Forwarded from Robin Covers news.

regards DaveP

Converting Annotated RELAX NG Schemas for Use in I-Ds or RFCs
Ladislav Lhotka (ed), IETF Internet Draft

This memo presents a method for annotating XML schemas expressed in
the RELAX NG language and transforming them to a form suitable for
direct inclusion in an XML source of an IETF Internet Draft (I-D) or
Request for Comments (RFC). The Extensible Stylesheet Language
Transformations (XSLT) stylesheet performing the transformation also
automatically generates cross-references between RELAX NG pattern
definitions and their references. In the context of IETF activities,
the most natural way of publishing and/or standardizing an XML schema
is to make it a part of an Internet Draft or RFC that describes the
application the schema is used for. However, including an annotated
schema directly in an I-D or RFC is not optimal since the annotations
wrapped in XML elements are clumsy and hard to read. XML comments are
better in this respect, but still the best option for rendering the
annotations is to convert them into standard paragraphs of the I-D or
RFC. The strategy presented here for annotating RELAX NG schemas and
transforming them for inclusion into XML source follows methods
documented in "Writing I-Ds and RFCs using XML" (RFC 2629). The method
presented in this memo is similar in spirit to "literate programming
in XML", which may be applied to arbitrary XML documents, for example
XSLT stylesheets. However, its main benefit, namely that it allows
for arbitrary modularization and reordering of the original document,
just duplicates the intrinsic functionality of RELAX NG based on the
"define" and "ref" elements. Therefore, the specialized XSLT stylesheet
rng2rfc.xsl is considerably simpler and yet achieves better results.

http://xml.coverpages.org/draft-lhotka-relaxng-to-rfc-00.txt

-- 
Dave Pawson
XSLT XSL-FO FAQ.
http://www.dpawson.co.uk

Reply via email to