Re: Choose based on non-required option?

Geert Josten <geert.josten@dayon.nl> writes:
> This doesn't seem to work in XMLCalabash (0.9.35/0.9.40), am I doing
> something obvious wrong?
>
> 	<p:option name="href" select="''"/>
>
> 	<p:choose name="choose">
> 		<p:when test="string-length($href) > 0">
>
> Whatever gets passed in as $href (I can log to screen, and $href really
> has a value), I always end up in the otherwise..

A quick trace through the code shows that I clearly evaluate the
expression

   boolean(string-length($href) > 0)

and get back the value of the $href variable as the result.

The mind boggles. I'll clearly have to take a deeper look. But, yeah,
I think it's an XML Calabash bug.

                                        Be seeing you,
                                          norm

-- 
Norman Walsh
Lead Engineer
MarkLogic Corporation
Phone: +1 413 624 6676
www.marklogic.com

Received on Wednesday, 30 November 2011 17:47:51 UTC