Class ValidatingXMLStreamReader

java.lang.Object
javax.xml.stream.util.StreamReaderDelegate
org.apache.xmlbeans.impl.validator.ValidatingXMLStreamReader
All Implemented Interfaces:
XMLStreamConstants, XMLStreamReader
Direct Known Subclasses:
ValidatingInfoXMLStreamReader

public class ValidatingXMLStreamReader
extends StreamReaderDelegate
implements XMLStreamReader
This class is a wrapper over a generic XMLStreamReader that provides validation. There are 3 cases:
1) the XMLStreamReader represents a document, it contains only one element document - in this case the user schema type should be null or it should be a document SchemaType
2) the XMLStreamReader represents an xml-fragment (content only) - must have at least one user type or xsi:type
a) it has an xsi:type - if user schema type is available it has to be a base type of xsi:type
b) it doesn't have xsi:type - user must provide a schema type otherwise will error and will not do validation
3) the XMLStreamReader represents a global attribute - i.e. user schema type is null and only one attribute
Author:
Cezar Andrei (cezar.andrei at bea.com) Date: Feb 13, 2004