This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Convert string to a list of nodes


Hello all,

I have the following problem:
I have a template that should perform some action for a set of nodes. 
This set can contain a various number of elements, and each element is unique within my XML document scope. This template looks moreless like this:
<xsl:template name="maintemplate">
  <xsl:param name="nodelist"></xsl:param>
  <!-- some other params -->

  <!--
   <![CDATA[
       here I want to proceed each node, that is listed in nodelist,
       something like <xsl:for-each> <xsl:call-template name="elemtempl">
       with some parameters.
      ]]> 
  -->
   
</xsl:template>

When I call this template, it should look like this:

<xsl:call-template name="maintemplate">
  <xsl:with-param name="nodelist">node1;node2;node3;node4</xsl:with-param>
   <!-- some params... -->
</xsl:call-template>

My question is: How can I convert the string from nodelist to set of nodes?
Or maybe there is another way to do, what I want to do, and my solution is not the best way ? ;-)
Thanx for any help

ps.
my XML document looks moreless like this:
<elem1>
  <node1>value1</node1>
  <node2>value2</node2>
  <node3>value3</node3>
  ...
  <node7>
    <subnode1/>
    ...
  </node7>
</elem1>
...

Best regards,
Alexandra

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]