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

Re: Names for p:* steps

From: Innovimax SARL <innovimax@gmail.com>
Date: Fri, 22 Aug 2008 16:19:12 +0200
Message-ID: <546c6c1c0808220719h55594a9r5c7127b5925a7518@mail.gmail.com>
To: "Norman Walsh" <ndw@nwalsh.com>
Cc: public-xml-processing-model-wg@w3.org

On Fri, Aug 22, 2008 at 3:45 PM, Norman Walsh <ndw@nwalsh.com> wrote:
> "Innovimax SARL" <innovimax@gmail.com> writes:
>> Well, may I ask you to elaborate on this ?
> Sure.
> Imagine that library.xpl contains:
>  <p:library ...>
>    <p:declare-step name="xinclude-and-xslt">...</p:declare-step>
>  </p:library>
> Consider the following imaginary command line syntax:
> $ calabash -isource=- -oresult=- -s xinclude-and-xslt library.xpl
> This tells the processor to load "library.xpl" and run the step named
> "xinclude-and-xslt". All straightforward.
> Now suppose I want to just run the "add-attribute" step. I could wrap
> it in a pipeline, put it in a library, give it a name, and run it. But
> since the library for the XProc builtin steps is always loaded (at
> least conceptually), why do I have to do that? Why can't I just say:
> $ calabash -isource=- -oresult=- -s add-attribute \
>          match=div attribute-name=foo attribute-value=bar
> I can't because the standard p:add-attribute step doesn't have a name.
> I was wondering if we couldn't do something about that. But I don't
> think we can.
> However, I think I'll work around the problem by saying that if you
> don't load a pipeline or a library and if you specify a step name then
> the xml:id values of the standard steps are considered for the purpose
> of matching the specified name.

Sorry for the comparison, but you remind me someone 10 years ago,
asking me why we can't execute any Java class that was in the JDK

I still think that declare step is declaring abstract model of the step

so if you want to instantiate it, I would say that you need to provide
a other mode to launch an abstract

 $ calabash -isource=- -oresult=- -instantiate p:add-attribute \
          match=div attribute-name=foo attribute-value=bar

where -instantiate takes a type instead of name and instantiate an
anonymous instance of that type

Innovimax SARL
Consulting, Training & XML Development
9, impasse des Orteaux
75020 Paris
Tel : +33 9 52 475787
Fax : +33 1 4356 1746
RCS Paris 488.018.631
SARL au capital de 10.000 
Received on Friday, 22 August 2008 14:19:49 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:32:46 UTC