com.sun.xml.internal.xsom.impl.parser
public class: ParserContext [javadoc |
source]
java.lang.Object
com.sun.xml.internal.xsom.impl.parser.ParserContext
Provides context information to be used by
NGCCRuntimeEx s.
This class does the actual processing for XSOMParser ,
but to hide the details from the public API, this class in
a different package.
- author:
Kohsuke - Kawaguchi (kohsuke.kawaguchi@sun.com)
| Field Summary |
|---|
| public final SchemaSetImpl | schemaSet | SchemaSet to which a newly parsed schema is put in. |
| final XMLParser | parser | |
| public final Map | parsedDocuments | Documents that are parsed already. Used to avoid cyclic inclusion/double
inclusion of schemas. Set of SchemaDocumentImpl s.
The actual data structure is map from SchemaDocumentImpl to itself,
so that we can access the SchemaDocumentImpl itself. |
| final PatcherManager | patcherManager | PatchManager implementation, which is accessible only from
NGCCRuntimEx. |
| final ErrorHandler | errorHandler | ErrorHandler proxy to turn on the hadError flag when an error
is found. |
| final ErrorHandler | noopHandler | ErrorHandler that does nothing. |
| Constructor: |
public ParserContext(XSOMParser owner,
XMLParser parser) {
this.owner = owner;
this.parser = parser;
try {
parse(new InputSource(ParserContext.class.getResource("datatypes.xsd").toExternalForm()));
SchemaImpl xs = (SchemaImpl)
schemaSet.getSchema("http://www.w3.org/2001/XMLSchema");
xs.addSimpleType(schemaSet.anySimpleType);
xs.addComplexType(schemaSet.anyType);
} catch( SAXException e ) {
// this must be a bug of XSOM
if(e.getException()!=null)
e.getException().printStackTrace();
else
e.printStackTrace();
throw new InternalError();
}
}
|