[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Why namespace-alias result prefix is the alias
On 18/03/2011 08:38, Karl Stubsjoen wrote:
I'm doing an identity translate on a stylesheet and I am inserting some extra stylesheet calls at different locations through the stylesheet. > So, I have an alias namespace setup, "rxsl", and I have a namespace-alias setup to translate rxsl to xsl. The way to think of it is not that, but rather you have an alias set up to alias the namespace http://example.com/foo to http://example.org/bar but the stylesheet uses the prefix you specify. Whats the problem? The resulting translated xslt has the "rxsl" prefix but properly namespaced to "http://www.w3.org/1999/XSL/Transform". So not really a problem, but why this behavior? XSLT1 was very vague as to which prefix would be used in the result (with the result that some processors used one and some the other) in fact xslt 1 always gave a processor licence to use any prefix for any namespace, irrespective of aliasing. As you note most of the time, this is just cosmetic, but if the result uses namespaces in context, such as xpath expressions then it does matter as the namespace URI and prefixes in element names, but prefixes in attribute values dont. So xpath2 specified it the way you see. It's better that way as it makes (say) literal result elements containing xpath or xsd types to look more natural as they all use the given prefixes.
David
|
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
|