XML Security, 1.6

com.ibm.xml.crypto.dsig.dom.transform
Class C14nTransformer

java.lang.Object
  extended by javax.xml.crypto.dsig.TransformService
      extended by com.ibm.xml.crypto.dsig.dom.transform.TransformBase
          extended by com.ibm.xml.crypto.dsig.dom.transform.C14nTransformer
All Implemented Interfaces:
AlgorithmMethod, CanonicalizationMethod, Transform, XMLStructure
Direct Known Subclasses:
C14nWCTransformer

public class C14nTransformer
extends TransformBase
implements CanonicalizationMethod


Field Summary
protected  boolean withComments
           
 
Fields inherited from class com.ibm.xml.crypto.dsig.dom.transform.TransformBase
node, spec
 
Fields inherited from interface javax.xml.crypto.dsig.CanonicalizationMethod
EXCLUSIVE, EXCLUSIVE_WITH_COMMENTS, INCLUSIVE, INCLUSIVE_WITH_COMMENTS
 
Fields inherited from interface javax.xml.crypto.dsig.Transform
BASE64, ENVELOPED, XPATH, XPATH2, XSLT
 
Constructor Summary
C14nTransformer()
           
 
Method Summary
static java.util.Hashtable collectNamespaceNodesInAncestors(org.w3c.dom.Node startNode, boolean useProxy)
          Collects all namespace nodes that are effective in the startNode.
static java.util.Hashtable collectXMLPrefixAttributesInAncestors(org.w3c.dom.Node startNode)
          Collects all xml: prefix attributess that are effective in the startNode but not in the startNode
(package private) static void serializeNode(org.w3c.dom.Node topNode, org.w3c.dom.Node node, org.w3c.dom.Node exceptedNode, boolean withComments, boolean xmlAttributes, java.io.Writer wr)
           
(package private) static void serializeSubset(org.w3c.dom.NodeList nodeList, boolean withComments, java.io.Writer wr)
           
 Data transform(Data in, XMLCryptoContext xcontext)
          Transforms the specified data using the underlying transform algorithm.
 
Methods inherited from class com.ibm.xml.crypto.dsig.dom.transform.TransformBase
getContext, getNode, getParameterSpec, init, init, isFeatureSupported, marshalParams, setNode, toNodeSet, transform
 
Methods inherited from class javax.xml.crypto.dsig.TransformService
getAlgorithm, getInstance, getInstance, getInstance, getMechanismType, getProvider
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.xml.crypto.dsig.CanonicalizationMethod
getParameterSpec
 
Methods inherited from interface javax.xml.crypto.dsig.Transform
transform
 
Methods inherited from interface javax.xml.crypto.XMLStructure
isFeatureSupported
 
Methods inherited from interface javax.xml.crypto.AlgorithmMethod
getAlgorithm
 

Field Detail

withComments

protected boolean withComments
Constructor Detail

C14nTransformer

public C14nTransformer()
Method Detail

transform

public Data transform(Data in,
                      XMLCryptoContext xcontext)
               throws TransformException
Description copied from interface: Transform
Transforms the specified data using the underlying transform algorithm.

Specified by:
transform in interface Transform
Parameters:
in - the data to be transformed
xcontext - the XMLCryptoContext containing additional context (may be null if not applicable)
Returns:
the transformed data
Throws:
TransformException - if an error occurs while executing the transform

serializeSubset

static void serializeSubset(org.w3c.dom.NodeList nodeList,
                            boolean withComments,
                            java.io.Writer wr)
                     throws java.io.IOException,
                            XMLSignatureException
Throws:
java.io.IOException
XMLSignatureException

serializeNode

static void serializeNode(org.w3c.dom.Node topNode,
                          org.w3c.dom.Node node,
                          org.w3c.dom.Node exceptedNode,
                          boolean withComments,
                          boolean xmlAttributes,
                          java.io.Writer wr)
                   throws java.io.IOException,
                          XMLSignatureException
Throws:
java.io.IOException
XMLSignatureException

collectNamespaceNodesInAncestors

public static java.util.Hashtable collectNamespaceNodesInAncestors(org.w3c.dom.Node startNode,
                                                                   boolean useProxy)
Collects all namespace nodes that are effective in the startNode.

Parameters:
startNode - A target element.
Returns:
A hashtable; A key in the result is an attribute names such as "xmlns", "xmlns:foo". An element in the result is an Attr instance.

collectXMLPrefixAttributesInAncestors

public static java.util.Hashtable collectXMLPrefixAttributesInAncestors(org.w3c.dom.Node startNode)
Collects all xml: prefix attributess that are effective in the startNode but not in the startNode

Parameters:
startNode - A target element.
Returns:
A hashtable; A key in the result is an attribute names such as "xml:lang", "xml:space". An element in the result is an Attr instance.

XML Security, 1.6

Portions Copyright 2003, 2012 IBM Corporation.
Portions Copyright 2003, 2012 Oracle and/or its affiliates.