Re: code test
| From: | John Miller | Date: | Thu, 19 Jan 2012 01:19:05 +0000 |
| Subject: | Re: code test | ||
| References: | 1 | Groups: | php.test |
| Request: | Send a blank email to php-test+get-888@lists.php.net to get a copy of this message | ||
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fn="http://www.w3.org/2005/xpath-functions"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes="fn xs"
xmlns="http://www.w3.org/1999/xhtml">
<xsl:output method="xhtml" encoding="UTF-8"/>
<xsl:param name="von" select="buchhandel/von"/>
<xsl:param name="bis" select="buchhandel/bis"/>
<xsl:template match="buchhandel">
<html>
<head>
<title>
<xsl:text>Example</xsl:text>
</title>
</head>
<body>
<xsl:for-each-group select="buch[@ersch-jahr > $von and @ersch-jahr < $bis]" group-by="@ersch-jahr">
<xsl:sort select="@ersch-jahr" data-type="number"/>
<p><b><xsl:value-of select="current-grouping-key()"/>
</b><br/>
<xsl:value-of separator=", " select="current-group()/buchtitel"/>
</p>
</xsl:for-each-group>
</body>
</html>
</xsl:template>
</xsl:stylesheet>