NamespaceResolver
, org.xml.sax.ContentHandler
public class ConfigurationReader extends java.lang.Object implements org.xml.sax.ContentHandler, NamespaceResolver
Modifier and Type | Field | Description |
---|---|---|
protected Configuration |
config |
Constructor | Description |
---|---|
ConfigurationReader() |
Modifier and Type | Method | Description |
---|---|---|
void |
characters(char[] ch,
int start,
int length) |
|
void |
endDocument() |
|
void |
endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName) |
|
void |
endPrefixMapping(java.lang.String prefix) |
|
protected void |
errorClass(java.lang.String element,
java.lang.String attribute,
java.lang.String actual,
java.lang.Class required,
java.lang.Exception cause) |
|
java.lang.String |
getURIForPrefix(java.lang.String prefix,
boolean useDefault) |
Get the namespace URI corresponding to a given prefix.
|
void |
ignorableWhitespace(char[] ch,
int start,
int length) |
|
java.util.Iterator |
iteratePrefixes() |
Get an iterator over all the prefixes declared in this namespace context.
|
Configuration |
makeConfiguration(javax.xml.transform.Source source) |
Create a Configuration based on the contents of this configuration file
|
void |
processingInstruction(java.lang.String target,
java.lang.String data) |
|
protected void |
readExtensionElement(org.xml.sax.Attributes atts) |
Process details of XSLT extension elements.
|
void |
setClassLoader(java.lang.ClassLoader classLoader) |
Set the ClassLoader to be used for dynamic loading of the configuration, and for dynamic loading
of other classes used within the configuration.
|
void |
setDocumentLocator(org.xml.sax.Locator locator) |
|
void |
skippedEntity(java.lang.String name) |
|
void |
startDocument() |
|
void |
startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes atts) |
|
void |
startPrefixMapping(java.lang.String prefix,
java.lang.String uri) |
protected Configuration config
public void setClassLoader(java.lang.ClassLoader classLoader)
classLoader
- the ClassLoader to be usedpublic Configuration makeConfiguration(javax.xml.transform.Source source) throws XPathException
source
- the Source of the configuration fileXPathException
public void setDocumentLocator(org.xml.sax.Locator locator)
setDocumentLocator
in interface org.xml.sax.ContentHandler
public void startDocument() throws org.xml.sax.SAXException
startDocument
in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
public void endDocument() throws org.xml.sax.SAXException
endDocument
in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
public void startPrefixMapping(java.lang.String prefix, java.lang.String uri) throws org.xml.sax.SAXException
startPrefixMapping
in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
public void endPrefixMapping(java.lang.String prefix) throws org.xml.sax.SAXException
endPrefixMapping
in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
public void startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts) throws org.xml.sax.SAXException
startElement
in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
protected void readExtensionElement(org.xml.sax.Attributes atts)
atts
- the attributes of the extensionElement element in the configuration fileprotected void errorClass(java.lang.String element, java.lang.String attribute, java.lang.String actual, java.lang.Class required, java.lang.Exception cause)
public void endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName) throws org.xml.sax.SAXException
endElement
in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
public void characters(char[] ch, int start, int length) throws org.xml.sax.SAXException
characters
in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
public void ignorableWhitespace(char[] ch, int start, int length) throws org.xml.sax.SAXException
ignorableWhitespace
in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
public void processingInstruction(java.lang.String target, java.lang.String data) throws org.xml.sax.SAXException
processingInstruction
in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
public void skippedEntity(java.lang.String name) throws org.xml.sax.SAXException
skippedEntity
in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
public java.lang.String getURIForPrefix(java.lang.String prefix, boolean useDefault)
getURIForPrefix
in interface NamespaceResolver
prefix
- the namespace prefix. May be the zero-length string, indicating
that there is no prefix. This indicates either the default namespace or the
null namespace, depending on the value of useDefault.useDefault
- true if the default namespace is to be used when the
prefix is "". If false, the method returns "" when the prefix is "".public java.util.Iterator iteratePrefixes()
iteratePrefixes
in interface NamespaceResolver