You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by el...@apache.org on 2002/10/07 16:14:38 UTC

cvs commit: xml-xerces/java/src/org/apache/xerces/impl XMLNSDocumentScannerImpl.java

elena       2002/10/07 07:14:38

  Modified:    java/src/org/apache/xerces/impl
                        XMLNSDocumentScannerImpl.java
  Log:
  URI was not updated in the element stack thus it was not set at the endElement() call.
  Fixes bug: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13321
  
  Revision  Changes    Path
  1.5       +5 -10     xml-xerces/java/src/org/apache/xerces/impl/XMLNSDocumentScannerImpl.java
  
  Index: XMLNSDocumentScannerImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/XMLNSDocumentScannerImpl.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- XMLNSDocumentScannerImpl.java	24 Sep 2002 23:05:17 -0000	1.4
  +++ XMLNSDocumentScannerImpl.java	7 Oct 2002 14:14:38 -0000	1.5
  @@ -242,12 +242,14 @@
                                              XMLErrorReporter.SEVERITY_FATAL_ERROR);
               }
   
  -
               // bind the element
               String prefix = fElementQName.prefix != null
                               ? fElementQName.prefix : XMLSymbols.EMPTY_STRING;
  -
  +            // assign uri to the element
               fElementQName.uri = fNamespaceContext.getURI(prefix);
  +            // make sure that object in the element stack is updated as well
  +            fCurrentElement.uri = fElementQName.uri;
  +
               if (fElementQName.prefix == null && fElementQName.uri != null) {
                   fElementQName.prefix = XMLSymbols.EMPTY_STRING;
               }
  @@ -287,13 +289,11 @@
               }
           }
   
  -        //handleStartElement(fElementQName, fAttributes); 
   
           // call handler
           if (fDocumentHandler != null) {
               if (empty) {
                   fDocumentHandler.emptyElement(fElementQName, fAttributes, null);
  -                // handleEndElement(fElementQName, null);
   
                   if (fBindNamespaces) {
                       int count = fNamespaceContext.getDeclaredPrefixCount();
  @@ -387,8 +387,6 @@
           }
           fEntityScanner.skipSpaces();
   
  -
  -
           // content
           int oldLen = attributes.getLength();
           attributes.addAttribute(fAttributeQName, XMLSymbols.fCDATASymbol, null);
  @@ -411,9 +409,6 @@
           attributes.setValue(oldLen, value);
           attributes.setNonNormalizedValue(oldLen, fTempString2.toString());
           attributes.setSpecified(oldLen, true);
  -
  -
  -
   
           // record namespace declarations if any.
           if (fBindNamespaces) {
  
  
  

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