[Bug 3486] [XQuery] relative base URI

http://www.w3.org/Bugs/Public/show_bug.cgi?id=3486





------- Comment #7 from davidc@nag.co.uk  2006-08-16 20:07 -------
(In reply to comment #6)
> None of the xml attributes affect the static context during construction.

Yes, I think that's (probably:-) the right design, and anyway I don't suggest
changing it, but I do think that in this case it wouldn't harm to say it
explictly in the case of xml:base.
<a xml:base="http://a/b">
  <b xml:base="c"/>
</a>

is legal syntax both as XML and XQuery, but if the nodes are generated by an
XML parser that supports xml base, then the base uri of <b/> is
http://a/c but if the nodes are generated by an XQuery processor then
(according to comment #3) the base uri of <b/> will be the absolute URI
resulting from resolving "c" against the base URI of the static context of the
Query.
This is justifiable but I think it wouldn't harm if the spec explictly gave
such an example, as it may surprise people used to the way xml base works in
XML (and in XSLT2).

So am I right that comment #3 implies that the answer to the question in
comment #4 is

http://a/b/y

(I just want confirmation that I understand the proposal before agreeing to
it:-)


David

Received on Wednesday, 16 August 2006 20:07:48 UTC