Return-Path: Delivered-To: apmail-xml-xalan-cvs-archive@xml.apache.org Received: (qmail 76059 invoked by uid 500); 21 Aug 2002 15:10:22 -0000 Mailing-List: contact xalan-cvs-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: Delivered-To: mailing list xalan-cvs@xml.apache.org Received: (qmail 76046 invoked from network); 21 Aug 2002 15:10:22 -0000 Date: 21 Aug 2002 15:10:22 -0000 Message-ID: <20020821151022.11592.qmail@icarus.apache.org> From: jkesselm@apache.org To: xml-xalan-cvs@apache.org Subject: cvs commit: xml-xalan/java/src/org/apache/xalan/transformer ClonerToResultTree.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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