Subject: RE: [xsl] How can I test if element is empty? From: "Xu, Xiaocun" <XXu@xxxxxxxxxxxx> Date: Tue, 20 Mar 2001 08:03:01 -0500 |
One way to do it is: <xsl:when test="string(elem) == string('')"> Note: the quotes inside the second string() is two single quotes Xiaocun Xu Emptoris, Inc. xxu@xxxxxxxxxxxx > -----Original Message----- > From: Denis Kranjcec [mailto:denis.kranjcec@xxxxxxxxxx] > Sent: Tuesday, March 20, 2001 6:10 AM > To: Xsl-List > Subject: [xsl] How can I test if element is empty? > > > Hi > > So,how can I test if element is empty with xsl? > > example element > <elem/> or <elem></elem> > > I have tried this > <xsl:choose> > <xsl:when test="string-length(elem)"> > <xsl:value-of select="elem"/> > </xsl:when> > <xsl:otherwise> > <xsl:value-of select="NOelem"/> > </xsl:otherwise> > </xsl:choose> > > and this > <xsl:when test="elem == ''"> > > but that don't work > > Thanks in advance > Denis Kranjcec > > > > 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] How can I test if element is , Denis Kranjcec | Thread | Re: [xsl] How can I test if element, David Carlisle |
Re: [xsl] passing parameters to jav, David Carlisle | Date | Re: [exsl] Naming exsl:return/exsl:, Lassi A. Tuura |
Month |