Subject: Re: AW: [xsl] adressing attributes From: Oliver Becker <obecker@xxxxxxxxxxxxxxxxxxxxxxx> Date: Fri, 29 Jun 2001 13:47:43 +0200 (MET DST) |
> ok, I found it myself... > > <xsl:choose> > <xsl:when test="../element[$here+$half]"> > <xsl:for-each select="../element[$here+$half]"> > <xsl:value-of select="@id"/> > </xsl:for-each> > </xsl:when> > <xsl:otherwise></xsl:otherwise> > </xsl:choose> Why not discard xsl:choose and xsl:for-each? simply write <xsl:value-of select="../element[$here+$half]/@id" /> If there is no ../element[$here+$half] (your test) then nothing will be output (the select expression is just an empty node set in this case). Cheers, Oliver /-------------------------------------------------------------------\ | ob|do Dipl.Inf. Oliver Becker | | --+-- E-Mail: obecker@xxxxxxxxxxxxxxxxxxxxxxx | | op|qo WWW: http://www.informatik.hu-berlin.de/~obecker | \-------------------------------------------------------------------/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
AW: [xsl] adressing attributes, Michael Zehrer | Thread | [xsl] OT: Mailinglist for schema qu, Jens Schaefers |
Re[2]: [xsl] xsl:sort Please Help, Steven . C . Kienle | Date | [xsl] OT: Mailinglist for schema qu, Jens Schaefers |
Month |