I agree. This is extremely powerful.
Eliot, I would be willing to help with any editorial work as well.
Thanks and best regards,
--Scott
Scott Hudson | Pelco by Schneider Electric | United States | Standards Lead
Ph: +1-970-282-1952 | M: +1-720-663-7268 | Site: pdn.pelco.com |
On 5/22/12 10:31 PM, "Eliot Kimber" <> wrote:
> George Bina from SynchroSoft (OxygenXML) has developed a technique and
> supporting software for using RelaxNG for defining DITA vocabulary modules.
> He has made this work available through the open-source dita-ng project:
> http://code.google.com/p/dita-ng/. This project provides a complete RelaxNG
> expression of the DITA 1.2 vocabulary and constraint modules and document
> type shells.
>
> George presented on his work at the DITA North America conference and those
> of us who saw it were very excited.
>
> To date, the main barrier to using RelaxNG for DITA vocabulary has been that
> RelaxNG did not have a built-in mechanism for defining default attribute
> values. This made it unsuitable for normal DITA use where we don't want the
> @class and @domains attribute explicit in our source documents.
>
> RelaxNG now has a companion specification that provides a way to define
> attribute defaults. George has implemented processing for this specification
> as an extension to the standard RelaxNG Java library (and has or will
> contribute that code back to the main projects). It works with any
> Java-based process that can add the necessarily libraries, including the
> DITA Open Toolkit.
>
> With the ability to define default attributes through RelaxNG, it now
> becomes possible to use RelaxNG with DITA documents just as you would DTDs
> or XSDs.
>
> That's useful in and of itself.
>
> But what really got us excited was the way that RelaxNG's design makes it
> about as easy as it could possibly be to do module integration and
> constraint.
>
> Here is the RelaxNG for the module inclusions for the topic document type
> shell
>
> <!-- Include modules -->
> <include href="../../base/rng/topic.mod.rng">
> <!--
> Redefine the infotype entity to exclude
> other topic types and disallow nesting
> -->
> <define name="topic-info-types">
> <ref name="topic.element"/>
> </define>
> </include>
> <include href="../../base/rng/highlightDomain.mod.rng"/>
> <include href="../../base/rng/utilitiesDomain.mod.rng"/>
> <include href="../../base/rng/indexingDomain.mod.rng"/>
> <include href="../../base/rng/hazardstatementDomain.mod.rng"/>
> <include href="abbreviateDomain.mod.rng"/>
> <include href="uiDomain.mod.rng"/>
> <include href="programmingDomain.mod.rng"/>
> <include href="softwareDomain.mod.rng"/>
>
>
> That's it. Each module declares how it contributes itself to the larger
> whole like so:
>
> The @domains contribution:
>
> <define name="domains-atts-value" combine="choice">
> <value>(topic abbrev-d)</value>
> </define>
>
> Content model extensions:
>
> <!-- Define domain extension patterns -->
> <define name="abbrev-d-term">
> <ref name="abbreviated-form.element"/>
> </define>
>
> <!-- Extend the patterns with the domain contribution -->
> <define name="term" combine="choice">
> <ref name="abbrev-d-term"/>
> </define>
>
>
> This is simply saying that the <term> element's content is extended by
> adding <abbreviated-form> as an additional choice.
>
> What this means in practice is that the integration of modules is done
> simply by referencing the modules you want--each module manages its own
> integration details. There is no separate integration configuration
> activity.
>
> This makes RelaxNG very attractive as the primary form of vocabulary
> definition *as long as* one can then reliably generate the DTD and XSD
> versions of the vocabulary. George is working on implementing that process
> now and I will probably do some work on it as well.
>
> Personally, I'm very excited about this because it gives me the potential to
> greatly simplify the task of defining and maintaining large vocabulary sets,
> such as DITA for Publishers and allows the easy provisioning of both DTD and
> XSD forms.
>
> RelaxNG also provides for embedding Schematron rules directly in the RelaxNG
> documents, meaning that a single document can define both the base XML rules
> and additional rules checkable through Schematron processing (this is also
> possible in XSD 1.1 with its new "assertion" feature, but support for XSD
> 1.1 is still not universal).
>
> RelaxNG also provides for embedded documentation (similar to how you can do
> it in XSD).
>
> Even if you never used the RelaxNG modules directly with documents, they
> would have tremendous value as the development source for the working
> modules.
>
> Given all that, I would like to propose the inclusion of RelaxNG as a
> recognized DITA schema language in addition to DTD and XSD. I am more than
> willing to act as champion for this proposal and do the editorial work.
>
> Cheers,
>
> Eliot
>