Subject:Dynamically created xsl used in pipeline Author:Steve Cuzner Date:30 Jul 2008 10:02 AM
I'm trying to implement a solution where a pipeline takes two input xml files, one is a data file and the other is a configuration file. I apply an xslt stylesheet to the configuration file that creates a new xslt stylesheet which then needs to be applied to the data file. Is there anyway to pipe the output from the first xslt node to the stylesheet parameter of the second xslt?
If there is no way to do this, I can copy to url the output from the first xslt process, but how do I signal the second xslt to begin using the disk file from step one?
Subject:Dynamically created xsl used in pipeline Author:(Deleted User) Date:04 Aug 2008 06:36 AM
Hi Steve,
you can make the first step write the new stylesheet directly to the disk (e.g. by setting the Copy To URL property of the output port), and have the second step point to the location where the XSLT will appear. You must only be sure that the second step is executed after the first one, e.g. by connecting the output link to an input of the second step.
Subject:Dynamically created xsl used in pipeline Author:Steve Cuzner Date:04 Aug 2008 11:33 AM
If I connect the output of the first xslt to the input of the second, that will take care of the timing, but wouldn't that mean that I'd have to set a root rule on the second xslt to do nothing with the input and instead open the second input file? I guess I could add the second input url to the generated xslt for process 2. Is this what you were suggesting?
Subject:Dynamically created xsl used in pipeline Author:(Deleted User) Date:05 Aug 2008 04:21 AM
Hi Steve,
yes, you will need to write a dedicated stylesheet for this approach to work; either the stylesheet ignores the default input and works on the data returned by a document() function, or it declares a (unused) global parameter that the pipeline block will expose as a second input port where the link from the generator can be attached.