Re: Proposal for subordinate source elements

Just to add some water...

It seems to join some propositions like this one :
http://lists.w3.org/Archives/Public/public-xml-processing-model-wg/2006Oct/0059

Furthermore, this kind of constructs can help a lot for documentation
(something, we could add to this draft for sure) without having to deal with
ID/REFID

<p:input port="myInput" [select="..."] [sequence="no"]>
      <p:documentation>
         <p:annotation>This is the documentation of MyInput</p:annotation>
      </p:documentation>
      <p:internal step="step1" port="result" />
</p:input>

and with the fallback construct

<p:input port="myInput" [select="..."] [sequence="no"]>
      <p:documentation>
         <p:annotation>This is the documentation of MyInput</p:annotation>
      </p:documentation>
      <p:external href="...">
        <p:documentation>
           <p:annotation>MyInput refer to an external URI, but if not
available, there is a fallback</p:annotation>
        </p:documentation>
        <p:here>
           ....
        </p:here>
      </p:external>
</p:input>

And one more thing, in case of sequence of documents

<p:input port="myInput" [select="..."] sequence="yes">
      <p:documentation>
         <p:annotation>This is the documentation of MyInput</p:annotation>
      </p:documentation>
      <p:internal step="step1" port="result" />
      <p:internal step="step2" port="result" />
      <p:internal step="step3" port="result" />
      <p:here>
        ....
      </p:here>
 </p:input>

If there is one concern, it will be about names : p:internal, p:external,
p:here, which could be a little too general

But have no clue, for better names

Regards

Mohamed

On 12/5/06, Murray Maloney <murray@muzmo.com> wrote:
>
>
> 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
> >
> >
>
>
>


-- 
Innovimax SARL
Consulting, Training & XML Development
9, impasse des Orteaux
75020 Paris
Tel : +33 8 72 475787
Fax : +33 1 4356 1746
http://www.innovimax.fr
RCS Paris 488.018.631
SARL au capital de 10.000 €

Received on Tuesday, 5 December 2006 07:51:35 UTC