Altova Mailing List Archives

[xsl] Generating an XSLT stylesheet with additional namespaces

From: "Jim Earley" <Jim.Earley@---------------------->
Date: 6/5/2006 11:38:00 PM

I'm trying to generate a "stub" XSL stylesheet by reading an XML Schema
to generate the template matches for all declared elements.  The problem
have is that the schema is using a default namespace and I want to
declare a
namespace prefix (and the URI) in the generated stylesheet.

For example:

<xsl:template match="/">

	<xsl:element name="xsl:stylesheet">
		<xsl:if test="@targetNamespace">
				specify the namespace on the stylesheet

		<xsl:for-each select="//xsd:element[@name]">
			<xsl:sort select="@name"/>
			<xsl:apply-templates select="."/>

How can I specify an "additional" and URI on the root xsl:stylesheet

Any ideas?

Thanks in advance for your help.

Jim Earley
XML Developer/Consultant
Flatirons Solutions
4747 Table Mesa Drive
Boulder, CO 80301



These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.