[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Dynamic pipelining in XSLT 2.0 w/ Saxon extensions

Subject: Re: Dynamic pipelining in XSLT 2.0 w/ Saxon extensions
From: "Andrew Welch" <andrew.j.welch@xxxxxxxxx>
Date: Tue, 19 Jun 2007 09:55:39 +0100
Re:  Dynamic pipelining in XSLT 2.0 w/ Saxon extensions
> * Are there any obvious pitfalls or problems with this
> approach? (Or any not so obvious?) How does it compare to
> other methods?

I'm inclined to think that a general purpose pipeline processor will do the
job better. It's likely to have memory management that's better adapted to
this kind of work, and debugging facilities to examine the documents at any
stage of the pipeline or to switch validation of intermediate steps on and
off, etc. If you're lucky it might even allow distributed or asynchronous
execution of the pipeline.

Does XProc fit here?

http://www.w3.org/TR/xproc/ (or http://xproc.org)

As an aside,  if your architecture is batch transforming directories,
where multiple transforms are performed in sequence, then Kernow [1]
might be a good fit.  Now you can run it using Ant, you can set up
your processing pipeline quite simply:

<target name="pipe">
 <!-- first pass -->
	<antcall target="kernow-directory">
		<param name="input.filename" value="${input.dir}/one"/>
		<param name="xslt.filename" value="${xslt.dir}/one.xslt"/>
		<param name="output.filename" value="${temp.dir}/one"/>
		<param name="xslt.params" value='"a=1 b=2'/>
	<!-- second pass -->
	<antcall target="kernow-directory">
		<param name="input.filename" value="${temp.dir}/one"/>
		<param name="xslt.filename" value="${xslt.dir}/two.xslt"/>
		<param name="output.filename" value="${result.dir}"/>
		<param name="xslt.params" value='"a=1 b=2'/>

<target name="kernow-directory">
	<fail message="Property: 'input.filename' not set" unless="input.filename"/>
	<fail message="Property: 'xslt.filename' not set" unless="xslt.filename"/>
	<fail message="Property: 'output.filename' not set" unless="output.filename"/>
	<fail message="Property: 'xslt.params' not set" unless="xslt.params"/>
	<antcall target="kernow">
		<param name="java.classname" value="DirectoryTransform"/>
		<param name="arg1" value="${input.filename}"/>
		<param name="arg2" value="${xslt.filename}"/>
		<param name="arg3" value="${output.filename}"/>
		<param name="arg4" value="${xslt.params}"/>

You can set up fairly large processing pipelines, and because you're
using Ant it's straight forward to add steps like zipping up the
result and FTP'ing it to your severs, ready for when you walk in in
the morning :)

It does write out each stage of the processing but this is definitely
A Good Thing in my book - the obvious one is debugging but also
because the processing can be restarted from the stage at which it
failed - just by using a different Ant target.

[1] http://kernowforsaxon.sf.net/


Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.