|
|||||||||
| 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.EntityValidator
public class EntityValidator
This class validates that elements and attributes of type ENTITY or ENTITIES have values are declared in the DOCTYPE declaration of the instance document as unparsed entities.
This component of the validation pipeline is used during standalone schema validation, but not during validation invoked from XSLT or XQuery, as constructed trees never contain unparsed entities.
| 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 | |
|---|---|
EntityValidator(Receiver next)
Create a validator for attributes of type ENTITY or ENTITIES |
|
| Method Summary | |
|---|---|
void |
attribute(NodeName nameCode,
SimpleType typeCode,
CharSequence value,
int locationId,
int properties)
Handle an attribute |
void |
characters(CharSequence chars,
int locationId,
int properties)
Character data |
void |
endElement()
End of element |
protected void |
reportValidationError(ValidationException err,
long locationId)
Report a validation error |
void |
setUnparsedEntity(String name,
String uri,
String publicId)
Set the URI for an unparsed entity in the document. |
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, close, comment, endDocument, getNamePool, getUnderlyingReceiver, namespace, open, processingInstruction, setPipelineConfiguration, setSystemId, setUnderlyingReceiver, 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 EntityValidator(Receiver next)
next - the next receiver in the pipeline| Method Detail |
|---|
public void setUnparsedEntity(String name,
String uri,
String publicId)
throws XPathException
setUnparsedEntity in interface ReceiversetUnparsedEntity in class ProxyReceivername - The name of the unparsed entityuri - The system identifier of the unparsed entitypublicId - The public identifier of the unparsed entity
XPathException - if an error occurs
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 typeCode,
CharSequence value,
int locationId,
int properties)
throws XPathException
attribute in interface Receiverattribute in class ProxyReceivernameCode - integer identifying the name of the attributetypeCode - integer identifying the type annotation (ignored)value - 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 attributepublic 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 considered fatal
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||