Re: Confirmation of xml:id behaviour

Hi Daniel.

Daniel Veillard:
>   All I can say from an xml:id point of view is that the svg element
> will be reported as having an attribute xml:id of type ID to the 
> application processing the document and that the value of this
> ID is '1' (not '0').

Sorry, yeah meant to write '1' there, not '0'.

>   Everything else you seems to assume looks dependand on how the
> application interpret the XML, including the svg and script element,
> and that xml:id cannot garantee it in itself.

OK, so given Document.getElementById() says:

  Returns the Element that has an ID attribute with the given value. If
  no such element exists, this returns null.
    — http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-getElBId

I think it should alert true.

It just seemed surprising to me that invalid IDs were effectively
treated the same as valid ones, but if that’s what’s meant to happen,
I’ll go with it.

Thanks,

Cameron

-- 
Cameron McCormack, http://mcc.id.au/
 xmpp:heycam@jabber.org  ▪  ICQ 26955922  ▪  MSN cam@mcc.id.au

Received on Tuesday, 12 February 2008 11:25:25 UTC