[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
> * Are there any obvious pitfalls or problems with this > approach? (Or any not so obvious?) How does it compare to > other methods? 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'/> </antcall> <!-- 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'/> </antcall> </target> <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}"/> </antcall> </target> 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/ cheers andrew
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|