public static class FolSchematronNode.VariableNode extends FolSchematronNode
FolSchematronNode.Arithmetic, FolSchematronNode.AttributeNode, FolSchematronNode.BindingContext, FolSchematronNode.ComparisonNode, FolSchematronNode.Empty, FolSchematronNode.Error, FolSchematronNode.IsNullNode, FolSchematronNode.IsTypeOfNode, FolSchematronNode.LiteralNode, FolSchematronNode.Logic, FolSchematronNode.Matches, FolSchematronNode.MessageComment, FolSchematronNode.NotNode, FolSchematronNode.QuantificationNode, FolSchematronNode.VariableNode, FolSchematronNode.XpathFragment, FolSchematronNode.XpathType
Modifier and Type | Field and Description |
---|---|
protected Variable |
vardecl |
BY_REFERENCE, children, INLINE, INLINE_OR_BY_REFERENCE, parent, schemaObject, SIMPLE_TYPE
Constructor and Description |
---|
VariableNode(FOL2Schematron schemaObject,
Variable var)
Ctor
|
Modifier and Type | Method and Description |
---|---|
FolSchematronNode.AttributeNode |
generatingAttribute()
Finds the generating attribute of the variable (searching in outer
scopes if necessary) - it may be null if the variable is purely based
on other variables without actual value (also in case it is 'self').
|
String |
getName()
Variable name inquiry function.
|
boolean |
hasIdentity()
This predicate finds out whether the Variable results in an instance,
which conceptually has identity.
|
boolean |
hasSimpleType()
This predicate finds out whether the Variable results in a simple XML
schema type.
|
boolean |
isDependentOn(Variable vardecl)
This method determines whether this variable is identical to the one
passed as argument.
|
boolean |
isVarOrAttribBased(Variable vardecl)
This method determines whether this variable is identical to the one
passed as argument.
|
void |
setValue(FolSchematronNode varValue) |
FolSchematronNode.XpathFragment |
translate(FolSchematronNode.BindingContext ctx)
This compiles a node to an Xpath expression, which stands for the
given variable.
|
FolSchematronNode |
value() |
addChild, containsError, hasSimpleType, isAIXMExtension, isAndOrLogic, isMultiple, nodeVariableIsBoundTo, objValueFromVariable
protected Variable vardecl
public VariableNode(FOL2Schematron schemaObject, Variable var)
schemaObject
- The schema objectvardecl
- Variable objectpublic String getName()
public boolean isDependentOn(Variable vardecl)
This method determines whether this variable is identical to the one passed as argument.
isDependentOn
in class FolSchematronNode
vardecl
- The Variable of the variablepublic boolean isVarOrAttribBased(Variable vardecl)
This method determines whether this variable is identical to the one passed as argument.
isVarOrAttribBased
in class FolSchematronNode
vardecl
- The Variable of the variablepublic FolSchematronNode.AttributeNode generatingAttribute()
Finds the generating attribute of the variable (searching in outer scopes if necessary) - it may be null if the variable is purely based on other variables without actual value (also in case it is 'self').
generatingAttribute
in class FolSchematronNode
public boolean hasSimpleType()
This predicate finds out whether the Variable results in a simple XML schema type.
hasSimpleType
in class FolSchematronNode
public boolean hasIdentity()
This predicate finds out whether the Variable results in an instance, which conceptually has identity.
hasIdentity
in class FolSchematronNode
public FolSchematronNode.XpathFragment translate(FolSchematronNode.BindingContext ctx)
This compiles a node to an Xpath expression, which stands for the given variable.
If the variable is defined in a surrounding 'let' construct, a proper translation for the use of the variable can always be achieved, given that the initial value of the variable translates properly. If the use of the variable is in ISCURRENT context, the variable definition will be mapped into a Schematron <let> definition. Otherwise the initial value is substituted in place of the variable.
Other variable references are treated as follows.
The only variable which can be properly translated in all cases is self, which will be mapped to current() or to '.', if compiled in a ISCURRENT context. Variable definitions from iterators require to be on the context stack of the expression, which is widely dependent on how the expression environment could be represented in Xpath.
translate
in class FolSchematronNode
ctx
- BindingContext this node shall be compiled inpublic void setValue(FolSchematronNode varValue)
public FolSchematronNode value()
Copyright © 2018. All rights reserved.