- From: Mukul Gandhi <gandhi.mukul@gmail.com>
- Date: Sat, 13 Nov 2010 17:56:08 +0530
- To: Pete Cordell <petexmldev@codalogic.com>
- Cc: Neil Beddoe <Neil.Beddoe@raidllp.com>, xmlschema-dev@w3.org
Thanks Pete for the references. It helps. Sorry I didn't cross check the definition of xs:anyType against schema for schemas. It helps me to learn that as well. On Sat, Nov 13, 2010 at 2:38 PM, Pete Cordell <petexmldev@codalogic.com> wrote: > Hi Mukul, > > I'm afraid I disagree with your assessment here. After a bit of digging I > think the following is the issue. > > In the schema for schemas, xs:anyType is declared as: > > <xs:complexType name="anyType" mixed="true"> > <xs:annotation> > <xs:documentation> > Not the real urType, but as close an approximation as we can > get in the XML representation</xs:documentation> > </xs:annotation> > <xs:sequence> > <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/> > </xs:sequence> > <xs:anyAttribute processContents="lax"/> > </xs:complexType> > > The issue is the processContents="lax" on the two wildcards. > > When the XML parser finds <Row> in the results, it realises its got a > definition for that and starts validating against it. Then we're back to > the issue that the attributes should be qualified because they are global, > but they are not because the default namespace doesn't affect attributes. > > For the record, on Visual Studio 2008 the following XML validates fine: > > <Results xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns="http://raid.raidllp.com" > > <RowOther> > <FieldOther FieldID="1234" FieldType="Ticker" Name="Ticker">CARLB DC > Equity</FieldOther> > <FieldOther FieldID="1234" FieldType="String" Name="Name">CARLSBERG > AS-B</FieldOther> > </RowOther> > </Results> > > HTH, > > Pete Cordell > Codalogic Ltd > Interface XML to C++ the easy way using C++ XML > data binding to convert XSD schemas to C++ classes. > Visit http://codalogic.com/lmx/ or http://www.xml2cpp.com > for more info -- Regards, Mukul Gandhi
Received on Saturday, 13 November 2010 12:31:29 UTC