Package com.saxonica.ee.schema.sdoc

## Class SaxonPreprocess

- java.lang.Object
- - net.sf.saxon.tree.linked.NodeImpl
  - - net.sf.saxon.tree.linked.ParentNodeImpl
    - - net.sf.saxon.tree.linked.ElementImpl
      - - com.saxonica.ee.schema.sdoc.SchemaElement
        - - com.saxonica.ee.schema.sdoc.AnnotationParent
          - - com.saxonica.ee.schema.sdoc.SaxonPreprocess

- All Implemented Interfaces:
    `javax.xml.transform.Source`, `javax.xml.transform.SourceLocator`, `GroundedValue`, `Item`, `MutableNodeInfo`, `NamespaceResolver`, `NodeInfo`, `Sequence`, `Location`, `SteppingNode<NodeImpl>`, `SiblingCountingNode`, `org.xml.sax.Locator`

      public class SaxonPreprocess
      extends AnnotationParent

  saxon:preprocess is an implementation-defined pre-lexical facet as permitted by XML Schema 1.1. It allows the lexical value as written in the source document to be transformed prior to validation against the constraining facets.

  The effect of saxon:preprocess is that the lexical space for a type derived by restriction is no longer constrained to be a subset of the lexical space for the type that it restricts. For example, a type derived from xs:decimal can use `<saxon:preprocess action="translate($value, ',', '.')">` to convert the input value "3,14159" to "3.14159", which then validates as an `xs:decimal`.

  More specifically, the saxon:preprocess facet converts the value from the lexical space of a restricted type to the lexical space of its base type. This means that preprocessing may be defined at multiple levels of the type hierarchy; the preprocessing will be performed on the most specific type first.

  Note that the pattern facet, if present, applies to the value output by the preprocess facet, not to its input.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class com.saxonica.ee.schema.sdoc.SchemaElement

      `SchemaElement.XPathStaticContext`

  - ### Field Summary

    - ### Fields inherited from class com.saxonica.ee.schema.sdoc.SchemaElement

      `NAMESPACE_ANY, NAMESPACE_LOCAL, NAMESPACE_OTHER, NAMESPACE_TARGET, REQUIRE_NULL_NS, REQUIRE_TARGET_NS, USE_DEFAULT_NS, USE_DEFAULT_NS_WITHOUT_IMPORT`

    - ### Fields inherited from class net.sf.saxon.tree.linked.NodeImpl

      `NODE_LETTER`

    - ### Fields inherited from interface net.sf.saxon.om.NodeInfo

      `IS_DTD_TYPE, IS_NILLED`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `SaxonPreprocess()` | Creates a new SaxonPreprocess element

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `Assertion` | `getAction()` | Get the Assertion schema component corresponding to the action in this saxon:preprocess element
    `Assertion` | `getReverseAction()` | Get the Assertion schema component corresponding to the reverse action in this saxon:preprocess element
    `void` | `prepareAttributes()` | Validate and process the attributes on this element in the schema document

    - ### Methods inherited from class com.saxonica.ee.schema.sdoc.AnnotationParent

      `validate`

    - ### Methods inherited from class com.saxonica.ee.schema.sdoc.SchemaElement

      `allocateAnonymousTypeCode, allowAttributes, checkContentModel, checkLocalTargetNamespace, checkMutuallyExclusiveAttributes, checkOnlyChildIsAnnotation, checkPermittedType, duplicate, duplicateElement, error, error, getComponentName, getContainingComplexType, getContainingSimpleType, getFingerprint, getSchema, getSchemaNodeFactory, getXSDSchema, illegalElement, indefiniteArticle, invalidAttributeValue, isFinalState, isTopLevel, makeNamespaceContext, missingAttribute, missingChildElement, mustBeFirstElement, mustPrecede, mutuallyExclusive, mutuallyExclusiveAttributes, mutuallyExclusiveElementAndAttribute, parseBooleanAttribute, parseFinalOrBlock, postValidate, processAllAttributes, processAllowedNamespaces, processDisallowedNamespaces, processDisallowedQNames, processId, processMaxOccurs, processMinOccurs, requireAttribute, setSchemaNodeFactory, validateChildren, validateSubtree, warning`

    - ### Methods inherited from class net.sf.saxon.tree.linked.ElementImpl

      `addAttribute, addNamespace, addNamespace, attributes, checkNotNamespaceSensitiveElement, copy, delete, fixupInsertedNamespaces, generateId, getAllNamespaces, getAttributeValue, getBaseURI, getColumnNumber, getDeclaredNamespaces, getLineNumber, getNodeKind, getNodeName, getRoot, getSchemaType, getSystemId, getURIForPrefix, initialise, isId, isIdref, isInScopeNamespace, isNilled, iteratePrefixes, removeAttribute, removeNamespace, removeTypeAnnotation, rename, replaceStringValue, setAttributeInfo, setAttributes, setLocation, setNamespaceMap, setNilled, setNodeName, setSystemId, setTypeAnnotation`

    - ### Methods inherited from class net.sf.saxon.tree.linked.ParentNodeImpl

      `addChild, children, compact, getFirstChild, getLastChild, getNthChild, getNumberOfChildren, getRawSequenceNumber, getSequenceNumber, getStringValue, getStringValueCS, hasChildNodes, insertChildren, iterateChildren, removeChild, replaceChildrenAt, setChildren, setRawSequenceNumber`

    - ### Methods inherited from class net.sf.saxon.tree.linked.NodeImpl

      `atomize, compareOrder, effectiveBooleanValue, equals, getConfiguration, getDisplayName, getFingerprint, getLocalPart, getNamePool, getNextInDocument, getNextSibling, getParent, getPhysicalRoot, getPrefix, getPreviousInDocument, getPreviousSibling, getRawParent, getSiblingPosition, getSuccessorElement, getTreeInfo, getURI, hasFingerprint, head, insertSiblings, isDeleted, iterateAxis, iterateAxis, newBuilder, replace, saveLocation, setRawParent, setSiblingPosition`

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

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

    - ### Methods inherited from interface net.sf.saxon.om.GroundedValue

      `asIterable, concatenate, containsNode, materialize`

    - ### Methods inherited from interface net.sf.saxon.om.Item

      `getLength, itemAt, iterate, reduce, subsequence`

    - ### Methods inherited from interface net.sf.saxon.om.NodeInfo

      `children, equals, getGenre, getPublicId, hashCode, isSameNodeInfo, isStreamed, toShortString`

    - ### Methods inherited from interface net.sf.saxon.om.Sequence

      `makeRepeatable`

    - ### Methods inherited from interface javax.xml.transform.Source

      `isEmpty`

- - ### Constructor Detail

    - #### SaxonPreprocess

          public SaxonPreprocess()

      Creates a new SaxonPreprocess element

  - ### Method Detail

    - #### prepareAttributes

          public void prepareAttributes()
                                 throws SchemaException

      Validate and process the attributes on this element in the schema document
      Specified by:
        `prepareAttributes` in class `SchemaElement`
      Throws:
        `SchemaException` - if any errors are found in the attributes

    - #### getAction

          public Assertion getAction()

      Get the Assertion schema component corresponding to the action in this saxon:preprocess element
      Returns:
        the Assertion schema component

    - #### getReverseAction

          public Assertion getReverseAction()

      Get the Assertion schema component corresponding to the reverse action in this saxon:preprocess element
      Returns:
        the Assertion schema component