|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] xsl:if 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








