public static class FolSchematronNode.Logic extends FolSchematronNode
This class stands for logical operations AND, OR, XOR and EQV. Which of these is is coded in the state member logic.
Modifier and Type | Class and Description |
---|---|
protected static class |
FolSchematronNode.Logic.LogicType |
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 FolSchematronNode.Logic.LogicType |
logic |
BY_REFERENCE, children, INLINE, INLINE_OR_BY_REFERENCE, parent, schemaObject, SIMPLE_TYPE
Constructor and Description |
---|
Logic(FOL2Schematron schemaObject,
FolSchematronNode.Logic.LogicType logic)
Ctor
|
Modifier and Type | Method and Description |
---|---|
boolean |
isAndOrLogic(boolean isAnd)
Method to inquire whether the node inquired is a Logic node and this
logic node has the same isAnd polarity as specified in the
parameter.
|
FolSchematronNode.XpathFragment |
translate(FolSchematronNode.BindingContext ctx)
This compiles the node and its children to an Xpath predicate, which
can be inserted into a <rule>.
|
addChild, containsError, generatingAttribute, hasIdentity, hasSimpleType, hasSimpleType, isAIXMExtension, isDependentOn, isMultiple, isVarOrAttribBased, nodeVariableIsBoundTo, objValueFromVariable
protected FolSchematronNode.Logic.LogicType logic
public Logic(FOL2Schematron schemaObject, FolSchematronNode.Logic.LogicType logic)
schemaObject
- The schema objectisAnd
- Flag to make this an AND (true) or an OR (false)public boolean isAndOrLogic(boolean isAnd)
Method to inquire whether the node inquired is a Logic node and this logic node has the same isAnd polarity as specified in the parameter. XORs and EQVs are ignored and yield false.
isAndOrLogic
in class FolSchematronNode
isAnd
- Flag: Are we an AND? (not an OR)?public FolSchematronNode.XpathFragment translate(FolSchematronNode.BindingContext ctx)
This compiles the node and its children to an Xpath predicate, which can be inserted into a <rule>.
AND and OR are translated into their Xpath counterparts and and or. XOR will be realized as a != operator, EQV by an = operator.
translate
in class FolSchematronNode
ctx
- BindingContext this node shall be compiled inCopyright © 2017. All rights reserved.