FileDocCategorySizeDatePackage
TransformC14NExclusiveWithComments.javaAPI DocJava SE 6 API3529Tue Jun 10 00:23:04 BST 2008com.sun.org.apache.xml.internal.security.transforms.implementations

TransformC14NExclusiveWithComments

public class TransformC14NExclusiveWithComments extends TransformSpi
Implements the http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments transform.
author
Christian Geuer-Pollmann

Fields Summary
public static final String
implementedTransformURI
Field implementedTransformURI
Constructors Summary
Methods Summary
protected java.lang.StringengineGetURI()
Method engineGetURI

inheritDoc



          
      
      return implementedTransformURI;
   
protected com.sun.org.apache.xml.internal.security.signature.XMLSignatureInputenginePerformTransform(com.sun.org.apache.xml.internal.security.signature.XMLSignatureInput input)

inheritDoc

   	    return enginePerformTransform(input,null);
   
protected com.sun.org.apache.xml.internal.security.signature.XMLSignatureInputenginePerformTransform(com.sun.org.apache.xml.internal.security.signature.XMLSignatureInput input, java.io.OutputStream os)

     try {
        String inclusiveNamespaces = null;

        if (this._transformObject
                .length(InclusiveNamespaces
                   .ExclusiveCanonicalizationNamespace, InclusiveNamespaces
                   ._TAG_EC_INCLUSIVENAMESPACES) == 1) {
           Element inclusiveElement =
               XMLUtils.selectNode(
              this._transformObject.getElement().getFirstChild(),
                 InclusiveNamespaces.ExclusiveCanonicalizationNamespace,
                 InclusiveNamespaces._TAG_EC_INCLUSIVENAMESPACES,0);

           inclusiveNamespaces = new InclusiveNamespaces(inclusiveElement,
                   this._transformObject.getBaseURI()).getInclusiveNamespaces();
        }

        Canonicalizer20010315ExclWithComments c14n =
            new Canonicalizer20010315ExclWithComments();        
        if (os!=null) {
           c14n.setWriter( os);
        }
        input.setNeedsToBeExpanded(true);
        byte []result;  
        result =c14n.engineCanonicalize(input, inclusiveNamespaces);
        XMLSignatureInput output=new XMLSignatureInput(result);
        
        return output;
     } catch (XMLSecurityException ex) {
        throw new CanonicalizationException("empty", ex);
     }