org.exolab.castor.xml.schema.util

Class XMLInstance2SchemaHandler

Implemented Interfaces:
DocumentHandler, org.xml.sax.ErrorHandler

public final class XMLInstance2SchemaHandler
extends java.lang.Object
implements DocumentHandler, org.xml.sax.ErrorHandler

A Utility class which will attempt to create an XML Schema Object Model based on a given XML instance document.
Version:
$Revision: 1.1.1.1 $ $Date: 2003/03/03 07:09:45 $
Author:
Keith Visco

Nested Class Summary

(package private) class
XMLInstance2SchemaHandler.StateInfo
Inner-class to hold state

Constructor Summary

XMLInstance2SchemaHandler()
Creates a new XMLInstance2SchemaHandler
XMLInstance2SchemaHandler(Schema schema)
Creates a new XMLInstance2SchemaHandler

Method Summary

void
characters(char[] ch, int start, int length)
void
endDocument()
void
endElement(String name)
void
error(SAXParseException exception)
void
fatalError(SAXParseException exception)
Schema
getSchema()
Returns the XML Schema object that is being used by this handler
void
ignorableWhitespace(char[] ch, int start, int length)
void
processingInstruction(String target, String data)
protected void
setDefaultGroupOrder(Order order)
This method is used to set the default group type.
void
setDocumentLocator(Locator locator)
void
startDocument()
void
startElement(String name, AttributeList atts)
void
warning(SAXParseException exception)

Constructor Details

XMLInstance2SchemaHandler

public XMLInstance2SchemaHandler()
Creates a new XMLInstance2SchemaHandler

XMLInstance2SchemaHandler

public XMLInstance2SchemaHandler(Schema schema)
Creates a new XMLInstance2SchemaHandler

Method Details

characters

public void characters(char[] ch,
                       int start,
                       int length)
            throws org.xml.sax.SAXException

endDocument

public void endDocument()
            throws org.xml.sax.SAXException

endElement

public void endElement(String name)
            throws org.xml.sax.SAXException

error

public void error(SAXParseException exception)
            throws org.xml.sax.SAXException

fatalError

public void fatalError(SAXParseException exception)
            throws org.xml.sax.SAXException

getSchema

public Schema getSchema()
Returns the XML Schema object that is being used by this handler
Returns:
the XML Schema object that is being used by this handler

ignorableWhitespace

public void ignorableWhitespace(char[] ch,
                                int start,
                                int length)
            throws org.xml.sax.SAXException

processingInstruction

public void processingInstruction(String target,
                                  String data)
            throws org.xml.sax.SAXException

setDefaultGroupOrder

protected void setDefaultGroupOrder(Order order)
This method is used to set the default group type. Either "sequence" or "all". The default is "sequence".
Parameters:
order - the default group order to use.

setDocumentLocator

public void setDocumentLocator(Locator locator)

startDocument

public void startDocument()
            throws org.xml.sax.SAXException

startElement

public void startElement(String name,
                         AttributeList atts)
            throws org.xml.sax.SAXException

warning

public void warning(SAXParseException exception)
            throws org.xml.sax.SAXException

Intalio Inc. (C) 1999-2003. All rights reserved http://www.intalio.com