- From: Florent Georges <fgeorges@fgeorges.org>
- Date: Thu, 24 Nov 2011 17:46:31 +0100
- To: Geert Josten <geert.josten@dayon.nl>
- Cc: XProc Dev <xproc-dev@w3.org>
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" xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:my="my..." version="1.0"> <p:declare-step type="my:step"> <p:input port="source" primary="true"/> <p:output port="result" primary="true"/> <p:option name="dummy"/> <p:choose> <p:when test="p:value-available('dummy')"> <p:identity> <p:input port="source"> <p:inline> <dummy/> </p:inline> </p:input> </p:identity> </p:when> <p:otherwise> <p:identity/> </p:otherwise> </p:choose> </p:declare-step> <my:step/> <!-- or --> <!--my:step dummy="hello"/--> </p:pipeline> Regards, -- Florent Georges http://fgeorges.org/ http://h2oconsulting.be/
Received on Thursday, 24 November 2011 16:47:19 UTC