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

RE: Choose based on non-required option?

From: Geert Josten <geert.josten@dayon.nl>
Date: Wed, 30 Nov 2011 20:55:30 +0100
Message-ID: <a3aeac94fc037b5676b571e7ae817e9c@mail.gmail.com>
To: Norman Walsh <ndw@nwalsh.com>, XProc Dev <xproc-dev@w3.org>
Issue #23...

-----Oorspronkelijk bericht-----
Van: Norman Walsh [mailto:ndw@nwalsh.com]
Verzonden: woensdag 30 november 2011 18:47
Aan: XProc Dev
Onderwerp: 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

   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 19:56:00 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:17:01 UTC