|
|||||||||
| 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.ValidatingFilter
com.saxonica.validate.XSIAttributeHandler
public class XSIAttributeHandler
This class processes attributes such as xsi:schemaLocation and xsi:type. To achieve this, it needs to be preceded in the pipeline by a StartTagBuffer, which buffers all attributes and namespaces, because the xsi:type and schemaLocation need to be processed before the start element event. Apart from the StartTagBuffer, this is the first class in the validation pipeline.
The main work of this class can be done in the startElement event, because the StartTagBuffer ensures that by this time, all the namespaces and attributes for the element are known and accessible.
| 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 | |
|---|---|
XSIAttributeHandler(ValidationStack out)
Create a handler for xsi: attributes |
|
| Method Summary | |
|---|---|
void |
attribute(NodeName nameCode,
SimpleType typeCode,
CharSequence value,
int locationId,
int properties)
Notify an attribute. |
void |
endDocument()
Notify the end of a document node |
void |
setPipelineConfiguration(PipelineConfiguration pipe)
Set the pipeline configuration |
void |
setStartTagBuffer(StartTagBufferEE stb)
Provide the location of the start tag buffer which buffers the attributes for a start tag and resolves namespaces |
void |
startElement(NodeName nameCode,
SchemaType typeCode,
int locationId,
int properties)
Notify the start of an element |
| Methods inherited from class com.saxonica.validate.ValidatingFilter |
|---|
append, getErrorCode, getInvalidity, isInvalid, reportIfInvalid, reportValidationError, setErrorCode, setInvalidity, usesTypeAnnotations |
| Methods inherited from class net.sf.saxon.event.ProxyReceiver |
|---|
characters, close, comment, endElement, getNamePool, getUnderlyingReceiver, namespace, open, processingInstruction, 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 XSIAttributeHandler(ValidationStack out)
out - the next filter in the pipeline| Method Detail |
|---|
public void setStartTagBuffer(StartTagBufferEE stb)
stb - the start tag bufferpublic void setPipelineConfiguration(PipelineConfiguration pipe)
Receiver
setPipelineConfiguration in interface ReceiversetPipelineConfiguration in class ProxyReceiverpipe - the pipeline configuration
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 attribute(NodeName nameCode,
SimpleType typeCode,
CharSequence value,
int locationId,
int properties)
throws XPathException
attribute in interface Receiverattribute in class ProxyReceivernameCode - The name of the attribute, as held in the name pooltypeCode - The type of the attribute, as held in the name poolproperties - Bit significant value. The following bits are defined:
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.
IllegalStateException: - attempt to output an attribute when there is no open element
start tag
XPathException - if an error occurs
public void endDocument()
throws XPathException
ProxyReceiver
endDocument in interface ReceiverendDocument in class ProxyReceiverXPathException - if an error occurs
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||