Re: Possible new XProc 1.1 step: p:template

-----BEGIN PGP SIGNED MESSAGE-----
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
input.

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

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

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
interpret

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

as shorthand for

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

ht
- -- 
       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]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFMZP6OkjnJixAXWBoRAhOYAJwI1YzG43a7oc+dMR3f+FcyzbXl8gCfc/BV
M/ujLxeQZltANXU4l8TsFYY=
=aHoI
-----END PGP SIGNATURE-----

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