com.saxonica.stream
Class AttributeCopier
java.lang.Object
com.saxonica.validate.Checker
com.saxonica.stream.AttributeCopier
- All Implemented Interfaces:
- Result, Receiver
public class AttributeCopier
- extends Checker
A Checker is a Receiver used to check the content of elements and attributes, especially those
that participate in uniqueness, key, and keyref constraints. The AttributeCopier is the Checker
that checks the content of attributes: basically by passing any that match the selection criteria
to the next stage in the pipeline
Method Summary |
void |
attribute(int nameCode,
int typeCode,
CharSequence value,
int locationId,
int properties)
Notify an attribute, passing it on to the receiver if it matches the selection |
void |
startContent()
Notify the start of the content, that is, the completion of all attributes and namespaces. |
boolean |
usesTypeAnnotations()
Ask whether this Receiver (or the downstream pipeline) makes any use of the type annotations
supplied on element and attribute events |
Methods inherited from class com.saxonica.validate.Checker |
characters, close, comment, endDocument, endElement, getConfiguration, getPipelineConfiguration, getSystemId, namespace, open, processingInstruction, setPipelineConfiguration, setSystemId, setUnparsedEntity, startDocument, startElement |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AttributeCopier
public AttributeCopier(Selection selection,
Receiver nextReceiver)
- Create an AttributeCopier
- Parameters:
selection
- the conditions that this checker is watching fornextReceiver
- the next stage in the pipeline, to receive matching attribute nodes
attribute
public void attribute(int nameCode,
int typeCode,
CharSequence value,
int locationId,
int properties)
throws XPathException
- Notify an attribute, passing it on to the receiver if it matches the selection
- Specified by:
attribute
in interface Receiver
- Overrides:
attribute
in class Checker
- Parameters:
nameCode
- The name of the attribute, as held in the name pooltypeCode
- The type of the attribute, as held in the name pool. The additional bit
NodeInfo.IS_DTD_TYPE may be set to indicate a DTD-derived type.value
- the string value of the attributelocationId
- 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
- Bit significant value. The following bits are defined:
- DISABLE_ESCAPING
- Disable escaping for this attribute
- NO_SPECIAL_CHARACTERS
- Attribute value contains no special characters
- Throws:
XPathException
startContent
public void startContent()
throws XPathException
- Description copied from interface:
Receiver
- Notify the start of the content, that is, the completion of all attributes and namespaces.
Note that the initial receiver of output from XSLT instructions will not receive this event,
it has to detect it itself. Note that this event is reported for every element even if it has
no attributes, no namespaces, and no content.
- Specified by:
startContent
in interface Receiver
- Overrides:
startContent
in class Checker
- Throws:
XPathException
usesTypeAnnotations
public boolean usesTypeAnnotations()
- Ask whether this Receiver (or the downstream pipeline) makes any use of the type annotations
supplied on element and attribute events
- Returns:
- true if the Receiver makes any use of this information. If false, the caller
may supply untyped nodes instead of supplying the type annotation
Copyright (c) Saxonica Limited. All rights reserved.