[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: xsl:include
> Seems to make no difference if I use xsl:import In your case it doesn't make any difference what templates you define in the included (or imported) document as your main document never applies templates: you don't have a single call to xsl:apply-templates anywhere. The only template that is ever going to run is the template matching / as that is called implictly by the system to start the transform. Your doc1.xsl has a template matching / so if that imports doc2.xsl the one in doc1 will have higher import precedence so nothing in doc2 will affect anything. If you include doc2 then as it is, doc2 does not define a template for the root node, just an element called <rootnode/> but this will never fire as you are not applying templates. You could make doc2 define a template for the root node match="/" Then if you use xsl:include your combined stylesheet will have two templates matching / which is an error but your xslt system may recover by running one of them, or you could avoid the error by adding priority="10" to the template that you want to win. Or alternatively rather than raise the priority of the template you want to win you can lower the priority of the one you want to lose, as I now notice you have done, setting it to -1, but as I say above priority only has an effect of the templates are matching the same nodes, and currently you only have one template matching the root node. David -- http://www.dcarlisle.demon.co.uk/matthew ________________________________________________________________________ This e-mail has been scanned for all viruses by Star Internet. 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 ________________________________________________________________________ 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
|