xml-commons-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n..@apache.org
Subject cvs commit: xml-commons/java/src/org/apache/xml/resolver/tools ResolvingXMLReader.java
Date Wed, 13 Nov 2002 20:53:46 GMT
ndw         2002/11/13 12:53:46

  Modified:    java/src/org/apache/xml/resolver/tools
                        ResolvingXMLReader.java
  Log:
  Add interfaces for constructing a filter with a particular CatalogManager
  
  Revision  Changes    Path
  1.2       +19 -1     xml-commons/java/src/org/apache/xml/resolver/tools/ResolvingXMLReader.java
  
  Index: ResolvingXMLReader.java
  ===================================================================
  RCS file: /home/cvs/xml-commons/java/src/org/apache/xml/resolver/tools/ResolvingXMLReader.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ResolvingXMLReader.java	30 Jan 2002 12:25:00 -0000	1.1
  +++ ResolvingXMLReader.java	13 Nov 2002 20:53:44 -0000	1.2
  @@ -91,10 +91,28 @@
      *
      * <p>In order to do its job, a ResolvingXMLReader must in fact be
      * a filter. So the only difference between this code and the filter
  -   * code is that a zero-argument constructor builds a new reader.</p>
  +   * code is that the constructor builds a new reader.</p>
      */
     public ResolvingXMLReader() {
       super();
  +    SAXParserFactory spf = SAXParserFactory.newInstance();
  +    try {
  +      SAXParser parser = spf.newSAXParser();
  +      setParent(parser.getXMLReader());
  +    } catch (Exception ex) {
  +      ex.printStackTrace();
  +    }
  +  }
  +
  +  /**
  +   * <p>Construct a new reader from the JAXP factory</p>
  +   *
  +   * <p>In order to do its job, a ResolvingXMLReader must in fact be
  +   * a filter. So the only difference between this code and the filter
  +   * code is that the constructor builds a new reader.</p>
  +   */
  +  public ResolvingXMLReader(CatalogManager manager) {
  +    super(manager);
       SAXParserFactory spf = SAXParserFactory.newInstance();
       try {
         SAXParser parser = spf.newSAXParser();
  
  
  

Mime
View raw message