On Tuesday, 11/27/2001 at 04:23 CET, Software AG <[EMAIL PROTECTED]>
wrote:
> You are right. Have spent quite some time thinking about it, but your
idea
> sounds reasonable and not too heavy weight.
Makes sense to me too...
> I will eventually add this code to my solution.
> Anyone interested in the new code then?
Definitely.
Even in its current incomplete form, we might want to start thinking about
adding it to the Xalan package as a first draft/prototype. It probably
belongs in org.apache.xpath.XPathAPI. The question is what name to give it.
String findPathToSingleNode(Node target,Node context)
would work, and makes clear that it's the inverse of selectSingleNode()...
but it's a bit wordy; a better name probably exists.
Another question to consider in a "production-quality" solution:
namespaces. I suspect we really ought to return a more complicated data
structure which includes the proper set of prefix declarations; the context
node may not define all the namespaces needed. Note too that the XPath
string may have to remap prefixes, since the same prefix may refer to
different namespaces at different points in the document.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]