- For the generation of XHTML, we used something like:
<xsl:for-each select="Addresses/Person">
- In practice, much more complex situations occur
- select an element if a constraint is fullfiled:
- "select the persons who have a mobile phone":
<xsl:for-each select="Addresses/Person[Tel/@where = 'mobile']">
- refer to an element "somewhere else" in the source tree:
- "set a link to the next person"
<xsl:attribute name="xlink:href">
<xsl:value-of
select="concat('#a',position()+1)"/></xsl:attribute>
</xsl:attribute