This is the mail archive of the docbook@lists.oasis-open.org mailing list for the DocBook project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RELAX NG and DocBook


Elliotte Rusty Harold <elharo@metalab.unc.edu> writes:

> At 8:24 PM -0500 11/15/01, Norman Walsh wrote:
> 
> >My vision is to transition from a DTD to a RELAX NG Schema as the
> >normative schema for DocBook. From this RELAX NG Schema, we'll
> >mechanically generate maximally appropriate W3C XML Schemas and XML
> >and SGML DTDs.
> 
> I'm not that familiar with Relax. Can it handle the entity
> declarations DocBook needs?

Norm can answer this much better than I can, but I'll make an attempt,
and just hope I don't garble it too much or get anything wrong...

One of the distinguishing traits/benefits of RELAX NG validation is
that it makes no changes to the infoset of a document. Because of
that, you cannot use a RELAX NG schema to specify entities (or
notations), and you can't specify attribute defaults in RELAX NG
directly -- you have to use a separate-namespace annotation mechanism
instead (the "a:defaultValue" attribute):

  http://www.oasis-open.org/committees/relax-ng/compatibility-20011203.html#default-value

But I think most or all of the parameter entity reference in the
DocBook DTD can be handled in a RELAX NG schema using the RELAX NG
<externalref> element and "named patterns" (using the <define> and
<ref> elements) as discussed in the RELAX NG tutorial:

  http://www.oasis-open.org/committees/relax-ng/tutorial-20011203.html#IDAETYR

And for creating customization layers for a RELAX NG schema, the
language provides a way to override or replace element definitions --
covered in the "Replacing definitions" section of the tutorial:

  http://www.oasis-open.org/committees/relax-ng/tutorial-20011203.html#IDAVEZR

And James Clark has put together a tool, DTDinst, for converting
existing DTDs into XML syntax -- either valid RELAX NG syntax or an
intermediate XML syntax specific to DTDinst.

  http://www.thaiopensource.com/dtdinst/

The main purpose of the tool is to handle conversion of parameter
entities. The intermediate DTDinst syntax helps to make it a little
more lucid how the parameter entities are being converted than the
final RELAX NG syntax does.

Probably more information than you wanted, but hope it all helps, and
hope I haven't missed the point of the question -- and that Norm will
correct anything I may've gotten wrong.

   --Mike




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]