W3C home > Mailing lists > Public > xproc-dev@w3.org > October 2009

RE: XSLT 2 vs XProc

From: Philip Fennell <Philip.Fennell@marklogic.com>
Date: Tue, 27 Oct 2009 06:47:27 -0700
To: XProc Dev <xproc-dev@w3.org>
Message-ID: <D20C296D14127D4EBD176AD949D8A75A1DA36634@EXCHG-BE.marklogic.com>

I'd say, with respect to the XProc steps that 'transform' the XML passing through a pipeline, that anything which is sufficiently simple can be done within XProc, anything that gets too complex to be reasonably done with XProc should be done within XSLT.

Now that's a rather broad statement I know, but for the most part it's in the eye of the beholder. For example, you could be using XProc to load documents into an Atom Store so part of the pipeline would require you to wrap your documents in an Atom Entry prior to POSTing them to the Store. Now it is entirely possible to construct an Atom Entry around a document but it does end up being rather clumsy compared to an XSLT transform that did the same thing.

Yes there is overlap between XProc and XSLT 2 but I think you draw the line between the two depending on the complexity of the task you have to perform on your content. If you needed to insert a unique identifier, add a timestamp or make all the URIs absolute, for example, then that's a simple step in XProc. If your 'transform' is looking like it would have been easier if you'd used XSLT in the first place then use XSLT.

There are, of course, some interesting cases where you are aggregating content from different sources/services, and that's where XProc comes into its own. You can set-up steps that retrieve metadata from a service that then needs to be embedded into your document. A simple insert step that takes its 'source' input from your document and its 'insertion' input from the metadata step is all you need. IMHO, stringing that together with XSLT is more complicated than using XProc.

Look at every task on its merits.


Philip Fennell

Mark Logic

E-mail: philip.fennell@marklogic.com
Mobile: +44 (0)7824 830 866 

From: xproc-dev-request@w3.org [mailto:xproc-dev-request@w3.org] On Behalf Of Tony Rogers
Sent: 27 October 2009 12:59
To: XProc Dev
Subject: XSLT 2 vs XProc

I was reading through the XSLT 2 spec recently about some elements I wasn't familiar with.  The more I read, the more I became confused--even though XProc was designed to fill a role that XSL did not-or a role that many people were trying to force XSL to fill-there is definitely still some overlap between some parts of XSLT 2 and XProc. 

Has anybody sat down and compared the two?  For people who are using both XProc and XSLT 2 I would like to know:

. anything that both can do, but is easier to do with XProc
. anything that both can do, but is easier to do with XSL (if any)
. anything that both can do, but XSL works better in situation A whereas XProc works better in situation B

Received on Tuesday, 27 October 2009 13:47:59 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:03:05 UTC