cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Removing namespaces - code from FAQ problem
Date Fri, 06 Apr 2007 08:08:42 GMT

I have used the following piece of code from "How can I remove namespaces from my xml files?"
from the official FAQ ( but it escapes CDATA
sections (eg. "<![CDATA[blah blah]]>").

How can I change it to avoid this side-effect..?

--- Begin xsl ---
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
  <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
    <xsl:template match="*">
      <!-- remove element prefix (if any) -->
      <xsl:element name="{local-name()}">
        <!-- process attributes -->
        <xsl:for-each select="@*">
          <!-- remove attribute prefix (if any) -->
          <xsl:attribute name="{local-name()}">
            <xsl:value-of select="."/>
--- End xsl ---

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message