Class LSPSAXParser
java.lang.Object
org.apache.xerces.parsers.XMLParser
org.apache.xerces.parsers.AbstractXMLDocumentParser
org.apache.xerces.parsers.AbstractSAXParser
org.apache.xerces.parsers.SAXParser
org.eclipse.lemminx.extensions.contentmodel.participants.diagnostics.LSPSAXParser
- All Implemented Interfaces:
org.apache.xerces.xni.XMLDocumentHandler,org.apache.xerces.xni.XMLDTDContentModelHandler,org.apache.xerces.xni.XMLDTDHandler,org.apache.xerces.xs.PSVIProvider,Parser,XMLReader
public class LSPSAXParser
extends org.apache.xerces.parsers.SAXParser
Extension of Xerces SAX Parser to fix some Xerces bugs:
- [BUG 2]: when Xerces XML grammar pool is used, the second validation ignore the existing of entities. See https://github.com/redhat-developer/vscode-xml/issues/234
- Author:
- Angelo ZERR
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.xerces.parsers.AbstractSAXParser
org.apache.xerces.parsers.AbstractSAXParser.AttributesProxy, org.apache.xerces.parsers.AbstractSAXParser.LocatorProxy -
Field Summary
FieldsFields inherited from class org.apache.xerces.parsers.SAXParser
NOTIFY_BUILTIN_REFS, SYMBOL_TABLE, XMLGRAMMAR_POOLFields inherited from class 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_INTERNINGFields inherited from class org.apache.xerces.parsers.AbstractXMLDocumentParser
fDocumentSource, fDTDContentModelSource, fDTDSource, fInDTDFields inherited from class org.apache.xerces.parsers.XMLParser
ENTITY_RESOLVER, ERROR_HANDLER, fConfigurationFields inherited from interface org.apache.xerces.xni.XMLDTDContentModelHandler
OCCURS_ONE_OR_MORE, OCCURS_ZERO_OR_MORE, OCCURS_ZERO_OR_ONE, SEPARATOR_CHOICE, SEPARATOR_SEQUENCEFields inherited from interface org.apache.xerces.xni.XMLDTDHandler
CONDITIONAL_IGNORE, CONDITIONAL_INCLUDE -
Constructor Summary
ConstructorsConstructorDescriptionLSPSAXParser(LSPErrorReporterForXML reporter, org.apache.xerces.xni.parser.XMLParserConfiguration config, LSPXMLGrammarPool grammarPool, DOMDocument document) -
Method Summary
Modifier and TypeMethodDescriptionvoiddoctypeDecl(String rootElement, String publicId, String systemId, org.apache.xerces.xni.Augmentations augs) voidsetContentHandler(ContentHandler contentHandler) voidstartDocument(org.apache.xerces.xni.XMLLocator locator, String encoding, org.apache.xerces.xni.NamespaceContext namespaceContext, org.apache.xerces.xni.Augmentations augs) Methods inherited from class org.apache.xerces.parsers.AbstractSAXParser
attributeDecl, characters, comment, elementDecl, endCDATA, endDocument, endDTD, endElement, endExternalSubset, endGeneralEntity, endNamespaceMapping, endParameterEntity, externalEntityDecl, getAttributePSVI, getAttributePSVIByName, getContentHandler, getDeclHandler, getDTDHandler, getElementPSVI, getEntityResolver, getErrorHandler, getFeature, getLexicalHandler, getProperty, ignorableWhitespace, internalEntityDecl, notationDecl, parse, parse, processingInstruction, reset, setDeclHandler, setDocumentHandler, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setLexicalHandler, setLocale, setProperty, startCDATA, startElement, startExternalSubset, startGeneralEntity, startNamespaceMapping, startParameterEntity, unparsedEntityDecl, xmlDeclMethods inherited from class 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, textDeclMethods inherited from class org.apache.xerces.parsers.XMLParser
parse
-
Field Details
-
VALIDATION_MANAGER
- See Also:
-
ENTITY_MANAGER
- See Also:
-
-
Constructor Details
-
LSPSAXParser
public LSPSAXParser(LSPErrorReporterForXML reporter, org.apache.xerces.xni.parser.XMLParserConfiguration config, LSPXMLGrammarPool grammarPool, DOMDocument document)
-
-
Method Details
-
startDocument
public void startDocument(org.apache.xerces.xni.XMLLocator locator, String encoding, org.apache.xerces.xni.NamespaceContext namespaceContext, org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException - Specified by:
startDocumentin interfaceorg.apache.xerces.xni.XMLDocumentHandler- Overrides:
startDocumentin classorg.apache.xerces.parsers.AbstractSAXParser- Throws:
org.apache.xerces.xni.XNIException
-
doctypeDecl
public void doctypeDecl(String rootElement, String publicId, String systemId, org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException - Specified by:
doctypeDeclin interfaceorg.apache.xerces.xni.XMLDocumentHandler- Overrides:
doctypeDeclin classorg.apache.xerces.parsers.AbstractSAXParser- Throws:
org.apache.xerces.xni.XNIException
-
setContentHandler
- Specified by:
setContentHandlerin interfaceXMLReader- Overrides:
setContentHandlerin classorg.apache.xerces.parsers.AbstractSAXParser
-