RELAX NG by Eric van der Vlist will be published by O'Reilly & Associates (ISBN: 0596004214)

You are welcome to use our annotation system to give your feedback.


XML or compact?

Figure�1 presents both syntaxes side by side:

There are two things which we immediately notice. The compact syntax is much more, well, compact. The XML syntax is, just as we'd expect, XML. It works well with generic XML tools (here a web browser) while the compact syntax isn't XML and must be used with other tools (here the text editor VIM with a plug-in that highlights RELAX NG's compact syntax).

These two statements summarize why they are both needed. The compact syntax is nice to work with and you'll probably find it more pleasant to edit your schemas and to document your vocabularies. On the other hand, the XML syntax is wonderful if you want to generate RELAX NG schemas the way we'll see in Chapter 14: Generating RELAX NG schemas or to generate anything out of your RELAX NG schemas using XML tools covered in Chapter 13: Annotating Schemas. The fact that we can translate from one syntax to the other without information loss guarantees that we can use either while having access to both.


You are welcome to use our annotation system to give your feedback.
[Annotations for this page]
All text is copyright Eric van der Vlist, Dyomedea. During development, I give permission for non-commercial copying for educational and review purposes. After publication, all text will be released under the Free Software Foundation GFDL.