On Fri, Sep 17, 2010 at 09:23:45AM -0400, markllama(a)redhat.com wrote:
[...]
I used Trang to translate from RelaxNG Compact format (RNC) to
RelaxNG XML format (RNG) and it appears that the annotations are maintained. The same is
not true when converting from RNC to XML Schema (XSD)
Mark McLaughlin thought it might be useful to start a discussion of the merits of using
RelaxNG as the canonical schema format. I find RNC very readable in a way that neither
RNG or XSD are. However, if the tools don't support them well, then it could add more
work than it's worth.
In general RelaxNG is a semantically very well defined schemas
language, while XSD doesn't have a well defined formal semantic (some
people managed to find their way though it and there is somehow less
incompatibilities between validators than in the past, but RNG is
from that viewpoint a better 'source' format).
RNG spec is clear, readable nearly by a beginner, a matter of minutes
before starting to use it, XSD spec is an abomination, but there is
many tutorials left and right, just never try to get the semantic from
the spec itself.
I never finished to implement the compact syntax, but honnestly
even the XML syntax of RNG is rather clear and unambiguous, this
part also give an edge to RNG over XSD, and for maintainance, patch
review etc..
The only advantage of XSD over RNG is that being more limited you
are garanteed to be able to implement a validator using a fixed amount
of memory dependant only on the schemas size and independantly of the
document size, but I don't think this point is a garantee in this
use case.
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit
http://xmlsoft.org/
daniel(a)veillard.com | Rpmfind RPM search engine
http://rpmfind.net/
http://veillard.com/ | virtualization library
http://libvirt.org/