[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

Subject: Re: Why namespace-alias result prefix is the alias
From: David Carlisle <davidc@xxxxxxxxx>
Date: Fri, 18 Mar 2011 09:05:24 +0000
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.


Thanks, Karl..


David


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.