- From: Rui Lopes <rlopes@di.fc.ul.pt>
- Date: Thu, 29 Jun 2006 17:53:49 +0100
- To: Norman Walsh <Norman.Walsh@Sun.COM>
- Cc: public-xml-processing-model-wg@w3.org
- Message-ID: <44A4059D.2030603@di.fc.ul.pt>
Norman Walsh wrote:
> Like the question of whether we use <p:step type="xslt"> or <p:xslt>,
> it's on the one hand not technically important which decision we make,
> as I'm sure we can all see that they're essentially isomorphic. And on
> the other, deeply important because it has a dramatic impact on the
> syntax.
I believe a generic syntax (i.e. <p:step type="xslt">) should be chosen
over explicit syntax (i.e. <p:xslt />). Imagine the following scenario:
I have a special purpose component ("my:safeguard") that will check my
cpu's temperature. If it's below a given threshold (provided by the
"max-cpu-temp" parameter), it will perform an identity transform.
Otherwise, an error will be triggered and the pipeline execution will
fail and stop. This component would prevent me to process a 10GB
document with my stylesheet (as my cpu would probably melt). The
corresponding pipeline follows.
<p:pipeline>
<p:input name="source" />
<p:output name="result" from="ss.result" />
<p:step type="my:safeguard" name="sg">
<p:with-input name="source" from="source" />
<p:with-param name="max-cpu-temp" value="30ºC" />
</p:step>
<p:step type="xslt" name="ss">
<p:with-input name="stylesheet" uri="http://example.org/foo.xsl" />
<p:with-input name="source" from="sg.result" />
</p:step>
</p:pipeline>
If this pipeline was written in a direct syntax, my pipeline processor
would have to know that an hypothetical <my:safeguard /> tag would
represent a step. However, if it doesn't recognize it, well... my cpu
would certainly melt! That wouldn't happen in a generic syntax.
We can imagine all sorts of special purpose components that will behave
similarly (authentication comes to mind).
As a side bonus, we have an easier GUI tool support for XProc. If I
develop a GUI that understands steps as blackboxes, I can
manage/visualize pipelines without caring if they are made of core
components and/or special purpose ones. With a direct syntax, my GUI has
to know about each component to be able to support them.
Any thoughts?
Cheers,
Rui
Received on Thursday, 29 June 2006 16:54:01 UTC