Re: [xml] Potential wrong usage of xmlIsID() in tree.c

Daniel Veillard wrote:
On Fri, Feb 24, 2006 at 07:04:46AM -0500, Rob Richards wrote:
Daniel Veillard wrote:
On Fri, Feb 24, 2006 at 06:33:54AM -0500, Rob Richards wrote:
Based on a DTD or the xml:id spec, an attribute must have an element to be considered an ID.
 True for DTD as far as I know, but I don't see where you get this
>from the xml:id spec, both the processing section and the section
about application interface drop any requirement at the containing
element level:
Doesn't mean that the element must be present?

The following information items must be present in the input infosets to enable correct processing:

  *   Element Information Items with attributes property.

 True, but it's a generic requirement from xml:id to Infoset, i.e.
that the toolkit must be able to provide element informations to garantee that xml:id can work on top of it.
It doesn't mean that if an attribute is standalone at some point
then it's idness should be asserted, but that for the spec as a whole
to function (i.e. being able to use xml:id in a framework) then
the infoset framwork must support element informations. I still
think the property of the attribute in that case is not dependant
of the element presence, but we can't garantee it will work in all
frameworks, and for example an xpath id() query won't ve able to find
okay I understand that point now. Any reason it just wasn't explicitly stated in the spec that an element is not required (it would have made it much clearer) because after reading the following I still would have expected one to be: "It has been a guiding principle in the design of this specification that the result of xml:id processing should be the same as if an appropriate declaration has been seen and used by the processor."

Reading that I know an element is required for an attribute to be an ID type, so assumed that it would be required for xml:id.

Thanks for the explanations though. Does this mean then that in the unlink and replace functions it should never remove idness for any attribute or should only remove it from non xml:id ones?


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]