public class CMRelaxNGElementDeclaration extends Object implements CMElementDeclaration
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.
ANY_ELEMENT_DECLARATIONS| Modifier and Type | Method and Description |
|---|---|
CMAttributeDeclaration |
findCMAttribute(String attributeName,
String namespace)
Returns the declared attribute which match the given name and null otherwise.
|
CMElementDeclaration |
findCMElement(String tag,
String namespace)
Returns the declared element which matches the given XML tag name / namespace
and null otherwise.
|
Collection<CMAttributeDeclaration> |
getAttributes()
Returns the attributes of this declared element.
|
CMRelaxNGDocument |
getCMDocument() |
String |
getDocumentation(ISharedSettingsRequest request)
Returns formatted documentation of the declared element, according to
settings defined in
request. |
String |
getDocumentURI()
Returns the owner document URI where the element is declared.
|
Collection<CMElementDeclaration> |
getElements()
Returns the children declared element of this declared element.
|
Collection<String> |
getEnumerationValues()
Return the enumeration values.
|
String |
getLocalName()
Returns the declared element local name.
|
String |
getNamespace()
Returns the target namespace and null otherwise.
|
com.thaiopensource.relaxng.pattern.ElementPattern |
getPattern() |
Collection<CMElementDeclaration> |
getPossibleElements(DOMElement parentElement,
int offset)
Returns the possible declared elements at the given offset of the given
parent element.
|
String |
getPrefix(String namespaceURI)
Returns the xmlns prefix from the given namespace URI and null otherwise.
|
String |
getTextDocumentation(String value,
ISharedSettingsRequest request)
Returns the documentation for the given enumeration value and null otherwise.
|
boolean |
isEmpty()
Returns true if the element cannot contains element children or text content
and false otherwise.
|
boolean |
isMixedContent()
Returns true if the element can contains text and element both and false
otherwise.
|
boolean |
isNillable()
Returns true if the element can have an explicit null value assigned to it.
|
boolean |
isOptional(String childElementName)
Returns true if the child element name is optional and false otherwise.
|
boolean |
isStringType()
Returns true if the element is a string type (ex : xs:string) and false
otherwise.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitfindCMAttribute, getNamepublic com.thaiopensource.relaxng.pattern.ElementPattern getPattern()
public String getLocalName()
CMElementDeclarationgetLocalName in interface CMElementDeclarationpublic String getNamespace()
CMElementDeclarationgetNamespace in interface CMElementDeclarationpublic String getPrefix(String namespaceURI)
CMElementDeclarationgetPrefix in interface CMElementDeclarationnamespaceURI - the namespacepublic Collection<CMAttributeDeclaration> getAttributes()
CMElementDeclarationgetAttributes in interface CMElementDeclarationpublic Collection<CMElementDeclaration> getElements()
CMElementDeclarationgetElements in interface CMElementDeclarationpublic Collection<CMElementDeclaration> getPossibleElements(DOMElement parentElement, int offset)
CMElementDeclarationgetPossibleElements in interface CMElementDeclarationparentElement - the parent elementoffset - the offsetpublic CMElementDeclaration findCMElement(String tag, String namespace)
CMElementDeclarationfindCMElement in interface CMElementDeclarationpublic CMAttributeDeclaration findCMAttribute(String attributeName, String namespace)
CMElementDeclarationfindCMAttribute in interface CMElementDeclarationattributeName - the attribute name.namespace - the attribute namespace and null otherwise.public String getDocumentation(ISharedSettingsRequest request)
CMElementDeclarationrequest.getDocumentation in interface CMElementDeclarationrequest - the request containing settingsrequest.public boolean isEmpty()
CMElementDeclarationisEmpty in interface CMElementDeclarationpublic Collection<String> getEnumerationValues()
CMElementDeclarationgetEnumerationValues in interface CMElementDeclarationpublic String getTextDocumentation(String value, ISharedSettingsRequest request)
CMElementDeclarationgetTextDocumentation in interface CMElementDeclarationvalue - the enumeration value.request - the shared settings.public String getDocumentURI()
CMElementDeclarationgetDocumentURI in interface CMElementDeclarationpublic boolean isStringType()
CMElementDeclarationisStringType in interface CMElementDeclarationpublic boolean isMixedContent()
CMElementDeclarationisMixedContent in interface CMElementDeclarationpublic boolean isOptional(String childElementName)
CMElementDeclarationisOptional in interface CMElementDeclarationpublic boolean isNillable()
CMElementDeclarationisNillable in interface CMElementDeclarationpublic CMRelaxNGDocument getCMDocument()
Copyright © 2022. All rights reserved.