com.saxonica.validate

## Class ValidationContext

- java.lang.Object
- - net.sf.saxon.lib.ConversionRules
  - - com.saxonica.validate.ValidationContext

- All Implemented Interfaces:
    Serializable

      public class ValidationContext
      extends ConversionRules

  This class defines information about a validation episode
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ValidationContext(ConversionRules rules)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected ConstraintChecker` | `getConstraintChecker()` Get the constraint checker used in this pipeline
    `Controller` | `getController()` Get the Controller used for this validation episode
    `protected String` | `getErrorCode()`
    `int` | `getErrorCount()` Get the number of validation errors found during the validation episode
    `StartTagBufferEE` | `getStartTagBuffer()` Get the startTagBuffer
    `ValidationParams` | `getValidationParams()` Get the validation parameters (as declared using saxon:param)
    `SchemaType` | `getXSIType()` Get the value of the xsi:type attribute.
    `boolean` | `incrementErrorCount()` Increment the count of validation errors found
    `void` | `setConstraintChecker(ConstraintChecker checker)` Set the constraint checker used in this pipeline
    `void` | `setController(Controller controller)` Set the Controller used for this validation episode
    `void` | `setErrorCode(String errorCode)` Set the error code to be used for error messages
    `void` | `setErrorLimit(int limit)` Set a limit on the number of errors to be reported before validation is abandoned
    `void` | `setStartTagBuffer(StartTagBufferEE startTag)` Set the StartTagBuffer, which buffers attributes on the element start tag, and also acts as the namespaceResolver to be used for resolving QName-valued attributes
    `void` | `setValidationParams(ValidationParams validationParams)` Set the validation parameters (as declared using saxon:param)
    `void` | `setXSIType(SchemaType xsiType)` Set the value of the xsi:type attribute.

    - ### Methods inherited from class net.sf.saxon.lib.ConversionRules

      `copy, copyTo, getConverter, getNameChecker, getStringConverter, getStringToDoubleConverter, isAllowYearZero, isDeclaredNotation, isValidURI, setAllowYearZero, setNameChecker, setNotationSet, setStringToDoubleConverter, setURIChecker`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ValidationContext

          public ValidationContext(ConversionRules rules)

  - ### Method Detail

    - #### getController

          public Controller getController()

      Get the Controller used for this validation episode
      Returns:
        the Controller

    - #### setController

          public void setController(Controller controller)

      Set the Controller used for this validation episode
      Parameters:
        `controller` - the controller to be used

    - #### getValidationParams

          public ValidationParams getValidationParams()

      Get the validation parameters (as declared using saxon:param)
      Returns:
        the validation parameter values. May be null if none have been defined

    - #### setValidationParams

          public void setValidationParams(ValidationParams validationParams)

      Set the validation parameters (as declared using saxon:param)
      Parameters:
        `validationParams` - the validation parameter values. May be null if none are required.

    - #### setConstraintChecker

          public void setConstraintChecker(ConstraintChecker checker)

      Set the constraint checker used in this pipeline
      Parameters:
        `checker` - the constraint checker

    - #### getConstraintChecker

          protected ConstraintChecker getConstraintChecker()

      Get the constraint checker used in this pipeline
      Returns:
        the constraint checker

    - #### setStartTagBuffer

          public void setStartTagBuffer(StartTagBufferEE startTag)

      Set the StartTagBuffer, which buffers attributes on the element start tag, and also acts as the namespaceResolver to be used for resolving QName-valued attributes
      Parameters:
        `startTag` - the namespace resolver

    - #### getStartTagBuffer

          public StartTagBufferEE getStartTagBuffer()

      Get the startTagBuffer
      Returns:
        the startTagBuffer

    - #### setXSIType

          public void setXSIType(SchemaType xsiType)

      Set the value of the xsi:type attribute. This is called immediately before the call of startElement on which the xsi:type attribute appears.
      Parameters:
        `xsiType` - the schema type identified by the xsi:type attribute

    - #### getXSIType

          public SchemaType getXSIType()

      Get the value of the xsi:type attribute. This is called immediately before the call of startElement on which the xsi:type attribute appears.
      Returns:
        the schema type identified by the xsi:type attribute

    - #### setErrorCode

          public void setErrorCode(String errorCode)

      Set the error code to be used for error messages
      Parameters:
        `errorCode` - the error code

    - #### getErrorCode

          protected String getErrorCode()

    - #### setErrorLimit

          public void setErrorLimit(int limit)

      Set a limit on the number of errors to be reported before validation is abandoned
      Parameters:
        `limit` - the limit on the number of errors

    - #### incrementErrorCount

          public boolean incrementErrorCount()

      Increment the count of validation errors found
      Returns:
        true if the limit on the number of errors has been exceeded, otherwise false

    - #### getErrorCount

          public int getErrorCount()

      Get the number of validation errors found during the validation episode
      Returns:
        the number of errors

Copyright (c) 2004-2013 Saxonica Limited. All rights reserved.