|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.saxon.event.SequenceReceiver
net.sf.saxon.event.ProxyReceiver
com.saxonica.validate.IdValidator
public class IdValidator
This class validates that ID elements and attributes have unique values and that IDREF and IDREFS elements and attributes refer to an ID in the same document. The class assumes that these elements and attributes have already been locally validated (so, for example, a element of type ID will not have child elements).
| Field Summary |
|---|
| 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 | |
|---|---|
IdValidator(Receiver next)
Create a validator for ID/IDREF constraints |
|
| Method Summary | |
|---|---|
void |
attribute(NodeName nameCode,
SimpleType type,
CharSequence value,
int locationId,
int properties)
Handle an attribute |
void |
characters(CharSequence chars,
int locationId,
int properties)
Character data |
void |
close()
End of document |
void |
endElement()
End of element |
protected void |
reportValidationError(ValidationException err,
long locationId)
Report a validation error |
void |
setConstraintChecker(ConstraintChecker checker)
Set the owning ConstraintChecker |
void |
startElement(NodeName nameCode,
SchemaType typeCode,
int locationId,
int properties)
Notify the start of an element |
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 net.sf.saxon.event.ProxyReceiver |
|---|
append, comment, endDocument, getNamePool, getUnderlyingReceiver, namespace, open, processingInstruction, setPipelineConfiguration, 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 |
|---|
public IdValidator(Receiver next)
next - the next receiver in the pipeline| Method Detail |
|---|
public void setConstraintChecker(ConstraintChecker checker)
checker - the owning ConstraintChecker
public void startElement(NodeName nameCode,
SchemaType typeCode,
int locationId,
int properties)
throws XPathException
startElement in interface ReceiverstartElement in class ProxyReceivernameCode - integer code identifying the name of the element within the name pool.typeCode - integer code identifying the element's type within the name pool.properties - for future use. Should be set to zero.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.
XPathException - if an error occurs
public void characters(CharSequence chars,
int locationId,
int properties)
throws XPathException
characters in interface Receivercharacters in class ProxyReceiverchars - The characterslocationId - 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:
XPathException - if an error occurs
public void endElement()
throws XPathException
endElement in interface ReceiverendElement in class ProxyReceiverXPathException - if an error occurs
public void attribute(NodeName nameCode,
SimpleType type,
CharSequence value,
int locationId,
int properties)
throws XPathException
attribute in interface Receiverattribute in class ProxyReceivernameCode - integer identifying the name of the attributetype - the type annotationvalue - the value of the attributeproperties - additional properties 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.
XPathException - On any failure to write the attribute
public void close()
throws XPathException
close in interface Receiverclose in class ProxyReceiverXPathException - if an error occurspublic boolean usesTypeAnnotations()
usesTypeAnnotations in interface ReceiverusesTypeAnnotations in class ProxyReceiver
protected void reportValidationError(ValidationException err,
long locationId)
throws ValidationException
err - The validation exceptionlocationId - identifies the location in the source document or stylesheet/query where the
validation error was detected
ValidationException - if the error is determined to be fatal
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||