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

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

From: mozer <xmlizer@gmail.com>
Date: Fri, 27 Nov 2009 23:39:37 +0100
Message-ID: <21d9ade60911271439g3846098bgea3c0a9971761cb0@mail.gmail.com>
To: "Henry S. Thompson" <ht@inf.ed.ac.uk>
Cc: xproc-dev <xproc-dev@w3.org>, Michael Kay <mike@saxonica.com>
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 27 November 2009 22:40:12 GMT