|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.crosswire.common.xml.TransformingSAXEventProvider
public class TransformingSAXEventProvider
A SAXEventProvider that gets its output data from an XSL stylesheet and another SAXEventProvider (supplying input XML).
|
Distribution Licence: JSword is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2 as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. The License is available on the internet here, or by writing to: Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA The copyright to this program is held by it's authors. |
Licence| Nested Class Summary | |
|---|---|
private static class |
TransformingSAXEventProvider.TemplateInfo
A simple struct to link modification times to Templates objects |
| Field Summary | |
|---|---|
private ErrorListener |
errors
The remembered ErrorListener because the transformer has not been created |
private static Logger |
log
The log stream |
private Properties |
outputs
The remembered OutputProperties because the transformer has not been created |
private Map |
params
The remembered Parameters because the transformer has not been created |
private URIResolver |
resolver
The remembered URIResolver because the transformer has not been created |
private TransformerFactory |
transfact
How we get the transformer objects |
private static Map |
txers
A cache of transformers |
private SAXEventProvider |
xmlsep
The XML input source |
private URL |
xslurl
The XSL stylesheet |
| Constructor Summary | |
|---|---|
TransformingSAXEventProvider(URL xslurl,
SAXEventProvider xmlsep)
Simple ctor |
|
| Method Summary | |
|---|---|
void |
clearParameters()
|
ErrorListener |
getErrorListener()
|
Properties |
getOutputProperties()
|
String |
getOutputProperty(String name)
|
Object |
getParameter(String name)
|
private TransformingSAXEventProvider.TemplateInfo |
getTemplateInfo()
Compile the XSL or retrieve it from the cache |
URIResolver |
getURIResolver()
|
void |
provideSAXEvents(ContentHandler handler)
When SAX events are required the user of this interface can call this method. |
void |
setErrorListener(ErrorListener errors)
|
void |
setOutputProperties(Properties outputs)
|
void |
setOutputProperty(String name,
String value)
|
void |
setParameter(String name,
Object value)
|
void |
setURIResolver(URIResolver resolver)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private ErrorListener errors
private URIResolver resolver
private Properties outputs
private Map params
private URL xslurl
private SAXEventProvider xmlsep
private TransformerFactory transfact
private static Map txers
private static final Logger log
| Constructor Detail |
|---|
public TransformingSAXEventProvider(URL xslurl,
SAXEventProvider xmlsep)
| Method Detail |
|---|
private TransformingSAXEventProvider.TemplateInfo getTemplateInfo()
throws IOException,
TransformerConfigurationException
IOException
TransformerConfigurationException
public void provideSAXEvents(ContentHandler handler)
throws SAXException
SAXEventProvider
provideSAXEvents in interface SAXEventProviderhandler - The place to send SAX events.
SAXExceptionpublic ErrorListener getErrorListener()
Transformer.getErrorListener()
public void setErrorListener(ErrorListener errors)
throws IllegalArgumentException
IllegalArgumentExceptionTransformer.setErrorListener(javax.xml.transform.ErrorListener)public URIResolver getURIResolver()
Transformer.getURIResolver()public void setURIResolver(URIResolver resolver)
Transformer.setURIResolver(javax.xml.transform.URIResolver)public Properties getOutputProperties()
Transformer.getOutputProperties()
public void setOutputProperties(Properties outputs)
throws IllegalArgumentException
IllegalArgumentExceptionTransformer.setOutputProperties(java.util.Properties)
public String getOutputProperty(String name)
throws IllegalArgumentException
IllegalArgumentExceptionTransformer.getOutputProperty(java.lang.String)
public void setOutputProperty(String name,
String value)
throws IllegalArgumentException
IllegalArgumentExceptionTransformer.setOutputProperty(java.lang.String, java.lang.String)public void clearParameters()
Transformer.clearParameters()public Object getParameter(String name)
Transformer.getParameter(java.lang.String)
public void setParameter(String name,
Object value)
Transformer.setParameter(java.lang.String, java.lang.Object)
|
Copyright ? 2003-2004 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||