Re: declaring xml:id attributes

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,
Wolfgang

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