Language Feature | DTDs | RELAX NG | Schematron | W3C XML Schemas |
---|---|---|---|---|
Unordered content | Yes[a] | Yes | Yes | Yes[b] |
Simple datatypes | Some[c] | Yes[d] | Yes[e] | Yes[f] |
Enumerations | Some[g] | Yes | Yes | Yes |
Default values | Some[g] | Some[h] | No | Yes |
Pattern matching | No | Yes[i] | Yes[j] | Yes |
Exclusions | Yes | Some[k] | Yes | Some[k] |
Pernicious mixed content | Yes | Yes | Yes | No |
Empty mixed content | No[l] | No | Yes | No |
[a] Using the "&" connector of SGML. [b] At the top-level of an element declaration [c] There are a tiny set of data types. [d] Datatype library identified by URI [e] The simple datatypes of XPath natively and others by expressions on the lexical and value spaces. [f] W3C XML Schema Part II datatypes [g] On attribute values only. [h] Only on attributes and only with RELAX NG DTD Compatibility. [i] If provided by the datatype library (e.g., W3C XML Schema Part 2: Datatypes). [j] Not regular expressions, but using string and other functions in expressions. [k] By content model manipulation [l] Generates a warning. |