conditional xsl:import ?

Here should go questions about transforming XML with XSLT and FOP.
TPP
Posts: 5
Joined: Fri Mar 24, 2006 6:32 pm

conditional xsl:import ?

Post by TPP »

Hi.Is it possible to dosomething like this:

I recive an xml which can have 14 different structures. Structure version is defined in a first node of xml. I immagined to do a "master" xslt file with case clause which would decide on a "xml structure version node" which "slave" xslt to use. I thougt to use imports but xsl:apply-imports does not accepts any Attributes (such as filename :) )

thanks for help, peter
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post by george »

Hello Peter,

You can use modes. If each XSLT defines templates in a specific mode than in the main stylesheet you can just apply templates on a specific mode based on whatever information you find in the input source.

Best Regards,
George
Post Reply