Carsten Ziegeler wrote:
Reinhard Poetz wrote:
Carsten Ziegeler wrote:
I started writing an XML schema for our sitemap. You can find a first
version in the 2.1.x branch at tools/src/sitemap-1.0.xsd.

My idea is to add schema validation to our tree processor engine in
trunk and validate a sitemap when it is read. Of course this will be
configurable and can be turned off.

I'm not interested in discussions whether XML schema is the best
solution for validation. But I'm interested to hear if others think that
this is a useful idea or not.
So far I've been happy with the validation performed by the tree processor. One problem with schema validation is that the error messages are often difficult to understand. It could also be confusing to our users if validation errors come from two different sources.
Hmm, yes, might be. The current validation of the tree processor is not
complete, for example it doesn't detect typos (try using map:prameter
for example).
The validation errors of the parser are very good imho, they tell you
exactly where which error occurs. In addition, they tell you which
elements are allowed, so you can spot typos etc. very easily.

probably it depends ;-)
I remember some weird error messages together with substitution groups and extension/restriction relationships but without having looked at the sitemap schema, I don't think it is that complicated.

As it will be configureable anyway and we already have all necessary libraries in our dependency graph, just add it. Whether we set schema validation to true or false per default, can be decided later on.

--
Reinhard Pötz Independent Consultant, Trainer & (IT)-Coach
{Software Engineering, Open Source, Web Applications, Apache Cocoon}

                                       web(log): http://www.poetz.cc
--------------------------------------------------------------------

Reply via email to