Package com.helger.schematron.pure.model
Class PSLet
java.lang.Object
com.helger.schematron.pure.model.PSLet
- All Implemented Interfaces:
com.helger.commons.lang.ICloneable<PSLet>,IPSClonableElement<PSLet>,IPSElement
A single Schematron let-element.
If the let element is the child of a rule element, the variable is calculated and scoped to the current rule and context. Otherwise, the variable is calculated with the context of the instance document root.
The required name attribute is the name of the variable. The required value attribute is an expression evaluated in the current context.
It is an error to reference a variable that has not been defined in the current schema, phase, pattern, or rule, if the query language binding allows this to be determined reliably. It is an error for a variable to be multiply defined in the current schema, phase, pattern and rule.
The variable is substituted into assertion tests and other expressions in the same rule before the test or expression is evaluated. The query language binding specifies which lexical conventions are used to detect references to variables.
An implementation may provide a facility to override the values of top-level variables specified by let elements under the schema element. For example, an implementation may allow top-level variables to be supplied on the command line. The values provided are strings or data objects, not expressions.
If the let element is the child of a rule element, the variable is calculated and scoped to the current rule and context. Otherwise, the variable is calculated with the context of the instance document root.
The required name attribute is the name of the variable. The required value attribute is an expression evaluated in the current context.
It is an error to reference a variable that has not been defined in the current schema, phase, pattern, or rule, if the query language binding allows this to be determined reliably. It is an error for a variable to be multiply defined in the current schema, phase, pattern and rule.
The variable is substituted into assertion tests and other expressions in the same rule before the test or expression is evaluated. The query language binding specifies which lexical conventions are used to detect references to variables.
An implementation may provide a facility to override the values of top-level variables specified by let elements under the schema element. For example, an implementation may allow top-level variables to be supplied on the command line. The values provided are strings or data objects, not expressions.
- Author:
- Philip Helger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PSLetcom.helger.xml.microdom.IMicroElementgetClone()getName()getValue()booleanbooleanisValid(IPSErrorHandler aErrorHandler) Check if this element is specified completely.voidvoidtoString()voidvalidateCompletely(IPSErrorHandler aErrorHandler) Check if this element is specified completely.
-
Constructor Details
-
PSLet
public PSLet()
-
-
Method Details
-
isValid
Description copied from interface:IPSElementCheck if this element is specified completely. This method stops at the first encountered error.- Specified by:
isValidin interfaceIPSElement- Parameters:
aErrorHandler- The error handler where the error details are stored. May not benull.- Returns:
trueif all mandatory fields are set and the element is valid,falseotherwise.
-
validateCompletely
Description copied from interface:IPSElementCheck if this element is specified completely. This method performs all validations independent of the number of encountered error.- Specified by:
validateCompletelyin interfaceIPSElement- Parameters:
aErrorHandler- The error handler where the error details are stored. May not benull.
-
isMinimal
public boolean isMinimal()- Specified by:
isMinimalin interfaceIPSElement- Returns:
trueif this element conforms to the Schematron minimal syntax,falseotherwise.
-
setName
- Parameters:
sName- The name of the variable. May benull.
-
getName
- Returns:
- The name of the variable. May be
null.
-
setValue
- Parameters:
sValue- The value of the variable. May benull.
-
getValue
- Returns:
- The value of the variable. May be
null.
-
getAsMicroElement
- Specified by:
getAsMicroElementin interfaceIPSElement- Returns:
- The XML representation of this element. Never
null.
-
getClone
- Specified by:
getClonein interfacecom.helger.commons.lang.ICloneable<PSLet>
-
toString
-
create
-