de.interactive_instruments.ShapeChange.Target.XmlSchema
Class SchematronConstraintNode.Size
java.lang.Object
de.interactive_instruments.ShapeChange.Target.XmlSchema.SchematronConstraintNode
de.interactive_instruments.ShapeChange.Target.XmlSchema.SchematronConstraintNode.Size
- Enclosing class:
- SchematronConstraintNode
public static class SchematronConstraintNode.Size
- extends SchematronConstraintNode
This class represents an OCL invocation of the size operation. Size
can be applied to anything with a -> and returns the number of elements
of the object interpreted as a collection. If applied to a String it
determines its length.
Nested classes/interfaces inherited from class de.interactive_instruments.ShapeChange.Target.XmlSchema.SchematronConstraintNode |
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 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SchematronConstraintNode.Size
public SchematronConstraintNode.Size(SchematronSchema schemaObject,
boolean set)
- Ctor
- Parameters:
schemaObject
- The schema objectset
- Flag: This is a set operation
translate
public SchematronConstraintNode.XpathFragment translate(SchematronConstraintNode.BindingContext ctx)
Compile to an equivalent Xpath expression. The Set variant is
compiled to count() and the String variant goes to string-length().
- Specified by:
translate
in class SchematronConstraintNode
- Parameters:
ctx
- BindingContext this node shall be compiled in
- Returns:
- Object containing the Xpath fragment
Copyright © 2015. All rights reserved.