[Home] [By Thread] [By Date] [Recent Entries]
Alan Hale wrote:
<snip /> You read up well. The warning is wrong. However, there's a little truth in it ;) You can use an xsl:variable with either a select or with more complex content: <!-- with select --> <xsl:variable name="x" select="file_link" /> <!-- with sequence constructor --> <xsl:variable name="x"><xsl:value-of select="file_link" /></xsl:variable> <!-- or more complex, like this: -->
<xsl:variable name="x">
<xsl:for-each select="bla">
<xsl:call-template name="xyz" />
<xsl:apply-templates select="." />
</xsl:for-each>
</xsl:variable><!-- or with text, like this (discouraged, use select to prevent document node to be created) --> <xsl:variable name="x">Some text here</xsl:variable> etc. But you can't mix the two methods. You PHP XSL extension is a bit too strict. In XSLT, the following: <xsl:variable name="x" select="file_link" > </xsl:variable> should be regarded equal to: <xsl:variable name="x" select="file_link" /> That is a lot of text for helping you to understand the issue at hand. To help PHP XSL a bit, you can remove the whitespace, or just make it an empty tag altogether (like above). Apparently the whitespace is regarded as a value, but PHP XSL shouldn't, really. HTH, -- Abel Braaksma http://www.nuntia.nl
|

Cart



