com.saxonica.validate
Class LaxValidator
java.lang.Object
  
net.sf.saxon.event.SequenceReceiver
      
net.sf.saxon.event.ProxyReceiver
          
com.saxonica.validate.ContentValidator
              
com.saxonica.validate.LaxValidator
- All Implemented Interfaces: 
 - Result, Receiver
 
- Direct Known Subclasses: 
 - AnyTypeValidator
 
public class LaxValidator
- extends ContentValidator
 
This class performs lax validation on an element.
- Author:
 
  - Michael Kay
 
 
 
 
 
 
| Methods inherited from class com.saxonica.validate.ContentValidator | 
endDocument, getContainingElement, getContainingElementLocationId, getElementDeclaration, getNamespaceResolver, getNillability, isInvalid, isNil, isOutput, makeValidator, makeValidator, setContainingElement, setElementDeclaration, setErrorCode, setIsOutput, setNamespaceResolver, setNillability, setXSIType | 
 
| Methods inherited from class net.sf.saxon.event.ProxyReceiver | 
append, close, comment, endElement, getConfiguration, getDocumentLocator, getNamePool, getUnderlyingReceiver, namespace, open, processingInstruction, setPipelineConfiguration, setSystemId, setUnderlyingReceiver, setUnparsedEntity, startContent, startDocument | 
 
 
 
LaxValidator
public LaxValidator()
startElement
public void startElement(int nameCode,
                         int typeCode,
                         int locationId,
                         int properties)
                  throws XPathException
- Output element start tag for a child element
- Specified by:
 startElement in interface Receiver- Overrides:
 startElement in class ContentValidator
 
- Parameters:
 nameCode - 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
- Throws:
 XPathException
 
 
getChildValidator
public ContentValidator getChildValidator()
- Description copied from class: 
ContentValidator 
- 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.
 
 
 
attribute
public void attribute(int nameCode,
                      int typeCode,
                      CharSequence value,
                      int locationId,
                      int properties)
               throws XPathException
- Handle an attribute
- Specified by:
 attribute in interface Receiver- Overrides:
 attribute in class ProxyReceiver
 
- Parameters:
 nameCode - integer identifying the name of the attributetypeCode - integer identifying the type annotation of the
                   attributevalue - the value of the attributeproperties - bit-significant flags indicating special action to
                   be takenlocationId - 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.
- Throws:
 XPathException - On any failure to write the attribute
 
 
characters
public void characters(CharSequence chars,
                       int locationId,
                       int properties)
                throws XPathException
- Character data
- Specified by:
 characters in interface Receiver- Overrides:
 characters in class ProxyReceiver
 
- Parameters:
 chars - 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:
        - DISABLE_ESCAPING
            - Disable escaping for this text node
 
        - USE_CDATA
                   - Output as a CDATA section
 
        - NO_SPECIAL_CHARACTERS
       - Value contains no special characters
 
        - WHITESPACE
                  - Text is all whitespace
 
- Throws:
 XPathException
 
 
Copyright (C) Michael H. Kay. All rights reserved.