You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Juan José Vázquez Delgado <ju...@gmail.com> on 2009/03/10 09:47:16 UTC
Pipeline support
Hi all,
After some work, the pipeline support prototype [1] has ended up as follows:
1. A XML pipeline is expressed as a W3C XProc [2] file with "xpl" extension.
For instance:
<p:pipeline xmlns:p="http://www.w3.org/ns/xproc">
<p:xslt>
<p:input port="stylesheet">
<p:document href="/xpl-sample/xsl/test-content.xslt"/>
</p:input>
</p:xslt>
<p:xslt>
<p:input port="stylesheet">
<p:document href="/xpl-sample/xsl/test-html.xslt"/>
</p:input>
</p:xslt>
</p:pipeline>
2. The pipeline (xpl file) is interpreted by a scripting engine named
"XProc" or "XML pipeline processor".
3. The XProc script engine relies on Cocoon 3 Pipeline in order to setup and
execute the pipeline.
4. A Cocoon generator named SlingGenerator is responsible for preparing the
input data.
In order to get the initial XML for the pipeline, the generator tries to
resolve the current resource as:
* a XML file (adapting to InputStream)
* dynamically generated XML (using an inclusion procedure)
* the underlying node´s export document view
5. A Cocoon transformer named SlingTransformer is responsible for resolving
XSLT templates.
If you are agree with this approach, I´d like grabbing the stuff into trunk
after adding some unit testing.
The question is, where?, "bundles/scripting" or "contrib/scripting"?.
WDYT?.
BR,
Juanjo.
[1]
https://svn.apache.org/repos/asf/incubator/sling/whiteboard/jvazquez/org.apa
che.sling.scripting.xproc
[2] http://www.w3.org/TR/xproc/
Re: Pipeline support
Posted by Juan José Vázquez Delgado <ju...@gmail.com>.
> This has been extracted from the XProc candidate recomendation [1].
Sorry, I forgot the link:
[1] http://www.w3.org/TR/xproc/
Re: Pipeline support
Posted by Bertrand Delacretaz <bd...@apache.org>.
On Tue, Mar 10, 2009 at 10:43 AM, Juan José Vázquez Delgado
<ju...@gmail.com> wrote:
>>> ...1. A XML pipeline is expressed as a W3C XProc [2] file with "xpl" extension....
>>
>> Is this "xpl" extension standard?
>> If you're choosing your own I'd prefer not having an L at the end as
>> it's too easy to confuse with a I.
>> Maybe "xpr" or even "xproc", clearer?
>
> This has been extracted from the XProc candidate recomendation [1].
> Literally: "The media type for pipeline documents is application/xml.
> Often, pipeline documents are identified by the extension .xpl."
Fine then, let's go with the standard!
-Bertrand
Re: Pipeline support
Posted by Juan José Vázquez Delgado <ju...@gmail.com>.
>> ...1. A XML pipeline is expressed as a W3C XProc [2] file with "xpl" extension....
>
> Is this "xpl" extension standard?
> If you're choosing your own I'd prefer not having an L at the end as
> it's too easy to confuse with a I.
> Maybe "xpr" or even "xproc", clearer?
This has been extracted from the XProc candidate recomendation [1].
Literally: "The media type for pipeline documents is application/xml.
Often, pipeline documents are identified by the extension .xpl."
I suppose we are not forced to use this extension but IMHO it could be
a good idea to stay in line with the recomendation. Anyway, we can
support both of them.
>> ...If you are agree with this approach, I´d like grabbing the stuff into trunk
>> after adding some unit testing...
>
> +1
>
>> ...The question is, where?, "bundles/scripting" or "contrib/scripting"?.
>
> We recently said "everything new initially goes under contrib", I
> think that's good in this case.
> Although very useful, this is not core Sling functionality.
Agreed.
BR,
Juanjo.
Re: Pipeline support
Posted by Bertrand Delacretaz <bd...@apache.org>.
Hi Juanjo,
On Tue, Mar 10, 2009 at 9:47 AM, Juan José Vázquez Delgado
<ju...@gmail.com> wrote:
> ...After some work, the pipeline support prototype [1] has ended up as follows:...
Cool stuff! Still haven't tested it, shame on me...but your
description looks great.
Just two quick comments for now.
> ...1. A XML pipeline is expressed as a W3C XProc [2] file with "xpl" extension....
Is this "xpl" extension standard?
If you're choosing your own I'd prefer not having an L at the end as
it's too easy to confuse with a I.
Maybe "xpr" or even "xproc", clearer?
> ...If you are agree with this approach, I´d like grabbing the stuff into trunk
> after adding some unit testing...
+1
> ...The question is, where?, "bundles/scripting" or "contrib/scripting"?.
We recently said "everything new initially goes under contrib", I
think that's good in this case.
Although very useful, this is not core Sling functionality.
-Bertrand