Next in thread → Next in month →

Re: Including relax-ng schema in my schema?

From
Josh Lubell <>
Date
2001-08-01T18:10:56+00:00
ID
00e001c11ab4$f5efe660$
Thread
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


----- Original Message 
-----
From: "Matthew MacKenzie" <>
To: "relax-ng" 
<>
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: 
>
Next in thread → Next in month →