diff options
Diffstat (limited to 'org/madore/damlengine/TodoEntryElement.java')
-rw-r--r-- | org/madore/damlengine/TodoEntryElement.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/org/madore/damlengine/TodoEntryElement.java b/org/madore/damlengine/TodoEntryElement.java index 8b38881..78bffd1 100644 --- a/org/madore/damlengine/TodoEntryElement.java +++ b/org/madore/damlengine/TodoEntryElement.java @@ -24,7 +24,8 @@ public final class TodoEntryElement extends TodoDefaultElement { @Override public void handleNodeOnly() { - if ( ! ( caller instanceof TodoWeblogElement ) ) + if ( ! ( caller instanceof TodoWeblogElement + || caller instanceof TodoWeblogSelectElement ) ) throw new IllegalArgumentException("entry node can only be child of weblog node"); Element div = ctx.doc.createElementNS(DamlEngine.XHTML_NS, "div"); @@ -35,11 +36,11 @@ public final class TodoEntryElement extends TodoDefaultElement { String entryNumberStr = node.getAttributeNS(null, "number"); if ( ! Pattern.matches("^\\d{4}$", entryNumberStr) ) - throw new IllegalArgumentException("title number attribute must be of the form NNNN"); + throw new IllegalArgumentException("entry number attribute must be of the form NNNN"); String entryDateStr = node.getAttributeNS(null, "date"); Matcher entryDateMatcher = Pattern.compile("^(\\d{4})-(\\d{2})-(\\d{2})$").matcher(entryDateStr); if ( ! entryDateMatcher.matches() ) - throw new IllegalArgumentException("title date attribute must be of the form YYYY-MM-DD"); + throw new IllegalArgumentException("entry date attribute must be of the form YYYY-MM-DD"); String entryYearStr = entryDateMatcher.group(1); String entryMonthStr = entryDateMatcher.group(2); String entryDayStr = entryDateMatcher.group(3); |