"XPath is a
language for addressing
parts of an XML document, designed to be used by both [XSLT] and
[XPointer]."
That's the summary of version 1.0 of the [W3C] specification of the
[XML] Path Language--XPath. You can read this standard (or
"recommendation", in W3C vernacular) for yourself at http://www.w3.org/TR/xpath .
One way to think about XPath is that it does for XML instances
a bit of what [SQL] does for [RDBMS]s--it's a kind of query language.
It complements XSLT in particular; XSLT describes what changes to
make, and XPath tells where in a document to make them (very roughly).
----
Examples of XPath
Tcler's Wiki
Tcl Exchange
OpenACS
Given the example XML above we could extract all tags using the following
XPath:
//a
We could also grab the "OpenACS" link with the following XPath:
//a[@id="getme"]
More examples can be found at: http://www.zvon.org/xxl/XPathTutorial/General/examples.html
[JC]
----
[[Explain XPath implementations in existing Tcl-XSLT bindings.]]