Class SAXParserImpl.JAXPSAXParser
- java.lang.Object
-
- org.smooks.engine.delivery.sax.ng.org.apache.xerces.parsers.XMLParser
-
- org.smooks.engine.delivery.sax.ng.org.apache.xerces.parsers.AbstractXMLDocumentParser
-
- org.smooks.engine.delivery.sax.ng.org.apache.xerces.parsers.AbstractSAXParser
-
- org.smooks.engine.delivery.sax.ng.org.apache.xerces.parsers.SAXParser
-
- org.smooks.engine.delivery.sax.ng.org.apache.xerces.jaxp.SAXParserImpl.JAXPSAXParser
-
- All Implemented Interfaces:
XMLDocumentHandler
,XMLDTDContentModelHandler
,XMLDTDHandler
,PSVIProvider
,Parser
,XMLReader
- Enclosing class:
- SAXParserImpl
public static class SAXParserImpl.JAXPSAXParser extends SAXParser
Extension of SAXParser. This class tracks changes to features and properties to allow the parser to be reset to its initial state.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.smooks.engine.delivery.sax.ng.org.apache.xerces.parsers.AbstractSAXParser
AbstractSAXParser.AttributesProxy, AbstractSAXParser.LocatorProxy
-
-
Field Summary
-
Fields inherited from class org.smooks.engine.delivery.sax.ng.org.apache.xerces.parsers.SAXParser
NOTIFY_BUILTIN_REFS, SYMBOL_TABLE, XMLGRAMMAR_POOL
-
Fields inherited from class org.smooks.engine.delivery.sax.ng.org.apache.xerces.parsers.AbstractSAXParser
ALLOW_UE_AND_NOTATION_EVENTS, DECLARATION_HANDLER, DOM_NODE, fContentHandler, fDeclaredAttrs, fDeclHandler, fDocumentHandler, fDTDHandler, fLexicalHandler, fLexicalHandlerParameterEntities, fNamespaceContext, fNamespacePrefixes, fNamespaces, fParseInProgress, fQName, fResolveDTDURIs, fStandalone, fUseEntityResolver2, fVersion, fXMLNSURIs, LEXICAL_HANDLER, NAMESPACES, STRING_INTERNING
-
Fields inherited from class org.smooks.engine.delivery.sax.ng.org.apache.xerces.parsers.AbstractXMLDocumentParser
fDocumentSource, fDTDContentModelSource, fDTDSource, fInDTD
-
Fields inherited from class org.smooks.engine.delivery.sax.ng.org.apache.xerces.parsers.XMLParser
ENTITY_RESOLVER, ERROR_HANDLER, fConfiguration
-
Fields inherited from interface org.smooks.engine.delivery.sax.ng.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.smooks.engine.delivery.sax.ng.org.apache.xerces.xni.XMLDTDHandler
CONDITIONAL_IGNORE, CONDITIONAL_INCLUDE
-
-
Constructor Summary
Constructors Constructor Description JAXPSAXParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
getFeature(String name)
Query the state of a feature.Object
getProperty(String name)
Query the value of a property.void
parse(String systemId)
Parses the input source specified by the given system identifier.void
parse(InputSource inputSource)
parsevoid
setFeature(String name, boolean value)
Override SAXParser's setFeature method to track the initial state of features.void
setProperty(String name, Object value)
Override SAXParser's setProperty method to track the initial state of properties.-
Methods inherited from class org.smooks.engine.delivery.sax.ng.org.apache.xerces.parsers.AbstractSAXParser
attributeDecl, characters, comment, doctypeDecl, elementDecl, endCDATA, endDocument, endDTD, endElement, endExternalSubset, endGeneralEntity, endNamespaceMapping, endParameterEntity, externalEntityDecl, getAttributePSVI, getAttributePSVIByName, getContentHandler, getDeclHandler, getDTDHandler, getElementPSVI, getEntityResolver, getErrorHandler, getLexicalHandler, ignorableWhitespace, internalEntityDecl, notationDecl, processingInstruction, reset, setContentHandler, setDeclHandler, setDocumentHandler, setDTDHandler, setEntityResolver, setErrorHandler, setLexicalHandler, setLocale, startCDATA, startDocument, startElement, startExternalSubset, startGeneralEntity, startNamespaceMapping, startParameterEntity, unparsedEntityDecl, xmlDecl
-
Methods inherited from class org.smooks.engine.delivery.sax.ng.org.apache.xerces.parsers.AbstractXMLDocumentParser
any, element, empty, emptyElement, endAttlist, endConditional, endContentModel, endGroup, getDocumentSource, getDTDContentModelSource, getDTDSource, ignoredCharacters, occurrence, pcdata, separator, setDocumentSource, setDTDContentModelSource, setDTDSource, startAttlist, startConditional, startContentModel, startDTD, startGroup, textDecl
-
-
-
-
Method Detail
-
setFeature
public void setFeature(String name, boolean value) throws SAXNotRecognizedException, SAXNotSupportedException
Override SAXParser's setFeature method to track the initial state of features. This keeps us from affecting the performance of the SAXParser when it is created with XMLReaderFactory.- Specified by:
setFeature
in interfaceXMLReader
- Overrides:
setFeature
in classAbstractSAXParser
- Parameters:
name
- The unique identifier (URI) of the feature.value
- The requested state of the feature (true or false).- Throws:
SAXNotRecognizedException
- If the requested feature is not known.SAXNotSupportedException
- If the requested feature is known, but the requested state is not supported.
-
getFeature
public boolean getFeature(String name) throws SAXNotRecognizedException, SAXNotSupportedException
Description copied from class:AbstractSAXParser
Query the state of a feature. Query the current state of any feature in a SAX2 parser. The parser might not recognize the feature.- Specified by:
getFeature
in interfaceXMLReader
- Overrides:
getFeature
in classAbstractSAXParser
- Parameters:
name
- The unique identifier (URI) of the feature being set.- Returns:
- The current state of the feature.
- Throws:
SAXNotRecognizedException
- If the requested feature is not known.SAXNotSupportedException
- If the requested feature is known but not supported.
-
setProperty
public void setProperty(String name, Object value) throws SAXNotRecognizedException, SAXNotSupportedException
Override SAXParser's setProperty method to track the initial state of properties. This keeps us from affecting the performance of the SAXParser when it is created with XMLReaderFactory.- Specified by:
setProperty
in interfaceXMLReader
- Overrides:
setProperty
in classAbstractSAXParser
- Parameters:
name
- The unique identifier (URI) of the property being set.value
- The value to which the property is being set.- Throws:
SAXNotRecognizedException
- If the requested property is not known.SAXNotSupportedException
- If the requested property is known, but the requested value is not supported.
-
getProperty
public Object getProperty(String name) throws SAXNotRecognizedException, SAXNotSupportedException
Description copied from class:AbstractSAXParser
Query the value of a property. Return the current value of a property in a SAX2 parser. The parser might not recognize the property.- Specified by:
getProperty
in interfaceXMLReader
- Overrides:
getProperty
in classAbstractSAXParser
- Parameters:
name
- The unique identifier (URI) of the property being set.- Returns:
- The current value of the property.
- Throws:
SAXNotRecognizedException
- If the requested property is not known.SAXNotSupportedException
- If the requested property is known but not supported.
-
parse
public void parse(InputSource inputSource) throws SAXException, IOException
Description copied from class:AbstractSAXParser
parse- Specified by:
parse
in interfaceParser
- Specified by:
parse
in interfaceXMLReader
- Overrides:
parse
in classAbstractSAXParser
- Throws:
SAXException
IOException
-
parse
public void parse(String systemId) throws SAXException, IOException
Description copied from class:AbstractSAXParser
Parses the input source specified by the given system identifier.This method is equivalent to the following:
parse(new InputSource(systemId));
- Specified by:
parse
in interfaceParser
- Specified by:
parse
in interfaceXMLReader
- Overrides:
parse
in classAbstractSAXParser
- Parameters:
systemId
- The system identifier (URI).- Throws:
SAXException
- Throws exception on SAX error.IOException
- Throws exception on i/o error.
-
-