FW: Clarification of id() and idref()

Forwarding to public comments list.

All the best, Ashok
> -----Original Message-----
> From: w3c-query-operators-request@w3.org [mailto:w3c-query-operators-
> request@w3.org] On Behalf Of Kay, Michael
> Sent: Wednesday, April 16, 2003 10:11 AM
> To: w3c-query-operators@w3.org
> 
> 
> The id() and idref() functions both say that they find nodes "in the
same
> document" as the context node, raising an error if the context item is
not
> a
> node.
> 
> I would like the specs to be clarified to say that if the context item
is
> a
> node in a tree whose root is not a document node, these two functions
> return
> an error. I think this is probably the intent of the current specs but
it
> should be spelt out explicitly.
> 
> I suggest the following wording:
> 
> "An error is raised [No context document] if there is no context item,
or
> if
> the context item is not a node, or if the context item is a node in a
tree
> whose root is not a document node."
> 
> (In principle it's possible to define these functions over
non-document
> trees. But it's a hassle for implementations, it adds little value for
> users, and it conflicts with the principle that we only do ID/IDREF
> constraint validation on entire documents).
> 
> Michael Kay
> 

Received on Friday, 18 April 2003 08:32:25 UTC