D
David Blickstein
I have an application where I have a shared "method" of selecting a nodeset.
The method currently is duplicated everywhere it is needed but I'd like that
code to be shared. The method also includes a conditional test (FWIW, the
test is whether a stylesheet parameter has a certain string value.)
<xsl:choose
<xsl:when test='$Generate='Y'">
select node set one way
<xsltherwise>
select node set another way
It's important to note that while the "method" of selection is common in
each occurence, I can't use a variable to store the nodeset once and reuse
for a number of reasons including the fact that there is no common scope
between the uses.
Is there a way to do this in XSLT V1? If there's a way to do it in V2, I'm
interested in hearing about it but I won't be able to use it.
The method currently is duplicated everywhere it is needed but I'd like that
code to be shared. The method also includes a conditional test (FWIW, the
test is whether a stylesheet parameter has a certain string value.)
<xsl:choose
<xsl:when test='$Generate='Y'">
select node set one way
<xsltherwise>
select node set another way
It's important to note that while the "method" of selection is common in
each occurence, I can't use a variable to store the nodeset once and reuse
for a number of reasons including the fact that there is no common scope
between the uses.
Is there a way to do this in XSLT V1? If there's a way to do it in V2, I'm
interested in hearing about it but I won't be able to use it.