cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeroen Reijn" <j.re...@hippo.nl>
Subject RE: Namespaces: how to get rid of them
Date Tue, 21 Jun 2005 08:32:12 GMT
Yves,
 
If everything else fails try adding an extra xslt at the end of your pipeline for stripping
out the namespaces:
 
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl=" http://www.w3.org/1999/XSL/Transform" xmlns="
http://www.w3.org/1999/xhtml">
 
  <xsl:template match="*" priority="-1">
    <xsl:choose>
      <xsl:when test="namespace-uri()=''">
        <!-- assume if namespace empty, namespace = xhtml -->
        <xsl:element name="{name()}">
          <xsl:apply-templates select="@*|node()"/>
        </xsl:element>
      </xsl:when>
      <xsl:otherwise>
        <xsl:element name="{local-name()}">
          <xsl:apply-templates select="@*|node()"/>
        </xsl:element>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>
 
  <xsl:template match="@*|comment()">
    <xsl:copy/>
  </xsl:template>
 
</xsl:stylesheet>
 
:-)
 
Greetz,
 
Jeroen
 
 

-----Original Message-----
From: Yves Vindevogel [mailto:yves.vindevogel@implements.be]
Posted At: Monday, June 20, 2005 5:11 PM
Posted To: Cocoon User List
Conversation: Namespaces: how to get rid of them
Subject: Re: Namespaces: how to get rid of them


I tried that, but it didn't help 

On 20 Jun 2005, at 14:17, Fred Vos wrote: 


On Mon, Jun 20, 2005 at 12:34:03PM +0200, Yves Vindevogel wrote: 

Try adding exclude-result-prefixes="sql" to <xsl:stylesheet... 


<xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
xmlns:sql="http://apache.org/cocoon/SQL/2.0"> 


Change this into: 

<xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
xmlns:sql="http://apache.org/cocoon/SQL/2.0" 
exclude-result-prefixes="sql"> 

Hope this helps, 

Fred 

--------------------------------------------------------------------- 
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org 
For additional commands, e-mail: users-help@cocoon.apache.org 




Met vriendelijke groeten, 
Bien à vous, 
Kind regards, 

Yves Vindevogel 
Implements 




Mime
View raw message