[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: filter using contains with multiple values

Subject: Re: filter using contains with multiple values
From: "Raimund Kammering raimund.kammering@xxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 7 Mar 2016 09:52:44 -0000
Re:  filter using contains with multiple values
YESS! This (tokenising with in the XSL) was the final idea to solve this
puzzling problem! I was to lazy to try out the String[], since this would also
leave me with
tokenising the argument within the servlet (and I like the simple and clean
intermediate step to tokenise in the XSL!)
Thank you very much Martin (but also thanks to all contributors)!

As final wrap up to make this thread useful to the public:

Be careful with how the transformers handle complex input if passing in as
external parameters (and Graydon, I tried using different quotation, it did
not help!)!
Here one really has to consult the documentation of THAT specific transformer
in full detail on how the setParameterbs second argument is going to be
handled!

Raimund Kammering
> On 04 Mar 2016, at 18:34, Martin Honnen martin.honnen@xxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
>
> Raimund Kammering raimund.kammering@xxxxxxx wrote:
>
>> So one could think of passing them using:
>>
>>                        transformer.setParameter("filter_values", bLog,
Infob);
>>
>> (which does not work either) but here I guess the whole second argument is
interpreted as one single string (object) and I knew in advance that this is
not meant to be working!
>
> If JAXP does not allow you to pass in a sequence of strings then the easiest
way around that might be to pass in the string you have above and use a second
variable
>
>   <xsl:variable name="filter-seq" select="tokenize($filter_values,
',\s*')"/>
>
> then within your comparison you can use that $filter-seq.
>
> As far as I understand
http://saxonica.com/documentation9.5/extensibility/function-result.html and
http://saxonica.com/documentation9.5/using-xsl/embedding/jaxp-transformation.
html you could also try to pass a Java String[] as the parameter value, it
should then be treated as a sequence of strings in XSLT/XPath. That is the 9.5
documentation however, I don't know whether 9.1 is different.

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.