cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Crossley <>
Subject towards reliable */sitemap.xmap
Date Thu, 08 Nov 2001 08:25:46 GMT
The sitemap.xmap files are looming as a potential point of
failure for Cocoon. Various apsects are a worry.

The *.xmap files do not declare their ruleset. (This could
be a DTD or Schema, but let us stick with DTDs for now.)
They do not declare their DTD, therefore they are basically
free-form XML and do not need to adhere to any structural
rules (other than to be well-balanced XML).

This sounds dangerous - it is too easy to break a sitemap.

It seems that the structure of the sitemap has been developed
in an ad hoc fashion, adding elements and attributes to the
*.xmap without defining them anywhere.

Fortunately, there is an initial sitemap DTD. Around 2001-07
Jeffrey Ricker developed an initial DTD to simply reflect the
structure of the sitemaps at that time (a complicated task,
to work in reverse). Since then, the sitemaps must have
changed a lot (many elements and attributes are not declared).
So i have built on Jeffrey's work to develop V0.2 - you can
find this in CVS at webapp/resources/entities/sitemap-v02.dtd
(There are still many issues in this DTD that are not addressed.)

Anyway, none of the sitemaps in the current distribution
can pass validation using this new DTD - they are all 
inconsistent in some way. (Note that the contraints imposed
by this DTD have already been vastly relaxed, just in an effort
to document the current structure.)

Another major issue is that the build process seems to have
no way to validate the sitemaps against this DTD. (I have been
doing it via separate direct processing w command-line parser.)
Even though the new "build docs" can now do validation,
it does not try to validate the sitemap. It seems that a
completely separate parser is directly used (i.e. not using

The big worry is that the development process for the
sitemap structure is haphazard. This is partly due to there
being no validation of xmaps during the build or when it

--David Crossley

To unsubscribe, e-mail:
For additional commands, email:

View raw message