|
home—lects—exams—hws
D2L—breeze (snow day)
Originally based on XML Visual Quickstart Guide by Kevin Howard Goldberg, and notes therefrom by Jack Davis (jcdavis@radford.edu).
In the last chapter XSL templates were described and examined. When you apply a template,
you use an expression to specify the node set that should be processed. You write
both patterns and expressions using XML Path Language (XPath) syntax.
XPath is a language for selecting nodes and node sets by specifying their location
paths in the XML document. This chapter will describe how to specify XPath location
paths in detail. XPath can be used in XSLT instructions to further process given node sets to
return values instead of nodes. XPath has built-in functions to do math, process strings,
and test conditions in an XML document. The next chapter, XPath Functions, will
describe these functions.
Here is a nice website: an xpath interpreter: chris.photobooks.com/xml/
/* the name of every wonder, but only those with a |
As a corrollary:
If processing the root-node, then
Usually, you use relative paths.
Beware when using absolute paths inside a loop —
it'll always return the same value!
xpath-ch03-17.xml(bug: absolute xpath in loop)
xpath-ch03-17.xsl(bug: absolute xpath in loop)
home—lects—exams—hws
D2L—breeze (snow day)
©2015, Ian Barland, Radford University Last modified 2015.Apr.22 (Wed) |
Please mail any suggestions (incl. typos, broken links) to ibarlandradford.edu |