Layering Schemas
When considering the schema language that's appropriate for your needs, the following questions may help you decide.
Do you need to constrain element and attribute structures? If so, choose DTDs, the W3C XML Schema Language, or RELAX NG.
Do you need to define entities? If so, you'll need a DTD.
Do you need broad compatibility with existing software and systems? Choose DTDs.
Do you need a simple, human-authorable syntax? Choose RELAX NG.
Do you need to annotate elements and attributes, either with types or other information? If so, the W3C XML Schema Language is powerful.
Do you need to store the schema documents independent of the instance documents? Choose the W3C XML Schema Language, Schematron, or RELAX NG.
Do you need co-occurrence ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access