From a44f33b4801ce6f9bc4607cb4d71fca2d20bb7be Mon Sep 17 00:00:00 2001 From: Jirka Kosek Date: Tue, 16 Jun 2009 11:59:04 +0000 Subject: [PATCH] Added schema comparison table --- docbook/relaxng/docbook/howto/howto.css | 3 + docbook/relaxng/docbook/howto/howto.xml | 139 +++++++++++++++++++++++- 2 files changed, 141 insertions(+), 1 deletion(-) diff --git a/docbook/relaxng/docbook/howto/howto.css b/docbook/relaxng/docbook/howto/howto.css index 6253d96b9..8df1626ab 100644 --- a/docbook/relaxng/docbook/howto/howto.css +++ b/docbook/relaxng/docbook/howto/howto.css @@ -58,3 +58,6 @@ dl { margin-left: 3em; padding: 1px; font-size: smaller; text-transform: uppercase } + +.yes { color: green; } +.no { color: red; } diff --git a/docbook/relaxng/docbook/howto/howto.xml b/docbook/relaxng/docbook/howto/howto.xml index 8621d341e..d307f6ecd 100644 --- a/docbook/relaxng/docbook/howto/howto.xml +++ b/docbook/relaxng/docbook/howto/howto.xml @@ -1,6 +1,12 @@ + +YES"> +NO"> ]>
+DocBook V5.0 document. See for +summary of constraints that are checked by different schemas. DTD and W3C XML Schema versions of the DocBook V5.0 grammar are provided as a convenience for users who want to use DocBook V5.0 with legacy tools @@ -228,6 +235,136 @@ constraints DocBook V5.0 uses Schematron. We recommend that you validate your document against both the RELAX NG and Schematron schemas. + + Schema Comparison + + + + + + + + + + Description + DTD + W3C XML Schema + W3C XML Schema + Schematron + RELAX NG + RELAX NG + Schematron/NVDL + + + + + Basic document structure + &yes; + &yes; + &yes; + &yes; + &yes; + + + ID/IDREF datatypes + &yes; + &yes; + &yes; + &yes; + &yes; + + + Datatypes + In a very few places RELAX NG specifies datatype + like number (mainly for length specifications) or + enumeration between 0 and + 1. + In general those datatypes can be also supported in + W3C XML Schema, but currently this schema is generated + from DTD which lacks datatype information. + + + &no; + &no; + &no; + &yes; + &yes; + + + Co-occurrences + RELAX NG grammar enforces exclusivity of several + elements. For example if you have title inside + info then it is not allowed to have another + title outside info. Similarly, + models of HTML and CALS tables are separated and validated + properly, where in DTD and WXS only union of both models is + available. + On other places co-occurrences enforces particular + content model based on presence of specific attribute or + attribute value. + Please also note that in theory co-occurences can be + validated using Schematron, but the current DocBook schema + uses RELAX NG for these definitions. Schematron can be used + only for validation, whereas grammar based schemas like + RELAX NG are useful also for other purposes like guided editing. + + &no; + &no; + &no; + &yes; + &yes; + + + Hooks for MathML and SVG content + &no; + &no; + &no; + &yes; + &yes; + + + Link type integrity + Check whether ID/IDREF links are pointing to element + of corresponding type. For example that + footnoteref points to + footnote. + &no; + &no; + &yes; + &no; + &yes; + + + Presence of version + attribute on the root element + &no; + &no; + &yes; + &no; + &yes; + + + Miscellaneous checks + For example consistency of segmented lists, only one + term inside term definition etc. + &no; + &no; + &yes; + &no; + &yes; + + + Element exclusions + Prevents improper nesting of elements, like admonition + inside admonition. + &no; + &no; + &yes; + &no; + &yes; + + + +
+
Where to get the schemas -- 2.40.0