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

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook 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]


Jirka Kosek wrote:
> Grosso, Paul wrote:
> 
>>> ACTION: Jirka to analyze RelaxNG without Schematron.
>> I'd be interested to know what constraints can only
>> be validated by Schematron, and what constraints can 
>> be validated by RelaxNG but not XSD.
> 
> Sure, my intention was to compare all DocBook 5.0 schemas available,
> including XSD and DTD.

Hi,

please find attached schema comparison. I have used fancy Unicode
characters inside table -- if it is too much for your browser, let me
know I will regenerate document with simple "Yes/No" words.

I tried to be concise, but if you think that description should be more
elaborative let me know -- I just didn't want repeat whole schema in
prose in this first draft.

I think that after some discussion and corrections we can put this
inside how-to, so people can easily see which constraints can be checked
in particular schemas.

Also note that the current W3C XML Schema can be little bit improved
because now it is converted from DTD. James Clark recently started
working again on Jing/Trang -- so may be if we are able to isolate
problems on which Trang choked in our RELAX NG schema, he can fix Trang
and we can easily get W3C XML Schema without our custom DTD step.

Comments welcomed!

			Jirka

-- 
------------------------------------------------------------------
  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

11/13/2008


Table 1. Schema Comparison

DescriptionDTDW3C XML SchemaRELAX NGRELAX NG + Schematron/NVDL
Basic document structure
ID/IDREF datatypes
Datatypes[a]
Co-occurrences[b]
Hooks for MathML and SVG content
Link type integrity[c]
Presence of version attribute on the root element
Miscellaneous checks[d]
Element exclusions[e]

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

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