Class CMDTDDocument
java.lang.Object
org.apache.xerces.impl.dtd.XMLDTDProcessor
org.apache.xerces.impl.dtd.XMLDTDLoader
org.apache.xerces.impl.dtd.XML11DTDProcessor
org.eclipse.lemminx.extensions.dtd.participants.diagnostics.LSPXML11DTDProcessor
org.eclipse.lemminx.extensions.dtd.contentmodel.CMDTDDocument
- All Implemented Interfaces:
org.apache.xerces.xni.grammars.XMLGrammarLoader,org.apache.xerces.xni.parser.XMLComponent,org.apache.xerces.xni.parser.XMLDTDContentModelFilter,org.apache.xerces.xni.parser.XMLDTDContentModelSource,org.apache.xerces.xni.parser.XMLDTDFilter,org.apache.xerces.xni.parser.XMLDTDSource,org.apache.xerces.xni.XMLDTDContentModelHandler,org.apache.xerces.xni.XMLDTDHandler,CMDocument
DTD document.
- Author:
- Angelo ZERR
-
Field Summary
Fields inherited from class org.apache.xerces.impl.dtd.XMLDTDLoader
BALANCE_SYNTAX_TREES, ENTITY_RESOLVER, ERROR_HANDLER, fDTDScanner, fEntityManager, fEntityResolver, fLocale, LOCALE, STANDARD_URI_CONFORMANT_FEATUREFields inherited from class org.apache.xerces.impl.dtd.XMLDTDProcessor
DTD_VALIDATOR, ERROR_REPORTER, fDTDContentModelHandler, fDTDContentModelSource, fDTDGrammar, fDTDHandler, fDTDSource, fDTDValidation, fErrorReporter, fGrammarBucket, fGrammarPool, fInDTDIgnore, fSymbolTable, fValidation, fValidator, fWarnDuplicateAttdef, fWarnOnUndeclaredElemdef, GRAMMAR_POOL, NOTIFY_CHAR_REFS, PARSER_SETTINGS, SYMBOL_TABLE, VALIDATION, WARN_ON_DUPLICATE_ATTDEF, WARN_ON_UNDECLARED_ELEMDEFFields 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
ConstructorsConstructorDescriptionCMDTDDocument(String uri, org.apache.xerces.impl.XMLEntityManager entityManager, org.apache.xerces.impl.XMLErrorReporter errorReporter, org.apache.xerces.xni.parser.XMLEntityResolver entityResolver) -
Method Summary
Modifier and TypeMethodDescriptionvoidattributeDecl(String elementName, String attributeName, String type, String[] enumeration, String defaultType, org.apache.xerces.xni.XMLString defaultValue, org.apache.xerces.xni.XMLString nonNormalizedDefaultValue, org.apache.xerces.xni.Augmentations augs) voidcomment(org.apache.xerces.xni.XMLString text, org.apache.xerces.xni.Augmentations augs) voidvoidendAttlist(org.apache.xerces.xni.Augmentations augs) voidendContentModel(org.apache.xerces.xni.Augmentations augs) voidexternalEntityDecl(String name, org.apache.xerces.xni.XMLResourceIdentifier identifier, org.apache.xerces.xni.Augmentations augs) findCMElement(DOMElement element, String namespace) Returns the declared element which matches the given XML element and null otherwise.org.eclipse.lsp4j.LocationLinkfindTypeLocation(DOMNode node) Returns the location of the type definition of the given node.Returns the elements declaration of the model document root.Returns list of declared entities.getURI()Returns the URI of this document, is none was provided this returns null.booleanhasNamespace(String namespaceURI) Returns true if the model document defines the given namespace and false otherwise.voidinternalEntityDecl(String name, org.apache.xerces.xni.XMLString text, org.apache.xerces.xni.XMLString nonNormalizedText, org.apache.xerces.xni.Augmentations augs) booleanisDirty()Returns true if the content model document is dirty and false otherwise.org.apache.xerces.xni.grammars.GrammarloadGrammar(org.apache.xerces.xni.parser.XMLInputSource source) voidloadInternalDTD(String internalSubset, String baseSystemId, String systemId) voidstartAttlist(String elementName, org.apache.xerces.xni.Augmentations augs) voidstartContentModel(String elementName, org.apache.xerces.xni.Augmentations augs) Methods inherited from class org.apache.xerces.impl.dtd.XML11DTDProcessor
createDTDScanner, getScannerVersion, isValidName, isValidNmtokenMethods inherited from class org.apache.xerces.impl.dtd.XMLDTDLoader
getEntityResolver, getErrorHandler, getFeature, getLocale, getProperty, getRecognizedFeatures, getRecognizedProperties, loadGrammarWithContext, reset, setEntityResolver, setErrorHandler, setFeature, setLocale, setPropertyMethods inherited from class org.apache.xerces.impl.dtd.XMLDTDProcessor
any, checkStandaloneEntityRef, elementDecl, empty, endConditional, endDTD, endExternalSubset, endGroup, endParameterEntity, getDTDContentModelHandler, getDTDContentModelSource, getDTDHandler, getDTDSource, getFeatureDefault, getPropertyDefault, ignoredCharacters, notationDecl, occurrence, pcdata, processingInstruction, reset, separator, setDTDContentModelHandler, setDTDContentModelSource, setDTDHandler, setDTDSource, startConditional, startDTD, startExternalSubset, startGroup, startParameterEntity, textDecl, unparsedEntityDeclMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.lemminx.extensions.contentmodel.model.CMDocument
findCMAttribute, findCMElement
-
Constructor Details
-
CMDTDDocument
public CMDTDDocument(String uri, org.apache.xerces.impl.XMLEntityManager entityManager, org.apache.xerces.impl.XMLErrorReporter errorReporter, org.apache.xerces.xni.parser.XMLEntityResolver entityResolver)
-
-
Method Details
-
hasNamespace
Description copied from interface:CMDocumentReturns true if the model document defines the given namespace and false otherwise.- Specified by:
hasNamespacein interfaceCMDocument- Returns:
- true if the model document defines the given namespace and false otherwise.
-
getElements
Description copied from interface:CMDocumentReturns the elements declaration of the model document root.- Specified by:
getElementsin interfaceCMDocument- Returns:
- the elements declaration of the model document root.
-
getURI
Returns the URI of this document, is none was provided this returns null. -
findCMElement
Description copied from interface:CMDocumentReturns the declared element which matches the given XML element and null otherwise.- Specified by:
findCMElementin interfaceCMDocument- Parameters:
element- the XML elementnamespace- the given namespace- Returns:
- the declared element which matches the given XML element and null otherwise.
-
internalEntityDecl
public void internalEntityDecl(String name, org.apache.xerces.xni.XMLString text, org.apache.xerces.xni.XMLString nonNormalizedText, org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException - Specified by:
internalEntityDeclin interfaceorg.apache.xerces.xni.XMLDTDHandler- Overrides:
internalEntityDeclin classorg.apache.xerces.impl.dtd.XMLDTDProcessor- Throws:
org.apache.xerces.xni.XNIException
-
externalEntityDecl
public void externalEntityDecl(String name, org.apache.xerces.xni.XMLResourceIdentifier identifier, org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException - Specified by:
externalEntityDeclin interfaceorg.apache.xerces.xni.XMLDTDHandler- Overrides:
externalEntityDeclin classorg.apache.xerces.impl.dtd.XMLDTDProcessor- Throws:
org.apache.xerces.xni.XNIException
-
startContentModel
public void startContentModel(String elementName, org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException - Specified by:
startContentModelin interfaceorg.apache.xerces.xni.XMLDTDContentModelHandler- Overrides:
startContentModelin classorg.apache.xerces.impl.dtd.XMLDTDProcessor- Throws:
org.apache.xerces.xni.XNIException
-
element
public void element(String elementName, org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException - Specified by:
elementin interfaceorg.apache.xerces.xni.XMLDTDContentModelHandler- Overrides:
elementin classorg.apache.xerces.impl.dtd.XMLDTDProcessor- Throws:
org.apache.xerces.xni.XNIException
-
endContentModel
public void endContentModel(org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException - Specified by:
endContentModelin interfaceorg.apache.xerces.xni.XMLDTDContentModelHandler- Overrides:
endContentModelin classorg.apache.xerces.impl.dtd.XMLDTDProcessor- Throws:
org.apache.xerces.xni.XNIException
-
startAttlist
public void startAttlist(String elementName, org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException - Specified by:
startAttlistin interfaceorg.apache.xerces.xni.XMLDTDHandler- Overrides:
startAttlistin classorg.apache.xerces.impl.dtd.XMLDTDProcessor- Throws:
org.apache.xerces.xni.XNIException
-
attributeDecl
public void attributeDecl(String elementName, String attributeName, String type, String[] enumeration, String defaultType, org.apache.xerces.xni.XMLString defaultValue, org.apache.xerces.xni.XMLString nonNormalizedDefaultValue, org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException - Specified by:
attributeDeclin interfaceorg.apache.xerces.xni.XMLDTDHandler- Overrides:
attributeDeclin classorg.apache.xerces.impl.dtd.XMLDTDProcessor- Throws:
org.apache.xerces.xni.XNIException
-
endAttlist
public void endAttlist(org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException - Specified by:
endAttlistin interfaceorg.apache.xerces.xni.XMLDTDHandler- Overrides:
endAttlistin classorg.apache.xerces.impl.dtd.XMLDTDProcessor- Throws:
org.apache.xerces.xni.XNIException
-
loadGrammar
public org.apache.xerces.xni.grammars.Grammar loadGrammar(org.apache.xerces.xni.parser.XMLInputSource source) throws IOException, org.apache.xerces.xni.XNIException - Specified by:
loadGrammarin interfaceorg.apache.xerces.xni.grammars.XMLGrammarLoader- Overrides:
loadGrammarin classorg.apache.xerces.impl.dtd.XMLDTDLoader- Throws:
IOExceptionorg.apache.xerces.xni.XNIException
-
loadInternalDTD
public void loadInternalDTD(String internalSubset, String baseSystemId, String systemId) throws org.apache.xerces.xni.XNIException, IOException - Throws:
org.apache.xerces.xni.XNIExceptionIOException
-
comment
public void comment(org.apache.xerces.xni.XMLString text, org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException - Specified by:
commentin interfaceorg.apache.xerces.xni.XMLDTDHandler- Overrides:
commentin classorg.apache.xerces.impl.dtd.XMLDTDProcessor- Throws:
org.apache.xerces.xni.XNIException
-
getHierarchiesMap
-
findTypeLocation
Description copied from interface:CMDocumentReturns the location of the type definition of the given node.- Specified by:
findTypeLocationin interfaceCMDocument- Parameters:
node- the node- Returns:
- the location of the type definition of the given node.
-
isDirty
public boolean isDirty()Description copied from interface:CMDocumentReturns true if the content model document is dirty and false otherwise.- Specified by:
isDirtyin interfaceCMDocument- Returns:
- true if the content model document is dirty and false otherwise.
-
getEntities
Description copied from interface:CMDocumentReturns list of declared entities.- Specified by:
getEntitiesin interfaceCMDocument- Returns:
- list of declared entities.
-