Subject: [xsl] xsl:if with params From: xptm@xxxxxxx Date: Fri, 24 Sep 2004 14:45:28 +0100 |
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Re: xsl-list Digest 24 Sep 20, David Carlisle | Thread | Re: [xsl] xsl:if with params, David Carlisle |
Re: [xsl] applying templates to all, Bruce D'Arcus | Date | Re: [xsl] applying templates to all, David Carlisle |
Month |