public class ConfigurationReader extends Object implements ContentHandler, NamespaceResolver
| Modifier and Type | Field and Description |
|---|---|
protected Configuration |
config |
| Constructor and Description |
|---|
ConfigurationReader() |
| Modifier and Type | Method and Description |
|---|---|
void |
characters(char[] ch,
int start,
int length) |
void |
endDocument() |
void |
endElement(String uri,
String localName,
String qName) |
void |
endPrefixMapping(String prefix) |
protected void |
error(XPathException err) |
protected void |
errorClass(String element,
String attribute,
String actual,
Class required,
Exception cause) |
String |
getURIForPrefix(String prefix,
boolean useDefault)
Get the namespace URI corresponding to a given prefix.
|
void |
ignorableWhitespace(char[] ch,
int start,
int length) |
Iterator<String> |
iteratePrefixes()
Get an iterator over all the prefixes declared in this namespace context.
|
Configuration |
makeConfiguration(Source source)
Create a Configuration based on the contents of this configuration file
|
void |
processingInstruction(String target,
String data) |
protected void |
readExtensionElement(Attributes atts)
Process details of XSLT extension elements.
|
protected void |
readPatternIndex(Attributes atts)
Process details of patternIndex elements.
|
protected void |
readPatternOptimization(Attributes atts)
Process details of patternOptimization elements.
|
protected void |
readPatternPrecondition(Attributes atts)
Process details of patternPrecondition elements.
|
protected void |
readPatternRewrite(Attributes atts)
Process details of patternRewrite elements.
|
void |
setClassLoader(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(Locator locator) |
void |
skippedEntity(String name) |
void |
startDocument() |
void |
startElement(String uri,
String localName,
String qName,
Attributes atts) |
void |
startPrefixMapping(String prefix,
String uri) |
protected Configuration config
public void setClassLoader(ClassLoader classLoader)
classLoader - the ClassLoader to be usedpublic Configuration makeConfiguration(Source source) throws XPathException
source - the Source of the configuration fileXPathExceptionpublic void setDocumentLocator(Locator locator)
setDocumentLocator in interface ContentHandlerpublic void startDocument()
throws SAXException
startDocument in interface ContentHandlerSAXExceptionpublic void endDocument()
throws SAXException
endDocument in interface ContentHandlerSAXExceptionpublic void startPrefixMapping(String prefix, String uri) throws SAXException
startPrefixMapping in interface ContentHandlerSAXExceptionpublic void endPrefixMapping(String prefix) throws SAXException
endPrefixMapping in interface ContentHandlerSAXExceptionpublic void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException
startElement in interface ContentHandlerSAXExceptionprotected void readPatternOptimization(Attributes atts)
atts - the attributes of the patternOptimization element in the configuration fileprotected void readPatternPrecondition(Attributes atts)
atts - the attributes of the patternPrecondition element in the configuration fileprotected void readPatternRewrite(Attributes atts)
atts - the attributes of the patternRewrite element in the configuration fileprotected void readPatternIndex(Attributes atts)
atts - the attributes of the patternIndex element in the configuration fileprotected void readExtensionElement(Attributes atts)
atts - the attributes of the extensionElement element in the configuration fileprotected void error(XPathException err)
protected void errorClass(String element, String attribute, String actual, Class required, Exception cause)
public void endElement(String uri, String localName, String qName) throws SAXException
endElement in interface ContentHandlerSAXExceptionpublic void characters(char[] ch,
int start,
int length)
throws SAXException
characters in interface ContentHandlerSAXExceptionpublic void ignorableWhitespace(char[] ch,
int start,
int length)
throws SAXException
ignorableWhitespace in interface ContentHandlerSAXExceptionpublic void processingInstruction(String target, String data) throws SAXException
processingInstruction in interface ContentHandlerSAXExceptionpublic void skippedEntity(String name) throws SAXException
skippedEntity in interface ContentHandlerSAXExceptionpublic String getURIForPrefix(String prefix, boolean useDefault)
getURIForPrefix in interface NamespaceResolverprefix - 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 Iterator<String> iteratePrefixes()
iteratePrefixes in interface NamespaceResolverCopyright (c) 2004-2014 Saxonica Limited. All rights reserved.