W3C home > Mailing lists > Public > xproc-dev@w3.org > October 2010

p:choose with no default

From: Nic Gibson <nicg@corbas.net>
Date: Wed, 6 Oct 2010 11:04:26 +0100
Message-Id: <50AEB643-BB3C-42DC-8B5A-E236C006BD3A@corbas.net>
To: xproc-dev@w3.org

I'm sure I'm missing something obvious here but I'm failing to see it. I have a pipeline in which a step should be executed only if a given element is present in the input. Otherwise, nothing need be done - there is no meaningful default. So I started with:

    <!-- generate the dedication if present -->
            <p:pipe port="result" step="text-fix"></p:pipe>
        <p:when test="/db:book//db:dedication">
                <p:input port="source">
                    <p:pipe port="result" step="text-fix"/>
                <p:with-option name="xhtml-path" select="$xhtml-path"/>

This fails with the error:

SEVERE: It is a dynamic error if no subpipeline is selected by the p:choose and no default is provided.

I assume that this a meaningful way to express this sort of thing in XProc but I'm vaguely stumped as to what is. Would anyone care to point out the (probably obvious) approach I should be taking?



Nic Gibson
Corbas Consulting
Digital Publishing Consultancy and Training
http://www.corbas.co.uk, +44 (0)7718 906817	
Received on Wednesday, 6 October 2010 10:05:25 UTC

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