com.saxonica.validate

## Class SkipValidator

- java.lang.Object
- - net.sf.saxon.event.SequenceReceiver
  - - net.sf.saxon.event.ProxyReceiver
    - - com.saxonica.validate.ValidatingFilter
      - - com.saxonica.validate.ContentValidator
        - - com.saxonica.validate.SkipValidator

- All Implemented Interfaces:
    Result, Receiver

      public class SkipValidator
      extends ContentValidator

  This class is a filter that passes all Receiver events through unchanged, except that it removes all type annotations from element and attribute nodes. It implements validation="strip" or in schema terms, skip validation
  Author:
    Michael Kay

- - ### Field Summary

    - ### Fields inherited from class com.saxonica.validate.ContentValidator

      `childValidator, nil, NIL_ALLOWED, NIL_DISALLOWED, NIL_IGNORED, pendingMessages`

    - ### Fields inherited from class com.saxonica.validate.ValidatingFilter

      `locallyInvalid`

    - ### Fields inherited from class net.sf.saxon.event.ProxyReceiver

      `nextReceiver`

    - ### Fields inherited from class net.sf.saxon.event.SequenceReceiver

      `pipelineConfiguration, previousAtomic, systemId`

    - ### Fields inherited from interface javax.xml.transform.Result

      `PI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SkipValidator(Receiver next)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `attribute(NodeName nameCode, SimpleType typeCode, CharSequence value, int locationId, int properties)` Handle an attribute
    `protected ContentValidator` | `getChildValidator()` Get a validator to handle the children of the current element.
    `protected ConstraintChecker` | `getConstraintChecker()` Get the constraint checker used in this pipeline
    `SchemaType` | `getSchemaType()` Get the schema type against which we are validating, if any
    `void` | `setPipelineConfiguration(PipelineConfiguration pipe)` Set the pipeline configuration
    `void` | `startElement(NodeName nameCode, SchemaType typeCode, int locationId, int properties)` Output element start tag

    - ### Methods inherited from class com.saxonica.validate.ContentValidator

      `endDocument, getAnnotation, getContainingElement, getContainingElementLocationId, getContainingElementName, getElementDeclaration, getNamespaceResolver, getNillability, isNil, makeChildValidator, makeValidator, makeValidatorForType, setAnnotation, setContainingElement, setElementDeclaration, setNillability`

    - ### Methods inherited from class com.saxonica.validate.ValidatingFilter

      `append, getStartTagBuffer, getValidationContext, reportIfInvalid, reportValidationError, setConstraintChecker, setStartTagBuffer, setValidationContext, usesTypeAnnotations`

    - ### Methods inherited from class net.sf.saxon.event.ProxyReceiver

      `characters, close, comment, endElement, getNamePool, getUnderlyingReceiver, namespace, open, processingInstruction, setSystemId, setUnderlyingReceiver, setUnparsedEntity, startContent, startDocument`

    - ### Methods inherited from class net.sf.saxon.event.SequenceReceiver

      `append, getConfiguration, getPipelineConfiguration, getSystemId`

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

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

- - ### Constructor Detail

    - #### SkipValidator

          public SkipValidator(Receiver next)

  - ### Method Detail

    - #### setPipelineConfiguration

          public void setPipelineConfiguration(PipelineConfiguration pipe)

      Description copied from interface: `Receiver`
      Set the pipeline configuration
      Specified by:
        `setPipelineConfiguration` in interface `Receiver`
      Overrides:
        `setPipelineConfiguration` in class `ProxyReceiver`
      Parameters:
        `pipe` - the pipeline configuration

    - #### getSchemaType

          public SchemaType getSchemaType()

      Get the schema type against which we are validating, if any
      Specified by:
        `getSchemaType` in class `ContentValidator`
      Returns:
        the schema type that this validator is validating against, or null

    - #### getConstraintChecker

          protected ConstraintChecker getConstraintChecker()

      Description copied from class: `ValidatingFilter`
      Get the constraint checker used in this pipeline
      Overrides:
        `getConstraintChecker` in class `ValidatingFilter`
      Returns:
        the constraint checker

    - #### startElement

          public void startElement(NodeName nameCode,
                          SchemaType typeCode,
                          int locationId,
                          int properties)
                            throws XPathException

      Output element start tag
      Specified by:
        `startElement` in interface `Receiver`
      Overrides:
        `startElement` in class `ContentValidator`
      Parameters:
        `nameCode` - integer code identifying the name of the element within the name pool.
        `typeCode` - integer code identifying the element's type within the name pool.
        `locationId` - an integer which can be interpreted using a `LocationProvider` to return information such as line number and system ID. If no location information is available, the value zero is supplied.
        `properties` - properties of the element node
      Throws:
        `XPathException` - if an error occurs

    - #### getChildValidator

          protected ContentValidator getChildValidator()

      Get a validator to handle the children of the current element. This is called immediately on return from the startElement call that starts this element.
      Specified by:
        `getChildValidator` in class `ContentValidator`
      Returns:
        the validator to be used to handle the children

    - #### attribute

          public void attribute(NodeName nameCode,
                       SimpleType typeCode,
                       CharSequence value,
                       int locationId,
                       int properties)
                         throws XPathException

      Handle an attribute
      Specified by:
        `attribute` in interface `Receiver`
      Overrides:
        `attribute` in class `ProxyReceiver`
      Parameters:
        `nameCode` - integer identifying the name of the attribute
        `typeCode` - integer identifying the type annotation of the attribute
        `value` - the value of the attribute
        `properties` - bit-significant flags indicating special action to be taken
        `locationId` - an integer which can be interpreted using a `LocationProvider` to return information such as line number and system ID. If no location information is available, the value zero is supplied.
      Throws:
        `XPathException` - On any failure to write the attribute

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