DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=30681>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=30681 <xsl:namespace-alias stylesheet-prefix="foo" result-prefix="#default" /> ------- Additional Comments From [EMAIL PROTECTED] 2004-08-27 03:46 ------- Section 7.1.1 (Literal Result Elements) of W3C Recommendation of XSLT 1.0 at http://www.w3.org/TR/xslt. It also says: "The xsl:namespace-alias element declares that the namespace URI bound to the prefix specified by the stylesheet-prefix attribute is an alias for the namespace URI bound to the prefix specified by the result-prefix attribute. Thus, the stylesheet-prefix attribute specifies the namespace URI that will appear in the stylesheet, and the result-prefix attribute specifies the corresponding namespace URI that will appear in the result tree. The default namespace (as declared by xmlns) may be specified by using #default instead of a prefix. If a namespace URI is declared to be an alias for multiple different namespace URIs, then the declaration with the highest import precedence is used. It is an error if there is more than one such declaration." I believe that #default is a special case for both result-prefix and stylesheet-prefix attributes of <namespace-alias /> nodes. If the result-prefix is #default then whatever prefix currently bound to the stylesheet-prefix attribute should become the default document prefix in the resulting document. Example: Stylesheet: <?xml version="1.0" encoding="utf-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:html="http://http://www.w3.org/1999/xhtml"> <xsl:namespace-alias stylesheet-prefix="html" result-prefix="#default" /> <html:html> .... Output: <?xml version="1.0" encoding="utf-8" ?> <html xmlns="http://http://www.w3.org/1999/xhtml"> .... _NOT_ <?xml version="1.0" encoding="utf-8" ?> <html xmlns:html="http://http://www.w3.org/1999/xhtml"> .... If the stylesheet-prefix is #default then the default prefix in the stylsheet document would have a namespace a prefix of the result-prefix attribute. Example: Stylesheet: <?xml version="1.0" encoding="utf-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:="http://http://www.w3.org/1999/xhtml"> <xsl:namespace-alias stylesheet-prefix="#default" result-prefix="html" /> <html> .... Output: <?xml version="1.0" encoding="utf-8" ?> <html:html xmlns:html="http://http://www.w3.org/1999/xhtml"> .... See my example where I submitted the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
