Chain of XSLT
Posted: Fri Oct 30, 2009 12:50 pm
Is it possible to set up a transformation scenario in Oxygen 11 that uses a chained series of XSLT transformations, with each transformation taking as its input the output of the previous transformation, or do I have to do each separately? I have read the help files on setting up scenarios, and I can't tell whether this is possible and if so how to do it.
What I want is, for instance:
INPUT.XML --- with TRANSFORM1.XSL -->
[RESULT1.XML] --- with TRANSFORM2.XSL -->
OUTPUT.XML
I want the two XSLT transformations to be separate. This is because
(a) I want to reuse TRANSFORM1 and potentially follow it in another scenario with a different TRANSFORM2, depending on the final OUTPUT desired.
(b) I am using the TRANSFORM1 to add an attribute to all the relevant elements within the INPUT calculated from their content (identically named but obtained in a different way according to the type of element and what it contains, from either a child element node or from a child attribute node, whichever happens to be present) and then TRANSFORM2 sorts the file on the basis of this newly calculated value (after removing any punctuation, spaces, and capitalisation, and after replacing the æ ligature with ae so that it sorts correctly).
(c) One of the transformations uses XSLT 1.0 and the other 2.0.
I'm not interested in seeing the intermediate stage that is generated (I can get that by running just TRANSFORM1) - I just want to get from INPUT.XML to OUTPUT.XML using successive rather than parallel transformations but in one step for the user.
Is this possible using transformation scenarios and if so, can you set out some very straightforward instructions about where precisely to identify each file when setting up the scenario?
What I want is, for instance:
INPUT.XML --- with TRANSFORM1.XSL -->
[RESULT1.XML] --- with TRANSFORM2.XSL -->
OUTPUT.XML
I want the two XSLT transformations to be separate. This is because
(a) I want to reuse TRANSFORM1 and potentially follow it in another scenario with a different TRANSFORM2, depending on the final OUTPUT desired.
(b) I am using the TRANSFORM1 to add an attribute to all the relevant elements within the INPUT calculated from their content (identically named but obtained in a different way according to the type of element and what it contains, from either a child element node or from a child attribute node, whichever happens to be present) and then TRANSFORM2 sorts the file on the basis of this newly calculated value (after removing any punctuation, spaces, and capitalisation, and after replacing the æ ligature with ae so that it sorts correctly).
(c) One of the transformations uses XSLT 1.0 and the other 2.0.
I'm not interested in seeing the intermediate stage that is generated (I can get that by running just TRANSFORM1) - I just want to get from INPUT.XML to OUTPUT.XML using successive rather than parallel transformations but in one step for the user.
Is this possible using transformation scenarios and if so, can you set out some very straightforward instructions about where precisely to identify each file when setting up the scenario?