Package com.saxonica.ee.validate
Class ConstraintChecker
java.lang.Object
net.sf.saxon.event.SequenceReceiver
com.saxonica.ee.stream.watch.WatchManager
com.saxonica.ee.validate.ConstraintChecker
- All Implemented Interfaces:
Result
,Receiver
,NamespaceResolver
This class handles the checking of Schema-defined unique, key, and keyref
constraints. It keeps track of the nesting of elements, and notifies a Watcher
class when an element is found that matches a particular Selector.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.saxonica.ee.stream.watch.WatchManager
WatchManager.ClosedownAction, WatchManager.GroupingScope
-
Field Summary
Fields inherited from class com.saxonica.ee.stream.watch.WatchManager
activeWatchStack, elementStackTop, watchList
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 -
Method Summary
Modifier and TypeMethodDescriptionprotected void
void
Notify end of elementprotected boolean
void
setElementDeclaration is called immediately before the call on startElement.void
Set the pipeline configurationvoid
void
startElement
(NodeName elementName, SchemaType typeCode, AttributeMap attributes, NamespaceMap namespaces, Location location, int properties) Output element start tagMethods inherited from class com.saxonica.ee.stream.watch.WatchManager
addWatch, allowsEarlyExit, append, characters, close, comment, endDocument, endGroupingScope, getCurrentEventNumber, getCurrentNode, getDepth, getDocumentNode, getMultiAccumulatorWatch, getOutputter, getURIForPrefix, getXPathContext, iteratePrefixes, processingInstruction, removeWatch, restartElement, setOutputter, setUnparsedEntity, setXPathContext, startCapturingGroupingWatches, startDocument, startGroupingScope, stopCapturingGroupingWatches, usesTypeAnnotations, watchAccumulators
Methods inherited from class net.sf.saxon.event.SequenceReceiver
append, decompose, flatten, getConfiguration, getErrorCodeForDecomposingFunctionItems, getNamePool, getPipelineConfiguration, getSystemId, handlesAppend, open, setSystemId
-
Constructor Details
-
ConstraintChecker
-
-
Method Details
-
setValidationContext
-
getValidationContext
-
setPipelineConfiguration
Description copied from interface:Receiver
Set the pipeline configuration- Specified by:
setPipelineConfiguration
in interfaceReceiver
- Overrides:
setPipelineConfiguration
in classWatchManager
- Parameters:
pipe
- the pipeline configuration
-
setElementDeclaration
setElementDeclaration is called immediately before the call on startElement. It identifies the element declaration that defines the just-started element, which in turn is used to create a Watch for constraints originating at this element.- Parameters:
decl
- the element declaration- Throws:
XPathException
- if an error occurs
-
addPrearrangedWatches
- Overrides:
addPrearrangedWatches
in classWatchManager
- Throws:
XPathException
-
startElement
public void startElement(NodeName elementName, SchemaType typeCode, AttributeMap attributes, NamespaceMap namespaces, Location location, int properties) throws XPathException Description copied from class:WatchManager
Output element start tag- Specified by:
startElement
in interfaceReceiver
- Overrides:
startElement
in classWatchManager
- Parameters:
elementName
- the name of the element.typeCode
- the type annotation of the element.attributes
- the attributes of this elementnamespaces
- the in-scope namespaces of this element: generally this is all the in-scope namespaces, without relying on inheriting namespaces from parent elementslocation
- an object providing information about the module, line, and column where the node originatedproperties
- bit-significant properties of the element node. If there are no relevant properties, zero is supplied. The definitions of the bits are in classReceiverOption
- Throws:
XPathException
- if an error occurs
-
endElement
Description copied from class:WatchManager
Notify end of element- Specified by:
endElement
in interfaceReceiver
- Overrides:
endElement
in classWatchManager
- Throws:
XPathException
- if an error occurs
-
isSkipValidation
protected boolean isSkipValidation()- Overrides:
isSkipValidation
in classWatchManager
-