- From: Alex Milowski <alex@milowski.org>
- Date: Thu, 20 Jul 2006 15:28:23 -0700
- To: public-xml-processing-model-wg@w3.org
> Here's another possibility: > > <p:pipeline name="pipe"> > <!-- accept a document, a schema, and a stylesheet. --> > <!-- validate, transform, and return the result --> > <p:declare-input-port port="document"/> > <p:declare-input-port port="schema"/> > <p:declare-input-port port="stylesheet"/> > <p:declare-output-port port="result" ref="identity.result"/> > > <p:step kind="validate"> > <p:input port="document" ref="pipe.document"/> > <p:input port="schema" ref="pipe.schema"/> > <p:output port="result"/> > </p:step> > > <p:choose name="choice"> > <p:declare-input-port port="testdocument" ref="validate.result"/> > <p:declare-input-port port="stylein" ref="pipe.stylesheet"/> > <p:declare-output-port port="result"/> > > <p:when test="/book"> > <p:step kind="xslt"> > <p:input port="document" ref="choice.testdocument"/> > <p:input port="stylesheet" ref="choice.stylein"/> > <p:output port="result" ref="choice.result"/> > </p:step> > </p:when> > > <p:when test="/html"> > <p:step kind="xslt"> > <p:input port="document" ref="choice.testdocument"/> > <p:input port="stylesheet" href="html.xsl"/> > <p:output port="result" ref="choice.result"/> > </p:step> > > <p:step kind="bitbucket"> > <p:input port="document" ref="choice.stylein"/> > </p:step> > </p:when> > </p:choose> > > <p:step kind="identity"> > <p:input port="document" ref="choice.result"/> > <p:output port="result"/> > </p:step> > <p:pipeline> > > I've switched to Richard's naming style, which is my 60/40 favorite at > the moment, though I'd use "/" instead of ".". I could warm up to a slash. > > I've used "ref" consistently instead of "from" and "to". On the one > hand, inputs come "from" somewhere and outputs go "to" somewhere, so > the different names are a useful hint. On the other hand, they're just > refs and using "ref" consistently might lead to fewer typos. I think a single 'ref' attribute would be fine. Could we possibly drop the '-port' from the declare* elements so that it reads a bit better in that we don't have the 'port port" going on: <p:pipeline name="pipe"> <!-- accept a document, a schema, and a stylesheet. --> <!-- validate, transform, and return the result --> <p:declare-input port="document"/> <p:declare-input port="schema"/> <p:declare-input port="stylesheet"/> <p:declare-output port="result" ref="identity.result"/> <p:step kind="validate"> <p:input port="document" ref="pipe.document"/> <p:input port="schema" ref="pipe.schema"/> <p:output port="result"/> </p:step> <p:choose name="choice"> <p:declare-input port="testdocument" ref="validate.result"/> <p:declare-input port="stylein" ref="pipe.stylesheet"/> <p:declare-output port="result"/> etc. ? --Alex Milowski
Received on Thursday, 20 July 2006 22:28:46 UTC