[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] save elments to an array and use later


Subject: Re: [xsl] save elments to an array and use later
From: henry human <henry_human@xxxxxxxx>
Date: Tue, 3 Dec 2013 12:44:55 +0000 (GMT)

Hi Mike 
What I meant was later use the elemnts saved in the variable. for
instance loop over the elements in the variable.
I am afraid this is not
possible?



  

Michael Kay <mike@xxxxxxxxxxxx> schrieb am 11:46 Dienstag,
3.Dezember 2013:
In XSLT there is no such thing as an "array element", and
there is also no such thing as "later". 

Of course you can bind a variable to
a sequence of nodes.

If you said what you were trying to achieve then perhaps
we could help you.

Michael Kay
Saxonica


On 3 Dec 2013, at 09:55, henry
human <henry_human@xxxxxxxx> wrote:

> 
> I want to save specific child
elements from the xml below to an array element and later loop over the array.
> For example the element I am interested in is those with <test>A</test> 
>
Any suggestion?
> Thanks
> 
> <root>
>     <child>
>    
<transfer>J</transfer>
>     <station>B</station>
>     <test>C</test>  
>
</child> 
>  <child>
>     <transfer>N</transfer>
>     <station>I</station>
>     <test>A</test>  
> </child> 
>  <child>
>     <transfer>F</transfer>
> 
   <station>B</station>
>     <test>M</test>  
> </child> 
>  <child>
>    
<transfer>F</transfer>
>     <station>B</station>
>     <test>P</test>  
>
</child> 
>  <child>
>     <transfer>H</transfer>
>     <station>G</station>
>     <test>A</test>  
> </child>
> </root>
> 
>
--~------------------------------------------------------------------
>
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@xxxxxxxxxxxxxxxxxxxxxx>
> --~--


Current Thread
Keywords