[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Conditional use of <xsl:apply-imports> or <xsl:import>
Hello, I have a stylesheet, which imports 8-9 other stylesheet into it. I am using <xsl:import> (with <>xsl:apply-imports>) element instead of <xsl:include>, as I need to override matching rules of main (calling) stylesheet. As I am importing the various stylesheet(basically different reference style with same matching elements), I am trying to figure out whether a conditional <xsl:apply-imports> can be done. I was looking into the tutorials for using <xsl:apply-imports> and I don't think attribute "use-when" will be of any help in my case. Basically the conditional <xsl:apply-imports> for reference styles depends upon the "journalcode". Below is what I am trying to achieve. <xsl:template match="article/meta/journalcode[.='ABCD' | 'EFGH' | 'IJKL' | 'LMNO']"> <xsl:apply-imports/> <!-- Some thing I need to do here --> </xsl:template> Another way of get it done is use of "mode" attribute <xsl:apply-templates mode="Reference-style-1"/>, which infact I was using as of now, but I ending up defining a huge stylesheet. This was reason I thought of having different modules to make the things manageable. My questions: ============= 1. Can the conditional apply-imports can be done. Or even conditional import of <xsl:import> instead of declaring all of them on top? 2. I have also noticed that my transformation taking much more time after declaring (xsl:import) all the stylesheet on top. Do this have anything to do with importing lots of stylesheet or this my incorrect clairvoyance? I am using XMLSPY enterprise edition. 3. Finally, is this a correct method to approach? Any suggestions will be highly appreciated. Best, Pankaj Chaturvedi ============================================================================ ================ Confidentiality Notice:" This message and any attachment(s) contained here are information that is confidential, proprietary to IDS Infotech Ltd. and its customers. Contents may be privileged or otherwise protected by law. The information is solely intended for the individual or the entity it is addressed to. If you are not the intended recipient of this message, you are not authorized to read, forward, print, retain, copy or disseminate this message or any part of it. If you have received this e-mail in error, please notify the sender immediately by return e-mail and delete it from your computer."
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|