
xsl:for-each has a select attribute so it needs a fully qualified path.
However, within the loop, the current element is the selection that
xsl:value-of retrieves through the “.” path.
The template also introduces the generate-id() function. The function
returns a unique identifier for the current node.
Using XSLT to Extract Information
As the various examples in this chapter illustrate, XSLT is a very powerful
and flexible mechanism that serves many purposes.
Indeed XSLT is not limited to styling. It also can be used to extract infor-
mation from XML documents.
Imagine I need to generate an index of articles. The XSLT solution is a two-
step process. ...