[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Importing stylesheets Precedence Info
Steven Livingstone writes: >I have two templates. Template A imports template B. Both >templates can stand alone, and so both have a match for the root. If you are referring to entire stylesheets, as implied in your subject line and in your use of the term "import", then you should revise your approach. I suggest that there are standalone stylesheets and then there are stylesheets intended for import. You invoke an XSLT processor with the standalone stylesheet, and it imports only "subsidiary" stylesheets. In your situation, define B to be a subsidiary and have a new standalone stylesheet (call it C) that also imports B. C handles the root node but may not do much else if B contains all the pertinent non-root processing. If some templates in A should override conflicting templates in B, use the priority feature. In fact, you can say that no template in a "subsidiary" or importable stylesheet will have a priority above, say, 5. Then your standalone stylesheets can be written to use priorities above 5 when they definitely want to override. Priority numbers don't need to follow any particular linear scale. .................David Marston 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
|