xsl-list
[Top] [All Lists]

Re: Passing a variable number of parameters or rather an array

2005-04-20 07:11:55
Kent,
wouldnt passing a xml schema list help ?

e,g,

<xsd:simpleType name="fruitType">
  <xsd:list type="xsd:string"/>
</xsd:simpleType>
<xsd:element name="fruits" type="fruitType"/>


<fruits>Apple Orange Guava</fruits>

Within your stylesheet, you could tokkenize it [use the XPath Function
tokenize() and use whitespace as the delimiter]  and use each item
within the list.
  e.g. somethng like tokenize($fruits,' ')



HTH

On 4/20/05, kent <kent(_at_)generatescape(_dot_)com> wrote:
I have had a trawl on this subject, but I the best answer I can get is 'You
can pass a nodeset, which can be treated as the XML equivalent of an Array'.
However I am not sure how to create the nodeset, pass it, and then deal with
it in the stylesheet.

I would like to pass an array of strings to the stylesheet. Does anyone have
an example of doing this, or know where one is. I looked at xalan examples
and none of the examples seem to fit, plus I can't find one anywhere else.

Any help would be grand.

Thanks.

Kent

--~------------------------------------------------------------------
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>
--~--




-- 
Shift to the left, shift to the right!
Pop up, push down, byte, byte, byte!

-Ramkumar Menon
 A typical Macroprocessor

--~------------------------------------------------------------------
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>
--~--