You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by mr...@apache.org on 2005/05/17 19:25:45 UTC

cvs commit: xml-xerces/java/src/org/apache/xerces/jaxp SAXParserImpl.java

mrglavas    2005/05/17 10:25:45

  Modified:    java/src/org/apache/xerces/jaxp SAXParserImpl.java
  Log:
  As suggested in JIRA Issue 1077:
  http://issues.apache.org/jira/browse/XERCESJ-1077
  
  Making SAXParserImpl an implementer of PSVIProvider. This allows
  applicaitons to cast SAXParser's directly to PSVIProvider without
  first having to retrieve the underlying XMLReader.
  
  Revision  Changes    Path
  1.24      +21 -2     xml-xerces/java/src/org/apache/xerces/jaxp/SAXParserImpl.java
  
  Index: SAXParserImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/jaxp/SAXParserImpl.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- SAXParserImpl.java	24 Feb 2004 23:15:58 -0000	1.23
  +++ SAXParserImpl.java	17 May 2005 17:25:45 -0000	1.24
  @@ -29,6 +29,9 @@
   import org.xml.sax.XMLReader;
   
   import org.apache.xerces.util.SAXMessageFormatter;
  +import org.apache.xerces.xs.AttributePSVI;
  +import org.apache.xerces.xs.ElementPSVI;
  +import org.apache.xerces.xs.PSVIProvider;
   
   /**
    * This is the implementation specific class for the
  @@ -40,7 +43,7 @@
    * @version $Id$
    */
   public class SAXParserImpl extends javax.xml.parsers.SAXParser
  -    implements JAXPConstants {
  +    implements JAXPConstants, PSVIProvider {
   
       private XMLReader xmlReader;
       private String schemaLanguage = null;     // null means DTD
  @@ -199,4 +202,20 @@
               return xmlReader.getProperty(name);
           }
       }
  +    
  +    /*
  +     * PSVIProvider methods
  +     */
  +
  +    public ElementPSVI getElementPSVI() {
  +        return ((PSVIProvider)xmlReader).getElementPSVI();
  +    }
  +
  +    public AttributePSVI getAttributePSVI(int index) {
  +        return ((PSVIProvider)xmlReader).getAttributePSVI(index);
  +    }
  +
  +    public AttributePSVI getAttributePSVIByName(String uri, String localname) {
  +        return ((PSVIProvider)xmlReader).getAttributePSVIByName(uri, localname);
  +    }
   }
  
  
  

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