XSLT variables in PHP

From: Date: Thu, 17 May 2001 22:08:52 +0000
Subject: XSLT variables in PHP
Groups: php.general 
Request: Send a blank email to php-general+get-53330@lists.php.net to get a copy of this message
I'm building an XSLT style sheet for a web site, and part of it revolves around the fact that sometimes a group of <TD> will be highlighted and the rest of the time they will be a standard background colour. In the example below, if the XML data that matches "primary", is equal to 1, than i want to print out a class of "highlight". I have been trying to use variables and/or parameters. It never seems to see it. I need the variable to be globally accessible. And it needs to change at the XML/html conversion run time. Pretty new to XSLT, so if anything has any ideas it would be great. I am trying to seperate the display from the data, so i can't do any of the calculations in php, since a different style sheet may be doing something entirely different. $xslData.=<<<EOF <xsl:template match="primary"> <TD class="items"><xsl:value-of select="."/></TD> </xsl:template> <xsl:template match="price"> <TD class="items"><xsl:value-of select="."/></TD> </xsl:template> <xsl:template match="name"> <TD class="items"><xsl:value-of select="."/></TD> </xsl:template> <xsl:template match="description"> <TD class="items"><xsl:value-of select="."/></TD> </xsl:template> >>> Nicholas Burke Strategic Profits Inc.

« previous php.general (#53330) next »