You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by ri...@locus.apache.org on 2000/08/22 02:39:43 UTC

cvs commit: xml-cocoon/src/org/apache/cocoon/processor/xsp xsp-java.xsl

ricardo     00/08/21 17:39:43

  Modified:    src/org/apache/cocoon/processor/xsp xsp-java.xsl
  Log:
  Added namespace preservation
  
  Revision  Changes    Path
  1.18      +18 -0     xml-cocoon/src/org/apache/cocoon/processor/xsp/xsp-java.xsl
  
  Index: xsp-java.xsl
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/processor/xsp/xsp-java.xsl,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- xsp-java.xsl	2000/05/07 04:41:55	1.17
  +++ xsp-java.xsl	2000/08/22 00:39:42	1.18
  @@ -136,6 +136,15 @@
       xspNodeStack.push(xspParentNode);
       xspCurrentNode =
         document.createElement("<xsl:value-of select="@name"/>");
  +
  +    <!-- Add namespace declarations -->
  +    <xsl:for-each select="namespace::*">
  +      ((Element) xspCurrentNode).setAttribute(
  +        "xmlns:<xsl:value-of select="local-name(.)"/>",
  +        "<xsl:value-of select="."/>"
  +      );
  +    </xsl:for-each>
  +
       xspParentNode.appendChild(xspCurrentNode);
   
       <xsl:apply-templates/>
  @@ -226,6 +235,15 @@
       xspParentNode.appendChild(xspCurrentNode);
   
       <xsl:apply-templates select="@*"/>
  +
  +    <!-- Add namespace declarations -->
  +    <xsl:for-each select="namespace::*">
  +      ((Element) xspCurrentNode).setAttribute(
  +        "xmlns:<xsl:value-of select="local-name(.)"/>",
  +        "<xsl:value-of select="."/>"
  +      );
  +    </xsl:for-each>
  +
       <xsl:apply-templates/>
   
       ((Element) xspCurrentNode).normalize();