DTD Datastore class.
Simple class providing a query interface to the underlying DTD DOM implementation.
The intension is to hide this underlying implementation as much as possible so it
can be changed in the future. See
At the moment this class uses the com.wutka DTD parser. We've also tried some
other DTD parsers but they all had the same missing feature which was that they
didn't keep attribute typing info (implemented using entities). This would
be a very valuable feature for the purposes of this module.
In the example below, it would have been usefull to have been able to look at
the xmlns attibute and recognise the fact that it was used to hold URI data.
<!ELEMENT html (head, body)>
id ID #IMPLIED
xmlns %URI; #FIXED 'http://www.w3.org/1999/xhtml'
is defined as:
<!ENTITY % URI "CDATA">
<!-- a Uniform Resource Identifier, see [RFC2396] -->
If this information was available we could target
at elements containing "URI" attributes.
Another examples of this idea of using DTD ENTITY definitions to target
org.milyn.delivery.ContentHandlers at specific elements (rather than using the element names)
might be using ENTITYs like the following (from http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd):
<!ENTITY % heading "h1|h2|h3|h4|h5|h6">
<!ENTITY % lists "ul | ol | dl | menu | dir">
<!ENTITY % blocktext "pre | hr | blockquote | address | center | noframes">
<!ENTITY % block
"p | %heading; | div | %lists; | %blocktext; | isindex |fieldset | table">
<!-- %Flow; mixes block and inline and is used for list items etc. -->
<!ENTITY % Flow "(#PCDATA | %block; | form | %inline; | %misc;)*">