[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] Xalan Java 2: doesn't seem to output namespaces to result document ...

Subject: [xsl] Xalan Java 2: doesn't seem to output namespaces to result document ...
From: "Ross, Douglas" <DRoss@xxxxxxxxxx>
Date: Tue, 11 Jan 2005 14:16:39 -0500

How do I get the namespaces to show up in the output document?

I use XSLT to create XSLT.

When using Xalan version 1, the following xml outputs:

	<xsl:stylesheet xmlns:xsl="..." xmlns:bla="...">
     		<xsl:call-template name="bla:do-something"/>

And when using Xalan Java 2, I get:

	<xsl:stylesheet xmlns:xsl="...">
      	<xsl:call-template name="bla:do-something"/>

Note: 'xmlns:bla' is missing!

Needless to say, the second one fails when I execute it as input -XSL.

I tried all the things that made sense to me. Add an attribute,
namespace-alias, and a several other things to no avail. Yes I googled,
searched, and asked colleagues (begged actually).

It seems non-triavial to have to change versions of Xalan just for this
behavior. What gives? Is there an explaination?

Any help would be appreciated.


PS Here is a annotated XSLT script:

<?xml version="1.0" ?>
<xsl:stylesheet version="1.2"
    <!--grasping here

<xsl:output method="xml" />

<!-- didn't help
<xsl:namespace-alias stylesheet-prefix="bla" result-prefix="bla"/>

<xsl:template match="/">
      <xsl:element name="xsl:stylesheet">
            <xsl:attribute name="version">1.2</xsl:attribute>
      <!-- didn't help: was ignored unresolve namespace 'xmlns'
            <xsl:apply-templates />

Current Thread