If you apply the given XPath, you get a nodeset. For each node in the nodeset, you can traverse recursively through its parents back to the document root, thus constructing the path. You have to take into account the type of node in the nodeset (treatment is slightly different for element, attribute and text nodes) for the first step.
Jeff ----- Original Message ----- From: "Lingzhi Zhang" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, June 04, 2003 12:03 AM Subject: get a complete path from Xalan > > Hi, > > I am new to Xalan. I am trying to use Xalan to get a complete path > for a given XPath expression. For example, for a given XPath expression > like /A//B/ and XML document foo.xml, I am looking for all the possible > path in foo.xml, which starts with A and ends with B, such as /A/C/B, > A/D/E/B ... --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
