aboutsummaryrefslogtreecommitdiff
path: root/src/share/classes/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformC14NExclusiveWithComments.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/share/classes/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformC14NExclusiveWithComments.java')
-rw-r--r--src/share/classes/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformC14NExclusiveWithComments.java20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/share/classes/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformC14NExclusiveWithComments.java b/src/share/classes/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformC14NExclusiveWithComments.java
index 12339dba1..2380750d0 100644
--- a/src/share/classes/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformC14NExclusiveWithComments.java
+++ b/src/share/classes/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformC14NExclusiveWithComments.java
@@ -20,21 +20,19 @@
*/
package com.sun.org.apache.xml.internal.security.transforms.implementations;
-
-
import java.io.OutputStream;
import com.sun.org.apache.xml.internal.security.c14n.CanonicalizationException;
import com.sun.org.apache.xml.internal.security.c14n.implementations.Canonicalizer20010315ExclWithComments;
import com.sun.org.apache.xml.internal.security.exceptions.XMLSecurityException;
import com.sun.org.apache.xml.internal.security.signature.XMLSignatureInput;
+import com.sun.org.apache.xml.internal.security.transforms.Transform;
import com.sun.org.apache.xml.internal.security.transforms.TransformSpi;
import com.sun.org.apache.xml.internal.security.transforms.Transforms;
import com.sun.org.apache.xml.internal.security.transforms.params.InclusiveNamespaces;
import com.sun.org.apache.xml.internal.security.utils.XMLUtils;
import org.w3c.dom.Element;
-
/**
* Implements the <CODE>http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments</CODE>
* transform.
@@ -47,7 +45,6 @@ public class TransformC14NExclusiveWithComments extends TransformSpi {
public static final String implementedTransformURI =
Transforms.TRANSFORM_C14N_EXCL_WITH_COMMENTS;
-
/**
* Method engineGetURI
*@inheritDoc
@@ -60,27 +57,29 @@ public class TransformC14NExclusiveWithComments extends TransformSpi {
/**
* @inheritDoc
*/
- protected XMLSignatureInput enginePerformTransform(XMLSignatureInput input)
+ protected XMLSignatureInput enginePerformTransform
+ (XMLSignatureInput input, Transform _transformObject)
throws CanonicalizationException {
- return enginePerformTransform(input,null);
+ return enginePerformTransform(input, null, _transformObject);
}
- protected XMLSignatureInput enginePerformTransform(XMLSignatureInput input,OutputStream os)
+
+ protected XMLSignatureInput enginePerformTransform(XMLSignatureInput input,OutputStream os, Transform _transformObject)
throws CanonicalizationException {
try {
String inclusiveNamespaces = null;
- if (this._transformObject
+ if (_transformObject
.length(InclusiveNamespaces
.ExclusiveCanonicalizationNamespace, InclusiveNamespaces
._TAG_EC_INCLUSIVENAMESPACES) == 1) {
Element inclusiveElement =
XMLUtils.selectNode(
- this._transformObject.getElement().getFirstChild(),
+ _transformObject.getElement().getFirstChild(),
InclusiveNamespaces.ExclusiveCanonicalizationNamespace,
InclusiveNamespaces._TAG_EC_INCLUSIVENAMESPACES,0);
inclusiveNamespaces = new InclusiveNamespaces(inclusiveElement,
- this._transformObject.getBaseURI()).getInclusiveNamespaces();
+ _transformObject.getBaseURI()).getInclusiveNamespaces();
}
Canonicalizer20010315ExclWithComments c14n =
@@ -88,7 +87,6 @@ public class TransformC14NExclusiveWithComments extends TransformSpi {
if (os!=null) {
c14n.setWriter( os);
}
- input.setNeedsToBeExpanded(true);
byte []result;
result =c14n.engineCanonicalize(input, inclusiveNamespaces);
XMLSignatureInput output=new XMLSignatureInput(result);