org.apache.xerces.parsers

Class DOMASBuilderImpl

Implemented Interfaces:
org.apache.xerces.dom3.as.DOMASBuilder, DOMConfiguration, LSParser, org.apache.xerces.xni.XMLDocumentHandler, org.apache.xerces.xni.XMLDTDContentModelHandler, org.apache.xerces.xni.XMLDTDHandler

public class DOMASBuilderImpl
extends DOMParserImpl
implements org.apache.xerces.dom3.as.DOMASBuilder

This is Abstract Schema DOM Builder class. It extends the DOMParserImpl class. Provides support for preparsing schemas.
Version:
$Id: DOMASBuilderImpl.java,v 1.25 2004/02/24 23:15:57 mrglavas Exp $
Authors:
Pavani Mukthipudi, Sun Microsystems Inc.
Neil Graham, IBM

Field Summary

protected static String
ENTITY_MANAGER
protected static String
ERROR_REPORTER
protected static String
SCHEMA_FULL_CHECKING
protected static String
SYMBOL_TABLE
protected ASModelImpl
fAbstractSchema
protected XSGrammarBucket
fGrammarBucket

Fields inherited from class org.apache.xerces.parsers.DOMParserImpl

DEBUG, DISALLOW_DOCTYPE_DECL_FEATURE, DYNAMIC_VALIDATION, NAMESPACES, NORMALIZE_DATA, PSVI_AUGMENT, SYMBOL_TABLE, VALIDATION_FEATURE, XMLSCHEMA, XMLSCHEMA_FULL_CHECKING, fBusy, fNamespaceDeclarations, fSchemaType

Fields inherited from class org.apache.xerces.parsers.AbstractDOMParser

CORE_DOCUMENT_CLASS_NAME, CREATE_CDATA_NODES_FEATURE, CREATE_ENTITY_REF_NODES, CURRENT_ELEMENT_NODE, DEFAULT_DOCUMENT_CLASS_NAME, DEFER_NODE_EXPANSION, DOCUMENT_CLASS_NAME, INCLUDE_COMMENTS_FEATURE, INCLUDE_IGNORABLE_WHITESPACE, NAMESPACES, PSVI_DOCUMENT_CLASS_NAME, abort, fBaseURIStack, fCreateCDATANodes, fCreateEntityRefNodes, fCurrentCDATASection, fCurrentCDATASectionIndex, fCurrentEntityDecl, fCurrentNode, fCurrentNodeIndex, fDOMFilter, fDeferNodeExpansion, fDeferredDocumentImpl, fDeferredEntityDecl, fDocument, fDocumentClassName, fDocumentImpl, fDocumentIndex, fDocumentType, fDocumentTypeIndex, fErrorHandler, fFilterReject, fFirstChunk, fInCDATASection, fInDTD, fInDTDExternalSubset, fInEntityRef, fIncludeComments, fIncludeIgnorableWhitespace, fInternalSubset, fNamespaceAware, fRejectedElement, fRoot, fSkippedElemStack, fStorePSVI, fStringBuffer

Fields inherited from class org.apache.xerces.parsers.AbstractXMLDocumentParser

fDTDContentModelSource, fDTDSource, fDocumentSource, fInDTD

Fields inherited from class org.apache.xerces.parsers.XMLParser

ENTITY_RESOLVER, ERROR_HANDLER, fConfiguration

Fields inherited from interface org.apache.xerces.xni.XMLDTDContentModelHandler

OCCURS_ONE_OR_MORE, OCCURS_ZERO_OR_MORE, OCCURS_ZERO_OR_ONE, SEPARATOR_CHOICE, SEPARATOR_SEQUENCE

Fields inherited from interface org.apache.xerces.xni.XMLDTDHandler

CONDITIONAL_IGNORE, CONDITIONAL_INCLUDE

Constructor Summary

DOMASBuilderImpl()
Constructs a DOM Builder using the dtd/xml schema parser configuration.
DOMASBuilderImpl(XMLGrammarCachingConfiguration config)
Constructs a DOM Builder using the specified parser configuration.
DOMASBuilderImpl(SymbolTable symbolTable)
Constructs a DOM Builder using the specified symbol table.
DOMASBuilderImpl(SymbolTable symbolTable, org.apache.xerces.xni.grammars.XMLGrammarPool grammarPool)
Constructs a DOM Builder using the specified symbol table and grammar pool.

Method Summary

org.apache.xerces.dom3.as.ASModel
getAbstractSchema()
Associate an ASModel with a document instance.
org.apache.xerces.dom3.as.ASModel
parseASInputSource(LSInput is)
Parse a Abstract Schema from a location identified by an LSInput.
org.apache.xerces.dom3.as.ASModel
parseASURI(String uri)
Parse a Abstract Schema from a location identified by an URI.
void
setAbstractSchema(org.apache.xerces.dom3.as.ASModel abstractSchema)
Associate an ASModel with a document instance.

Methods inherited from class org.apache.xerces.parsers.DOMParserImpl

abort, canSetParameter, getAsync, getBusy, getDomConfig, getFilter, getParameter, getParameterNames, parse, parseURI, parseWithContext, reset, setFilter, setParameter, startElement

Methods inherited from class org.apache.xerces.parsers.AbstractDOMParser

abort, attributeDecl, characters, comment, createAttrNode, createElementNode, doctypeDecl, elementDecl, emptyElement, endAttlist, endCDATA, endConditional, endDTD, endDocument, endElement, endExternalSubset, endGeneralEntity, endParameterEntity, externalEntityDecl, getDocument, getDocumentClassName, handleBaseURI, handleBaseURI, ignorableWhitespace, ignoredCharacters, internalEntityDecl, notationDecl, processingInstruction, reset, setCharacterData, setDocumentClassName, setLocale, startAttlist, startCDATA, startConditional, startDTD, startDocument, startElement, startExternalSubset, startGeneralEntity, startParameterEntity, textDecl, unparsedEntityDecl, xmlDecl

Methods inherited from class org.apache.xerces.parsers.AbstractXMLDocumentParser

any, attributeDecl, characters, comment, doctypeDecl, element, elementDecl, empty, emptyElement, endAttlist, endCDATA, endConditional, endContentModel, endDTD, endDocument, endElement, endExternalSubset, endGeneralEntity, endGroup, endParameterEntity, externalEntityDecl, getDTDContentModelSource, getDTDSource, getDocumentSource, ignorableWhitespace, ignoredCharacters, internalEntityDecl, notationDecl, occurrence, pcdata, processingInstruction, reset, separator, setDTDContentModelSource, setDTDSource, setDocumentSource, startAttlist, startCDATA, startConditional, startContentModel, startDTD, startDocument, startElement, startExternalSubset, startGeneralEntity, startGroup, startParameterEntity, textDecl, unparsedEntityDecl, xmlDecl

Methods inherited from class org.apache.xerces.parsers.XMLParser

parse, reset

Field Details

ENTITY_MANAGER

protected static final String ENTITY_MANAGER

ERROR_REPORTER

protected static final String ERROR_REPORTER

SCHEMA_FULL_CHECKING

protected static final String SCHEMA_FULL_CHECKING

SYMBOL_TABLE

protected static final String SYMBOL_TABLE

fAbstractSchema

protected ASModelImpl fAbstractSchema

fGrammarBucket

protected XSGrammarBucket fGrammarBucket

Constructor Details

DOMASBuilderImpl

public DOMASBuilderImpl()
Constructs a DOM Builder using the dtd/xml schema parser configuration.

DOMASBuilderImpl

public DOMASBuilderImpl(XMLGrammarCachingConfiguration config)
Constructs a DOM Builder using the specified parser configuration. We must demand that the configuration extend XMLGrammarCachingConfiguration to make sure all relevant methods/features are available.

DOMASBuilderImpl

public DOMASBuilderImpl(SymbolTable symbolTable)
Constructs a DOM Builder using the specified symbol table.

DOMASBuilderImpl

public DOMASBuilderImpl(SymbolTable symbolTable,
                        org.apache.xerces.xni.grammars.XMLGrammarPool grammarPool)
Constructs a DOM Builder using the specified symbol table and grammar pool. The grammarPool implementation should extent the default implementation; otherwise, correct functioning of this class may not occur.

Method Details

getAbstractSchema

public org.apache.xerces.dom3.as.ASModel getAbstractSchema()
Associate an ASModel with a document instance. This ASModel will be used by the " validate-if-schema" and " datatype-normalization" options during the load of a new Document.
Specified by:
getAbstractSchema in interface org.apache.xerces.dom3.as.DOMASBuilder

parseASInputSource

public org.apache.xerces.dom3.as.ASModel parseASInputSource(LSInput is)
            throws org.apache.xerces.dom3.as.DOMASException,
                   Exception
Parse a Abstract Schema from a location identified by an LSInput.
Specified by:
parseASInputSource in interface org.apache.xerces.dom3.as.DOMASBuilder
Parameters:
is - The LSInput from which the source Abstract Schema is to be read.
Returns:
The newly created ASModel.
Throws:
org.apache.xerces.dom3.as.DOMASException - Exceptions raised by parseASURI() originate with the installed ErrorHandler, and thus depend on the implementation of the DOMErrorHandler interfaces. The default error handlers will raise a DOMASException if any form of Abstract Schema inconsistencies or warning occurs during the parse, but application defined errorHandlers are not required to do so.
WRONG_MIME_TYPE_ERR: Raised when mimeTypeCheck is true and the inputsource has an incorrect MIME Type. See attribute mimeTypeCheck.

parseASURI

public org.apache.xerces.dom3.as.ASModel parseASURI(String uri)
            throws org.apache.xerces.dom3.as.DOMASException,
                   Exception
Parse a Abstract Schema from a location identified by an URI.
Specified by:
parseASURI in interface org.apache.xerces.dom3.as.DOMASBuilder
Parameters:
uri - The location of the Abstract Schema to be read.
Returns:
The newly created Abstract Schema.
Throws:
org.apache.xerces.dom3.as.DOMASException - Exceptions raised by parseASURI() originate with the installed ErrorHandler, and thus depend on the implementation of the DOMErrorHandler interfaces. The default error handlers will raise a DOMASException if any form of Abstract Schema inconsistencies or warning occurs during the parse, but application defined errorHandlers are not required to do so.
WRONG_MIME_TYPE_ERR: Raised when mimeTypeCheck is true and the inputsource has an incorrect MIME Type. See attribute mimeTypeCheck.

setAbstractSchema

public void setAbstractSchema(org.apache.xerces.dom3.as.ASModel abstractSchema)
Associate an ASModel with a document instance. This ASModel will be used by the " validate-if-schema" and " datatype-normalization" options during the load of a new Document.
Specified by:
setAbstractSchema in interface org.apache.xerces.dom3.as.DOMASBuilder

Copyright B) 1999-2005 Apache XML Project. All Rights Reserved.