public class CMRelaxNGDocument extends Object implements CMDocument
NOTE : this class is hosted in 'com.thaiopensource.relaxng.pattern' because
Pattern
implementation like ElementPattern
are not public.
Once https://github.com/relaxng/jing-trang/issues/271 will be fixed we could
move this class in 'org.eclipse.lemminx.extensions.relaxng.contentmodel'
package.
Constructor and Description |
---|
CMRelaxNGDocument(String relaxNGURI,
com.thaiopensource.relaxng.pattern.Pattern start,
URIResolverExtensionManager resolverExtensionManager) |
Modifier and Type | Method and Description |
---|---|
CMElementDeclaration |
findCMElement(DOMElement element,
String namespace)
Returns the declared element which matches the given XML element and null
otherwise.
|
org.eclipse.lsp4j.LocationLink |
findTypeLocation(DOMNode originNode)
Returns the location of the type definition of the given node.
|
String |
getDocumentation(Locator locator) |
String |
getDocumentation(Locator locator,
String value) |
Collection<CMElementDeclaration> |
getElements()
Returns the elements declaration of the model document root.
|
boolean |
hasNamespace(String namespaceURI)
Returns true if the model document defines the given namespace and false
otherwise.
|
boolean |
isDirty()
Returns true if the content model document is dirty and false otherwise.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
findCMAttribute, findCMElement, getEntities
public CMRelaxNGDocument(String relaxNGURI, com.thaiopensource.relaxng.pattern.Pattern start, URIResolverExtensionManager resolverExtensionManager)
public boolean hasNamespace(String namespaceURI)
CMDocument
hasNamespace
in interface CMDocument
public Collection<CMElementDeclaration> getElements()
CMDocument
getElements
in interface CMDocument
public CMElementDeclaration findCMElement(DOMElement element, String namespace)
CMDocument
findCMElement
in interface CMDocument
element
- the XML elementnamespace
- the given namespacepublic org.eclipse.lsp4j.LocationLink findTypeLocation(DOMNode originNode)
CMDocument
findTypeLocation
in interface CMDocument
originNode
- the nodepublic boolean isDirty()
CMDocument
isDirty
in interface CMDocument
Copyright © 2022. All rights reserved.