Page 1 of 1

conditional xsl:import ?

Posted: Tue May 16, 2006 11:03 am
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

Posted: Wed May 17, 2006 4:13 pm
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