Bertrand Delacretaz wrote:
We talked about this at the GT and today again on irc, the goal is to allow structured comments in sitemaps, for example:
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0" xmlns:note="http://apache.org/cocoon/sitemap/annotations/1.0" >
<note:revision date="2003-12-05" author="bd">annotations added to sitemap today</note:revision>
<map:match pattern="">
<note:comment>no filename, generate list of samples</note:comment>
<map:generate src="foo.xml"/>
...
</map:match>
etc..
The TreeProcessor would ignore everything in the annotations namespace (Sylvain suggests adding a filtering XMLPipe just after the parser that reads the sitemap file).
Suggested namespace is http://apache.org/cocoon/sitemap/annotations/1.0
WDYaT?
Why not simply add element into the map namespace, such as map:annotation, or map:documentation, or something? Similar approach is used for XMLSchema files.
I prefer a separate namespace as it clearly makes the documentation and sitemap stuff orthogonal.
They *are* separate concerns: note: is for humans, map: is for Cocoon. I think a separate namespace is the logical model for this.
Apart from being slightly more complicated to implement, do you see other downsides to the namespace option?
I don't think performance is an issue as the sitemap filtering will only happen when the sitemap changes.
-Bertrand
