xsl-list
[Top] [All Lists]

RE: [xsl] Help on node selection

2010-08-27 09:12:06
Thanks Martin.
I will give it a try.

Regards,
Fabien


-----Message d'origine-----
De : Martin Honnen [mailto:Martin(_dot_)Honnen(_at_)gmx(_dot_)de] 
Envoyé : vendredi 27 août 2010 14:27
À : xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Objet : Re: [xsl] Help on node selection

Fabien Tillier wrote:
Well, it is not what I want. The XML is a lot more complex
That's why I didn't put an output at first...
I want to know the syntax to call a template with a list of nodes, based on a 
criteria.

If you use a template with a match attribute, then there will always 
exactly one current node when the template is processed with 
apply-templates.

You could however define a parameter and pass in a node-set (XSLT 1.0) 
or sequence of nodes (XSLT 2.0) e.g.
   <xsl:template name="n1">
     <xsl:param name="rows" as="element(row)*"/>
     ...
   </xsl:template>


   ...<xsl:call-template name="n1">
        <xsl:with-param name="rows" select="data/row[N1=1]"/>
      </xsl:call-template>



-- 

        Martin Honnen
        http://msmvps.com/blogs/martin_honnen/

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--