Re: using variables and attributes to build output tre
> so we can then say: > <para @include='executive<some_separator>retail'> well you can't call it @include as you can't start an XML name with @ (which is why it's free for use in Xpath syntax) If you had <para include='executive retail'> you could have <xsl:template match="para"> <xsl:variable name="x"> <xsl:call-template name="y"/> </xsl:variable> <xsl:if test="$x='yes'"> ... code for para ... </xsl:if> </xsl:template> <xsl:template name="y"> <xsl:choose> <xsl:when test="contains(@include,'retail') and $output='retail' and ( ancestor::retail or @retail)">yes</xsl:when> .... </xsl:choose> </xsl:template> _____________________________________________________________________ This message has been checked for all known viruses by Star Internet delivered through the MessageLabs Virus Scanning Service. For further information visit http://www.star.net.uk/stats.asp or alternatively call Star Internet for details on the Virus Scanning Service. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
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