xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filkorn Roman <Roman.Filk...@swh.sk>
Subject Re: XSL question
Date Mon, 11 Jun 2001 13:27:12 GMT


I think this should be asked on xalan-j-user@zml.apache.org
(XSLT questions) - there is far more people to ask..

> <xsl:template name="someTemplate">
>   <xsl:call-template name="callMe">
>     <xsl:with-param
> name="location">/section/data/stuff</xsl:with-param>
>   </xsl:call-template>
> </xsl:template>
> <xsl:template name="callMe">
>   <xsl:param name="location"/>
>   <xsl:for-each select="$location">
>     <!-- some content -->
>   </xsl:for-each>
> </xsl:template>
> ---- what's wrong; the "location" parameter is passed
> correctly and can be debugged using a value-of
> instruction, however if I want to use it within a
> for-each, it isn't allowed for some reason - why?

I don't know it exactly, but I have had similar problem and this is what I

for-each takes a 'node-set-expression' in atribute 'select', and it does it
in one step -- so one and only thing is that '$location' is transformed into
the parameter value ('/selection/data/stuff', in this case).
There is an extending function node-set() (or similar, look at the spec.) in
Xalan2. So:

>   <xsl:for-each select="node-set($location)">
>     <!-- some content -->
>   </xsl:for-each>

will return a node-set for your expression.

It worked for me (but it was a time ago), so please check for details for
yourself. I hope this will help you.



In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org

View raw message