- summary: Currnt Stylesheet chaining Behavior is Illogical --> Using both Rule-based chains and f:chain-to together
There are two ways to chain stylesheets: (1) Rules, and
(2) f:chain-to
What happens when you combine the two?
For example:
If you had this server rule:
<Rules chain-multiple-transforms=yes xslt-
transform=A1.xslt B1.xslt
/>
And in A1.xslt:
<f:chain-to href=A2.xslt />
And in B2.xslt:
<f:chain-to href=B2.xslt />
Would the resulting transform chain be:
A1 -> A2 -> B1 -> B2 ?
If not, then what happens?
As it turns out, the resulting transform chain is: A1->A2-
>B1->B2. BUT, this is probably just coincidental.
For example, if initial XML source is SRC.xml, then the
sequence can be described as follows:
Stage 1: (SRC.xml) -> A1 -> (chain-to-1.xml) -> A2 ->
output1
Stage 2: (SRC.xml) -> B1 -> (chain-to-1.xml) -> B2 ->
output2
The output from stage 2, output2, is whats seen by the
client. The output from stage 1, output1, is completely
lost (and wasted).
In my opinion, the behaviour should be something like
this:
(SRC.xml) -> A1.xslt -> (chain-to-1-1.xml) -> A2 ->
(chain-to-1-2.xml) -> B1 -> (chain-to-2-1.xml) -> B2 -
> output
To obtain this behavior requires a minor change to
Ft/Server/Server/Score/ResourceMetaDataImp.py. This
patch file will implement this behaviour.