xsl-list
[Top] [All Lists]

RE: Access all values

2003-05-28 12:56:38

   Hello,

   I show you the example,

   <xsl:variable name="langs" select="terms/lang"/>

   langs will access all the childs of the select. How can I get all of
   them in just one varible, like if it was an array?

   I need this because I have it a form and I have to submit an array of
   langs.

   Thanks,

   Ricardo Saraiva.


Sorry but that isn't an example of anything, you'd need to show a sample
input and a required output.
I'm not sure what you mean by "childs of the select", the expression
would select all lang children of terms children of the current node. 
They are all in "one variable", accessed by $langs.

I can only assume by "all" you mean all of the lang nodes in the document
rather than just grandchildren of the current node, that would be
<xsl:variable name="langs" select="//lang"/>

But it's not clear that you need a variable at all, usually when
beginners expect to use a variable in XSLT then it turns out that no
variable is needed.

David

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



<Prev in Thread] Current Thread [Next in Thread>