xalan-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jkess...@apache.org
Subject cvs commit: xml-xalan/java/src/org/apache/xalan/transformer ClonerToResultTree.java
Date Wed, 21 Aug 2002 15:10:22 GMT
jkesselm    2002/08/21 08:10:21

  Modified:    java/src/org/apache/xalan/transformer
                        ClonerToResultTree.java
  Log:
  James Riordan's bug -- Attributes on elements returned from
  extensions were not being processed successfully. Turns out
  our copying logic had a minor sequencing error.
  
  I don't see anything similar listed in Bugzilla.
  
  Revision  Changes    Path
  1.13      +10 -11    xml-xalan/java/src/org/apache/xalan/transformer/ClonerToResultTree.java
  
  Index: ClonerToResultTree.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/transformer/ClonerToResultTree.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- ClonerToResultTree.java	7 Nov 2001 14:42:26 -0000	1.12
  +++ ClonerToResultTree.java	21 Aug 2002 15:10:21 -0000	1.13
  @@ -211,22 +211,21 @@
           break;
         case DTM.ELEMENT_NODE :
           {
  -          Attributes atts;
  -
  +          // Note: SAX apparently expects "no namespace" to be
  +          // represented as "" rather than null.
  +          String ns = dtm.getNamespaceURI(node);
  +          if (ns==null) ns="";
  +          String localName = dtm.getLocalName(node);
  +          rth.startElement(ns, localName, dtm.getNodeNameX(node), null);
  +          
  +	  // If outputting attrs as separate events, they must
  +	  // _follow_ the startElement event. (Think of the
  +	  // xsl:attribute directive.)
             if (shouldCloneAttributes)
             {
               rth.addAttributes(node);
               rth.processNSDecls(node, nodeType, dtm);
             }
  -
  -          String ns = dtm.getNamespaceURI(node);
  -          // JJK SAX apparently expects "no namespace" to be represented
  -          // as "" rather than null.
  -          if(ns==null)ns="";
  -
  -          String localName = dtm.getLocalName(node);
  -
  -          rth.startElement(ns, localName, dtm.getNodeNameX(node), null);
           }
           break;
         case DTM.CDATA_SECTION_NODE :
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org


Mime
View raw message