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

Re: Proposal for subordinate source elements

From: Murray Maloney <murray@muzmo.com>
Date: Mon, 04 Dec 2006 23:53:22 -0500
Message-Id: <5.1.1.6.2.20061204235234.047becf0@mail.muzmo.com>
To: "XProc WG" <public-xml-processing-model-wg@w3.org>

I was hoping for a lively discussion, but any discussion at all would do. :-)

At 03:36 PM 11/30/2006 -0500, Murray Maloney wrote:

>At 06:07 PM 11/30/2006 +0100, Innovimax SARL wrote:
>
>>I now begin to agree that Murray's idea of a subordinated element would
>>be a *good* idea. It will at least simplify the spec. This subordinated 
>>element
>>we could name it p:content will have three forms
>><p:content port='' step='' />
>><p:content href='' />
>><p:content>
>>  ...here document
>></p:content>
>
>I had something a bit more expressive in mind. Rather than a single element
>with three forms, I was thinking of three distinct elements. The names that I
>chose to represent them are subject to discussion. I initially wanted to 
>extend
>the pipeline metaphor and use plumbing terms, but I couldn't come up with
>useful terms that could express the distinctions among step/port(s), URIs and
>here documents. For the time being I used -- internal, external and here.
>
>I have treated a here document just like a port or URI on the basis that a 
>select
>or test can be parameterized, thus making a static document a more practical
>option for input to a choose/when.
>
>While I was at it, I noticed that when/otherwise would indent better as 
>when/else.
>Yes, I do know that else usually goes with if, but I think it has the same 
>meaning
>as otherwise. As I say, it looks better when reading.
>
>         <when> ... </when>
>         <when> ... </when>
>         <else> ... </else>
>
>==========================================
>For inputs:
>
><p:input port="myInput" select="..." sequence="no">
>         <p:internal step="step1" port="result" />
></p:input>
>
><p:input port="myInput" select="..." sequence="no">
>         <p:external href="..." />
></p:input>
>
><p:input port="myInput" select="..." sequence="no">
>         <p:here>here document</p:here>
></p:input>
>
>==========================================
>For outputs:
>
><p:output port="myOutput" select="..." >
>         <p:internal step="step1" port="result" />
></p:output >
>
><p:output port="myOutput" select="..." >
>         <p:external href="..." />
></p:output >
>
><p:output port="myOutput" select="..." >
>         <p:here>here document</p:here>
></p:output >
>
>
>==========================================
>For parameters:
>
><p:parameter name="myParam" value="myValue" />
>
><p:parameter name="myParam" >myValue</p:parameter >
>
><p:parameter name="myParam" select="..." >
>         <p:internal step="step1" port="result" />
></p:parameter >
>
><p:parameter name="myParam" select="..." >
>         <p:external href="..." />
></p:parameter >
>
><p:parameter name="myParam" select="..." >
>         <p:here>myValue</p:here>
></p:parameter >
>
>==========================================
>For choose:
>
><p:choose name="myChoose" >
>         <p:internal step="step1" port="result" />
>         <p:when> ... </p:when>
>         <p:otherwise> ... </p:/otherwise>
></p:choose>
>
><p:choose name="myChoose"  >
>         <p:external href="..." />
>         <p:when> ... </p:when>
>         <p:otherwise> ... </p:/otherwise>
></p:choose>
>
><p:choose name="myChoose"  >
>         <p:here>here document</p:here>
>         <p:when> ... </p:when>
>         <p:otherwise> ... </p:/otherwise>
></p:choose >
>
>==========================================
>For when: (see alternate for when below)
>
><p:when name="myWhen" test="expression" > <!-- context is from the parent 
>choose -->
>         ...
></p:when>
>
><p:when name="myWhen" test="expression" >
>         <p:internal step="step1" port="result" />
>         ...
></p:when>
>
><p:when name="myWhen" test="expression"  >
>         <p:external href="..." />
>         ...
></p:when>
>
><p:when name="myWhen" test="expression" >
>         <p:here>here document</p:here>
>         ...
></p:when>
>
>==========================================
>For when: (this an alternate for when)
>
><p:when name="myWhen" test="expression" > <!-- context is from the parent 
>choose -->
>         ...
></p:when>
>
><p:when name="myWhen" >
>         <p:test expression="expression" >
>                 <p:internal step="step1" port="result" />
>         </p:test>
>         ...
></p:when>
>
><p:when name="myWhen"  >
>         <p:test expression="expression" >
>                 <p:external href="..." />
>         </p:test>
>         ...
></p:when>
>
><p:when name="myWhen" >
>         <p:test expression="expression" >
>                 <p:here>here document</p:here>
>         </p:test>
>         ...
></p:when>
>
>==========================================
>One last thing to consider:
>
>Both p:internal and p:external are empty elements. But imagine a scenario
>in which the port of external resource is empty and you want to catch that
>and substitute an alternate document, sort of like NOSCRIPT does for HTML.
>If no alternate was provided, then the fall-through mechanism would be 
>inactive
>and an empty port/URI would be passed through -- so to speak. Otherwise, 
>whatever
>appears in the here document would be passed through.
>
>         <p:internal step="step1" port="result" >
>                 <p:here>...</p:here>
>         </p:internal>
>
>         <p:external href="..." >
>                 <p:here>...</p:here>
>         </p:external>
>
>This is just a thought that occurred to me. I am not wed to the idea. It 
>just seemed
>like it could be an interesting convenience feature.
>
>Looking forward to a lively discussion.
>
>Regards,
>
>Murray
>
>
Received on Tuesday, 5 December 2006 04:53:55 GMT

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