|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: <xsl:output method="xml"> and an if sentence to o
Jacob, since you're generating HTML, just use output="html", or even
output="xml". Also, tag-writing <xsl:text><</... is usually not a good
idea, and is not needed when generating well-formed elements. Thus the
following:
may be written more simply, and in more XSL-esque fashion as: <xsl:template name="outline"> <xsl:param name="title" /> <dl>
<xsl:value-of select="$title" /><xsl:for-each select="outline"> <dd> <xsl:attribute name="class"> <xsl:choose> <xsl:when test="@this">active</xsl:when> </xsl:choose> </xsl:attribute> <a> <xsl:attribute name="href"><xsl:value-of select="@url" /></xsl:attribute> <xsl:value-of select="@title" /> </a> </dd> </xsl:for-each> </dl> </xsl:template> Note containment of elements, and the use of <xsl:attribute/> regards, --A _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
|
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
|

Cart








