Hi Hussein, Le vendredi 14 janvier 2005 ? 16:51 +0100, Hussein Shafie a ?crit :
> For xsdvalid/XXE, <foo> elements can contain <bar> child elements and a > *single content model* is allowed for all these <bar> child elements. > > For xsdvalid/XXE, > > --- > type="xs:token" > --- > > and > > --- > type="xs:token" nillable="true" > --- > > clearly specifies two different *content models*. Sure! RELAX NG does support this kind of tricky models. Is that something you'll change if you support RNG? > The only sensible thing we can do is to document this behavior as being > a limitation of xsdvalid/XXE (well, we could also completely rewrite our > WXS validation engine but we currently do not plan to do that :-)). > > See also other limitations of xsdvalid/XXE: > http://www.xmlmind.com/xmleditor/_distrib/docs/xsdvalid/xsdvalid.html#id.s6.2 In fact, I am not so keen of this xsi:nil attribute (in fact I usually advise *not* using it) but I have a very simple case where I need to translate the content of an EDIFACT message which has contents such as: * ... * data1(mandatory) * data2(optional) * data1(optional) * ... and also: * ... * data1(optional) * data2(optional) * data1(optional) * ... And to meet these cases, the xsi:nil feature seems to be the only workaround around the numerous restrictions of WXS (and interpretations of these restrictions by the different implementations). If you've got some better idea, don't hesitate to share it! Eric (wishing we could all use RNG for all our projects) > > -- Curious about Relax NG? Read my book online. http://books.xmlschemata.org/relaxng/ ------------------------------------------------------------------------ Eric van der Vlist http://xmlfr.org http://dyomedea.com (ISO) RELAX NG ISBN:0-596-00421-4 http://oreilly.com/catalog/relax (W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema ------------------------------------------------------------------------

