|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] AW: XSL newbie help needed
just use an xsl:variable or xsl:param if you want to control it from outside the template, see below: > <xsl:stylesheet version="1.0" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > xmlns:mdc="http://us.mil.dcgs/metadata" > xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xsl:param name="maker">ford</xsl:param> <!-- ford is default if no param given --> > <xsl:template match="/"> > <xsl:for-each select="descendant::xsd:element"> > <xsl:if test="contains(@substitutionGroup,'car')"> > <xsl:value-of select="@type"/><xsl:text> </xsl:text> > </xsl:if> <!-- > <xsl:if test="contains(@substitutionGroup,'ford')"> --> <xsl:if test="contains(@substitutionGroup, $maker)"> <!-- > ford should > not be hard coded --> > <xsl:value-of select="@substitutionGroup"/>-<xsl:value-of > select="@type"/> <xsl:text> </xsl:text> > </xsl:if> > </xsl:for-each> > </xsl:template> > </xsl:stylesheet> > cheers chris
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








