<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:r="http://nwalsh.com/xmlns/extreme2004/recipes/" xmlns="http://www.w3.org/1999/xhtml" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:saxon="http://saxon.sf.net/" version="2.0"> <xsl:import-schema namespace="http://nwalsh.com/xmlns/extreme2004/recipes/" schema-location="recipes.xsd"/> <xsl:output method="html" indent="yes"/> <xsl:strip-space elements="r:*"/> <xsl:preserve-space elements="r:name r:source r:p"/> <xsl:key name="recipes" match="r:recipeList/*" use="r:name"/> <xsl:param name="match" select="'Vegetable Frittata'"/> <xsl:template match="r:recipeList"> <html> <head> <title>My Recipes</title> <link href="output.css" type="text/css" rel="stylesheet"/> <style type="text/css"> div.recipe { border-top-color: black; border-top-width: 1px; border-top-style: solid; } .bold { font-weight: bold; } </style> </head> <body> <h1>Recipe Node Comparisons</h1> <p>Target recipe is: <xsl:value-of select="$match"/></p> <table border="1"> <thead> <tr> <th>Node</th> <th><<</th> <th>is</th> <th>>></th> </tr> </thead> <tbody> <xsl:apply-templates/> </tbody> </table> </body> </html> </xsl:template> <xsl:template match="element(*, r:Recipe)"> <tr> <td> <xsl:value-of select="name(.)"/> <xsl:text> (</xsl:text> <xsl:value-of select="r:name"/> <xsl:text>)</xsl:text> </td> <td> <xsl:value-of select=". << key('recipes', $match)"/> </td> <td> <xsl:value-of select=". is key('recipes', $match)"/> </td> <td> <xsl:value-of select=". >> key('recipes', $match)"/> </td> </tr> </xsl:template> </xsl:stylesheet>