org.apache.xml.resolver.readers

Class OASISXMLCatalogReader

Implemented Interfaces:
ContentHandler, DocumentHandler, CatalogReader, SAXCatalogParser
Known Direct Subclasses:
ExtendedXMLCatalogReader

public class OASISXMLCatalogReader
extends SAXCatalogReader
implements SAXCatalogParser

Parse OASIS Entity Resolution Technical Committee XML Catalog files.
Version:
1.0
Author:
Norman Walsh Norman.Walsh@Sun.COM
See Also:
Catalog

Field Summary

protected Stack
baseURIStack
protected Catalog
catalog
The catalog object needs to be stored by the object so that SAX callbacks can use it.
static String
namespaceName
The namespace name of OASIS ERTC catalogs
protected Stack
namespaceStack
protected Stack
overrideStack
static String
tr9401NamespaceName
The namespace name of OASIS ERTC TR9401 catalog extension

Fields inherited from class org.apache.xml.resolver.readers.SAXCatalogReader

debug, namespaceMap, parserClass, parserFactory

Method Summary

void
characters(ch[] , int start, int length)
The SAX characters method does nothing.
boolean
checkAttributes(Attributes atts, String attName)
boolean
checkAttributes(Attributes atts, String attName1, String attName2)
void
endDocument()
The SAX endDocument method does nothing.
void
endElement(String namespaceURI, String localName, String qName)
The SAX endElement method does nothing.
void
endPrefixMapping(String prefix)
The SAX endPrefixMapping method does nothing.
Catalog
getCatalog()
Get the current catalog.
void
ignorableWhitespace(ch[] , int start, int length)
The SAX ignorableWhitespace method does nothing.
protected boolean
inExtensionNamespace()
Are we in an extension namespace?
void
processingInstruction(String target, String data)
The SAX processingInstruction method does nothing.
void
setCatalog(Catalog catalog)
Set the current catalog.
void
setDocumentLocator(Locator locator)
The SAX setDocumentLocator method does nothing.
void
skippedEntity(String name)
The SAX skippedEntity method does nothing.
void
startDocument()
The SAX startDocument method does nothing.
void
startElement(String namespaceURI, String localName, String qName, Attributes atts)
The SAX startElement method recognizes elements from the plain catalog format and instantiates CatalogEntry objects for them.
void
startPrefixMapping(String prefix, String uri)
The SAX startPrefixMapping method does nothing.

Methods inherited from class org.apache.xml.resolver.readers.SAXCatalogReader

characters, endDocument, endElement, endElement, endPrefixMapping, getCatalogParser, getParserClass, getParserFactory, ignorableWhitespace, processingInstruction, readCatalog, readCatalog, setCatalogParser, setDocumentLocator, setParserClass, setParserFactory, skippedEntity, startDocument, startElement, startElement, startPrefixMapping

Field Details

baseURIStack

protected Stack baseURIStack

catalog

protected Catalog catalog
The catalog object needs to be stored by the object so that SAX callbacks can use it.

namespaceName

public static final String namespaceName
The namespace name of OASIS ERTC catalogs

namespaceStack

protected Stack namespaceStack

overrideStack

protected Stack overrideStack

tr9401NamespaceName

public static final String tr9401NamespaceName
The namespace name of OASIS ERTC TR9401 catalog extension

Method Details

characters

public void characters(ch[] ,
                       int start,
                       int length)
            throws SAXException
The SAX characters method does nothing.
Overrides:
characters in interface SAXCatalogReader

checkAttributes

public boolean checkAttributes(Attributes atts,
                               String attName)

checkAttributes

public boolean checkAttributes(Attributes atts,
                               String attName1,
                               String attName2)

endDocument

public void endDocument()
            throws SAXException
The SAX endDocument method does nothing.
Overrides:
endDocument in interface SAXCatalogReader

endElement

public void endElement(String namespaceURI,
                       String localName,
                       String qName)
            throws SAXException
The SAX endElement method does nothing.
Overrides:
endElement in interface SAXCatalogReader

endPrefixMapping

public void endPrefixMapping(String prefix)
            throws SAXException
The SAX endPrefixMapping method does nothing.
Overrides:
endPrefixMapping in interface SAXCatalogReader

getCatalog

public Catalog getCatalog()
Get the current catalog.

ignorableWhitespace

public void ignorableWhitespace(ch[] ,
                                int start,
                                int length)
            throws SAXException
The SAX ignorableWhitespace method does nothing.
Overrides:
ignorableWhitespace in interface SAXCatalogReader

inExtensionNamespace

protected boolean inExtensionNamespace()
Are we in an extension namespace?
Returns:
true if the current stack of open namespaces includes an extension namespace.

processingInstruction

public void processingInstruction(String target,
                                  String data)
            throws SAXException
The SAX processingInstruction method does nothing.
Overrides:
processingInstruction in interface SAXCatalogReader

setCatalog

public void setCatalog(Catalog catalog)
Set the current catalog.
Specified by:
setCatalog in interface SAXCatalogParser

setDocumentLocator

public void setDocumentLocator(Locator locator)
The SAX setDocumentLocator method does nothing.
Overrides:
setDocumentLocator in interface SAXCatalogReader

skippedEntity

public void skippedEntity(String name)
            throws SAXException
The SAX skippedEntity method does nothing.
Overrides:
skippedEntity in interface SAXCatalogReader

startDocument

public void startDocument()
            throws SAXException
The SAX startDocument method does nothing.
Overrides:
startDocument in interface SAXCatalogReader

startElement

public void startElement(String namespaceURI,
                         String localName,
                         String qName,
                         Attributes atts)
            throws SAXException
The SAX startElement method recognizes elements from the plain catalog format and instantiates CatalogEntry objects for them.
Overrides:
startElement in interface SAXCatalogReader
Parameters:
namespaceURI - The namespace name of the element.
localName - The local name of the element.
qName - The QName of the element.
atts - The list of attributes on the element.
See Also:
CatalogEntry

startPrefixMapping

public void startPrefixMapping(String prefix,
                               String uri)
            throws SAXException
The SAX startPrefixMapping method does nothing.
Overrides:
startPrefixMapping in interface SAXCatalogReader

Copyright B) 2001-2003 Apache Software Foundation. All Rights Reserved.