W3C home > Mailing lists > Public > public-xml-processing-model-wg@w3.org > April 2006

Directed vs Generic Syntax

From: Alex Milowski <alex@milowski.org>
Date: Thu, 13 Apr 2006 08:19:27 -0700
Message-ID: <443E6BFF.7010405@milowski.org>
To: public-xml-processing-model-wg@w3.org

Taking the following example from Jeni Tennison's email:

<p:if input="$document" test="/foo">
     <p:then>
       <p:step name="xslt">
         <p:input select="$document" />
         <p:input name="stylesheet" href="foo.xsl" />
         <p:output href="result.xml" />
       </p:step>
     </p:then>
     <p:else>
       <p:step name="xslt">
         <p:input select="$document" />
         <p:input name="stylesheet" href="bar.xsl" />
         <p:output href="result.xml" />
       </p:step>
    </p:else>
   </p:if>

 From my perspective, I see a mix of directed syntax (if, then, else) and
generic steps.  It could be argued that this are pipeline flow control
and the others are steps.

I've been in favor of using directed syntaxes for everything.  Much like
ant tasks, the step syntax is indicated by using a directed vocabulary.
So, in ant, XSLT is the element 'xslt'.

 From that, the above becomes:

<p:if input="$document" test="/foo">
     <p:then>
       <p:xslt input="$document" stylesheet="foo.xsl"
               output="result.xml"/>
     </p:then>
     <p:else>
       <p:xslt input="$document" stylesheet="bar.xsl"
               output="result.xml"/>
    </p:else>
</p:if>

This means the pipeline compiler needs to understand each directed
syntax--including extension steps.  While this adds to the implementors
work, I think the end result is far simpler for the user.

--Alex Milowski
Received on Thursday, 13 April 2006 15:19:43 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:21:47 GMT