File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 Soft Skills this week in the Jobs Discussion 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
Author

Question Regarding Querystring parameters and XSL/XML

Michele Smith
Ranch Hand

Joined: Oct 27, 2010
Posts: 421
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
Bartender

Joined: Oct 14, 2005
Posts: 18985
    
    8

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