OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-tc message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Re: [docbook-tc] RelaxNG et al. [was: DocBook Technical CommitteeMeeting Minutes: 17 September 2008]

Grosso, Paul wrote:
> Pardon my ignorance, as I haven't used Schematron, but.... 
> I note the last column is "RELAX NG + Schematron/NVDL". Wha'ts NVDL?

NVDL is meta-schema validation language which can very easily describe
how to validate compound documents (with elements from various
namespace) and how to validate parts of document against multiple
schemas at the same time.

DocBook V5.0 uses NVDL to validate document against both RELAX NG and
Schematron schema. So effectively this is same as RELAX NG + Schematron
validation, but from user point of view this is only single validation
against NVDL schema which internally invokes validation against two
schemas. See:


> Is there such a thing as W3C XML Schema + Schematron?  If so, what
> would a column in this table look like for that combination?

Good question. Actually few minutes after I send the first draft this
idea also come across my nose. Please find attached updated table.


  Jirka Kosek      e-mail: jirka@kosek.cz      http://xmlguru.cz
       Professional XML consulting and training services
  DocBook customization, custom XSLT/XSL-FO document processing
 OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 member
Title: DocBook V5.0 Schema Comparison

DocBook V5.0 Schema Comparison

Jirka Kosek


Table 1. Schema Comparison

DescriptionDTDW3C XML SchemaW3C XML Schema + SchematronRELAX NGRELAX NG + Schematron/NVDL
Basic document structureYESYESYESYESYES
Hooks for MathML and SVG contentNONONOYESYES
Link type integrity[c]NONONONOYES
Presence of version attribute on the root elementNONOYESNOYES
Miscellaneous checks[d]NONOYESNOYES
Element exclusions[e]NONOYESNOYES

[a] 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.

[b] 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.

[c] Check whether ID/IDREF links are pointing to element of corresponding type. For example that footnoteref points to footnote.

[d] For example consistency of segmented lists, only one term inside term definition etc.

[e] Prevents improper nesting of elements, like admonition inside admonition.

OpenPGP digital signature

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]