[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: <xsl:choose>...now getting both the <xsl:choose> r

Subject: Re: <xsl:choose>...now getting both the <xsl:choose> result AND the < xsl:otherwise> result
From: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx>
Date: Mon, 8 Sep 2003 21:12:08 +0200
 Re: <xsl:choose>...now getting both the <xsl:choose> r
"Kathy Burke" <Kathy_Burke@xxxxxxxxx> wrote in message
news:395DE57EA5BB7F4E952B7B89775350B5021E41CE@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Hi again. After continued searching, came across some postings and revised
> my xsl as follows:
>
> (The xml is simply either <measure name="firstpass">20 mm</measure> or
> <measure name="firstpass/>.)
>
> <xsl:template match="measure">
>    <xsl:choose>
>       <xsl:when test="not(normalize-space(.))">
>           <input type="text" name="{@name}" value="{.}"/>
>       </xsl:when>
>       <xsl:otherwise>
>            Entered: <value-of select="."/>
>       </xsl:otherwise>
>    </xsl:choose>
> </xsl:template>
>
> However, if the text node has content, now I get BOTH the input textbox
AND
> the test node value after that.
> If there is no text node for <measure>, I just get the text box as
desired.
> I also tried test="not(string(.))" with the same results. Cleary I'm still
> missing something?


Let me guess: does the default template rule produce this for you?


=====
Cheers,

Dimitre Novatchev.
http://fxsl.sourceforge.net/ -- the home of FXSL




 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.