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

Re: Possible new XProc 1.1 step: p:template

From: Henry S. Thompson <ht@inf.ed.ac.uk>
Date: Fri, 13 Aug 2010 09:12:57 +0100
To: <Toman_Vojtech@emc.com>
Cc: <public-xml-processing-model-wg@w3.org>
Message-ID: <f5by6cbue0m.fsf@calexico.inf.ed.ac.uk>
Hash: SHA1

Vojtech writes:

>From the examples above, I don't see if p:template would be a step or a
> binding. (I expect it to be a step, but I don't see an input port.)
> Personally, I think that making it a step would be more flexible because
> you could then, for instance, use other steps to dynamically construct
> the "template XML document" and then pass it to p:template.

It's meant to be a step.  No inputs or outputs because in all the
examples primary input is what's wanted.  It's unlike any existing
steps in that its content is taken as a kind of defaulted non-primary

I guess it would look less unusual if I had written e.g.

 <p:transform match="/*">
  <p:input port="template">
    <c:request method="GET" href="{@uri}">
     <c:header name="Accept" value="application/rdf+xml"/>

That would do for expermentation purposes.

I should have made clear that I assume that the context node for
evaluation of XPath expressions within curly braces is the node
matched by the 'match' option.

A further step at the level of the whole language would be to

  <[step name] . . .>
   <[some elt] . . .>
    . . .
   </[some elt]>
  </[step name]>

as shorthand for

  <[step name] . . .>
   <p:input port="[primary port name]">
     <[some elt] . . .>
      . . .
     </[some elt]>
  </[step name]>

- -- 
       Henry S. Thompson, School of Informatics, University of Edinburgh
      10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
                Fax: (44) 131 651-1426, e-mail: ht@inf.ed.ac.uk
                       URL: http://www.ltg.ed.ac.uk/~ht/
 [mail from me _always_ has a .sig like this -- mail without it is forged spam]
Version: GnuPG v1.2.6 (GNU/Linux)

Received on Friday, 13 August 2010 08:13:34 UTC

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