Right, not the right list…
But maybe a quick and simple solution: <xsl:for-each 
select="//items/item[substr($theList,text()]"><xsl:for-each>?

Am 29.09.2013 um 17:20 schrieb Glenn Adams <gl...@skynav.com>:

> This question relates to XSLT, not XSL-FO or FOP, so this isn't really the 
> right ML to post this.
> 
> 
> On Sun, Sep 29, 2013 at 12:23 AM, Bernard Giannetti 
> <thebernmeis...@hotmail.com> wrote:
> Hi,
> 
> I'm using FOP, embedded in a desktop application, to create PDFs from a 
> single data XML file using an XSLT file.
> 
> Say the data XML file is a list of items, for example:
> 
> <items>
>   <item>
>     apple
>   </item>
>   <item>
>     orange
>   </item>
>   <item>
>     water melon
>   </item>
> ...
> </items>
> 
> I want to be able to tell the XSLT to only process specific items (say 
> "apple" and "orange").
> 
> I've created a java.util.ArrayList and passed that to the transformer using 
> setParameter( "theList", theList ).  In the XSLT, when I use <xsl:value-of 
> select="$theList" />, I'll get in the output  [apple, orange].  Fair enough.
> 
> However, what I really want (I think) is to take the array and iterate over 
> it, calling a template for each item.  Is this possible?
> 
> From what I've managed to deduce from a lot of searching/reading is that it's 
> possible even to pass in a Java object and somehow get XSLT to access that 
> Java object.  I'm not sure if that is overkill for what I want to do, but I 
> cannot even achieve processing a list of items one by one.
> 
> 
> Thanks in advance,
> 
> Bernard.
> 

Reply via email to