Hi Richard,
Params are always evaluated with the root as the context node, so you
cannot do this. Two possibilities come to mind:
1. A two-stage process, where you generate a more specific stylesheet
from a stylesheet template.
2. Put the lookup table in an external document, and load it with the
document() function.
You should subscribe to, and post to, the Mulberry Technologies XSL list,
which is the best forum for generic XSLT questions. You may even find an
answer to this question in the FAQ.
Hope that helps...
Dave
"Richard George
(QMP)" To:
"'[email protected]'" <[email protected]>
<[EMAIL PROTECTED] cc: (bcc: David N
Bertoni/Cambridge/IBM)
ricsson.se> Subject: Expression passed
in as a param
03/19/2003 12:30 AM
Hi All,
I have the following code that works OK:
testXSLT -PARAM Missing "'Fred'" -IN register.xml -XSL registerParse.xsl
registerParse.xsl
...
<xsl:for-each select="REGISTER/[EMAIL PROTECTED] = $Missing]">
<xsl:copy-of select="."/>
</xsl:for-each>
...
I now want to extend it so that I can select multiple names in the
register, the names being passed in on the command line. However, as the
number of names for any one call is unknown I can not just add lots of
PARAMs. In effect I want to do the following:
testXSLT -PARAM Missing "@name = 'Fred' or @name = 'John'" -IN register.xml
-XSL registerParse.xsl
registerParse.xsl
...
<xsl:for-each select="REGISTER/DEATILS[$Missing]">
<xsl:copy-of select="."/>
</xsl:for-each
..
But that does not work. Any suggestions how I might get this to work?
Regards, Richard