RE: XSLT function "path()" required

Thank you for the comment.

This has been requested before, but it's not actually simple to do, because
of the context-dependency of namespace prefixes. People usually suggest a
path in a nice human-readable format like the one you have given, but in
general this would be tied to a particular set of namespace declarations. It
would of course be possible to produce a context-free path, or indeed an
XPointer, but it's not clear exactly what people want. Some people of course
want a path that could then be used to find the node again, but we have
explicitly decided not to include in XSLT 2.0 the ability to execute an
XPath expression obtained dynamically from a string.

It's not difficult to write a function to construct a path like the one
shown as a user-written function, or to find one that someone else has
already written.

Regards,

Michael Kay

> -----Original Message-----
> From: Huberson Jean [mailto:jean.huberson@free.fr] 
> Sent: 25 September 2003 20:06
> To: public-qt-comments@w3.org
> Cc: HUBERSON Christian
> Subject: XSLT function "path()" required 
> 
> 
> 
> Dear sirs,
> 
> I have been working with XSLT files quite a lot and I think 
> that a function that could give the absolute path of the 
> current node would be very useful in cases where you have no 
> idea about the structure of the XML file you are processing. 
> The result returned by the "path()" function would look 
> something like this: "/book/chapter[2]/paragraph[5]/title"
> 
> Hope you will also see the interest of integrating such a 
> function in the new XSLT 2.0 specifications,
> 
> Best regards,
> 
> Christian Huberson
> 
> christian.huberson@imag.fr
> 

Received on Friday, 26 September 2003 10:01:22 UTC