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() |
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 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
- if a failure occurs, typically an invalid configuration filepublic void setDocumentLocator(org.xml.sax.Locator locator)
setDocumentLocator
in interface org.xml.sax.ContentHandler
public void startDocument()
startDocument
in interface org.xml.sax.ContentHandler
public void endDocument()
endDocument
in interface org.xml.sax.ContentHandler
public void startPrefixMapping(java.lang.String prefix, java.lang.String uri)
startPrefixMapping
in interface org.xml.sax.ContentHandler
public void endPrefixMapping(java.lang.String prefix)
endPrefixMapping
in interface org.xml.sax.ContentHandler
public void startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts)
startElement
in interface org.xml.sax.ContentHandler
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)
endElement
in interface org.xml.sax.ContentHandler
public void characters(char[] ch, int start, int length)
characters
in interface org.xml.sax.ContentHandler
public void ignorableWhitespace(char[] ch, int start, int length)
ignorableWhitespace
in interface org.xml.sax.ContentHandler
public void processingInstruction(java.lang.String target, java.lang.String data)
processingInstruction
in interface org.xml.sax.ContentHandler
public void skippedEntity(java.lang.String name)
skippedEntity
in interface org.xml.sax.ContentHandler
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-2020 Saxonica Limited. All rights reserved.