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

Re: Non-required options cannot be empty?

From: Florent Georges <fgeorges@fgeorges.org>
Date: Fri, 25 Nov 2011 15:33:02 +0100
Message-ID: <CADyR_r3c2+ODiVSUtEnBxQhcLUmsU-pQMC7hhvJipOronnHBKg@mail.gmail.com>
To: Geert Josten <geert.josten@dayon.nl>
Cc: XProc Dev <xproc-dev@w3.org>
On 24 November 2011 18:26, Geert Josten wrote:

> That would indeed be an option, or use the XPath 2.0 if in
> XMLCalabash, *if* I would have control over the declarations.
> But I am talking about the options of p:xslt:
> [...]
> '' and () are not accepted as default values for these. :(

  Oh, I see.  This is not in the way one passes options to your
step, but rather how your step is passing those values to the
standard p:xslt step.  I don't think this is possible.  That's a
bit like, let say in Java, if you have to call different
overloaded versions of the same function, with different number
of parameters, then you'd have to call every possibility.

  That's because a compile-time structure (the call) depends on a
run-time value (has some option been set or not).  In that case,
I think I'd like to have something like:

    <p:with-option name="opt" use-when="p:value-available('opt')" .../>

or (to not use use-when which is related to compilation):

    <p:with-option name="opt" if="p:value-available('opt')" .../>

  Regards,

-- 
Florent Georges
http://fgeorges.org/
http://h2oconsulting.be/
Received on Friday, 25 November 2011 14:33:50 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 25 November 2011 14:33:51 GMT