|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: multiple templates with same name
Jon Smirl wrote: > > I have defined several template with the same name. Sometime like: > <xsl:template name="main"> > </xsl:template> > > I have two include files, each defining a main template. My top level file > also defines the main template. With XT the one in the main file wins. With > Saxon the first one encountered wins. This isn't a bug, the two include > files are also used standalone and need a main template defined. > > What is the correct order for resolving the multiple definitions? The WD says (http://www.w3.org/TR/WD-xslt#named-templates): "It is an error if a stylesheet contains more than one template with the same name and same import precedence. An XSLT processor may signal the error; if it does not signal the error, it must recover by choosing from amongst the templates with highest import precedence the one that occurs last in the stylesheet." You would be unwise to rely on this error recovery behaviour. 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








