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

xsl:if with params

Subject: xsl:if with params
From: xptm@xxxxxxx
Date: Fri, 24 Sep 2004 14:45:28 +0100
xsl with params
I have this thing working as i want it to work, but i don't understand why!!!

I have

  <xsl:param name="main" select="somevalue"/>

and later

      <xsl:if test="$main">
	do some stuff
      </xsl:if>

Then i'm launching my transformation from Java, sometimes i set that
parameter
some times don't, like this:

        if ("main".equals(xpar)) {
          stylesheet.setParameter("main", "ok");
        }
        stylesheet.transform(request, response);

And it's working ok, it only "does some stuff" when i setParameter to
something,
wathever value i have in <xsl:param name="main" select="somevalue"/> and
whatever value i pass to the parameter.

The only exception are if i use

<xsl:param name="main" select="true()"/> and

stylesheet.setParameter("main", new Boolean(false));


So, when i'm making

      <xsl:if test="$main">

what am i saying in english?

(BTW, excuse my bad english in the first place...)












O SAPO ja esta livre de vmrus com a Panda Software, fique vocj tambim!
Clique em: http://antivirus.sapo.pt

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.