[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Determining if an optional attribute is present
On Tuesday 17 October 2006 17:36, Sam Carleton wrote: > > <xsl:attribute name="revision"> > <xsl:if test="not(string(@revision)) = false()"> > <xsl:value-of select="@revision"/> > </xsl:if> > <xsl:if test="not(string(@revision))"> > <xsl:text>0</xsl:text> > </xsl:if> > </xsl:attribute> > What about: <xsl:attribute name="revision"> <xsl:if test="@revision != ''"> <xsl:value-of select="@revision"/> </xsl:if> <xsl:if test="not(@revision)"> <xsl:text>0</xsl:text> </xsl:if> </xsl:attribute> Sometimes a <xsl:choose> is easier. Richard -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Richard Lewis Sonic Arts Research Archive http://www.sara.uea.ac.uk/ JID: ironchicken@xxxxxxxxxxxxxxx -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
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
|