Re: p:value-available not as useful as I'd like. . .

Probably something like

f:value-available-or-the-other-one('foo', xyzzy) that would give what you
intend

Xmlizer

On Thu, Nov 26, 2009 at 6:32 PM, Henry S. Thompson <ht@inf.ed.ac.uk> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> The following doesn't work:
>
>  <p:with-option name="foo"
>                 select="if (p:value-available('bar') then $bar else
> xyzzy"/>
>
> because the semantics of if only protect you against _dynamic_ errors
> in the branch not taken, and the fact that bar isn't a know (XPath2)
> variable is a _static_ error. . .
>
> Wrapping two copies of the whole surrounding step in a p:choose/p:when
> seems awfully heavyweight. . .
>
> Any ideas for a workaround (I'm _not_ suggesting a change to the
> spec. at this late stage :-)?
>
> ht
> - --
>       Henry S. Thompson, School of Informatics, University of Edinburgh
>                         Half-time member of W3C Team
>      10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
>                Fax: (44) 131 651-1426, e-mail: ht@inf.ed.ac.uk
>                       URL: http://www.ltg.ed.ac.uk/~ht/
> [mail really from me _always_ has this .sig -- mail without it is forged
> spam]
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.6 (GNU/Linux)
>
> iD8DBQFLDrufkjnJixAXWBoRAiWoAJ0fgSYsxn2XcefUW8c2kImDBrvHNwCePvLn
> BTX8h6CX0ihAYO0gLOcnvvY=
> =Z45V
> -----END PGP SIGNATURE-----
>
>

Received on Friday, 27 November 2009 22:40:10 UTC