cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Schlichtherle" <>
Subject RE: How to suppress xmlns:jx attribute in output of JXTemplate generator?
Date Sat, 02 Jun 2007 13:21:32 GMT

based on your script, this is what I derived:

<?xml version="1.0" encoding="UTF-8" ?>
<!-- Strips unused XML namespace declarations from the result tree. -->
<xsl:stylesheet version="1.0"
    <xsl:template match="*">
        <xsl:element name="{name()}">
            <xsl:apply-templates select="@*"/>
    <xsl:template match="@*">

The difference to the script provided by you is that this one only removes
namespaces if they are not used by an element. So the resulting XML is
remains valid.

Thank you very much again for setting me on the right track.

Kind regards,

View raw message