Alex Rivera | Logout

Is daisy chaining xslt an accepted practice?

Asked 2010-12-31T19:32:39.047
10

I have a situation where I think I need to daisy chain my xslt transformation (i.e. that output of one xslt transform being input into another). The first transform is rather complex with lots of xsl:choice and ancestor xpaths. My thought is to transform the xml into xml that can then be easily transformed to html.

My question is 'Is this standard practice or am I missing something?'

Thanks in advance.

Stephen

Edit
Report

1 Answer

1

If this is your situation (or may become your situation):

  1. Transform initial xml to mediary xml.
  2. Maybe transform mediary xml into final1_html.
  3. Maybe transform mediary xml into final2_html (not at all like final1_html).

or

  1. Transform initial xml into mediary xml. This is reasonably likely to change over time.
  2. Transform mediary xml to final_html. This in not likely to change over time.

Then it makes sense to use a two step transformation.

If this is your situation:

  1. Transform initial xml to mediary xml.
  2. Transform mediary xml to final_html.

Then consider not two stepping. Instead just perform one transformation.

answered 2010-12-31T19:46:42.933

Your Answer