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

RE: Non-required options cannot be empty?

From: Geert Josten <geert.josten@dayon.nl>
Date: Thu, 24 Nov 2011 18:02:42 +0100
Message-ID: <77bfb37ccd22b33bbc7567435d811308@mail.gmail.com>
To: Florent Georges <fgeorges@fgeorges.org>
Cc: XProc Dev <xproc-dev@w3.org>
Yeah, was afraid someone was going to mention that. But how about 4
non-required option? I would have to consider 24 possible combinations..

It would help a lot if XMLCalabash would recognize that the option is
declared and therefore known, but 'simply' hasn't any value..


-----Oorspronkelijk bericht-----
Van: fgeorges@gmail.com [mailto:fgeorges@gmail.com] Namens Florent Georges
Verzonden: donderdag 24 november 2011 17:47
Aan: Geert Josten
CC: XProc Dev
Onderwerp: Re: Non-required options cannot be empty?

On 24 November 2011 17:15, Geert Josten wrote:

> But when I try to access the options in an expression later on,
> without having supplied a value from outside, XMLCalabash complains
> it doesn't know the option at all.

  That's what p:value-available() is for.  For instance:

    <p:pipeline xmlns:p="http://www.w3.org/ns/xproc"

       <p:declare-step type="my:step">
          <p:input  port="source" primary="true"/>
          <p:output port="result" primary="true"/>
          <p:option name="dummy"/>
             <p:when test="p:value-available('dummy')">
                   <p:input port="source">

      <!-- or -->
       <!--my:step dummy="hello"/-->



Florent Georges
Received on Thursday, 24 November 2011 17:03:32 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:03:09 UTC