use of javax.xml.crypto.dsig.spec.XSLTTransformParameterSpec in project camel by apache.
the class XmlSignatureHelper method getXslTranform.
/**
* Returns a configuration for an XSL transformation.
*
* @param is
* input stream of the XSL
* @return XSL transform
* @throws IllegalArgumentException
* if <tt>is</tt> is <code>null</code>
* @throws Exception
* if an error during the reading of the XSL file occurs
*/
public static AlgorithmMethod getXslTranform(InputStream is) throws SAXException, IOException, ParserConfigurationException {
if (is == null) {
throw new IllegalArgumentException("is must not be null");
}
Document doc = parseInput(is);
DOMStructure stylesheet = new DOMStructure(doc.getDocumentElement());
XSLTTransformParameterSpec spec = new XSLTTransformParameterSpec(stylesheet);
XmlSignatureTransform transformXslt = new XmlSignatureTransform();
transformXslt.setAlgorithm(Transform.XSLT);
transformXslt.setParameterSpec(spec);
return transformXslt;
}
use of javax.xml.crypto.dsig.spec.XSLTTransformParameterSpec in project jdk8u_jdk by JetBrains.
the class DOMXSLTTransform method marshalParams.
public void marshalParams(XMLStructure parent, XMLCryptoContext context) throws MarshalException {
super.marshalParams(parent, context);
XSLTTransformParameterSpec xp = (XSLTTransformParameterSpec) getParameterSpec();
Node xsltElem = ((javax.xml.crypto.dom.DOMStructure) xp.getStylesheet()).getNode();
DOMUtils.appendChild(transformElem, xsltElem);
}
Aggregations