Menu

#9 Using both Rule-based chains and f:chain-to together

open
None
5
2005-05-01
2004-08-12
mongryong
No

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 what’s 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.

Discussion

  • mongryong

    mongryong - 2004-08-12
    • summary: Currnt Stylesheet chaining Behavior is Illogical --> Using both Rule-based chains and f:chain-to together
     
  • mongryong

    mongryong - 2004-08-12
     
  • Jeremy Kloth

    Jeremy Kloth - 2005-05-01
    • assigned_to: nobody --> uche
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.