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

 


Help: OASIS Mailing Lists Help | MarkMail Help

relax-ng message

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


Subject: Re: Including relax-ng schema in my schema?


The following RELAX NG pattern should work:

<element xmlns="http://relaxng.org/ns/structure/0.9" name="MyDocument">
...
  <element name="StructureDefinition">
    <externalRef href="relaxng.rng"/>
  </element>
...
</element>

where relaxng.rng is a RELAX NG pattern for RELAX NG.

If you want to test this out using the Jing RELAX NG validator, make sure
you use the RELAX NG pattern for RELAX NG at thaiopensource.com rather than
the one at OASIS. I believe the pattern at OASIS reflects changes in the
spec that haven't yet been implemented in Jing.

Regards,
Josh

Joshua Lubell, NIST
100 Bureau Drive, Stop 8263
Gaithersburg MD 20899-8263 USA
(301) 975-3563
lubell@nist.gov

----- Original Message -----
From: "Matthew MacKenzie" <matt@xmlglobal.com>
To: "relax-ng" <relax-ng@lists.oasis-open.org>
Sent: Wednesday, August 01, 2001 12:16 PM
Subject: Including relax-ng schema in my schema?


> In reading the spec and tutorial, it is not clear to me how I would
> define my own pattern which contains the relax-ng pattern.  Here is
> basically what I want to do:
>
> <MyDocument>
> <!-- ... -->
>  <StructureDefinition xmlns:rng="http://relaxng.org/ns/structure/0.9">
>   <rng:grammar ns="http://mydocument.com/ns/1.0">
>         <rng:start><rng:ref name="name" /></rng:start>
>         <rng:define name="name">
>             <rng:element name="Name"><rng:text /></rng:element>
>         </rng:define>
>    </rng:grammar>
>  </StructureDefinition>
> <!-- ... -->
> </MyDocument>
>
> How exactly do I enable this in the relax-ng schema for MyDocument?  In
> a DTD, I might do this:
>
> <!ENTITY % rng SYSTEM "rng.dtd">
> %rng;
> <!ELEMENT MyDocument (StructureDefinition)>
> <!ELEMENT StructureDefinition (grammar|element)>
>
>
> Thanks in advance,
>
> Matthew MacKenzie
> XML Global
>
>
>
> ------------------------------------------------------------------
> To unsubscribe from this elist send a message with the single word
> "unsubscribe" in the body to: relax-ng-request@lists.oasis-open.org
>
 


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


Powered by eList eXpress LLC