- From: Pete Cordell <petexmldev@codalogic.com>
- Date: Fri, 12 Feb 2010 12:42:27 -0000
- To: <xmlschema-dev@w3.org>
Oops, scrub that.
I got confused about the difference between:
<xs:element name="AName" />
and:
<xs:complexType name="AName"/>
Sorry for the interruption.
Pete Cordell
Codalogic Ltd
Interface XML to C++ the easy way using XML C++
data binding to convert XSD schemas to C++ classes.
Visit http://codalogic.com/lmx/ or http://www.xml2cpp.com
for more info
----- Original Message -----
From: "Pete Cordell" <petexmldev@codalogic.com>
To: <xmlschema-dev@w3.org>
Sent: Friday, February 12, 2010 12:33 PM
Subject: Confused about instance validation
>
> I have the following schema:
>
> <xs:schema
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
> targetNamespace="http://codalogic.com/schemas/UnexpectedAttribute.xsd"
> xmlns="http://codalogic.com/schemas/UnexpectedAttribute.xsd"
> elementFormDefault="qualified">
>
> <xs:element name="MyElement" type="MyType"/>
>
> <xs:complexType name="MyType"/>
> </xs:schema>
>
> And then the following XML instance:
>
> <MyElement xmlns="http://codalogic.com/schemas/UnexpectedAttribute.xsd"
> AnAttribute="AnAttribute"/>
>
> Both Microsoft and XSV report the instance as invalid because the
> attribute is unexpected.
>
> However, I would have thought that MyType is effectively xs:anyType which
> allows an attribute wildcard with any namespace and lax processing. Hence
> the instance should be valid.
>
> Does anyone have any opinions?
>
> Thanks,
>
> Pete Cordell
> Codalogic Ltd
> Interface XML to C++ the easy way using XML C++
> data binding to convert XSD schemas to C++ classes.
> Visit http://codalogic.com/lmx/ or http://www.xml2cpp.com
> for more info
>
>
>
>
>
Received on Friday, 12 February 2010 12:43:15 UTC