This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: using variables and attributes to build output tree

[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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]