W3C home > Mailing lists > Public > xmlschema-dev@w3.org > January 2003

FW: Problem with processContents="lax" in MSV

From: Goldner Zvi <Zvi_Goldner@icomverse.com>
Date: Tue, 7 Jan 2003 16:47:08 +0200
Message-ID: <385D702A9C11D511A9E90008C7160AD53297A4@ismail1.comverse.com>
To: "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>
Can someone please help?
Am I missing something?
How can I fix the problem so the validation will not throw an error on such
case?
Zvi Goldner
 

-----Original Message-----
From: Goldner Zvi 
Sent: Tuesday, December 31, 2002 5:29 PM
To: 'xmlschema-dev@w3.org'
Subject: Problem with processContents="lax" in MSV




Hi all 
I am using MSV in order to validate XMLs, but I am facing a problem with the
lax processing. 
It seems like the lax is working fine with undeclared elements (it does not
validates elements which are not specified in the XSD), but it throws
validation error on undeclared elements, which contain attributes. This kind
of behavior does not happen in other validation tools (such as "XmlSpy" has,
for instance).

The XSD looks like: 
<xs:schema xmlns:xs=" http://www.w3.org/2001/XMLSchema
<http://www.w3.org/2001/XMLSchema> " elementFormDefault="unqualified"
attributeFormDefault="unqualified">

        <xs:element name="Root"> 
                <xs:complexType> 
                        <xs:sequence maxOccurs="unbounded"> 
                                <xs:any processContents="lax"
maxOccurs="unbounded"/> 
                        </xs:sequence> 
                </xs:complexType> 
        </xs:element> 
        <xs:element name="InnerElement" type="xs:boolean"/> 
</xs:schema> 
The XML looks like: 
<Root xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance
<http://www.w3.org/2001/XMLSchema-instance> "
xsi:noNamespaceSchemaLocation="C:\temp\lax.xsd"> 
        <InnerElement>true</InnerElement> 
        <UnDefineElement attr1="1"/> 
</Root> 
The error tells about "unexpected attribute 'attr1'". 
Is it a bug? 
Can someone help? 
Received on Tuesday, 7 January 2003 09:49:03 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:35 GMT