W3C home > Mailing lists > Public > xproc-dev@w3.org > November 2011

Re: Choose based on non-required option?

From: Norman Walsh <ndw@nwalsh.com>
Date: Wed, 30 Nov 2011 12:47:09 -0500
To: XProc Dev <xproc-dev@w3.org>
Message-ID: <m2wrahwlia.fsf@nwalsh.com>
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

   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,

Norman Walsh
Lead Engineer
MarkLogic Corporation
Phone: +1 413 624 6676

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

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 November 2011 17:47:52 GMT