This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: using variables and attributes to build output tree
- To: xsl-list at lists dot mulberrytech dot com
- Subject: Re: [xsl] using variables and attributes to build output tree
- From: David Carlisle <davidc at nag dot co dot uk>
- Date: Tue, 13 Nov 2001 17:11:51 GMT
- References: <20011113173925.J8186@apple.fruitcom.com>
- Reply-to: xsl-list at lists dot mulberrytech dot com
[Get raw message]
> 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