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: [relax-ng] converting relax ng schema to w3c schema?


On Thu, 2002-06-20 at 09:40, James Clark wrote:
> 

> I don't see the issue with this one (but you know much more about W3C XML
> Schema than me). Currently I produce:
> 
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"; version="1.0">
>   <xs:element name="foo">
>     <xs:complexType>
>       <xs:sequence>
>         <xs:element ref="bar"/>
>       </xs:sequence>
>     </xs:complexType>
>   </xs:element>
>   <xs:element name="bar">
>     <xs:complexType>
>       <xs:sequence minOccurs="0" maxOccurs="unbounded">
>         <xs:element ref="bar"/>
>       </xs:sequence>
>     </xs:complexType>
>   </xs:element>
> </xs:schema>

Sorry I should have been more explicit... This WXS is accepting <bar/>
as an instance document while the RNG one was requiring a "foo" element
as a document element. This may make a big difference to some users.

A way to define elements which cannot be document elements with WXS is
to embed them in groups:

<xs:group name="isolatedBar">
   <xs:element name="bar">
    <xs:complexType>
       <xs:sequence minOccurs="0" maxOccurs="unbounded">
         ?????
       </xs:sequence>
     </xs:complexType>
   </xs:element>
</xs:group>

but here, you can't replace the "?????" by a reference to "isolatedBar"
since recursive groups are forbidden.

What I meant here is that there are so many nasty "special cases" and
"small restrictions" withn WXS that it will be very difficult to
establish general rules to produce the "closest" WXS.

Eric

> 
> James
> 
> 
> 
> 
> 
-- 
See you in San Diego.
                               http://conferences.oreillynet.com/os2002/
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------



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


Powered by eList eXpress LLC