elena       2002/09/25 07:26:29

  Modified:    java/src/org/apache/xerces/impl/dtd XMLDTDValidator.java
  Log:
  DTD validator should pass the namespace context object to the next component.
  
  Revision  Changes    Path
  1.37      +9 -5      
xml-xerces/java/src/org/apache/xerces/impl/dtd/XMLDTDValidator.java
  
  Index: XMLDTDValidator.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xerces/java/src/org/apache/xerces/impl/dtd/XMLDTDValidator.java,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- XMLDTDValidator.java      24 Sep 2002 23:05:17 -0000      1.36
  +++ XMLDTDValidator.java      25 Sep 2002 14:26:29 -0000      1.37
  @@ -678,14 +678,18 @@
               }
           }
           fDocLocation = locator;
  -        // REVISIT: in DTD validator we need to be able to update namespace context
  -        //          thus we need to upcast.
  -        if (fNamespaceSupport != null) {
  -            fNamespaceSupport.reset();
  +        // REVISIT: xni.NamespaceSupport should be read/write, since some
  +        //          components might want or need to modify the namespace 
information
  +        // 
  +        if (namespaceContext instanceof NamespaceSupport) {
  +            fNamespaceSupport = (NamespaceSupport)namespaceContext;
           }
           else {
  +            // REVISIT: this is a hack for the case user inserts component before
  +            //          DTD validator
               fNamespaceSupport = new NamespaceSupport();
           }
  +
           if (fDocumentHandler != null) {
               fDocumentHandler.startDocument(locator, encoding, fNamespaceSupport, 
augs);
           }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to