asif_zzz ha scritto:
Hi,
Im using Cocoon 2.1.10 CFORMS

My namespace declartion will look like this.

<page
        xmlns:i18n="http://apache.org/cocoon/i18n/2.1";
        xmlns:ft="http://apache.org/cocoon/forms/1.0#template";
        xmlns:fi="http://apache.org/cocoon/forms/1.0#instance";
        xmlns:jx="http://apache.org/cocoon/templates/jx/1.0";
        xmlns:xi="http://www.w3.org/2001/XInclude";>

I tried by adding a template(template name is = page) in XSL file to remove
the namespace information.
When i run the application it get removed from the html tag but i found that
the problem persists in sub tag.

<link xmlns:ft="http://apache.org/cocoon/forms/1.0#template"; xmlns:fi="http://apache.org/cocoon/forms/1.0#instance"; xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"; xmlns:xi="http://www.w3.org/2001/XInclude"; type="text/css" rel="stylesheet"
href="../style1.css">

Anyone please tell me ,how to solve this issue??
Hi,
in these cases, I usually add an XSL transformation with a stylesheet like the following (found sometime ago somewhere in Internet); as you can see, it is quite a hack, but it does the job ;-)


<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>

 <xsl:output method="xml" encoding="UTF-8" />

 <xsl:template match="*">
   <xsl:choose>
     <!-- <div> + CSS bug's workaround for MSIE and Mozilla -->
     <xsl:when
       test="local-name()='div' and @id='forms_calendarDiv'">
       <xsl:element name="div">
         <xsl:attribute name="id">
           forms_calendarDiv
         </xsl:attribute>
         &#160;
       </xsl:element>
     </xsl:when>

     <!-- default behavior: remove all namespaces -->
     <xsl:otherwise>
       <!-- 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:otherwise>
   </xsl:choose>
 </xsl:template>

</xsl:stylesheet>



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to