|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: importance
Jakob Fix wrote: > > given a stylesheet "a" which imports two stylesheets "b" and "c" which in > turn import one stylesheet each, "d" and "e" what is their relationship > importance-wise? > > a > / \ > b c > | | > d e > > following the spec, "a" as the importing stylesheet is the most important > one. (section 15.1 Stylesheet Import). > > now, is the order of importing the stylesheets > "b" then "c" then "d" then "e", or > "b" then "d" then "c" then "e"? > This seems not to be explicitly stated in the spec, but is obviously > necessary to decide on the imortance of each. > > When the spec says > > "Definitions and template rules in the importing stylesheet are defined to > be more important than definitions and templates in any imported > stylesheets." > > does "importing stylesheet" mean the root stylesheet, "a" only, or any > stylesheet that imports another stylesheet? It means that if stylesheet X imports stylesheet Y then X is more important Y. So if we use X > Y to mean that X is more important than Y, we have a > b a > c b > d c > e The spec also says: Also definitions and template rules in one imported stylesheet are defined to be more important than definitions and template rules in previous imported stylesheets. This is intended to mean in your case that: c > b c > d e > b e > d (Clearly there's scope for improving the wording here.) Implicit in the spec is the idea that importance is transitive: if X > Y and Y > Z then X > Z. So putting this together the order of importance of the stylesheets in your example would be (most important first): a c e b d Remember that all xsl:import statements must come at the beginning of the stylesheet before any template rules. So if you parse an xsl:import when you see it, then the template rules will be encoutered coming from stylesheets in the following order: d b e c a ie precisely in reverse order of importance. James 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








