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" /> Summary: <xsl:namespace-alias stylesheet-prefix="foo" result- prefix="#default" /> Product: XalanJ2 Version: 2.6 Platform: Other OS/Version: All Status: NEW Severity: Major Priority: Other Component: org.apache.xalan.transformer AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] This bug exists in the implementation shipped with the JWSDP-1.4:JAXP-1.2.6 on Sun's java xml site: http://java.sun.com/xml/jaxp/index.jsp If the result-prefix is "#default" then the output should make the source prefix's URI the outputs default namespace, removing any prefixes from nodes in templates. This is not the case. See: http://www.w3.org/TR/xslt#literal-result-element XSLT file "bug.xslt": <?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:output method="xml" version="1.0" encoding="utf-8" indent="yes" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" /> <xsl:namespace-alias stylesheet-prefix="html" result-prefix="#default" /> <xsl:strip-space elements="*" /> <xsl:template match="/adoc"> <html:html> <html:head> <html:title> A title </html:title> </html:head> <html:body> Some text </html:body> </html:html> </xsl:template> </xsl:stylesheet> Source Document "bug.xml": <?xml version="1.0" ?> <adoc /> Command: java org.apache.xalan.xslt.Process -IN bug.xml -XSL bug.xslt -OUT out.html Produces: <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html:html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html:html> <html:head> <html:title> A title </html:title> </html:head> <html:body> Some text </html:body> </html:html> The output should be: <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title> A title </title> </head> <body> Some text </body> </html> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
