RE: base-uri clarification

> The data model document says:
>    Document, element, and processing-instruction nodes have a
>    base-uri property. If that property is non-empty, its value
>    is returned.
> 
>    If the accessor is called on a node that does not have a base-uri
>    property, or whose base-uri property is empty, the base-uri of that
>    node's parent is returned. If the node has no parent, an error is
>    raised.
> 
> The functions and operators document says:
> 
>    For document and element nodes, this function returns the value of
>    the base-uri property. For other kinds of node, it returns 
> the empty
>    sequence.
> 
> So if T is a text node that has a parent:
>    dm:base-uri(T) returns dm:base-uri(dm:parent(T)).
>    fn:base-uri(T) returns ().
> 
> If this is correct, perhaps it is worth a clarifying note.

Since functions in F&O aren't supposed to access data model properties
except via data-model accessors this is clearly NOT correct - thanks for
pointing it out.

I suspect that the F&O description should be changed to say it maps to the
DM base-uri accessor, rather than to the DM base-uri property.

Michael Kay

Received on Thursday, 13 February 2003 07:53:42 UTC