|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Conditional Import of stylesheet depending on pass
William Reilly wrote: > COMMAND LINE (exploded for legibility) > C:\jakarta-tomcat-4.0.3\webapps\ROOT\mlnmdev> > java > org.apache.xalan.xslt.Process > -IN BusinessML\2002-07-16-0_summary.xml > -XSL xsl\ct11_press_release_summary.xslt > -OUT StructureML\2002-07-16-0_summary.xml > -PARAM environment WINDOWS As others mentioned, you can't do conditional imports within XSLT. No one told what you could do, though. Obviously you are relying on the user to know what the underlying platform is, in order to set $environment. Well, instead of setting $environment to 'WINDOWS', the user could just invoke a Windows-specific stylesheet that sets $path to what it needs to be for Windows, and then imports the generic stylesheet, which tries (but fails, due to lower import precedence) to set $path to the Unix one. If they're not on Windows, they can just invoke the generic stylesheet. It might be worth writing a wrapper that invokes Xalan via JAXP; the wrapper can choose the right stylesheet. If you need to do multiple transforms, you'll want the wrapper anyway, so you can recycle the compiled stylesheets and avoid JVM startup overhead. - Mike ____________________________________________________________________________ mike j. brown | xml/xslt: http://skew.org/xml/ denver/boulder, colorado, usa | resume: http://skew.org/~mike/resume/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|

Cart








