W3C home > Mailing lists > Public > xmlschema-dev@w3.org > September 2006

Re: declaring xml:id attributes

From: Wolfgang Jeltsch <wolfgang@jeltsch.net>
Date: Fri, 15 Sep 2006 13:57:02 +0200
To: xmlschema-dev@w3.org
Message-Id: <200609151357.02433.wolfgang@jeltsch.net>

Am Freitag, 15. September 2006 03:22 schrieben Sie:
> You need a separate schema with namespace of xml, define your xml:id
> attribute there, and import it to your schema and use <xsd:attribute
> ref="xml:id"/>
> Huseyin Ulger

Ah, thanks.  This is, of course, very logical.

I have a related question.  As far as I remember, the xml:id specification 
says that an xml:id attribute must be declared as being of type ID.  Does 
this mean that it's illegal to declare an xml:id attribute which has a 
restriction of xsd:ID as its type?

If not, there is still one issue.  If I want to restrict the type of the 
xml:id attributes of one kind of element in one way and the type of the 
xml:id attribute of another kind of element in a different way then I seem to 
have a problem since with the approach you described you cannot declare 
different variants of xml:id attributes for different kinds of elements.

Best wishes,
Received on Friday, 15 September 2006 11:57:18 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:10 UTC