embedded pipelines

I don't know if this is in the Xproc standard (some parts are still a
mystery to me), or if it has been implemented anywhere, but I wanted to
put it out for comment.

It would sometimes be convenient to embed pipeline steps in a
(non-xproc) XML document, and then perform an xproc step on the document
with the effect of replacing all the embedded pipelines with their
results. The input document would serve as a template, with replaceable
content specified by the pipeline steps.

This would work like p:replace, except that the invocation would not
specify what parts of the input document to work on or what to do with
them: the "match" expression would be fixed to select all pipeline steps
in the input, and the "replacement" document would be the result of
evaluating each pipeline. The outer pipeline author and the template
authors would have to arrange for the embedded steps and all resources
to be known and available in the processing context.

For example, well-formed xhtml or xsl-fo documents could contain
pipeline steps that would expand to the intended content based on
parameter inputs. This approach would lend itself to easier analysis,
documentation, and maintenance than other popular templating mechanisms.

This is a similar concept to the "simplified" XSLT templates, by which
any XML document can be treated as an XSLT stylesheet, with restrictions
on the xslt features that can be included.

If others think this might be useful, consider adding it to the
requirements for Xproc v2.

Regards,
--Paul

Received on Saturday, 9 November 2013 03:32:12 UTC