[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: xsl, and different xml versions
As others have commented you can not use xsl:import that way, also > <xsl:template match="/"> > <xsl:if test="@version = '1'"> match="/" matches the document root (ie the logical top of th edocument) not the top level document element, root nodes never have attributes so your test would always be false you need to test /*/@version. An alternative (or addition0 to using version would be to use teh stylesheet PI which is exactly for this use Given the files <?xml-stylesheet type="text/xsl" href="version1.xsl"/> <report> <table foo="bar"/> <text value="sometext"/> </report> <?xml-stylesheet type="text/xsl" href="version2.xsl"/> <report> <table foo="bar"/> <text value="sometext"/> </report> Any processor which supports xml-stylesheet will do what yuou want. This includes, at least, Internet explorer, Mozilla and saxon (if given the -a flag) David ________________________________________________________________________ This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________
|
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
|