Bert Van Kets wrote: > I have been updating the sitemap DTD, using the > src\webapp\resources\entities\sitemap-v02.dtd file, and found that a lot of > attributes and elements are missing. ex. the logger attribute is not present.
Beware. Note the comments in the top of the DTD, wherein it says that the DTD has been reverse-engineered from the *.xmap files at that time. Note also that the DTD is deliberately lax, because it was just trying to document the structure rather than set up strict validation rules. That was seen as the first step. > I did it to use this DTD in XMLSpy to see all the possible attributes and > child elements of a given element. Great idea. At the time of the last revision, i was hoping to sort it out, so that i could use a tool that reads a DTD and automatically generates some user documentation. I also expected that XML validation was a crucial component. However, no-one seemed interested at the time. > Is there a specific reason why the DTD is out of sync with the current > sitemap, apart from that fact that Cocoon doesn't use the DTD. It has always been out of sync. A few brave souls have tried to update the DTD following on from some discussion item on the list. It seems that all work must happen in the actual Java classes. Design work, adding new elements and attributes, seems to not happen in XML-land. On occasion this makes me wonder if there is too much programmatic focus in Cocoon and not enough utilisation of the magic of reliable XML. If the build process, and sitemap generation process, started with a validation run then surely the Java code could rely on that and so be more efficient. > Does anybody have a full up-to-date sitemap DTD? > > If it doesn't exist yet I will update my file using all the existing > sitemaps in the current CVS HEAD and commit the new file. Please, please do. Other ways to verify the DTD would be to compare with xdocs for generators, transformers etc. and also with the various Javadocs. If you can manage some tweaks to xdocs as you go, then that would be fantastic. --David --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]