[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XML Schema (sequence) and MSXMLDOM question.


msxmldom
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
------------------------------------------------------------------------


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.