[Home] [By Thread] [By Date] [Recent Entries]
PHP User wrote:
Currently I am running it through XT, but that's not a necessity, so I can switch processors.
<xsl:variable name="initTitle" select="substring(//did/unittitle/title,'1','1')" /> ^^^^^^^^^^^^^^ Here appearss to be your problem: the first argument to the substring function is the node set of all the title elements in the document, the substring will only take the first, therefore the initTitle variable has always the same value (probably an 'A') Furthermore: <xsl:call-template name="page"> <xsl:value-of select="$sTitle" /> </xsl:call-template> That's several syntax errors rolled into one line. <xsl:for-each select="."> That's a no-op. Just omit it. Also syntax errors. Probably you need <xsl:template name="page">
<html>
<head><title>The Letter <xsl:value-of select="." /></title></head>
<body>
<xsl:variable name="lett_case_mod" select="translate(.,'abcdef...','ABCDEF...')" />
<xsl:for-each select="//did/unittitle[
translate(substring(title,1,1),'abcdef...','ABCDEF...')=$lett_case_mod]">
<h1><xsl:value-of select="title" /></h1>
<xsl:call-template name="showbox"/>
</xsl:for-each>
</body>
</html>
</xsl:template>J.Pietschmann XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|

Cart



