Ci-dessous le XSLT (avec XPATH) utilisé pour afficher le tableau des patrons NOM+ADJ dans l’étape 3:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html" encoding="UTF-8"/>
<xsl:template match="/PARCOURS">
<link rel="stylesheet" href="tablo.css" type="text/css"/>
<html>
<body>
<table>
<tr>
<th>Extraction de patrons: <font color="red">NOM</font> <font color="blue">ADJ</font></th>
</tr>
<xsl:for-each select="child::FILTRAGE/file//element">
<xsl:if test="(child::data[1][contains(text(), 'NOM')]) and (following-sibling::element[1]/data[1][contains(text(), 'ADJ')])">
<tr>
<td>
<font color="red"><xsl:value-of select="child::data[3]"/></font><xsl:text> </xsl:text>
<font color="blue"><xsl:value-of select="following-sibling::element[1]/data[3]"/></font>
</td>
</tr>
</xsl:if>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>