public class ConfigurationReader extends java.lang.Object implements org.xml.sax.ContentHandler, NamespaceResolver
Modifier and Type | Field and Description |
---|---|
protected Configuration |
config |
Constructor and Description |
---|
ConfigurationReader() |
ConfigurationReader(Configuration baseConfiguration) |
Modifier and Type | Method and 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 |
error(XPathException err) |
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<java.lang.String> |
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.
|
protected void |
readWithParam(org.xml.sax.Attributes atts) |
protected void |
readXsltPackage(org.xml.sax.Attributes atts) |
void |
setBaseConfiguration(Configuration base)
Set a base Configuration to be used by the new Configuration.
|
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 ConfigurationReader()
public ConfigurationReader(Configuration baseConfiguration)
public void setClassLoader(java.lang.ClassLoader classLoader)
classLoader
- the ClassLoader to be usedpublic void setBaseConfiguration(Configuration base)
base
- the base configuration 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 readXsltPackage(org.xml.sax.Attributes atts)
protected void readWithParam(org.xml.sax.Attributes atts)
protected void error(XPathException err)
protected 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<java.lang.String> iteratePrefixes()
iteratePrefixes
in interface NamespaceResolver
Copyright (c) 2004-2018 Saxonica Limited. All rights reserved.