Subject: Re: [xsl] using variables and attributes to build output tree From: David Carlisle <davidc@xxxxxxxxx> Date: Tue, 13 Nov 2001 17:11:51 GMT |
> 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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] using variables and attribute, Eric Smith | Thread | Re: [xsl] using variables and attri, Eric Smith |
RE: [xsl] Using Transforms and #inc, Hellstern, Manny | Date | RE: [xsl] Building XML DOM from Acc, Michael Kay |
Month |