| home / experts / xml / column59 |
|
xsi:schemaLocation attribute, which
allows an XML document instance to indicate the schema that should be
used to validate the document. This creates problems with security (the destination might have
changed or tampered with), interoperability (use of schemaLocation is optional)
and "purity" of schema definition: There is no way to prevent the document
containing magic xsi:* attributes, so the use of W3C XML Schema "infects" the
grammar you are defining.With these problems identified, Clark proposes the consideration of RELAX NG, designed under his lead by OASIS. RELAX NG merges Murata Makoto's RELAX and Clark's TREX. It is a simple, yet elegant evolution of the DTD, emphasizing ease-of-use, modularity, and focus on validation. It does not modify the infoset in the process of validation and avoids the problems of XML Schema listed above. RELAX NG is also part of an ISO draft standard, ISO/IEC DIS 19757-2.
More specifically RELAX NG improves on the XML Schema problems outlined above by providing:
&" to specify unorderd alternatives.
RELAX NG schemas were originally written in XML, but a compact non-XML syntax is also provided, which resembles a context-free grammar. This non-XML syntax provides a familiar view of the language that is comprehensible, and digestible by a parser.
The IETF's RFC on the use of XML and its statement of the recommended use of XML Schema created some resistance in the XML community. Section 1.2 of RFC 2026 states that two of the goals of the Internet Standards Process are: first, technical excellence; and second, clear, concise and easily understood documentation. Clark challenges that RELAX NG beats XML Schema in both categories and invites everybody who disagrees to compare the RELAX spec with the XML Schema spec. I tend to agree with him.
Produced by Michael Claßen
URL: http://www.webreference.com/xml/column59/2.html
Created: Jul 08, 2002
Revised: Jul 08, 2002