Class PSValueOf

java.lang.Object
com.helger.schematron.pure.model.PSValueOf
All Implemented Interfaces:
com.helger.commons.lang.ICloneable<PSValueOf>, IPSClonableElement<PSValueOf>, IPSElement, IPSHasForeignAttributes

@NotThreadSafe public class PSValueOf extends Object implements IPSClonableElement<PSValueOf>, IPSHasForeignAttributes
A single Schematron value-of-element.
Finds or calculates values from the instance document to allow clearer assertions and diagnostics. The required select attribute is an expression evaluated in the current context that returns a string.
Variable references in the select attribute are resolved in the scope of the current schema, phase, pattern and rule.
An implementation which does not report natural-language assertions is not required to make use of this element.
Author:
Philip Helger
  • Constructor Details

    • PSValueOf

      public PSValueOf()
  • Method Details

    • isValid

      public boolean isValid(@Nonnull IPSErrorHandler aErrorHandler)
      Description copied from interface: IPSElement
      Check if this element is specified completely. This method stops at the first encountered error.
      Specified by:
      isValid in interface IPSElement
      Parameters:
      aErrorHandler - The error handler where the error details are stored. May not be null.
      Returns:
      true if all mandatory fields are set and the element is valid, false otherwise.
    • validateCompletely

      public void validateCompletely(@Nonnull IPSErrorHandler aErrorHandler)
      Description copied from interface: IPSElement
      Check if this element is specified completely. This method performs all validations independent of the number of encountered error.
      Specified by:
      validateCompletely in interface IPSElement
      Parameters:
      aErrorHandler - The error handler where the error details are stored. May not be null.
    • isMinimal

      public boolean isMinimal()
      Specified by:
      isMinimal in interface IPSElement
      Returns:
      true if this element conforms to the Schematron minimal syntax, false otherwise.
    • getAllForeignAttributes

      @Nonnull @ReturnsMutableCopy public com.helger.commons.collection.impl.ICommonsOrderedMap<String,String> getAllForeignAttributes()
      Specified by:
      getAllForeignAttributes in interface IPSHasForeignAttributes
    • hasForeignAttributes

      public boolean hasForeignAttributes()
      Specified by:
      hasForeignAttributes in interface IPSHasForeignAttributes
    • addForeignAttribute

      public void addForeignAttribute(@Nonnull String sAttrName, @Nonnull String sAttrValue)
      Specified by:
      addForeignAttribute in interface IPSHasForeignAttributes
    • getSelect

      @Nullable public String getSelect()
      Returns:
      The select expression string. May be null.
    • setSelect

      public void setSelect(@Nullable String sSelect)
      Set the expression to retrieve the value of
      Parameters:
      sSelect - The select expression string. May be null.
    • getAsMicroElement

      @Nonnull public com.helger.xml.microdom.IMicroElement getAsMicroElement()
      Specified by:
      getAsMicroElement in interface IPSElement
      Returns:
      The XML representation of this element. Never null.
    • getClone

      @Nonnull public PSValueOf getClone()
      Specified by:
      getClone in interface com.helger.commons.lang.ICloneable<PSValueOf>
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • ofSelect

      @Nonnull public static PSValueOf ofSelect(@Nullable String sSelect)
      Factory method to create a new PSValueOf with a certain "select" value
      Parameters:
      sSelect - The "select" value to be used. May be null.
      Returns:
      Never null.
      Since:
      6.2.3