[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: XML Encoding of XPath: Examples
- From: Evan Lenz <email@example.com>
- To: Dan Diebolt <firstname.lastname@example.org>, Wayne Steele <email@example.com>,firstname.lastname@example.org, email@example.com
- Date: Thu, 15 Mar 2001 15:47:54 -0800
Dan Diebolt wrote:
> Am I missing something here? Why would it
> be desirable to reform XPath into XML?
> What problem would this address?
It would address the problem of the programmatic manipulation of XPath
expressions. I don't think anyone's suggesting that XSLT should use an XML
syntax for XPath, but it would be nice if one could *view* an XPath
expression as XML, in order to leverage all of the familiar XML processing
tools, eg. DOM, SAX, and XSLT (which, of course, includes XPath itself).
One particular use case that I've come across is the manipulation of
existing XSLT stylesheets. XSLT can work quite well to make these
manipulations, but it does not work well for string parsing in general, and
parsing XPath expressions in particular. If I had, say, an extension
function that returned a root node containing the XML tree representation of
a particular XPath expression, then I could query and/or manipulate that
XPath expression just as I would any other tree. Another extension function
would allow me to serialize that tree back into XPath syntax.
This same general problem is addressed in this recent xml-dev thread:
Hope this helps,