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

New to Xproc Question : conditionnal "output port" definition?

From: Matthieu Ricaud-Dussarget <matthieu.ricaud@igs-cp.fr>
Date: Wed, 12 Oct 2011 12:25:07 +0200
Message-ID: <4E956B03.5000905@igs-cp.fr>
To: XProc Dev <xproc-dev@w3.org>
Hi Xproc Folks !

I'm new to Xproc and I can't figure out how to deal with primary output 
port :

- I use <p:declared-step> as root element
- I fixed main <p:output port="result"> to <p:empty/> because I want to 
store each steps output in a debuging file with <p:store> (R. Castello 
says "Since we are writing to files with p:store, set the output to 
empty" in his tuto)
- I have a <p:choose> which can lead to <p:error> if a special condition 
is not satisfied.
- It seems I have to plug my main output port to the <p:choose> so that 
the errors is thrown and stop the process

See the choose step at the bottom of this mail.

Actually Calabash raises this error :
GRAVE: It is a static error if two subpipelines in a p:choose declare 
different outputs.

Does that means what I want to do "If (test) then (error) else 
(xslt+store)" is not possible ?
Is there a way to achieve this "process" ?

Any help, tips welcome !


The choose step code :

<p:choose name="stop_if_viewport_inconsistence">
<p:error name="viewport_err" code="viewport_err">
<p:input port="source">
<message>viewports inconsistence here !</message>
<p:xslt name="generateECF">
<p:input port="source">
<p:pipe step="add-viewport" port="result"></p:pipe>
<p:input port="stylesheet">
<p:document href="../xslt/generateECF.xsl"/>
<p:input port="parameters"><p:empty/></p:input>
<p:store encoding="UTF-8" omit-xml-declaration="false" indent="true">
<p:with-option name="href" 

<p:output port="result">
at the beginning.

Matthieu Ricaud
Service Livre numérique
Received on Wednesday, 12 October 2011 10:25:44 UTC

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