Re: Syntax noodling

Hi Norm,

Norm Walsh wrote:
> / Jeni Tennison <jeni@jenitennison.com> was heard to say:
> | A couple of quick queries before I get onto the meaty issues.
> |
> | Norman Walsh wrote:
> |> Imagine that the following configuration is known to the engine:
> | [snip]
> |> <p:component name="p:load">
> |>   <p:input name="stdin"/>
> |>   <p:output name="stdout"/>
> |> </p:component>
> |
> | Did you mean that to be:
> |
> | <p:component name="p:load">
> |   <p:param name="href" />
> |   <p:output name="stdout" />
> | </p:component>
> |
> | Otherwise it seems to just be an identity component?
> 
> I'm not sure. :-)
> 
> Having an href parameter would work, but I also think that it's going
> to be advantageous to make
> 
>   <p:input href="someURI"/>
> 
> work as the syntax for allowing any component's input to come from a
> URI. That means that the p:load component is just a synonym for
> p:identity but that's OK, I think.

I agree that we want to use a href attribute to load a document, but I 
think we should interpret it as the instantiation of the load component 
whose href parameter is set to the specified URI. Similarly, I'd like a 
href attribute on <p:output> to be interpreted as the instantiation of 
the save component with the specified href parameter.

So:

   <p:step name="xslt">
     <p:input href="document.xml" />
     <p:input name="style" href="style.xsl" />
     <p:output href="out.xml" />
   </p:step>

could be understood as representing four steps: load document.xml, load
style.xsl, xslt step, and save out.xml. The graph would look like:

                            (load) href: style.xsl
                               |
                               | style
                               v
         (load) -----------> (xslt)
   href: document.xml          |
                               |
                               v
                             (save) href: out.xml

I'd certainly like to see this as a shorthand, and we *could* say that 
it's the only way to invoke the load and save components.

Cheers,

Jeni
-- 
Jeni Tennison
http://www.jenitennison.com

Received on Wednesday, 10 May 2006 11:55:59 UTC