Class Validation

java.lang.Object
net.sf.saxon.lib.Validation

public final class Validation extends Object
This class contains constants and static methods to manipulate the validation property of a type.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Code indicating that validation against a named type was requested
    static final int
    Code indicating that no specific validation options were requested
    static final int
    Code indicating that the value of a validation request was invalid
    static final int
    Code for lax validation
    static final int
    Code corresponding to the XSLT option validation=preserve, which indicates that existing type annotations are to be preserved but no new validation is performed.
    static final int
    Synonym for STRIP, corresponding to XQuery usage
    static final int
    Code for strict validation
    static final int
    Code corresponding to the XSLT option validation=strip, which indicates that existing type annotations are to be removed and no new validation is performed.
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    describe(int value)
    Get a string representation of a validation code
    static int
    getCode(String value)
    Get the integer validation code corresponding to a given string

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • INVALID

      public static final int INVALID
      Code indicating that the value of a validation request was invalid
      See Also:
    • STRICT

      public static final int STRICT
      Code for strict validation
      See Also:
    • LAX

      public static final int LAX
      Code for lax validation
      See Also:
    • PRESERVE

      public static final int PRESERVE
      Code corresponding to the XSLT option validation=preserve, which indicates that existing type annotations are to be preserved but no new validation is performed.
      See Also:
    • STRIP

      public static final int STRIP
      Code corresponding to the XSLT option validation=strip, which indicates that existing type annotations are to be removed and no new validation is performed.
      See Also:
    • SKIP

      public static final int SKIP
      Synonym for STRIP, corresponding to XQuery usage
      See Also:
    • DEFAULT

      public static final int DEFAULT
      Code indicating that no specific validation options were requested
      See Also:
    • BY_TYPE

      public static final int BY_TYPE
      Code indicating that validation against a named type was requested
      See Also:
  • Method Details

    • getCode

      public static int getCode(String value)
      Get the integer validation code corresponding to a given string
      Parameters:
      value - one of "strict", "lax", "preserve", or "strip"
      Returns:
      the corresponding code STRICT, LAX, PRESERVE, or STRIP
    • describe

      public static String describe(int value)
      Get a string representation of a validation code
      Parameters:
      value - one of the validation codes defined in this class
      Returns:
      one of the strings "strict", "lax", "preserve", "skip" (sic), or "invalid"