Re: Attributes and Default Namespaces

Mukul Gandhi <[email protected]>
Newsgroups gmane.text.xml.schema.devel
Message-ID <[email protected]>
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 <[email protected]> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.