[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: choose/otherwise not doing anything?
Hi Richard, > I'm sure I'm doing something really stupid, but I cant figure out > for the life of me why the following template always outputs and > empty element. Yeah, you're doing something really stupid -- you've just missed some quotes :) You're doing: <xsl:value-of select='positive'/> when you mean to do: <xsl:value-of select="'positive'"/> though personally, I'd just use literal text rather than an <xsl:value-of> instruction: <xsl:template match="medical_assessment/tb_test_positive | medical_assessment/hiv_test_positive"> <xsl:copy> <xsl:choose> <xsl:when test=". = 'true' or . = '1'">positive</xsl:when> <xsl:when test=". = 'false' or . = '0'">negative</xsl:when> <xsl:otherwise>otherwise</xsl:otherwise> </xsl:choose> </xsl:copy> </xsl:template> Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|