deegree 2.3 (2010/04/09 10:10 build-4-official)

org.deegree.framework.xml
Class XSLTDocument

java.lang.Object
  extended by org.deegree.framework.xml.XMLFragment
      extended by org.deegree.framework.xml.XSLTDocument
All Implemented Interfaces:
Serializable

public class XSLTDocument
extends XMLFragment

Encapsulates the DOM representation of an XSLT stylesheet.

Version:
$Revision: 18195 $, $Date: 2009-06-18 17:55:39 +0200 (Do, 18. Jun 2009) $
Author:
Markus Schneider , last edited by: $Author: mschneider $
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.deegree.framework.xml.XMLFragment
DEFAULT_URL, nsContext, XLNNS
 
Constructor Summary
XSLTDocument()
          An empty xslt document.
XSLTDocument(URL url)
           
 
Method Summary
 void transform(InputStream input, OutputStream target)
          Transforms an input XML stream to an output stream using this XSLTDocument.
 XMLFragment transform(InputStream instream, String systemId, Properties outputProperties, Map<String,?> params)
          Transforms the XML from the given InputStream.
 XMLFragment transform(Reader reader, String systemId, Properties outputProperties, Map<String,?> params)
          Transforms the XML from the given Reader.
static Result transform(Source xmlSource, Source xslSource, Result result, Properties outputProperties, Map<String,?> params)
          Transforms the given XML Source instance using the also submitted XSLT stylesheet Source.
 XMLFragment transform(XMLFragment xmlDocument)
          Transforms the given XMLFragment instance.
 void transform(XMLFragment xmlDocument, OutputStream target)
          Transforms the given XMLFragment instance.
 XMLFragment transform(XMLFragment xmlDocument, String systemId, Properties outputProperties, Map<String,?> params)
          Transforms the given XMLFragment instance.
 
Methods inherited from class org.deegree.framework.xml.XMLFragment
getAsPrettyString, getAsString, getAttachedSchemas, getQualifiedName, getRootElement, getSystemId, hasSchema, load, load, load, parseQualifiedName, parseSimpleLink, prettyPrint, prettyPrint, resolve, setRootElement, setSystemId, setSystemId, toString, write, write, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XSLTDocument

public XSLTDocument()
An empty xslt document.


XSLTDocument

public XSLTDocument(URL url)
             throws IOException,
                    SAXException
Parameters:
url -
Throws:
IOException
SAXException
Method Detail

transform

public XMLFragment transform(XMLFragment xmlDocument,
                             String systemId,
                             Properties outputProperties,
                             Map<String,?> params)
                      throws TransformerException,
                             MalformedURLException
Transforms the given XMLFragment instance.

Parameters:
xmlDocument - can not be null
systemId - SystemID for the resulting XMLFragment, may be null
outputProperties - transformation properties, may be null
params - transformation parameters, may be null
Returns:
the transformed xml file.
Throws:
TransformerException
MalformedURLException - if systemId is no valid URL

transform

public XMLFragment transform(XMLFragment xmlDocument)
                      throws TransformerException
Transforms the given XMLFragment instance.

Parameters:
xmlDocument - can not be null
Returns:
the transformed xml file.
Throws:
TransformerException

transform

public void transform(XMLFragment xmlDocument,
                      OutputStream target)
               throws TransformerException
Transforms the given XMLFragment instance.

Parameters:
xmlDocument - can not be null
target - output stream where the result of the transformation will be written to
Throws:
TransformerException

transform

public void transform(InputStream input,
                      OutputStream target)
               throws TransformerException
Transforms an input XML stream to an output stream using this XSLTDocument.

Parameters:
input - provides the input xml as a stream
target - output stream where the result of the transformation will be written to
Throws:
TransformerException

transform

public XMLFragment transform(InputStream instream,
                             String systemId,
                             Properties outputProperties,
                             Map<String,?> params)
                      throws TransformerException,
                             MalformedURLException
Transforms the XML from the given InputStream.

NOTE: You have to make sure that the InputStream provides a valid XML document.

Parameters:
instream -
systemId - SystemID for the resulting XMLFragment
outputProperties - transformation properties, may be null
params - transformation parameters, may be null
Returns:
the transformed xml file.
Throws:
TransformerException - if transformation fails
MalformedURLException - if given systemId is no valid URL

transform

public XMLFragment transform(Reader reader,
                             String systemId,
                             Properties outputProperties,
                             Map<String,?> params)
                      throws TransformerException,
                             MalformedURLException
Transforms the XML from the given Reader.

NOTE: You have to make sure that the Reader provides a valid XML document.

Parameters:
reader -
systemId - SystemID for the resulting XMLFragment
outputProperties - transformation properties, may be null
params - transformation parameters, may be null
Returns:
the transformed xml file.
Throws:
TransformerException - if transformation fails
MalformedURLException - if given systemId is no valid URL

transform

public static Result transform(Source xmlSource,
                               Source xslSource,
                               Result result,
                               Properties outputProperties,
                               Map<String,?> params)
                        throws TransformerException
Transforms the given XML Source instance using the also submitted XSLT stylesheet Source.

Parameters:
xmlSource -
xslSource -
result -
outputProperties - may be null
params - may be null
Returns:
the transformed xml file.
Throws:
TransformerException
TransformerException

deegree 2.3 (2010/04/09 10:10 build-4-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org