Re: implements-prefix vs implements-namespace
Hi Dave, > I've created a stylsheet from some other source, which has the > correct xsl namespace, but uses out: as prefix. > > If I import/include this into a main stylesheet which uses xsl: as > the prefix, what happens? What should happen is that the imported stylesheet is used in the same way whatever the prefix. Within the main stylesheet, you have XSLT instructions that are declared with elements in the XSLT namespace as indicated by an 'xsl' prefix. Within the imported stylesheet, you have XSLT instructions that are declared with elements in the XSLT namespace as indicated by an 'out' prefix. It should make no difference to the processor what prefix is used in the imported stylesheet. All it needs to do is recognise which are XSLT instructions, which are literal result elements and which are extension elements. If you try to use an element in the main stylesheet using the 'out' prefix then (unless you have namespace declaration that uses the 'out' prefix in the main stylesheet) you will be shouted at by your XSLT processor because it doesn't understand what namespace the 'out' prefix indicates - you haven't declared that prefix for any namespace in that document. The same thing will happen if you have an element with an 'xsl' prefix in the imported stylesheet, again unless you have a namespace declaration that uses the 'xsl' prefix within it. The bottom line is that a namespace declaration's scope is limited to the literal content of the element that it's declared on and the element itself. Namespace declarations for a particular element cannot be introduced from other documents in any way. Is that any clearer? Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/ 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