public static class SchematronConstraintNode.Logic extends SchematronConstraintNode
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 |
SchematronConstraintNode.Logic.LogicType |
SchematronConstraintNode.AllInstances, SchematronConstraintNode.Arithmetic, SchematronConstraintNode.Attribute, SchematronConstraintNode.BindingContext, SchematronConstraintNode.Cast, SchematronConstraintNode.ChangeCase, SchematronConstraintNode.Comparison, SchematronConstraintNode.Concatenate, SchematronConstraintNode.Empty, SchematronConstraintNode.Error, SchematronConstraintNode.Exists, SchematronConstraintNode.IfThenElse, SchematronConstraintNode.KindOf, SchematronConstraintNode.Let, SchematronConstraintNode.Literal, SchematronConstraintNode.Logic, SchematronConstraintNode.Matches, SchematronConstraintNode.MessageComment, SchematronConstraintNode.Select, SchematronConstraintNode.Size, SchematronConstraintNode.Substring, SchematronConstraintNode.Unique, SchematronConstraintNode.Variable, SchematronConstraintNode.XpathFragment, SchematronConstraintNode.XpathType
Modifier and Type | Field and Description |
---|---|
protected SchematronConstraintNode.Logic.LogicType |
logic |
children, negated, parent, schemaObject
Constructor and Description |
---|
Logic(SchematronSchema schemaObject,
SchematronConstraintNode.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.
|
SchematronConstraintNode.XpathFragment |
translate(SchematronConstraintNode.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, isDependentOn, isMultiple, isVarOrAttribBased, nodeVariableIsBoundTo
protected SchematronConstraintNode.Logic.LogicType logic
public Logic(SchematronSchema schemaObject, SchematronConstraintNode.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 SchematronConstraintNode
isAnd
- Flag: Are we an AND? (not an OR)?public SchematronConstraintNode.XpathFragment translate(SchematronConstraintNode.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 SchematronConstraintNode
ctx
- BindingContext this node shall be compiled inCopyright © 2018. All rights reserved.