Subject: RE: [xsl] <xsl:if test ... - question From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx> Date: Tue, 7 Jan 2003 12:33:21 -0000 |
match="/servus" will only match a <servus> element at the top level, it won't match one that is a child of <xsp:page>. Also, you are testing check="true", but the actual value of the <check> element is "check" surrounded by a number of spaces (unless you use xsl:strip-space to remove them). Michael Kay Software AG home: Michael.H.Kay@xxxxxxxxxxxx work: Michael.Kay@xxxxxxxxxxxxxx > > I have a question concerning "<xsl:if test ...". > First trying to check a value in an xsp page in the xsp:logic > part. If blabla, the value should be set to true. > > My XSP: > > <?xml version="1.0" encoding="ISO-8859-1"?> > <xsp:page language="java" > xmlns:xsp="http://apache.org/xsp"> > > <xsp:logic> > String check = "false"; > ... > check = "true"; > </xsp:logic> > > <servus> > ... > <check> > <xsp:expr>check</xsp:expr> > </check> > </servus> > > </xsp:page> > > > My XSL: > > <?xml version="1.0"?> > <xsl:stylesheet > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version ="1.0"> > > <xsl:template match="/servus"> > <html> > <head> > ... > <select name="report_id"> > <xsl:if test="check = 'true'"> > <xsl:attribute > name="disabled"><xsl:value-of select ="check"/></xsl:attribute> > </xsl:if> > </select> > </p> > </body> > </html> > </xsl:template> > > </xsl:stylesheet> > > > My problem is, that my checking doesn't work (it never > disables the selectbox). What am I doing wrong? > > > > Jonny > > > > -------------------------------------------------------------- > -------------------------------------- > > This electronic message contains information from the mmo2 > plc Group which may be privileged or confidential. The > information is intended to be for the use of the > individual(s) or entity named above. If you are not the > intended recipient be aware that any disclosure, copying, > distribution or use of the contents of this information is > prohibited. If you have received this electronic message in > error, please notify us by telephone or email (to the numbers > or address above) immediately. > > > > > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] <xsl:if test ... - question, Johannes . Becker | Thread | RE: [xsl] <xsl:if test ... - questi, Jarno . Elovirta |
Re: [xsl] Problems with Oracle XSL , Steve Muench | Date | RE: [xsl] creating a string after c, Stuart Brown |
Month |