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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] XML Schema (sequence) and MSXMLDOM question.

[ Lists Home | Date Index | Thread Index ]

On Wed, 2003-11-26 at 19:07, Rodrigo Pinho Pereira de Souza wrote:

> In theory, the XML above, is it ok?

The XML is perfectly OK, but the schema isn't!

When you write:

             <xs:sequence>

                    <xs:element ref="nsSDSGeneral:PlugIn" minOccurs="0"
maxOccurs="unbounded"/>

                    <xs:element ref="nsSDSGeneral:SDSMenuItem"
minOccurs="0" maxOccurs="unbounded"/>

                    <xs:element ref="nsSDSGeneral:PlugIn" minOccurs="0"
maxOccurs="unbounded"/>

             </xs:sequence>

A schema processor can't tell if a sequence composed of only a single
"nsSDSGeneral:PlugIn" element matched the first or the second occurrence
and this type of "non determinism" is forbidden by the W3C XML Schema
rec.

>  I think yes, and XMLSpy load and validate this normally, but when I
> want to load this in MSXMLDOM, I get a fail.
>
> Any suggestions?

1) Don't use tools that are not conform to the rec ;-) 

2) either rewrite your schema to make it deterministic or use a schema
language that doesn't require that (ie RELAX NG).

Eric
-- 
Read me on Advogato.
                                         http://advogato.org/person/vdv/
Upcoming XML schema languages tutorials:
 - Philadelphia -full day- ( 7/12/2003)        http://masl.to/?V28612FC5
 - Santa Clara  -half day- (15/03/2004)        http://masl.to/?J24916E96
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS