wood burning stoves 2.0*
The moose likes XML and Related Technologies and the fly likes Question Regarding Querystring parameters and XSL/XML Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Question Regarding Querystring parameters and XSL/XML" Watch "Question Regarding Querystring parameters and XSL/XML" New topic

Question Regarding Querystring parameters and XSL/XML

Michele Smith
Ranch Hand

Joined: Oct 27, 2010
Posts: 375
Hello, my XML file needs to include this variable which gets passed on the querystring of my application.

<xsl:variable name="parentId" select="substring-before(substring-after(concat($querystring, '&'), 'parentid='), '&')"/>

My xml needs to say this:

something like this, that does not mention the other numbers, for instance, ALL BUT the numbers: 23, 10, 192, 15, 169,189,230

<xsl:if test="@id="SelectReporting' and not($parentid='2,10,192,15,169,189,230')">
<xsl:attribute name="STYLE">display:none<xsl:attribute>

I KNOW MY CODE IS NOT CORRECT, Wonder what would be inclusive of all integers other than the ones listed above.
Paul Clapham

Joined: Oct 14, 2005
Posts: 18110

It works pretty much like any other programming language; testing to see whether an element is in a list and testing to see if two strings are equal are different operations in all languages that I know.

So not this:

because that tests to see if two strings are equal. Try this instead:

(I leave it to you to extend that to the whole list of magic numbers.

However... if you can get the list of magic numbers into an XSLT nodeset, then you can use the fact that asking if something is "equal to" that nodeset is equivalent to asking if that something is a member of the nodeset.
I agree. Here's the link: http://aspose.com/file-tools
subject: Question Regarding Querystring parameters and XSL/XML
Similar Threads
Servlet & Javascript
xsl: Send/remember xml to show in other frame/xsl-stylesheet
xsl: Show hidden layers with onmouseover
parsing data and storing in the xml
retreaving the value in servlet which is set in session in a jsp page