|
|||||||||
| 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.ContentValidator
com.saxonica.validate.AttributeValidator
public abstract class AttributeValidator
This class is an abstract superclass for all the receivers that do element content validation. Since all kinds of element content can be associated with attributes, the attribute validation is handled at this level.
| Field Summary |
|---|
| Fields inherited from class com.saxonica.validate.ContentValidator |
|---|
nil, NIL_ALLOWED, NIL_DISALLOWED, NIL_IGNORED, pendingMessages, xsiType |
| 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 | |
|---|---|
AttributeValidator(Receiver next)
Create an AttributeValidator |
|
| 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)
Handle character data appearing as a child of the element being validated |
SimpleType |
getMostRecentAttributeType()
Get the SimpleType used for validating the most recent attribute, if any |
protected void |
noCharactersWhenNil(int locationId)
|
protected SchemaType |
processWildcardTerm(Wildcard card,
int nameCode,
int locationId)
Process a wildcard term found in complex content or "all" content groups. |
void |
setAttributeGroup(AttributeGroupDecl attributeGroup)
Identify the set of attributes permitted by the complex type being validated. |
void |
startContent()
Notify the start of the content, that is, the completion of all attributes and namespaces. |
void |
startElement(NodeName nameCode,
SchemaType typeCode,
int locationId,
int properties)
Handle the start tag for a child element of the element being validated |
| 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 |
|---|
close, comment, endElement, getNamePool, getUnderlyingReceiver, namespace, open, processingInstruction, setPipelineConfiguration, setSystemId, setUnderlyingReceiver, setUnparsedEntity, 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 AttributeValidator(Receiver next)
next - the next receiver in the pipeline| Method Detail |
|---|
public void setAttributeGroup(AttributeGroupDecl attributeGroup)
throws ValidationException
attributeGroup - the set of attributes declared for this complex type
ValidationException - if an unresolved reference is found
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 SimpleType getMostRecentAttributeType()
public void startElement(NodeName nameCode,
SchemaType typeCode,
int locationId,
int properties)
throws XPathException
startElement in interface ReceiverstartElement in class ContentValidatornameCode - integer code identifying the name of the element within the name pool.typeCode - integer code identifying the element's type within the name pool.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.properties - properties of the element node
XPathException - if an error occurs
public final void startContent()
throws XPathException
startContent in interface ReceiverstartContent in class ProxyReceiverXPathException - if an error occurs
public void characters(CharSequence chars,
int locationId,
int properties)
throws XPathException
characters in interface Receivercharacters in class ProxyReceiverchars - The character contentproperties - Additional propertieslocationId - 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 this element does not allow character data
protected void noCharactersWhenNil(int locationId)
throws XPathException
XPathException
protected SchemaType processWildcardTerm(Wildcard card,
int nameCode,
int locationId)
throws XPathException
card - the Wildcard that has been matchednameCode - the name of the child elementlocationId - the location of the child element
XPathException - if the content is invalid
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||