Class RelaxNGUtils
java.lang.Object
org.eclipse.lemminx.extensions.relaxng.utils.RelaxNGUtils
RelaxNG utilities.
- Author:
- Angelo ZERR
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumBinding type of rng grammar -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic FilesChangedTrackercreateFilesChangedTracker(RelaxNGGrammar grammar) static RelaxNGUtils.BindingTypegetBindingType(DOMAttr originAttr) Returns the binding type of the origin attribute (ex : ref/@name) which bounds an another target attribute (ex : define/@name).static DOMAttrgetHref(DOMElement element) static booleanstatic booleanisExternalRef(Element element) static booleanstatic booleanstatic booleanisRNGTargetElement(Element element) Returns true if the given element is an RNG target element (define element) and false otherwise.static voidsearchRNGOriginAttributes(DOMNode targetNode, BiConsumer<DOMAttr, DOMAttr> collector, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker) Search origin attributes from the given target node..static voidsearchRNGTargetAttributes(DOMAttr originAttr, RelaxNGUtils.BindingType bindingType, boolean matchAttr, boolean searchInExternalSchema, BiConsumer<String, DOMAttr> collector) Collect RNG target attributes declared in the RNG grammar according the given attribute and binding type.
-
Field Details
-
GRAMMAR_TAG
- See Also:
-
NAME_ATTR
- See Also:
-
-
Constructor Details
-
RelaxNGUtils
public RelaxNGUtils()
-
-
Method Details
-
createFilesChangedTracker
-
getBindingType
Returns the binding type of the origin attribute (ex : ref/@name) which bounds an another target attribute (ex : define/@name).- Parameters:
originAttr- the origin attribute (ex : ref/@name)- Returns:
- the binding type of the origin attribute (ex : ref/@name) which bounds an another target attribute (ex : define/@name).
-
searchRNGTargetAttributes
public static void searchRNGTargetAttributes(DOMAttr originAttr, RelaxNGUtils.BindingType bindingType, boolean matchAttr, boolean searchInExternalSchema, BiConsumer<String, DOMAttr> collector) Collect RNG target attributes declared in the RNG grammar according the given attribute and binding type.- Parameters:
originAttr- the origin attribute.matchAttr- true if the attribute value must match the value of target attribute value and false otherwise.searchInExternalSchema- true if search must be done in included XML Schema (include) and false otherwise.collector- collector to collect RNG target attributes.
-
searchRNGOriginAttributes
public static void searchRNGOriginAttributes(DOMNode targetNode, BiConsumer<DOMAttr, DOMAttr> collector, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker) Search origin attributes from the given target node..- Parameters:
targetNode- the referenced nodecollector- the collector to collect reference between an origin and target attribute.
-
isInclude
-
isExternalRef
-
isDefine
-
isRef
-
isRNGTargetElement
Returns true if the given element is an RNG target element (define element) and false otherwise.- Parameters:
element- the DOM element.- Returns:
- true if the given element is an RNG target element (define element) and false otherwise.
-
getHref
-