W3C home > Mailing lists > Public > public-xml-processing-model-wg@w3.org > April 2008

Short form of p:base-uri() and p:resolve-uri()

From: <Toman_Vojtech@emc.com>
Date: Fri, 25 Apr 2008 08:33:08 -0400
Message-ID: <6E216CCE0679B5489A61125D0EFEC7870ACDCD9A@CORPUSMX10A.corp.emc.com>
To: <public-xml-processing-model-wg@w3.org>

Just a question about p:base-uri() and p:resolve-uri() functions. Do we
really want the XProc implementations to support the no-argument version
p:base-uri() and p:resolve-uri(relative)? I mean, they can be always
expressed using the 'longer form':

p:base-uri() -> p:base-uri(.) 
p:resolve-uri(relative) -> p:resolve-uri(relative, p:base-uri(.))

I know we have two versions because XPath 2.0 has them, but at the same
time, we have introduced these new functions to provide functionality
that would otherwise be missing in XPath 1.0 based implementations. To
me, the 'short form' is just a convenience API for the user.

Actually, the main reason why I am asking is more prosaic: I am just
implementing these two functions using Java XPath API and it seems like
there is no way you can get a reference to the current context node in
the implementation of XPathFunction interface. Although I agree this is
more an implementation problem than a problem in the spec...

Regards,
Vojtech
Received on Friday, 25 April 2008 12:35:15 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 25 April 2008 12:35:16 GMT