org.xmlecho.palomar.xform
Interface TransformService
- public interface TransformService
service for adapting XML to and from various representations, e.g.
SAX events, byte streams, DOM trees, etc. and for transforming
XML documents
createXSLTTransformer
public Transformer createXSLTTransformer()
throws TransformException
- Returns:
- an XSLT Transformation engine packaged as an
SAX2 XML Filter
- Throws:
TransformException
createXSLTTransformer
public Transformer createXSLTTransformer(org.xml.sax.XMLReader upstream)
throws TransformException
- Parameters:
upstream - the SAX 2 XMLReader (parser) which delivers the
input parse events to the Transformer
- Returns:
- an XSLT Transformation engine packaged as an
SAX2 XML Filter
- Throws:
TransformException
createXSLTTransformer
public Transformer createXSLTTransformer(org.xml.sax.XMLReader upstream,
org.xml.sax.XMLReader styleSheet)
throws TransformException
- Parameters:
upstream - the SAX 2 XMLReader (parser) which delivers the
input parse events to the TransformerstyleSheet - a SAX 2 XMLReader (parser) for the stylesheet
- Returns:
- an XSLT Transformation engine packaged as an
SAX2 XML Filter
- Throws:
TransformException
createXSLTTransformer
public Transformer createXSLTTransformer(org.xml.sax.XMLReader upstream,
RepositoryItem stylesheet)
throws TransformException
- Parameters:
upstream - the SAX 2 XMLReader (parser) which delivers the
input parse events to the Transformerstylesheet - the stylesheet
- Returns:
- an XSLT Transformation engine packaged as an
SAX2 XML Filter
- Throws:
TransformException
createJAXPTransformer
public Transformer createJAXPTransformer(javax.xml.transform.Source upstream,
javax.xml.transform.Source styleSheet)
throws TransformException
- Parameters:
upstream - the SAX 2 XMLReader (parser) which delivers the
input parse events to the TransformerstyleSheet - a SAX 2 XMLReader (parser) for the stylesheet
- Returns:
- an XSLT Transformation engine packaged as an
SAX2 XML Filter
- Throws:
TransformException
createJAXPTransformer
public Transformer createJAXPTransformer(javax.xml.transform.Source upstream,
RepositoryItem stylesheet)
throws TransformException
- Parameters:
upstream - the SAX 2 XMLReader (parser) which delivers the
input parse events to the Transformerstylesheet - the stylesheet
- Returns:
- an XSLT Transformation engine packaged as an
SAX2 XML Filter
- Throws:
TransformException
createElementFilter
public ElementFilter createElementFilter()
- Returns:
- an ElementFilter which can be configured to
selectively remove elements from a SAX event stream
createAttributesFilter
public ElementFilter createAttributesFilter(java.lang.String attrNames)
- Returns:
- an ElementFilter which can be configured to
selectively remove attributes from a SAX event stream
createCompiledTransformer
public Transformer createCompiledTransformer()
throws TransformException
- Returns:
- a compiled XSLT Transformation engine packaged as an
SAX2 XML Filter
- Throws:
TransformException
createOutputStreamContentWriter
public org.xml.sax.ContentHandler createOutputStreamContentWriter(java.io.OutputStream s)
throws TransformException
- Returns:
- a SAX ContentHandler for writing transformed
output to a utf-8 byte stream
- Throws:
TransformException
createOutputStreamContentWriter
public org.xml.sax.ContentHandler createOutputStreamContentWriter(java.io.OutputStream s,
boolean addXMLDecl)
throws TransformException
- Returns:
- a SAX ContentHandler for writing transformed
output to a utf-8 byte stream
- Throws:
TransformException
createCharacterContentWriter
public org.xml.sax.ContentHandler createCharacterContentWriter(java.io.Writer w)
throws TransformException
- Returns:
- a SAX ContentHandler for writing transformed
output to a character Writer
- Throws:
TransformException
createXPSMLContentWriter
public org.xml.sax.ContentHandler createXPSMLContentWriter(java.io.Writer w)
throws TransformException
- Returns:
- a SAX ContentHandler for writing transformed
output to a character Writer in the XPSML (java like) syntax
- Throws:
TransformException
createHTMLContentWriter
public org.xml.sax.ContentHandler createHTMLContentWriter(java.io.Writer w)
throws TransformException
- Returns:
- a SAX ContentHandler for writing transformed
output as html
- Throws:
TransformException
createInputSourceReader
public org.xml.sax.XMLReader createInputSourceReader()
throws TransformException
- Returns:
- a SAX 2 XML Reader (parser) suitable for parsing a
SAX InputSource
- Throws:
TransformException
createInputSourceReader
public org.xml.sax.XMLReader createInputSourceReader(org.xml.sax.InputSource src)
throws TransformException
- Returns:
- a SAX 2 XML Reader (parser) already wired for
parsing the specified SAX InputSource
- Throws:
TransformException
createDOMDestination
public javax.xml.parsers.DocumentBuilder createDOMDestination(org.xml.sax.XMLReader upstream,
org.xmlecho.palomar.dom.ElementFactory factory)
throws TransformException
- Returns:
- a DOM DocumentBuilder as a target of a SAX2 event stream
- Throws:
TransformException
createDOMWriter
public DOMWriter createDOMWriter(org.xmlecho.palomar.dom.ElementFactory factory)
throws TransformException
- Returns:
- a DOM building ContentHandler as a target of a SAX2 event stream
- Throws:
TransformException
createDOMWriter
public DOMWriter createDOMWriter()
throws TransformException
- Returns:
- a DOM building ContentHandler as a target of a SAX2 event stream
- Throws:
TransformException
createDOMSourceReader
public org.xml.sax.XMLReader createDOMSourceReader(org.w3c.dom.Node domNode)
throws TransformException
- Returns:
- an XMLReader which walks a DOM and is the source
of a SAX2 event stream
- Throws:
TransformException