cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hepabolu <hepab...@gmail.com>
Subject Re: i18nTransformer problems with static pages
Date Mon, 04 Dec 2006 21:57:43 GMT
falcorn said the following on 4/12/06 13:47:
> 
> I removed dtd declaration and xml:space attribute has gone;
> But there is declaration of xmlns:i18n at html tag.
> And IE dosen't like this attribute. I get blank page.
> In FF everything is correct, I only get some warrnings from Tidy that there
> is not standard attribute at html tag: xmlns:i18n

You should add an extra stylesheet that removes superfluous namespace 
attributes. This is what I've done:

    <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="."/>
           </xsl:attribute>
         </xsl:for-each>
         <xsl:apply-templates/>
       </xsl:element>
   </xsl:template>

Add a generic catchall template or you end up with nothing:

    <!-- ========================================= -->
    <!-- generic catchall template                 -->
    <!-- ========================================= -->
    <xsl:template match="text()">
       <xsl:copy>
          <xsl:apply-templates select="text()"/>
       </xsl:copy>
    </xsl:template>


HTH

Bye, Helma


Mime
View raw message