public class XSDUtils extends Object
Modifier and Type | Class and Description |
---|---|
static class |
XSDUtils.BindingType
Binding type of xs attribute.
|
Constructor and Description |
---|
XSDUtils() |
Modifier and Type | Method and Description |
---|---|
static FilesChangedTracker |
createFilesChangedTracker(org.apache.xerces.impl.xs.SchemaGrammar grammar) |
static FilesChangedTracker |
createFilesChangedTracker(Set<org.apache.xerces.impl.xs.SchemaGrammar> grammars) |
static XSDUtils.BindingType |
getBindingType(DOMAttr originAttr)
Returns the binding type of the origin attribute which bounds an another
target attribute.
|
static DOMAttr |
getSchemaLocation(DOMElement element) |
static boolean |
isXSAttribute(DOMElement element) |
static boolean |
isXSComplexType(Element element) |
static boolean |
isXSElement(Element element) |
static boolean |
isXSGroup(Element element) |
static boolean |
isXSImport(Element element) |
static boolean |
isXSInclude(Element element) |
static boolean |
isXSSchema(Element element) |
static boolean |
isXSSimpleType(Element element) |
static boolean |
isXSTargetElement(Element element) |
static void |
searchXSOriginAttributes(DOMNode targetNode,
BiConsumer<DOMAttr,DOMAttr> collector,
org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)
Search origin attributes from the given target node..
|
static void |
searchXSTargetAttributes(DOMAttr originAttr,
XSDUtils.BindingType bindingType,
boolean matchAttr,
boolean searchInExternalSchema,
BiConsumer<String,DOMAttr> collector)
Collect XSD target attributes declared in the XML Schema according the given
attribute and binding type.
|
public static XSDUtils.BindingType getBindingType(DOMAttr originAttr)
originAttr
- the origin attributepublic static void searchXSTargetAttributes(DOMAttr originAttr, XSDUtils.BindingType bindingType, boolean matchAttr, boolean searchInExternalSchema, BiConsumer<String,DOMAttr> collector)
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 (xs:include) and false otherwise.collector
- collector to collect XSD target attributes.public static void searchXSOriginAttributes(DOMNode targetNode, BiConsumer<DOMAttr,DOMAttr> collector, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)
targetNode
- the referenced nodecollector
- the collector to collect reference between an origin and
target attribute.public static boolean isXSComplexType(Element element)
public static boolean isXSSimpleType(Element element)
public static boolean isXSElement(Element element)
public static boolean isXSGroup(Element element)
public static boolean isXSInclude(Element element)
public static boolean isXSImport(Element element)
public static boolean isXSTargetElement(Element element)
public static boolean isXSAttribute(DOMElement element)
public static boolean isXSSchema(Element element)
public static FilesChangedTracker createFilesChangedTracker(org.apache.xerces.impl.xs.SchemaGrammar grammar)
public static FilesChangedTracker createFilesChangedTracker(Set<org.apache.xerces.impl.xs.SchemaGrammar> grammars)
public static DOMAttr getSchemaLocation(DOMElement element)
Copyright © 2020. All rights reserved.