deegree 2.5 (2011/06/29 09:44 build-8-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:
java.io.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(java.net.URL url)
           
 
Method Summary
 void transform(java.io.InputStream input, java.io.OutputStream target)
          Transforms an input XML stream to an output stream using this XSLTDocument.
 XMLFragment transform(java.io.InputStream instream, java.lang.String systemId, java.util.Properties outputProperties, java.util.Map<java.lang.String,?> params)
          Transforms the XML from the given InputStream.
 XMLFragment transform(java.io.Reader reader, java.lang.String systemId, java.util.Properties outputProperties, java.util.Map<java.lang.String,?> params)
          Transforms the XML from the given Reader.
static javax.xml.transform.Result transform(javax.xml.transform.Source xmlSource, javax.xml.transform.Source xslSource, javax.xml.transform.Result result, java.util.Properties outputProperties, java.util.Map<java.lang.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, java.io.OutputStream target)
          Transforms the given XMLFragment instance.
 XMLFragment transform(XMLFragment xmlDocument, java.lang.String systemId, java.util.Properties outputProperties, java.util.Map<java.lang.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(java.net.URL url)
             throws java.io.IOException,
                    org.xml.sax.SAXException
Parameters:
url -
Throws:
java.io.IOException
org.xml.sax.SAXException
Method Detail

transform

public XMLFragment transform(XMLFragment xmlDocument,
                             java.lang.String systemId,
                             java.util.Properties outputProperties,
                             java.util.Map<java.lang.String,?> params)
                      throws javax.xml.transform.TransformerException,
                             java.net.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:
javax.xml.transform.TransformerException
java.net.MalformedURLException - if systemId is no valid URL

transform

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

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

transform

public void transform(XMLFragment xmlDocument,
                      java.io.OutputStream target)
               throws javax.xml.transform.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:
javax.xml.transform.TransformerException

transform

public void transform(java.io.InputStream input,
                      java.io.OutputStream target)
               throws javax.xml.transform.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:
javax.xml.transform.TransformerException

transform

public XMLFragment transform(java.io.InputStream instream,
                             java.lang.String systemId,
                             java.util.Properties outputProperties,
                             java.util.Map<java.lang.String,?> params)
                      throws javax.xml.transform.TransformerException,
                             java.net.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:
javax.xml.transform.TransformerException - if transformation fails
java.net.MalformedURLException - if given systemId is no valid URL

transform

public XMLFragment transform(java.io.Reader reader,
                             java.lang.String systemId,
                             java.util.Properties outputProperties,
                             java.util.Map<java.lang.String,?> params)
                      throws javax.xml.transform.TransformerException,
                             java.net.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:
javax.xml.transform.TransformerException - if transformation fails
java.net.MalformedURLException - if given systemId is no valid URL

transform

public static javax.xml.transform.Result transform(javax.xml.transform.Source xmlSource,
                                                   javax.xml.transform.Source xslSource,
                                                   javax.xml.transform.Result result,
                                                   java.util.Properties outputProperties,
                                                   java.util.Map<java.lang.String,?> params)
                                            throws javax.xml.transform.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:
javax.xml.transform.TransformerException
javax.xml.transform.TransformerException

deegree 2.5 (2011/06/29 09:44 build-8-official)

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