jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/IncrementalSAXSource_Xerces.java
author dfuchs
Tue, 30 Jun 2015 12:04:27 +0200
changeset 31497 4a6b2e733c0d
parent 25868 686eef1e7a79
child 44797 8b3b3b911b8a
permissions -rw-r--r--
8130051: Cleanup usage of reflection in jaxp Summary: replaced usage of reflection with direct access where possible, removed obsolete code where possible. Reviewed-by: joehw
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6
7f561c08de6b Initial load
duke
parents:
diff changeset
     1
/*
7f561c08de6b Initial load
duke
parents:
diff changeset
     2
 * reserved comment block
7f561c08de6b Initial load
duke
parents:
diff changeset
     3
 * DO NOT REMOVE OR ALTER!
7f561c08de6b Initial load
duke
parents:
diff changeset
     4
 */
7f561c08de6b Initial load
duke
parents:
diff changeset
     5
/*
7f561c08de6b Initial load
duke
parents:
diff changeset
     6
 * Copyright 1999-2004 The Apache Software Foundation.
7f561c08de6b Initial load
duke
parents:
diff changeset
     7
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
     8
 * Licensed under the Apache License, Version 2.0 (the "License");
7f561c08de6b Initial load
duke
parents:
diff changeset
     9
 * you may not use this file except in compliance with the License.
7f561c08de6b Initial load
duke
parents:
diff changeset
    10
 * You may obtain a copy of the License at
7f561c08de6b Initial load
duke
parents:
diff changeset
    11
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    12
 *     http://www.apache.org/licenses/LICENSE-2.0
7f561c08de6b Initial load
duke
parents:
diff changeset
    13
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    14
 * Unless required by applicable law or agreed to in writing, software
7f561c08de6b Initial load
duke
parents:
diff changeset
    15
 * distributed under the License is distributed on an "AS IS" BASIS,
7f561c08de6b Initial load
duke
parents:
diff changeset
    16
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7f561c08de6b Initial load
duke
parents:
diff changeset
    17
 * See the License for the specific language governing permissions and
7f561c08de6b Initial load
duke
parents:
diff changeset
    18
 * limitations under the License.
7f561c08de6b Initial load
duke
parents:
diff changeset
    19
 */
7f561c08de6b Initial load
duke
parents:
diff changeset
    20
/*
7f561c08de6b Initial load
duke
parents:
diff changeset
    21
 * $Id: IncrementalSAXSource_Xerces.java,v 1.2.4.1 2005/09/15 08:15:08 suresh_emailid Exp $
7f561c08de6b Initial load
duke
parents:
diff changeset
    22
 */
7f561c08de6b Initial load
duke
parents:
diff changeset
    23
7f561c08de6b Initial load
duke
parents:
diff changeset
    24
package com.sun.org.apache.xml.internal.dtm.ref;
7f561c08de6b Initial load
duke
parents:
diff changeset
    25
7f561c08de6b Initial load
duke
parents:
diff changeset
    26
import java.io.IOException;
7f561c08de6b Initial load
duke
parents:
diff changeset
    27
import java.lang.reflect.Constructor;
7f561c08de6b Initial load
duke
parents:
diff changeset
    28
import java.lang.reflect.Method;
7f561c08de6b Initial load
duke
parents:
diff changeset
    29
7f561c08de6b Initial load
duke
parents:
diff changeset
    30
import com.sun.org.apache.xerces.internal.parsers.SAXParser;
7f561c08de6b Initial load
duke
parents:
diff changeset
    31
import com.sun.org.apache.xml.internal.res.XMLErrorResources;
7f561c08de6b Initial load
duke
parents:
diff changeset
    32
import com.sun.org.apache.xml.internal.res.XMLMessages;
12458
d601e4bba306 7160380: Sync JDK8 with JAXP 1.4.5
joehw
parents: 12457
diff changeset
    33
import com.sun.org.apache.xalan.internal.utils.ObjectFactory;
6
7f561c08de6b Initial load
duke
parents:
diff changeset
    34
7f561c08de6b Initial load
duke
parents:
diff changeset
    35
import org.xml.sax.InputSource;
7f561c08de6b Initial load
duke
parents:
diff changeset
    36
import org.xml.sax.SAXException;
7f561c08de6b Initial load
duke
parents:
diff changeset
    37
import org.xml.sax.XMLReader;
7f561c08de6b Initial load
duke
parents:
diff changeset
    38
7f561c08de6b Initial load
duke
parents:
diff changeset
    39
7f561c08de6b Initial load
duke
parents:
diff changeset
    40
/** <p>IncrementalSAXSource_Xerces takes advantage of the fact that Xerces1
7f561c08de6b Initial load
duke
parents:
diff changeset
    41
 * incremental mode is already a coroutine of sorts, and just wraps our
7f561c08de6b Initial load
duke
parents:
diff changeset
    42
 * IncrementalSAXSource API around it.</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
    43
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    44
 * <p>Usage example: See main().</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
    45
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    46
 * <p>Status: Passes simple main() unit-test. NEEDS JAVADOC.</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
    47
 * */
7f561c08de6b Initial load
duke
parents:
diff changeset
    48
public class IncrementalSAXSource_Xerces
7f561c08de6b Initial load
duke
parents:
diff changeset
    49
  implements IncrementalSAXSource
7f561c08de6b Initial load
duke
parents:
diff changeset
    50
{
7f561c08de6b Initial load
duke
parents:
diff changeset
    51
  //
7f561c08de6b Initial load
duke
parents:
diff changeset
    52
  // Reflection. To allow this to compile with both Xerces1 and Xerces2, which
7f561c08de6b Initial load
duke
parents:
diff changeset
    53
  // require very different methods and objects, we need to avoid static
7f561c08de6b Initial load
duke
parents:
diff changeset
    54
  // references to those APIs. So until Xerces2 is pervasive and we're willing
7f561c08de6b Initial load
duke
parents:
diff changeset
    55
  // to make it a prerequisite, we will rely upon relection.
7f561c08de6b Initial load
duke
parents:
diff changeset
    56
  //
7f561c08de6b Initial load
duke
parents:
diff changeset
    57
  Method fParseSomeSetup=null; // Xerces1 method
7f561c08de6b Initial load
duke
parents:
diff changeset
    58
  Method fParseSome=null; // Xerces1 method
7f561c08de6b Initial load
duke
parents:
diff changeset
    59
  Object fPullParserConfig=null; // Xerces2 pull control object
7f561c08de6b Initial load
duke
parents:
diff changeset
    60
  Method fConfigSetInput=null; // Xerces2 method
7f561c08de6b Initial load
duke
parents:
diff changeset
    61
  Method fConfigParse=null; // Xerces2 method
7f561c08de6b Initial load
duke
parents:
diff changeset
    62
  Method fSetInputSource=null; // Xerces2 pull control method
7f561c08de6b Initial load
duke
parents:
diff changeset
    63
  Constructor fConfigInputSourceCtor=null; // Xerces2 initialization method
7f561c08de6b Initial load
duke
parents:
diff changeset
    64
  Method fConfigSetByteStream=null; // Xerces2 initialization method
7f561c08de6b Initial load
duke
parents:
diff changeset
    65
  Method fConfigSetCharStream=null; // Xerces2 initialization method
7f561c08de6b Initial load
duke
parents:
diff changeset
    66
  Method fConfigSetEncoding=null; // Xerces2 initialization method
7f561c08de6b Initial load
duke
parents:
diff changeset
    67
  Method fReset=null; // Both Xerces1 and Xerces2, but diff. signatures
7f561c08de6b Initial load
duke
parents:
diff changeset
    68
7f561c08de6b Initial load
duke
parents:
diff changeset
    69
  //
7f561c08de6b Initial load
duke
parents:
diff changeset
    70
  // Data
7f561c08de6b Initial load
duke
parents:
diff changeset
    71
  //
7f561c08de6b Initial load
duke
parents:
diff changeset
    72
  SAXParser fIncrementalParser;
7f561c08de6b Initial load
duke
parents:
diff changeset
    73
  private boolean fParseInProgress=false;
7f561c08de6b Initial load
duke
parents:
diff changeset
    74
7f561c08de6b Initial load
duke
parents:
diff changeset
    75
  //
7f561c08de6b Initial load
duke
parents:
diff changeset
    76
  // Constructors
7f561c08de6b Initial load
duke
parents:
diff changeset
    77
  //
7f561c08de6b Initial load
duke
parents:
diff changeset
    78
7f561c08de6b Initial load
duke
parents:
diff changeset
    79
  /** Create a IncrementalSAXSource_Xerces, and create a SAXParser
7f561c08de6b Initial load
duke
parents:
diff changeset
    80
   * to go with it. Xerces2 incremental parsing is only supported if
7f561c08de6b Initial load
duke
parents:
diff changeset
    81
   * this constructor is used, due to limitations in the Xerces2 API (as of
7f561c08de6b Initial load
duke
parents:
diff changeset
    82
   * Beta 3). If you don't like that restriction, tell the Xerces folks that
7f561c08de6b Initial load
duke
parents:
diff changeset
    83
   * there should be a simpler way to request incremental SAX parsing.
7f561c08de6b Initial load
duke
parents:
diff changeset
    84
   * */
7f561c08de6b Initial load
duke
parents:
diff changeset
    85
  public IncrementalSAXSource_Xerces()
7f561c08de6b Initial load
duke
parents:
diff changeset
    86
                throws NoSuchMethodException
7f561c08de6b Initial load
duke
parents:
diff changeset
    87
        {
7f561c08de6b Initial load
duke
parents:
diff changeset
    88
                try
7f561c08de6b Initial load
duke
parents:
diff changeset
    89
                {
31497
4a6b2e733c0d 8130051: Cleanup usage of reflection in jaxp
dfuchs
parents: 25868
diff changeset
    90
                        // This should be cleaned up and the use of reflection
4a6b2e733c0d 8130051: Cleanup usage of reflection in jaxp
dfuchs
parents: 25868
diff changeset
    91
                        // removed - see JDK-8129880
4a6b2e733c0d 8130051: Cleanup usage of reflection in jaxp
dfuchs
parents: 25868
diff changeset
    92
6
7f561c08de6b Initial load
duke
parents:
diff changeset
    93
                        // Xerces-2 incremental parsing support (as of Beta 3)
7f561c08de6b Initial load
duke
parents:
diff changeset
    94
                        // ContentHandlers still get set on fIncrementalParser (to get
7f561c08de6b Initial load
duke
parents:
diff changeset
    95
                        // conversion from XNI events to SAX events), but
7f561c08de6b Initial load
duke
parents:
diff changeset
    96
                        // _control_ for incremental parsing must be exercised via the config.
7f561c08de6b Initial load
duke
parents:
diff changeset
    97
                        //
7f561c08de6b Initial load
duke
parents:
diff changeset
    98
                        // At this time there's no way to read the existing config, only
7f561c08de6b Initial load
duke
parents:
diff changeset
    99
                        // to assert a new one... and only when creating a brand-new parser.
7f561c08de6b Initial load
duke
parents:
diff changeset
   100
                        //
7f561c08de6b Initial load
duke
parents:
diff changeset
   101
                        // Reflection is used to allow us to continue to compile against
7f561c08de6b Initial load
duke
parents:
diff changeset
   102
                        // Xerces1. If/when we can abandon the older versions of the parser,
7f561c08de6b Initial load
duke
parents:
diff changeset
   103
                        // this will simplify significantly.
7f561c08de6b Initial load
duke
parents:
diff changeset
   104
7f561c08de6b Initial load
duke
parents:
diff changeset
   105
                        // If we can't get the magic constructor, no need to look further.
7f561c08de6b Initial load
duke
parents:
diff changeset
   106
                        Class xniConfigClass=ObjectFactory.findProviderClass(
7f561c08de6b Initial load
duke
parents:
diff changeset
   107
                            "com.sun.org.apache.xerces.internal.xni.parser.XMLParserConfiguration",
12458
d601e4bba306 7160380: Sync JDK8 with JAXP 1.4.5
joehw
parents: 12457
diff changeset
   108
                            true);
6
7f561c08de6b Initial load
duke
parents:
diff changeset
   109
                        Class[] args1={xniConfigClass};
7f561c08de6b Initial load
duke
parents:
diff changeset
   110
                        Constructor ctor=SAXParser.class.getConstructor(args1);
7f561c08de6b Initial load
duke
parents:
diff changeset
   111
7f561c08de6b Initial load
duke
parents:
diff changeset
   112
                        // Build the parser configuration object. StandardParserConfiguration
7f561c08de6b Initial load
duke
parents:
diff changeset
   113
                        // happens to implement XMLPullParserConfiguration, which is the API
7f561c08de6b Initial load
duke
parents:
diff changeset
   114
                        // we're going to want to use.
7f561c08de6b Initial load
duke
parents:
diff changeset
   115
                        Class xniStdConfigClass=ObjectFactory.findProviderClass(
7f561c08de6b Initial load
duke
parents:
diff changeset
   116
                            "com.sun.org.apache.xerces.internal.parsers.StandardParserConfiguration",
12458
d601e4bba306 7160380: Sync JDK8 with JAXP 1.4.5
joehw
parents: 12457
diff changeset
   117
                            true);
6
7f561c08de6b Initial load
duke
parents:
diff changeset
   118
                        fPullParserConfig=xniStdConfigClass.newInstance();
7f561c08de6b Initial load
duke
parents:
diff changeset
   119
                        Object[] args2={fPullParserConfig};
7f561c08de6b Initial load
duke
parents:
diff changeset
   120
                        fIncrementalParser = (SAXParser)ctor.newInstance(args2);
7f561c08de6b Initial load
duke
parents:
diff changeset
   121
7f561c08de6b Initial load
duke
parents:
diff changeset
   122
                        // Preload all the needed the configuration methods... I want to know they're
7f561c08de6b Initial load
duke
parents:
diff changeset
   123
                        // all here before we commit to trying to use them, just in case the
7f561c08de6b Initial load
duke
parents:
diff changeset
   124
                        // API changes again.
7f561c08de6b Initial load
duke
parents:
diff changeset
   125
                        Class fXniInputSourceClass=ObjectFactory.findProviderClass(
7f561c08de6b Initial load
duke
parents:
diff changeset
   126
                            "com.sun.org.apache.xerces.internal.xni.parser.XMLInputSource",
12458
d601e4bba306 7160380: Sync JDK8 with JAXP 1.4.5
joehw
parents: 12457
diff changeset
   127
                            true);
6
7f561c08de6b Initial load
duke
parents:
diff changeset
   128
                        Class[] args3={fXniInputSourceClass};
7f561c08de6b Initial load
duke
parents:
diff changeset
   129
                        fConfigSetInput=xniStdConfigClass.getMethod("setInputSource",args3);
7f561c08de6b Initial load
duke
parents:
diff changeset
   130
7f561c08de6b Initial load
duke
parents:
diff changeset
   131
                        Class[] args4={String.class,String.class,String.class};
7f561c08de6b Initial load
duke
parents:
diff changeset
   132
                        fConfigInputSourceCtor=fXniInputSourceClass.getConstructor(args4);
7f561c08de6b Initial load
duke
parents:
diff changeset
   133
                        Class[] args5={java.io.InputStream.class};
7f561c08de6b Initial load
duke
parents:
diff changeset
   134
                        fConfigSetByteStream=fXniInputSourceClass.getMethod("setByteStream",args5);
7f561c08de6b Initial load
duke
parents:
diff changeset
   135
                        Class[] args6={java.io.Reader.class};
7f561c08de6b Initial load
duke
parents:
diff changeset
   136
                        fConfigSetCharStream=fXniInputSourceClass.getMethod("setCharacterStream",args6);
7f561c08de6b Initial load
duke
parents:
diff changeset
   137
                        Class[] args7={String.class};
7f561c08de6b Initial load
duke
parents:
diff changeset
   138
                        fConfigSetEncoding=fXniInputSourceClass.getMethod("setEncoding",args7);
7f561c08de6b Initial load
duke
parents:
diff changeset
   139
7f561c08de6b Initial load
duke
parents:
diff changeset
   140
                        Class[] argsb={Boolean.TYPE};
7f561c08de6b Initial load
duke
parents:
diff changeset
   141
                        fConfigParse=xniStdConfigClass.getMethod("parse",argsb);
7f561c08de6b Initial load
duke
parents:
diff changeset
   142
                        Class[] noargs=new Class[0];
7f561c08de6b Initial load
duke
parents:
diff changeset
   143
                        fReset=fIncrementalParser.getClass().getMethod("reset",noargs);
7f561c08de6b Initial load
duke
parents:
diff changeset
   144
                }
7f561c08de6b Initial load
duke
parents:
diff changeset
   145
                catch(Exception e)
7f561c08de6b Initial load
duke
parents:
diff changeset
   146
                {
7f561c08de6b Initial load
duke
parents:
diff changeset
   147
            // Fallback if this fails (implemented in createIncrementalSAXSource) is
7f561c08de6b Initial load
duke
parents:
diff changeset
   148
                        // to attempt Xerces-1 incremental setup. Can't do tail-call in
7f561c08de6b Initial load
duke
parents:
diff changeset
   149
                        // constructor, so create new, copy Xerces-1 initialization,
7f561c08de6b Initial load
duke
parents:
diff changeset
   150
                        // then throw it away... Ugh.
7f561c08de6b Initial load
duke
parents:
diff changeset
   151
                        IncrementalSAXSource_Xerces dummy=new IncrementalSAXSource_Xerces(new SAXParser());
7f561c08de6b Initial load
duke
parents:
diff changeset
   152
                        this.fParseSomeSetup=dummy.fParseSomeSetup;
7f561c08de6b Initial load
duke
parents:
diff changeset
   153
                        this.fParseSome=dummy.fParseSome;
7f561c08de6b Initial load
duke
parents:
diff changeset
   154
                        this.fIncrementalParser=dummy.fIncrementalParser;
7f561c08de6b Initial load
duke
parents:
diff changeset
   155
                }
7f561c08de6b Initial load
duke
parents:
diff changeset
   156
  }
7f561c08de6b Initial load
duke
parents:
diff changeset
   157
7f561c08de6b Initial load
duke
parents:
diff changeset
   158
  /** Create a IncrementalSAXSource_Xerces wrapped around
7f561c08de6b Initial load
duke
parents:
diff changeset
   159
   * an existing SAXParser. Currently this works only for recent
7f561c08de6b Initial load
duke
parents:
diff changeset
   160
   * releases of Xerces-1.  Xerces-2 incremental is currently possible
7f561c08de6b Initial load
duke
parents:
diff changeset
   161
   * only if we are allowed to create the parser instance, due to
7f561c08de6b Initial load
duke
parents:
diff changeset
   162
   * limitations in the API exposed by Xerces-2 Beta 3; see the
7f561c08de6b Initial load
duke
parents:
diff changeset
   163
   * no-args constructor for that code.
7f561c08de6b Initial load
duke
parents:
diff changeset
   164
   *
7f561c08de6b Initial load
duke
parents:
diff changeset
   165
   * @exception if the SAXParser class doesn't support the Xerces
7f561c08de6b Initial load
duke
parents:
diff changeset
   166
   * incremental parse operations. In that case, caller should
7f561c08de6b Initial load
duke
parents:
diff changeset
   167
   * fall back upon the IncrementalSAXSource_Filter approach.
7f561c08de6b Initial load
duke
parents:
diff changeset
   168
   * */
7f561c08de6b Initial load
duke
parents:
diff changeset
   169
  public IncrementalSAXSource_Xerces(SAXParser parser)
7f561c08de6b Initial load
duke
parents:
diff changeset
   170
    throws NoSuchMethodException
7f561c08de6b Initial load
duke
parents:
diff changeset
   171
  {
7f561c08de6b Initial load
duke
parents:
diff changeset
   172
                // Reflection is used to allow us to compile against
7f561c08de6b Initial load
duke
parents:
diff changeset
   173
                // Xerces2. If/when we can abandon the older versions of the parser,
7f561c08de6b Initial load
duke
parents:
diff changeset
   174
                // this constructor will simply have to fail until/unless the
7f561c08de6b Initial load
duke
parents:
diff changeset
   175
                // Xerces2 incremental support is made available on previously
7f561c08de6b Initial load
duke
parents:
diff changeset
   176
                // constructed SAXParser instances.
7f561c08de6b Initial load
duke
parents:
diff changeset
   177
    fIncrementalParser=parser;
7f561c08de6b Initial load
duke
parents:
diff changeset
   178
                Class me=parser.getClass();
7f561c08de6b Initial load
duke
parents:
diff changeset
   179
    Class[] parms={InputSource.class};
7f561c08de6b Initial load
duke
parents:
diff changeset
   180
    fParseSomeSetup=me.getMethod("parseSomeSetup",parms);
7f561c08de6b Initial load
duke
parents:
diff changeset
   181
    parms=new Class[0];
7f561c08de6b Initial load
duke
parents:
diff changeset
   182
    fParseSome=me.getMethod("parseSome",parms);
7f561c08de6b Initial load
duke
parents:
diff changeset
   183
    // Fallback if this fails (implemented in createIncrementalSAXSource) is
7f561c08de6b Initial load
duke
parents:
diff changeset
   184
    // to use IncrementalSAXSource_Filter rather than Xerces-specific code.
7f561c08de6b Initial load
duke
parents:
diff changeset
   185
  }
7f561c08de6b Initial load
duke
parents:
diff changeset
   186
7f561c08de6b Initial load
duke
parents:
diff changeset
   187
  //
7f561c08de6b Initial load
duke
parents:
diff changeset
   188
  // Factories
7f561c08de6b Initial load
duke
parents:
diff changeset
   189
  //
7f561c08de6b Initial load
duke
parents:
diff changeset
   190
  static public IncrementalSAXSource createIncrementalSAXSource()
7f561c08de6b Initial load
duke
parents:
diff changeset
   191
        {
7f561c08de6b Initial load
duke
parents:
diff changeset
   192
                try
7f561c08de6b Initial load
duke
parents:
diff changeset
   193
                {
7f561c08de6b Initial load
duke
parents:
diff changeset
   194
                        return new IncrementalSAXSource_Xerces();
7f561c08de6b Initial load
duke
parents:
diff changeset
   195
                }
7f561c08de6b Initial load
duke
parents:
diff changeset
   196
                catch(NoSuchMethodException e)
7f561c08de6b Initial load
duke
parents:
diff changeset
   197
                {
7f561c08de6b Initial load
duke
parents:
diff changeset
   198
                        // Xerces version mismatch; neither Xerces1 nor Xerces2 succeeded.
7f561c08de6b Initial load
duke
parents:
diff changeset
   199
                        // Fall back on filtering solution.
7f561c08de6b Initial load
duke
parents:
diff changeset
   200
                        IncrementalSAXSource_Filter iss=new IncrementalSAXSource_Filter();
7f561c08de6b Initial load
duke
parents:
diff changeset
   201
                        iss.setXMLReader(new SAXParser());
7f561c08de6b Initial load
duke
parents:
diff changeset
   202
                        return iss;
7f561c08de6b Initial load
duke
parents:
diff changeset
   203
                }
7f561c08de6b Initial load
duke
parents:
diff changeset
   204
  }
7f561c08de6b Initial load
duke
parents:
diff changeset
   205
7f561c08de6b Initial load
duke
parents:
diff changeset
   206
  static public IncrementalSAXSource
7f561c08de6b Initial load
duke
parents:
diff changeset
   207
  createIncrementalSAXSource(SAXParser parser) {
7f561c08de6b Initial load
duke
parents:
diff changeset
   208
                try
7f561c08de6b Initial load
duke
parents:
diff changeset
   209
                {
7f561c08de6b Initial load
duke
parents:
diff changeset
   210
                        return new IncrementalSAXSource_Xerces(parser);
7f561c08de6b Initial load
duke
parents:
diff changeset
   211
                }
7f561c08de6b Initial load
duke
parents:
diff changeset
   212
                catch(NoSuchMethodException e)
7f561c08de6b Initial load
duke
parents:
diff changeset
   213
                {
7f561c08de6b Initial load
duke
parents:
diff changeset
   214
                        // Xerces version mismatch; neither Xerces1 nor Xerces2 succeeded.
7f561c08de6b Initial load
duke
parents:
diff changeset
   215
                        // Fall back on filtering solution.
7f561c08de6b Initial load
duke
parents:
diff changeset
   216
                        IncrementalSAXSource_Filter iss=new IncrementalSAXSource_Filter();
7f561c08de6b Initial load
duke
parents:
diff changeset
   217
                        iss.setXMLReader(parser);
7f561c08de6b Initial load
duke
parents:
diff changeset
   218
                        return iss;
7f561c08de6b Initial load
duke
parents:
diff changeset
   219
                }
7f561c08de6b Initial load
duke
parents:
diff changeset
   220
  }
7f561c08de6b Initial load
duke
parents:
diff changeset
   221
7f561c08de6b Initial load
duke
parents:
diff changeset
   222
  //
7f561c08de6b Initial load
duke
parents:
diff changeset
   223
  // Public methods
7f561c08de6b Initial load
duke
parents:
diff changeset
   224
  //
7f561c08de6b Initial load
duke
parents:
diff changeset
   225
7f561c08de6b Initial load
duke
parents:
diff changeset
   226
  // Register handler directly with the incremental parser
7f561c08de6b Initial load
duke
parents:
diff changeset
   227
  public void setContentHandler(org.xml.sax.ContentHandler handler)
7f561c08de6b Initial load
duke
parents:
diff changeset
   228
  {
7f561c08de6b Initial load
duke
parents:
diff changeset
   229
    // Typecast required in Xerces2; SAXParser doesn't inheret XMLReader
7f561c08de6b Initial load
duke
parents:
diff changeset
   230
    // %OPT% Cast at asignment?
7f561c08de6b Initial load
duke
parents:
diff changeset
   231
    ((XMLReader)fIncrementalParser).setContentHandler(handler);
7f561c08de6b Initial load
duke
parents:
diff changeset
   232
  }
7f561c08de6b Initial load
duke
parents:
diff changeset
   233
7f561c08de6b Initial load
duke
parents:
diff changeset
   234
  // Register handler directly with the incremental parser
7f561c08de6b Initial load
duke
parents:
diff changeset
   235
  public void setLexicalHandler(org.xml.sax.ext.LexicalHandler handler)
7f561c08de6b Initial load
duke
parents:
diff changeset
   236
  {
7f561c08de6b Initial load
duke
parents:
diff changeset
   237
    // Not supported by all SAX2 parsers but should work in Xerces:
7f561c08de6b Initial load
duke
parents:
diff changeset
   238
    try
7f561c08de6b Initial load
duke
parents:
diff changeset
   239
    {
7f561c08de6b Initial load
duke
parents:
diff changeset
   240
      // Typecast required in Xerces2; SAXParser doesn't inheret XMLReader
7f561c08de6b Initial load
duke
parents:
diff changeset
   241
      // %OPT% Cast at asignment?
7f561c08de6b Initial load
duke
parents:
diff changeset
   242
      ((XMLReader)fIncrementalParser).setProperty("http://xml.org/sax/properties/lexical-handler",
7f561c08de6b Initial load
duke
parents:
diff changeset
   243
                                     handler);
7f561c08de6b Initial load
duke
parents:
diff changeset
   244
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
   245
    catch(org.xml.sax.SAXNotRecognizedException e)
7f561c08de6b Initial load
duke
parents:
diff changeset
   246
    {
7f561c08de6b Initial load
duke
parents:
diff changeset
   247
      // Nothing we can do about it
7f561c08de6b Initial load
duke
parents:
diff changeset
   248
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
   249
    catch(org.xml.sax.SAXNotSupportedException e)
7f561c08de6b Initial load
duke
parents:
diff changeset
   250
    {
7f561c08de6b Initial load
duke
parents:
diff changeset
   251
      // Nothing we can do about it
7f561c08de6b Initial load
duke
parents:
diff changeset
   252
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
   253
  }
7f561c08de6b Initial load
duke
parents:
diff changeset
   254
7f561c08de6b Initial load
duke
parents:
diff changeset
   255
  // Register handler directly with the incremental parser
7f561c08de6b Initial load
duke
parents:
diff changeset
   256
  public void setDTDHandler(org.xml.sax.DTDHandler handler)
7f561c08de6b Initial load
duke
parents:
diff changeset
   257
  {
7f561c08de6b Initial load
duke
parents:
diff changeset
   258
    // Typecast required in Xerces2; SAXParser doesn't inheret XMLReader
7f561c08de6b Initial load
duke
parents:
diff changeset
   259
    // %OPT% Cast at asignment?
7f561c08de6b Initial load
duke
parents:
diff changeset
   260
    ((XMLReader)fIncrementalParser).setDTDHandler(handler);
7f561c08de6b Initial load
duke
parents:
diff changeset
   261
  }
7f561c08de6b Initial load
duke
parents:
diff changeset
   262
7f561c08de6b Initial load
duke
parents:
diff changeset
   263
  //================================================================
7f561c08de6b Initial load
duke
parents:
diff changeset
   264
  /** startParse() is a simple API which tells the IncrementalSAXSource
7f561c08de6b Initial load
duke
parents:
diff changeset
   265
   * to begin reading a document.
7f561c08de6b Initial load
duke
parents:
diff changeset
   266
   *
7f561c08de6b Initial load
duke
parents:
diff changeset
   267
   * @throws SAXException is parse thread is already in progress
7f561c08de6b Initial load
duke
parents:
diff changeset
   268
   * or parsing can not be started.
7f561c08de6b Initial load
duke
parents:
diff changeset
   269
   * */
7f561c08de6b Initial load
duke
parents:
diff changeset
   270
  public void startParse(InputSource source) throws SAXException
7f561c08de6b Initial load
duke
parents:
diff changeset
   271
  {
7f561c08de6b Initial load
duke
parents:
diff changeset
   272
    if (fIncrementalParser==null)
7f561c08de6b Initial load
duke
parents:
diff changeset
   273
      throw new SAXException(XMLMessages.createXMLMessage(XMLErrorResources.ER_STARTPARSE_NEEDS_SAXPARSER, null)); //"startParse needs a non-null SAXParser.");
7f561c08de6b Initial load
duke
parents:
diff changeset
   274
    if (fParseInProgress)
7f561c08de6b Initial load
duke
parents:
diff changeset
   275
      throw new SAXException(XMLMessages.createXMLMessage(XMLErrorResources.ER_STARTPARSE_WHILE_PARSING, null)); //"startParse may not be called while parsing.");
7f561c08de6b Initial load
duke
parents:
diff changeset
   276
7f561c08de6b Initial load
duke
parents:
diff changeset
   277
    boolean ok=false;
7f561c08de6b Initial load
duke
parents:
diff changeset
   278
7f561c08de6b Initial load
duke
parents:
diff changeset
   279
    try
7f561c08de6b Initial load
duke
parents:
diff changeset
   280
    {
7f561c08de6b Initial load
duke
parents:
diff changeset
   281
      ok = parseSomeSetup(source);
7f561c08de6b Initial load
duke
parents:
diff changeset
   282
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
   283
    catch(Exception ex)
7f561c08de6b Initial load
duke
parents:
diff changeset
   284
    {
7f561c08de6b Initial load
duke
parents:
diff changeset
   285
      throw new SAXException(ex);
7f561c08de6b Initial load
duke
parents:
diff changeset
   286
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
   287
7f561c08de6b Initial load
duke
parents:
diff changeset
   288
    if(!ok)
7f561c08de6b Initial load
duke
parents:
diff changeset
   289
      throw new SAXException(XMLMessages.createXMLMessage(XMLErrorResources.ER_COULD_NOT_INIT_PARSER, null)); //"could not initialize parser with");
7f561c08de6b Initial load
duke
parents:
diff changeset
   290
  }
7f561c08de6b Initial load
duke
parents:
diff changeset
   291
7f561c08de6b Initial load
duke
parents:
diff changeset
   292
7f561c08de6b Initial load
duke
parents:
diff changeset
   293
  /** deliverMoreNodes() is a simple API which tells the coroutine
7f561c08de6b Initial load
duke
parents:
diff changeset
   294
   * parser that we need more nodes.  This is intended to be called
7f561c08de6b Initial load
duke
parents:
diff changeset
   295
   * from one of our partner routines, and serves to encapsulate the
7f561c08de6b Initial load
duke
parents:
diff changeset
   296
   * details of how incremental parsing has been achieved.
7f561c08de6b Initial load
duke
parents:
diff changeset
   297
   *
7f561c08de6b Initial load
duke
parents:
diff changeset
   298
   * @param parsemore If true, tells the incremental parser to generate
7f561c08de6b Initial load
duke
parents:
diff changeset
   299
   * another chunk of output. If false, tells the parser that we're
7f561c08de6b Initial load
duke
parents:
diff changeset
   300
   * satisfied and it can terminate parsing of this document.
7f561c08de6b Initial load
duke
parents:
diff changeset
   301
   * @return Boolean.TRUE if the CoroutineParser believes more data may be available
7f561c08de6b Initial load
duke
parents:
diff changeset
   302
   * for further parsing. Boolean.FALSE if parsing ran to completion.
7f561c08de6b Initial load
duke
parents:
diff changeset
   303
   * Exception if the parser objected for some reason.
7f561c08de6b Initial load
duke
parents:
diff changeset
   304
   * */
7f561c08de6b Initial load
duke
parents:
diff changeset
   305
  public Object deliverMoreNodes (boolean parsemore)
7f561c08de6b Initial load
duke
parents:
diff changeset
   306
  {
7f561c08de6b Initial load
duke
parents:
diff changeset
   307
    if(!parsemore)
7f561c08de6b Initial load
duke
parents:
diff changeset
   308
    {
7f561c08de6b Initial load
duke
parents:
diff changeset
   309
      fParseInProgress=false;
7f561c08de6b Initial load
duke
parents:
diff changeset
   310
      return Boolean.FALSE;
7f561c08de6b Initial load
duke
parents:
diff changeset
   311
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
   312
7f561c08de6b Initial load
duke
parents:
diff changeset
   313
    Object arg;
7f561c08de6b Initial load
duke
parents:
diff changeset
   314
    try {
7f561c08de6b Initial load
duke
parents:
diff changeset
   315
      boolean keepgoing = parseSome();
7f561c08de6b Initial load
duke
parents:
diff changeset
   316
      arg = keepgoing ? Boolean.TRUE : Boolean.FALSE;
7f561c08de6b Initial load
duke
parents:
diff changeset
   317
    } catch (SAXException ex) {
7f561c08de6b Initial load
duke
parents:
diff changeset
   318
      arg = ex;
7f561c08de6b Initial load
duke
parents:
diff changeset
   319
    } catch (IOException ex) {
7f561c08de6b Initial load
duke
parents:
diff changeset
   320
      arg = ex;
7f561c08de6b Initial load
duke
parents:
diff changeset
   321
    } catch (Exception ex) {
7f561c08de6b Initial load
duke
parents:
diff changeset
   322
      arg = new SAXException(ex);
7f561c08de6b Initial load
duke
parents:
diff changeset
   323
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
   324
    return arg;
7f561c08de6b Initial load
duke
parents:
diff changeset
   325
  }
7f561c08de6b Initial load
duke
parents:
diff changeset
   326
7f561c08de6b Initial load
duke
parents:
diff changeset
   327
        // Private methods -- conveniences to hide the reflection details
7f561c08de6b Initial load
duke
parents:
diff changeset
   328
        private boolean parseSomeSetup(InputSource source)
7f561c08de6b Initial load
duke
parents:
diff changeset
   329
                throws SAXException, IOException, IllegalAccessException,
7f561c08de6b Initial load
duke
parents:
diff changeset
   330
                                         java.lang.reflect.InvocationTargetException,
7f561c08de6b Initial load
duke
parents:
diff changeset
   331
                                         java.lang.InstantiationException
7f561c08de6b Initial load
duke
parents:
diff changeset
   332
        {
7f561c08de6b Initial load
duke
parents:
diff changeset
   333
                if(fConfigSetInput!=null)
7f561c08de6b Initial load
duke
parents:
diff changeset
   334
                {
7f561c08de6b Initial load
duke
parents:
diff changeset
   335
                        // Obtain input from SAX inputSource object, construct XNI version of
7f561c08de6b Initial load
duke
parents:
diff changeset
   336
                        // that object. Logic adapted from Xerces2.
7f561c08de6b Initial load
duke
parents:
diff changeset
   337
                        Object[] parms1={source.getPublicId(),source.getSystemId(),null};
7f561c08de6b Initial load
duke
parents:
diff changeset
   338
                        Object xmlsource=fConfigInputSourceCtor.newInstance(parms1);
7f561c08de6b Initial load
duke
parents:
diff changeset
   339
                        Object[] parmsa={source.getByteStream()};
7f561c08de6b Initial load
duke
parents:
diff changeset
   340
                        fConfigSetByteStream.invoke(xmlsource,parmsa);
7f561c08de6b Initial load
duke
parents:
diff changeset
   341
                        parmsa[0]=source.getCharacterStream();
7f561c08de6b Initial load
duke
parents:
diff changeset
   342
                        fConfigSetCharStream.invoke(xmlsource,parmsa);
7f561c08de6b Initial load
duke
parents:
diff changeset
   343
                        parmsa[0]=source.getEncoding();
7f561c08de6b Initial load
duke
parents:
diff changeset
   344
                        fConfigSetEncoding.invoke(xmlsource,parmsa);
7f561c08de6b Initial load
duke
parents:
diff changeset
   345
7f561c08de6b Initial load
duke
parents:
diff changeset
   346
                        // Bugzilla5272 patch suggested by Sandy Gao.
7f561c08de6b Initial load
duke
parents:
diff changeset
   347
                        // Has to be reflection to run with Xerces2
7f561c08de6b Initial load
duke
parents:
diff changeset
   348
                        // after compilation against Xerces1. or vice
7f561c08de6b Initial load
duke
parents:
diff changeset
   349
                        // versa, due to return type mismatches.
7f561c08de6b Initial load
duke
parents:
diff changeset
   350
                        Object[] noparms=new Object[0];
7f561c08de6b Initial load
duke
parents:
diff changeset
   351
                        fReset.invoke(fIncrementalParser,noparms);
7f561c08de6b Initial load
duke
parents:
diff changeset
   352
7f561c08de6b Initial load
duke
parents:
diff changeset
   353
                        parmsa[0]=xmlsource;
7f561c08de6b Initial load
duke
parents:
diff changeset
   354
                        fConfigSetInput.invoke(fPullParserConfig,parmsa);
7f561c08de6b Initial load
duke
parents:
diff changeset
   355
7f561c08de6b Initial load
duke
parents:
diff changeset
   356
                        // %REVIEW% Do first pull. Should we instead just return true?
7f561c08de6b Initial load
duke
parents:
diff changeset
   357
                        return parseSome();
7f561c08de6b Initial load
duke
parents:
diff changeset
   358
                }
7f561c08de6b Initial load
duke
parents:
diff changeset
   359
                else
7f561c08de6b Initial load
duke
parents:
diff changeset
   360
                {
7f561c08de6b Initial load
duke
parents:
diff changeset
   361
                        Object[] parm={source};
7f561c08de6b Initial load
duke
parents:
diff changeset
   362
                        Object ret=fParseSomeSetup.invoke(fIncrementalParser,parm);
7f561c08de6b Initial load
duke
parents:
diff changeset
   363
                        return ((Boolean)ret).booleanValue();
7f561c08de6b Initial load
duke
parents:
diff changeset
   364
                }
7f561c08de6b Initial load
duke
parents:
diff changeset
   365
        }
7f561c08de6b Initial load
duke
parents:
diff changeset
   366
//  Would null work???
7f561c08de6b Initial load
duke
parents:
diff changeset
   367
    private static final Object[] noparms=new Object[0];
7f561c08de6b Initial load
duke
parents:
diff changeset
   368
    private static final Object[] parmsfalse={Boolean.FALSE};
7f561c08de6b Initial load
duke
parents:
diff changeset
   369
    private boolean parseSome()
7f561c08de6b Initial load
duke
parents:
diff changeset
   370
                throws SAXException, IOException, IllegalAccessException,
7f561c08de6b Initial load
duke
parents:
diff changeset
   371
                                         java.lang.reflect.InvocationTargetException
7f561c08de6b Initial load
duke
parents:
diff changeset
   372
        {
7f561c08de6b Initial load
duke
parents:
diff changeset
   373
                // Take next parsing step, return false iff parsing complete:
7f561c08de6b Initial load
duke
parents:
diff changeset
   374
                if(fConfigSetInput!=null)
7f561c08de6b Initial load
duke
parents:
diff changeset
   375
                {
7f561c08de6b Initial load
duke
parents:
diff changeset
   376
                        Object ret=(Boolean)(fConfigParse.invoke(fPullParserConfig,parmsfalse));
7f561c08de6b Initial load
duke
parents:
diff changeset
   377
                        return ((Boolean)ret).booleanValue();
7f561c08de6b Initial load
duke
parents:
diff changeset
   378
                }
7f561c08de6b Initial load
duke
parents:
diff changeset
   379
                else
7f561c08de6b Initial load
duke
parents:
diff changeset
   380
                {
7f561c08de6b Initial load
duke
parents:
diff changeset
   381
                        Object ret=fParseSome.invoke(fIncrementalParser,noparms);
7f561c08de6b Initial load
duke
parents:
diff changeset
   382
                        return ((Boolean)ret).booleanValue();
7f561c08de6b Initial load
duke
parents:
diff changeset
   383
                }
7f561c08de6b Initial load
duke
parents:
diff changeset
   384
        }
7f561c08de6b Initial load
duke
parents:
diff changeset
   385
7f561c08de6b Initial load
duke
parents:
diff changeset
   386
7f561c08de6b Initial load
duke
parents:
diff changeset
   387
  //================================================================
7f561c08de6b Initial load
duke
parents:
diff changeset
   388
  /** Simple unit test. Attempt coroutine parsing of document indicated
7f561c08de6b Initial load
duke
parents:
diff changeset
   389
   * by first argument (as a URI), report progress.
7f561c08de6b Initial load
duke
parents:
diff changeset
   390
   */
7f561c08de6b Initial load
duke
parents:
diff changeset
   391
  public static void _main(String args[])
7f561c08de6b Initial load
duke
parents:
diff changeset
   392
  {
7f561c08de6b Initial load
duke
parents:
diff changeset
   393
    System.out.println("Starting...");
7f561c08de6b Initial load
duke
parents:
diff changeset
   394
7f561c08de6b Initial load
duke
parents:
diff changeset
   395
    CoroutineManager co = new CoroutineManager();
7f561c08de6b Initial load
duke
parents:
diff changeset
   396
    int appCoroutineID = co.co_joinCoroutineSet(-1);
7f561c08de6b Initial load
duke
parents:
diff changeset
   397
    if (appCoroutineID == -1)
7f561c08de6b Initial load
duke
parents:
diff changeset
   398
    {
7f561c08de6b Initial load
duke
parents:
diff changeset
   399
      System.out.println("ERROR: Couldn't allocate coroutine number.\n");
7f561c08de6b Initial load
duke
parents:
diff changeset
   400
      return;
7f561c08de6b Initial load
duke
parents:
diff changeset
   401
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
   402
    IncrementalSAXSource parser=
7f561c08de6b Initial load
duke
parents:
diff changeset
   403
      createIncrementalSAXSource();
7f561c08de6b Initial load
duke
parents:
diff changeset
   404
7f561c08de6b Initial load
duke
parents:
diff changeset
   405
    // Use a serializer as our sample output
7f561c08de6b Initial load
duke
parents:
diff changeset
   406
    com.sun.org.apache.xml.internal.serialize.XMLSerializer trace;
7f561c08de6b Initial load
duke
parents:
diff changeset
   407
    trace=new com.sun.org.apache.xml.internal.serialize.XMLSerializer(System.out,null);
7f561c08de6b Initial load
duke
parents:
diff changeset
   408
    parser.setContentHandler(trace);
7f561c08de6b Initial load
duke
parents:
diff changeset
   409
    parser.setLexicalHandler(trace);
7f561c08de6b Initial load
duke
parents:
diff changeset
   410
7f561c08de6b Initial load
duke
parents:
diff changeset
   411
    // Tell coroutine to begin parsing, run while parsing is in progress
7f561c08de6b Initial load
duke
parents:
diff changeset
   412
7f561c08de6b Initial load
duke
parents:
diff changeset
   413
    for(int arg=0;arg<args.length;++arg)
7f561c08de6b Initial load
duke
parents:
diff changeset
   414
    {
7f561c08de6b Initial load
duke
parents:
diff changeset
   415
      try
7f561c08de6b Initial load
duke
parents:
diff changeset
   416
      {
7f561c08de6b Initial load
duke
parents:
diff changeset
   417
        InputSource source = new InputSource(args[arg]);
7f561c08de6b Initial load
duke
parents:
diff changeset
   418
        Object result=null;
7f561c08de6b Initial load
duke
parents:
diff changeset
   419
        boolean more=true;
7f561c08de6b Initial load
duke
parents:
diff changeset
   420
        parser.startParse(source);
7f561c08de6b Initial load
duke
parents:
diff changeset
   421
        for(result = parser.deliverMoreNodes(more);
7f561c08de6b Initial load
duke
parents:
diff changeset
   422
            result==Boolean.TRUE;
7f561c08de6b Initial load
duke
parents:
diff changeset
   423
            result = parser.deliverMoreNodes(more))
7f561c08de6b Initial load
duke
parents:
diff changeset
   424
        {
7f561c08de6b Initial load
duke
parents:
diff changeset
   425
          System.out.println("\nSome parsing successful, trying more.\n");
7f561c08de6b Initial load
duke
parents:
diff changeset
   426
7f561c08de6b Initial load
duke
parents:
diff changeset
   427
          // Special test: Terminate parsing early.
7f561c08de6b Initial load
duke
parents:
diff changeset
   428
          if(arg+1<args.length && "!".equals(args[arg+1]))
7f561c08de6b Initial load
duke
parents:
diff changeset
   429
          {
7f561c08de6b Initial load
duke
parents:
diff changeset
   430
            ++arg;
7f561c08de6b Initial load
duke
parents:
diff changeset
   431
            more=false;
7f561c08de6b Initial load
duke
parents:
diff changeset
   432
          }
7f561c08de6b Initial load
duke
parents:
diff changeset
   433
7f561c08de6b Initial load
duke
parents:
diff changeset
   434
        }
7f561c08de6b Initial load
duke
parents:
diff changeset
   435
7f561c08de6b Initial load
duke
parents:
diff changeset
   436
        if (result instanceof Boolean && ((Boolean)result)==Boolean.FALSE)
7f561c08de6b Initial load
duke
parents:
diff changeset
   437
        {
7f561c08de6b Initial load
duke
parents:
diff changeset
   438
          System.out.println("\nParser ended (EOF or on request).\n");
7f561c08de6b Initial load
duke
parents:
diff changeset
   439
        }
7f561c08de6b Initial load
duke
parents:
diff changeset
   440
        else if (result == null) {
7f561c08de6b Initial load
duke
parents:
diff changeset
   441
          System.out.println("\nUNEXPECTED: Parser says shut down prematurely.\n");
7f561c08de6b Initial load
duke
parents:
diff changeset
   442
        }
7f561c08de6b Initial load
duke
parents:
diff changeset
   443
        else if (result instanceof Exception) {
7f561c08de6b Initial load
duke
parents:
diff changeset
   444
          throw new com.sun.org.apache.xml.internal.utils.WrappedRuntimeException((Exception)result);
7f561c08de6b Initial load
duke
parents:
diff changeset
   445
          //          System.out.println("\nParser threw exception:");
7f561c08de6b Initial load
duke
parents:
diff changeset
   446
          //          ((Exception)result).printStackTrace();
7f561c08de6b Initial load
duke
parents:
diff changeset
   447
        }
7f561c08de6b Initial load
duke
parents:
diff changeset
   448
7f561c08de6b Initial load
duke
parents:
diff changeset
   449
      }
7f561c08de6b Initial load
duke
parents:
diff changeset
   450
7f561c08de6b Initial load
duke
parents:
diff changeset
   451
      catch(SAXException e)
7f561c08de6b Initial load
duke
parents:
diff changeset
   452
      {
7f561c08de6b Initial load
duke
parents:
diff changeset
   453
        e.printStackTrace();
7f561c08de6b Initial load
duke
parents:
diff changeset
   454
      }
7f561c08de6b Initial load
duke
parents:
diff changeset
   455
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
   456
7f561c08de6b Initial load
duke
parents:
diff changeset
   457
  }
7f561c08de6b Initial load
duke
parents:
diff changeset
   458
7f561c08de6b Initial load
duke
parents:
diff changeset
   459
7f561c08de6b Initial load
duke
parents:
diff changeset
   460
} // class IncrementalSAXSource_Xerces