| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
DEFAULT_ALGORITHM_URI_
The default algorithm URI for this algorithm implementation.
|
protected static int |
ESXLT_DISABLED |
protected static int |
EXSLT_ENABLED |
protected static int |
EXSLT_UNKNOWN |
protected static java.lang.String |
NAMESPACE_URI_XSLT_
The namespace for XSLT.
|
protected static java.lang.String |
STYLESHEET_TAG_
The name for the XSL stylesheet element.
|
protected org.w3c.dom.Element |
styleSheetDOMElem_
The stylesheet parameter element which contains the XLS stylesheet to be applied.
|
protected URI |
styleSheetURI_
The URI for the stylesheet to be applied.
|
protected javax.xml.transform.Transformer |
transformer_
The XLS transformer object.
|
protected javax.xml.transform.URIResolver |
uRIResolver_
The URI resolver used for resolving URIs within the stylesheet (include, import, document()).
|
inputNodeSet_, inputOctetStream_, inputURI_| Constructor and Description |
|---|
TransformImplXSLT()
Standard constructor.
|
| Modifier and Type | Method and Description |
|---|---|
org.w3c.dom.Element |
getStyleSheetElement()
Gets the XSL stylesheet to be processed by this transform as a DOM element.
|
URI |
getStyleSheetURI()
Gets the XSL stylesheet to be processed by this transform as a DOM element.
|
javax.xml.transform.URIResolver |
getURIResolver()
Gets the URI resolver used for resolving URIs within the stylesheet (include, import, document()).
|
void |
setParameters(org.w3c.dom.Element transformElement)
Sets the parameters for this XSL transform implementation.
|
void |
setStyleSheet(org.w3c.dom.Element styleSheetDOMElem,
URI styleSheetURI)
Sets the XSL stylesheet to be processed by this transform.
|
void |
setStyleSheet(java.io.InputStream styleSheetXMLStream,
URI styleSheetURI)
Sets the XSL stylesheet to be processed by this transform.
|
void |
setURIResolver(javax.xml.transform.URIResolver uRIResolver)
Sets the URI resolver used for resolving URIs within the stylesheet (include, import, document()).
|
org.w3c.dom.Element |
toElement(org.w3c.dom.Document signatureDOMDoc)
Returns the DOM element representation of the transform.
|
java.lang.Object |
transform()
Computes the transform result for the previously specified input.
|
distributeNSDeclarations, setInput, setInput, skipStylesheetElem, withdrawDistributedNSDeclarationsprotected static final int ESXLT_DISABLED
protected static final int EXSLT_ENABLED
protected static final int EXSLT_UNKNOWN
protected static final java.lang.String DEFAULT_ALGORITHM_URI_
protected static final java.lang.String NAMESPACE_URI_XSLT_
protected static final java.lang.String STYLESHEET_TAG_
protected org.w3c.dom.Element styleSheetDOMElem_
protected javax.xml.transform.URIResolver uRIResolver_
protected javax.xml.transform.Transformer transformer_
protected URI styleSheetURI_
public TransformImplXSLT()
http://www.w3.org/TR/1999/REC-xslt-19991116.public void setParameters(org.w3c.dom.Element transformElement)
throws AlgorithmException
Transform element for a XSL
transform must have a single parameter element, namely a stylesheet element which is in
the xsl namespace (http://www.w3.org/1999/XSL/Transform).setParameters in class AlgorithmtransformElement - The DOM element representation of the transform, as it will be found by IXSIL
in the XML signature. Must not equal null.AlgorithmException - if the stylesheet parameter element cannot be found.public void setStyleSheet(org.w3c.dom.Element styleSheetDOMElem,
URI styleSheetURI)
throws AlgorithmException
styleSheetDOMElem - A XSL stylesheet DOM element to be processed by this transform.
Must not be null and must be in the XSL namespace.styleSheetURI - An URI indicating the system identifier of the stylesheet. Used to resolve
relative URIs within the XML stylesheet. May be null.AlgorithmException - if initializing the XSL transformer fails.public void setStyleSheet(java.io.InputStream styleSheetXMLStream,
URI styleSheetURI)
throws AlgorithmException
styleSheetXMLStream - An XML stylesheet document which has a stylesheet element as
its document element. Must not be null.styleSheetURI - An URI indicating the system identifier of the stylesheet. Used to resolve
relative URIs within the XML stylesheet. May be null.AlgorithmException - If the XML document does not have a stylesheet element in
the XSL namespace as its document element, or if parsing the XML style-
sheet document fails for any other reason, or if initializing the XSL
transformer fails.public org.w3c.dom.Element getStyleSheetElement()
stylesheet DOM element to be processed by this transform.public URI getStyleSheetURI()
public void setURIResolver(javax.xml.transform.URIResolver uRIResolver)
uRIResolver - The URI resolver. May be null.public javax.xml.transform.URIResolver getURIResolver()
setURIResolver(javax.xml.transform.URIResolver)), this method will return
null.public org.w3c.dom.Element toElement(org.w3c.dom.Document signatureDOMDoc)
throws AlgorithmException
toElement in class AlgorithmsignatureDOMDoc - The DOM document which should be used to create necessary DOM nodes.AlgorithmException - if no identifying URI has been specified for this transform, or if no
XSL stylesheet has been specified for this transform.public java.lang.Object transform()
throws AlgorithmException
Computes the transform result for the previously specified input.
If the input has been specified as an XPath node set, it will be serialized using Canonical XML to get the input in octet stream form. If the input has been specified as octet stream, no further pre- processing will be done.
The input is then transformed according to section 6.6.5 of XML Signature.
transform in class TransformAlgorithmException - if no input has been set previously, or if no XSL stylesheet has been
set previously, or if converting a XPath node set input into an octet
stream input fails, or if performing the transform fails for any reason.