com.saxonica.validate
Class ComplexContentValidator
java.lang.Object
   net.sf.saxon.event.SequenceReceiver
net.sf.saxon.event.SequenceReceiver
       net.sf.saxon.event.ProxyReceiver
net.sf.saxon.event.ProxyReceiver
           com.saxonica.validate.ContentValidator
com.saxonica.validate.ContentValidator
               com.saxonica.validate.AttributeValidator
com.saxonica.validate.AttributeValidator
                   com.saxonica.validate.ComplexContentValidator
com.saxonica.validate.ComplexContentValidator
- All Implemented Interfaces: 
- Receiver, javax.xml.transform.Result
- public class ComplexContentValidator- extends AttributeValidator
This class is a filter that is used to validate the content of an element with a
 complex type. As each child element is encountered, it is used to compute a transition
 in the finite state machine compiled for the given complex type.
 
 
 
 
 
| Fields inherited from interface javax.xml.transform.Result | 
| PI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING | 
 
 
 
 
| Methods inherited from class com.saxonica.validate.ContentValidator | 
| endDocument, getAnnotation, getContainingElement, getContainingElementLocationId, getContainingElementName, getElementDeclaration, getNamespaceResolver, isInvalid, isNillable, isOutput, makeValidator, makeValidator, makeValidator, reportValidationError, setAnnotation, setContainingElement, setElementDeclaration, setIsOutput, setNamespaceResolver, setNillable, setXSIType | 
 
| Methods inherited from class net.sf.saxon.event.ProxyReceiver | 
| close, comment, getConfiguration, getDocumentLocator, getNamePool, getSystemId, getUnderlyingReceiver, namespace, open, processingInstruction, setPipelineConfiguration, setSystemId, setUnderlyingReceiver, setUnparsedEntity, startDocument | 
 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
ComplexContentValidator
public ComplexContentValidator(ElementDecl declaration,
                               UserComplexType type)
                        throws ValidationException
- Create a ComplexContentValidator for a given type
 
- Parameters:
- declaration- the element declaration, if available, or null otherwise.
- type- the complex type
setSchemaType
public void setSchemaType(UserComplexType type)
                   throws ValidationException
- 
- Throws:
- ValidationException
 
getSchemaType
public UserComplexType getSchemaType()
- 
 
startElement
public void startElement(int nameCode,
                         int typeCode,
                         int locationId,
                         int properties)
                  throws XPathException
- Handle the start tag for a child element of the element being validated
 
- 
- Specified by:
- startElementin interface- Receiver
- Overrides:
- startElementin class- AttributeValidator
 
- 
- Throws:
- XPathException
 
getChildValidator
protected ContentValidator getChildValidator()
- Get a validator to handle the children of the current element. This
 is called immediately on return from the startElement call that starts
 this element.
 
- 
- Specified by:
- getChildValidatorin class- ContentValidator
 
- 
 
characters
public void characters(java.lang.CharSequence chars,
                       int locationId,
                       int properties)
                throws XPathException
- Handle character data appearing as a child of the element being validated
 
- 
- Specified by:
- charactersin interface- Receiver
- Overrides:
- charactersin class- AttributeValidator
 
- 
- Parameters:
- chars- The character content
- properties- Additional properties
- Throws:
- XPathException- If this element does not allow character data
 
endElement
public void endElement()
                throws XPathException
- Validation at the end of the element being validated. (Note this is a different element from
 the one passed to startElement).
 
- 
- Specified by:
- endElementin interface- Receiver
- Overrides:
- endElementin class- ProxyReceiver
 
- 
- Throws:
- XPathException- if the element is invalid