|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] using variables and attributes to build output tree
Hi
I currently use this conditional to determine whether to apply a
template:
<xsl:template match="sub">
<xsl:if test="
( $output='proposal' and ( ancestor::proposal or @proposal) )
or
( $output='executive' and ( ancestor::executive or @executive) )
or
( $output='retail' and ( ancestor::retail or @retail) )
or
$output='full'
or
( $output = 'subsidy' and ( ancestor::subsidy or @subsidy ))
">
<fo:block>
...
<apply-templates/>
...
This conditional allows user to create nodes with names that
relate to particular outputs. In addition you can define an
attribute in a selected node with <sub proposal="1">.
However I now want to define attributes more flexibly, so
I thought three extra attributes viz.
@include
@exclusive
@reject
would fill all conditions we need, but these need to be able
to be lists (not just because they have an '@' for a perl array :)).
so we can then say:
<para @include='executive<some_separator>retail'>
and use xsl regex in the conditional to match any of these.
The other part of my question is how do I establish the above
conditional for all templates but only have it occur once in the xsl
(and not in each template, which is silly).
I tried with a named template but failed.
--
Eric Smith - currently xalan and fop on linux
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
|

Cart








