Re: Non-required options cannot be empty?

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 UTC