Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: invalid within XML-Spy, .NET and Xerces parsers but valid with the W3C validator

From: Kevin Braun <kbraun@-------.--->
To: Robert Melskens <robert.melskens@-----.--->
Date: 3/12/2009 5:43:00 AM
In addition to what Michael already said, here's a little additional 
explanation that points you toward where you run afoul of the spec...

The error Xerces gives is: rcase-Recurse.2: There is not a complete 
functional mapping between the particles.

Xerces seems to be following 2.2 at 
http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#cos-particle-restrict. 

It removes the "pointless" sequence, so that comp1A1 becomes:
   <xs:complexType name="complA1">
       <xs:complexContent>
           <xs:restriction base="complA">
               <xs:sequence minOccurs="0">
                       <xs:element name="B" minOccurs="0"/>
                       <xs:element name="C" minOccurs="0"/>
                       <xs:element name="D" minOccurs="0"/>
                       <xs:element name="E" minOccurs="0"/>
               </xs:sequence>
           </xs:restriction>
       </xs:complexContent>
   </xs:complexType>

However, after doing this, applying the rules for a sequence particle 
restricting a sequence particle 
(http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#rcase-Recurse) 
leads to the noted failure (element B would map to the original nested 
sequence, elements C..E don't map to anything).

Kevin

On 3/11/2009 4:39 AM, Robert Melskens wrote:
> Hi,
>  
> With the attached XML-Schema, a simplified version of one of our 
> schema's, we had some problems within XML-Spy.
> The schema contains a content-model, which is judged by XML-Spy as 
> invalid.
> I know how to solve this invalidness, but that solution conflicts with 
> the desired model.
>
> I wasn''t able to get a grip on the real source of this 'invalid' 
> message by XML-Spy.
> Why is it invalid to have a minOccurs of 1 on the sequence element? 
> So I decided to try another validator, it might give me more clues.
> I tried '_http://www.w3.org/2001/03/webdata/xsv_' enad surprisingly 
> the schema was judged here as valid.
>
> I concluded XML-Spy would probably have a bug because I put more trust 
> in a W3C validator.
>
> So I sent a bug-report to Altova. A moment ago they answered me. They 
> did test the schema also on a .Net and the Xerces paser and also those 
> parsers reported an error.
> Does this mean the W3C validator has a bug? If so, can you answer the 
> question above. The XML-Schema recommendation doesn't help me much.
>
> I attached the mentioned schema.
>
> Greetings,
>
> Robert Melskens
>
> *Atos Origin Nederland B.V.*
>

From vitywap@s... Thu Mar 12 14:27:01 2009
Received: from bart.w3.org ([128.30.52.63])
	by frink.w3.org 


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent