W3C home > Mailing lists > Public > xmlschema-dev@w3.org > May 2004

Re: Resolving ID usage in schemas

From: Xan Gregg <xan.gregg@jmp.com>
Date: Wed, 12 May 2004 15:31:11 -0400
Message-Id: <EC84E544-A44A-11D8-8AEC-000393BB384C@jmp.com>
Cc: <xmlschema-dev@w3.org>
To: "Bagepalli, Kiran" <kbagepalli@informatica.com>

> Does that mean the below set of schemas are valid? Does ID attribute 
> have applicability only with respect with the XML representation and 
> not with the includes?

Yes to both.

xan

On May 12, 2004, at 2:28 PM, Bagepalli, Kiran wrote:
> I had a question on  id handling in schemas.
>
> For eg. if I have schema A.xsd
>
> <xsd:schema id="ABC">
>   <xsd:include schemaLocation="B.xsd">
>   <xsd:element name="x" type="xsd:string">
> </xsd:schema>
>
> schema B.xsd
>
> <xsd:schema id="ABC">     //HERE ABC value is repeated as a id
> </xsd:schema>
>
> If we look at A.xsd as standalone XML having a id attribute it is
> unique.
> However since it includes B.xsd does the id declared here considered a
> duplicate.
Received on Wednesday, 12 May 2004 15:32:03 GMT

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