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 10:17, James Clark wrote:
> > This WXS is accepting <bar/>
> > as an instance document while the RNG one was requiring a "foo" element
> > as a document element.
> Right.  WXS doesn't have a way to specify the root elements.  I think this 
> is just something that WXS users have to live with.
> > This may make a big difference to some users.
> It is a strange omission from WXS indeed.
> > A way to define elements which cannot be document elements with WXS is
> > to embed them in groups:
> That's not, in my view, a good idea.  The global/local element distinction 
> isn't designed to be a root element/non-root element distinction.  For 
> example, you can only use substitution groups on global elements.  If you 
> restrict yourself to using global elements only for root elements, lots of 
> things become significantly more inconvenient (eg multi-namespace schemas); 
> this is just not how WXS is designed to be used.

Yes, that's right, WXS is very wrong to mix both aspects. Users need to
find a balance between two nuisances (either accepting the bar may be
used as a root element or accepting that it cannot be used from another
namespace nor in a substitution group). Who knows which is the best
choice for the author of my original RNG schema? No automatic tool can
be sure to make the right choice and, if it needs to ask the question
for any such choices (this one is only an example), it might become as
difficult and complex for the user to answer those choices than to use
WXS :-( ...

> > <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.
> That's not how I interpret the spec.  Which schema processors disallow this?

My interpretation is based on a discussion with Henry Thompson:


And the spec seems rather clear:



> James
See you in San Diego.
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