public class XSLTTransformService extends TransformServiceImpl
TransformService implements the
XSLT Transform (http://www.w3.org/TR/1999/REC-xslt-19991116) as specified by the W3C
recommendation XML-Signature
Syntax and Processing.
The normative specification for XSL Transformations is XSLT.
Specification of a namespace-qualified stylesheet element, which MUST be the
sole child of the Transform element, indicates that the
specified style sheet should be used. Whether this instantiates in-line
processing of local XSLT declarations within the resource is determined by
the XSLT processing model; the ordered application of multiple stylesheet may
require multiple Transforms. No special provision is made for
the identification of a remote stylesheet at a given URI because it can be
communicated via an
xsl:include or
xsl:import within the stylesheet child of the
Transform.
This transform requires an octet stream as input. If the actual input is an XPath node-set, then the signature application should attempt to convert it to octets (apply Canonical XML) as described in the Reference Processing Model (section 4.3.3.2).
The output of this transform is an octet stream. The processing rules
for the XSL style sheet or transform element are stated in the XSLT
specification. We RECOMMEND that XSLT transform authors use an output method
of xml for XML and HTML. As XSLT implementations do not produce
consistent serializations of their output, we further RECOMMEND inserting a
transform after the XSLT transform to canonicalize the output. These steps
will help to ensure interoperability of the resulting signatures among
applications that support the XSLT transform. Note that if the output is
actually HTML, then the result of these steps is logically equivalent.
XSLTTransformParameterSpec (mandatory)
transformNode_| Constructor and Description |
|---|
XSLTTransformService() |
| Modifier and Type | Method and Description |
|---|---|
List |
getAlgorithmParameters()
Returns the list of algorithm parameter.
|
AlgorithmParameterSpec |
getParameterSpec()
Returns the algorithm-specific input parameters associated with this
Transform. |
static Transformer |
secureTransformer(URIResolver resolver,
DOMSource stylesheet,
XMLCryptoContext context)
This method returns a secured XSLT Transformer.
|
protected void |
setParameterSpec(AlgorithmParameterSpec spec)
Sets the algorithm parameter for this
TransformService. |
protected void |
setParameterSpec(List params)
Sets the algorithm parameter for this
TransformService. |
Data |
transform(Data data,
XMLCryptoContext context)
Transforms the specified data using the underlying transform algorithm.
|
init, init, isFeatureSupported, marshalParams, parse, parse, transformgetAlgorithm, getInstance, getInstance, getInstance, getMechanismType, getProviderprotected void setParameterSpec(AlgorithmParameterSpec spec) throws InvalidAlgorithmParameterException
TransformServiceImplTransformService.setParameterSpec in class TransformServiceImplspec - the AlgorithmParameterSpecInvalidAlgorithmParameterException - if the supplied spec is not appropriate for this
TransformServiceTransformServiceImpl.setParameterSpec(java.security.spec.AlgorithmParameterSpec)protected void setParameterSpec(List params) throws InvalidAlgorithmParameterException
TransformServiceImplTransformService.setParameterSpec in class TransformServiceImplparams - the list of AlgorithmParameterImplsInvalidAlgorithmParameterException - if supplied params are not appropriate for this
TransformServiceTransformServiceImpl.setParameterSpec(java.util.List)public List getAlgorithmParameters()
TransformServiceImplgetAlgorithmParameters in class TransformServiceImplAlgorithmParameterImpls (may be empty but never
null)TransformServiceImpl.getAlgorithmParameters()public AlgorithmParameterSpec getParameterSpec()
javax.xml.crypto.dsig.TransformTransform.
The returned parameters can be typecast to a
TransformParameterSpec object.
AlgorithmMethod.
Returns null if this AlgorithmMethod does
not require parameters and they are not specified.AlgorithmMethod.getParameterSpec()public static Transformer secureTransformer(URIResolver resolver, DOMSource stylesheet, XMLCryptoContext context) throws TransformerConfigurationException, TransformException
resolver - The URI resolver to be used by this transformer.stylesheet - The stylesheet to be compiled into a tranformer.context - The crypto context.TransformerConfigurationExceptionTransformExceptionpublic Data transform(Data data, XMLCryptoContext context) throws TransformException
javax.xml.crypto.dsig.Transformdata - the data to be transformedcontext - the XMLCryptoContext containing additional context (may
be null if not applicable)TransformException - if an error occurs while executing the transformTransform.transform(javax.xml.crypto.Data,
javax.xml.crypto.XMLCryptoContext)© 2002-2005 IAIK, © 2004, 2006 - 2019 Stiftung SIC