Class Canonicalizer20010315Excl
- java.lang.Object
-
- org.apache.xml.security.c14n.CanonicalizerSpi
-
- org.apache.xml.security.c14n.implementations.CanonicalizerBase
-
- org.apache.xml.security.c14n.implementations.Canonicalizer20010315Excl
-
- Direct Known Subclasses:
Canonicalizer20010315ExclOmitComments,Canonicalizer20010315ExclWithComments
public abstract class Canonicalizer20010315Excl extends CanonicalizerBase
Implements " Exclusive XML Canonicalization, Version 1.0 "
Credits: During restructuring of the Canonicalizer framework, Ren?? Kollmorgen from Software AG submitted an implementation of ExclC14n which fitted into the old architecture and which based heavily on my old (and slow) implementation of "Canonical XML". A big "thank you" to Ren?? for this.
THIS implementation is a complete rewrite of the algorithm.- Version:
- $Revision: 1720201 $
- Author:
- Christian Geuer-Pollmann
- See Also:
- XML Canonicalization, Version 1.0
-
-
Field Summary
-
Fields inherited from class org.apache.xml.security.c14n.implementations.CanonicalizerBase
COMPARE, NODE_AFTER_DOCUMENT_ELEMENT, NODE_BEFORE_DOCUMENT_ELEMENT, NODE_NOT_BEFORE_OR_AFTER_DOCUMENT_ELEMENT, XML, XMLNS
-
Fields inherited from class org.apache.xml.security.c14n.CanonicalizerSpi
reset, secureValidation
-
-
Constructor Summary
Constructors Constructor Description Canonicalizer20010315Excl(boolean includeComments)Constructor Canonicalizer20010315Excl
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcircumventBugIfNeeded(XMLSignatureInput input)byte[]engineCanonicalize(XMLSignatureInput rootNode, java.lang.String inclusiveNamespaces)byte[]engineCanonicalizeSubTree(org.w3c.dom.Node rootNode)Method engineCanonicalizeSubTreebyte[]engineCanonicalizeSubTree(org.w3c.dom.Node rootNode, java.lang.String inclusiveNamespaces)Method engineCanonicalizeSubTreebyte[]engineCanonicalizeSubTree(org.w3c.dom.Node rootNode, java.lang.String inclusiveNamespaces, boolean propagateDefaultNamespace)Method engineCanonicalizeSubTreebyte[]engineCanonicalizeSubTree(org.w3c.dom.Node rootNode, java.lang.String inclusiveNamespaces, org.w3c.dom.Node excl)Method engineCanonicalizeSubTreebyte[]engineCanonicalizeXPathNodeSet(java.util.Set<org.w3c.dom.Node> xpathNodeSet, java.lang.String inclusiveNamespaces)Method engineCanonicalizeXPathNodeSetprotected java.util.Iterator<org.w3c.dom.Attr>handleAttributes(org.w3c.dom.Element element, NameSpaceSymbTable ns)protected java.util.Iterator<org.w3c.dom.Attr>handleAttributesSubtree(org.w3c.dom.Element element, NameSpaceSymbTable ns)-
Methods inherited from class org.apache.xml.security.c14n.implementations.CanonicalizerBase
canonicalizeSubTree, canonicalizeXPathNodeSet, engineCanonicalize, engineCanonicalizeSubTree, engineCanonicalizeXPathNodeSet, getNullNode, getParentNameSpaces, handleParent, isVisible, isVisibleDO, isVisibleInt, outputAttrToWriter, outputCommentToWriter, outputPItoWriter, outputTextToWriter, setWriter
-
Methods inherited from class org.apache.xml.security.c14n.CanonicalizerSpi
engineCanonicalize, engineCanonicalizeXPathNodeSet, engineCanonicalizeXPathNodeSet, engineGetIncludeComments, engineGetURI, isSecureValidation, setSecureValidation
-
-
-
-
Method Detail
-
engineCanonicalizeSubTree
public byte[] engineCanonicalizeSubTree(org.w3c.dom.Node rootNode) throws CanonicalizationExceptionMethod engineCanonicalizeSubTree- Overrides:
engineCanonicalizeSubTreein classCanonicalizerBase- Returns:
- the c14n bytes
- Throws:
CanonicalizationException
-
engineCanonicalizeSubTree
public byte[] engineCanonicalizeSubTree(org.w3c.dom.Node rootNode, java.lang.String inclusiveNamespaces) throws CanonicalizationExceptionMethod engineCanonicalizeSubTree- Specified by:
engineCanonicalizeSubTreein classCanonicalizerSpi- Returns:
- the c14n bytes
- Throws:
CanonicalizationException
-
engineCanonicalizeSubTree
public byte[] engineCanonicalizeSubTree(org.w3c.dom.Node rootNode, java.lang.String inclusiveNamespaces, boolean propagateDefaultNamespace) throws CanonicalizationExceptionMethod engineCanonicalizeSubTree- Specified by:
engineCanonicalizeSubTreein classCanonicalizerSpipropagateDefaultNamespace- If true the default namespace will be propagated to the c14n-ized root element- Returns:
- the c14n bytes
- Throws:
CanonicalizationException
-
engineCanonicalizeSubTree
public byte[] engineCanonicalizeSubTree(org.w3c.dom.Node rootNode, java.lang.String inclusiveNamespaces, org.w3c.dom.Node excl) throws CanonicalizationExceptionMethod engineCanonicalizeSubTree- Parameters:
rootNode-inclusiveNamespaces-excl- A element to exclude from the c14n process.- Returns:
- the rootNode c14n.
- Throws:
CanonicalizationException
-
engineCanonicalize
public byte[] engineCanonicalize(XMLSignatureInput rootNode, java.lang.String inclusiveNamespaces) throws CanonicalizationException
- Parameters:
rootNode-inclusiveNamespaces-- Returns:
- the rootNode c14n.
- Throws:
CanonicalizationException
-
engineCanonicalizeXPathNodeSet
public byte[] engineCanonicalizeXPathNodeSet(java.util.Set<org.w3c.dom.Node> xpathNodeSet, java.lang.String inclusiveNamespaces) throws CanonicalizationExceptionMethod engineCanonicalizeXPathNodeSet- Specified by:
engineCanonicalizeXPathNodeSetin classCanonicalizerSpi- Returns:
- the c14n bytes
- Throws:
CanonicalizationException
-
handleAttributesSubtree
protected java.util.Iterator<org.w3c.dom.Attr> handleAttributesSubtree(org.w3c.dom.Element element, NameSpaceSymbTable ns) throws CanonicalizationException- Throws:
CanonicalizationException
-
handleAttributes
protected final java.util.Iterator<org.w3c.dom.Attr> handleAttributes(org.w3c.dom.Element element, NameSpaceSymbTable ns) throws CanonicalizationException- Throws:
CanonicalizationException
-
circumventBugIfNeeded
protected void circumventBugIfNeeded(XMLSignatureInput input) throws CanonicalizationException, javax.xml.parsers.ParserConfigurationException, java.io.IOException, org.xml.sax.SAXException
- Throws:
CanonicalizationExceptionjavax.xml.parsers.ParserConfigurationExceptionjava.io.IOExceptionorg.xml.sax.SAXException
-
-