- From: Martin Kraetke, le-tex <martin.kraetke@le-tex.de>
- Date: Thu, 30 Nov 2017 11:21:05 +0100
- To: xproc-dev@w3.org
Hi,
In XProc 1.0 primary input and output ports are implicitly connected, if
no explicit connection is declared. This is very convenient, because you
can write more compact code.
I wonder if we can have the same feature for options in XProc 3.0? In
our pipelines, we use frequently the same set of options. With 1.0 we
are forced to declare them explicitely for each step. IMHO, this results
in many redundant code lines and makes the pipeline harder to read.
Therefore, I would propose to specifiy implicit option connections for 3.0:
If one or more options are in the scope of a step which expects these
options, they should be automatically passed to the step. In this case,
it should not be required to declare them explicitely with
<p:with-option> unless you want to.
The pipeline below provides a brief demonstration of implicitely
connected options.
<?xml version="1.0" encoding="UTF-8"?>
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
xmlns:c="http://www.w3.org/ns/xproc-step"
version="3.0">
<p:input port="source">
<p:inline>
<doc>Hello world!</doc>
</p:inline>
</p:input>
<p:output port="result"/>
<p:option name="attribute-name" select="'foo'"/>
<p:option name="attribute-value" select="'bar'"/>
<p:add-attribute match="/doc"/>
</p:declare-step>
In case, you want to avoid an implicit connection, the easiest way to do
so is to declare the option explitely. If you do not want that the
option is declared at all, I would suggest to add an empty
<p:with-option/> for that step.
Please let me know, what do you think about implicit option connections?
Kind regards,
Martin
--
Martin Kraetke
Lead Content Engineer
le-tex publishing services GmbH
Weissenfelser Str. 84, 04229 Leipzig, Germany
Phone +49 341 355356 143, Fax +49 341 355356 543
martin.kraetke@le-tex.de, http://www.le-tex.de
Registergericht / Commercial Register: Amtsgericht Leipzig
Registernummer / Registration Number: HRB 24930
Geschäftsführer: Gerrit Imsieke, Svea Jelonek,
Thomas Schmidt, Dr. Reinhard Vöckler
Received on Thursday, 30 November 2017 10:21:42 UTC