Class ConfigurableValidationState

  • All Implemented Interfaces:
    ValidationContext

    public final class ConfigurableValidationState
    extends ValidationState

    An extension of ValidationState which can be configured to turn off checking for ID/IDREF errors and unparsed entity errors.

    Version:
    $Id$
    Author:
    Peter McCracken, IBM
    • Constructor Detail

      • ConfigurableValidationState

        public ConfigurableValidationState()
        Creates a new ConfigurableValidationState. By default, error checking for both ID/IDREFs and unparsed entities are turned on.
    • Method Detail

      • setIdIdrefChecking

        public void setIdIdrefChecking​(boolean setting)
        Turns checking for ID/IDREF errors on and off.
        Parameters:
        setting - true to turn on error checking, false to turn off error checking
      • setUnparsedEntityChecking

        public void setUnparsedEntityChecking​(boolean setting)
        Turns checking for unparsed entity errors on and off.
        Parameters:
        setting - true to turn on error checking, false to turn off error checking
      • checkIDRefID

        public Iterator checkIDRefID()
        Checks if all IDREFs have a corresponding ID.
        Overrides:
        checkIDRefID in class ValidationState
        Returns:
        null, if ID/IDREF checking is turned off otherwise, returns the value of the super implementation
      • isIdDeclared

        public boolean isIdDeclared​(String name)
        Checks if an ID has already been declared.
        Specified by:
        isIdDeclared in interface ValidationContext
        Overrides:
        isIdDeclared in class ValidationState
        Returns:
        false, if ID/IDREF checking is turned off otherwise, returns the value of the super implementation