|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.xml.security.c14n.CanonicalizerSpi
org.apache.xml.security.c14n.implementations.CanonicalizerBase
org.apache.xml.security.c14n.implementations.CanonicalizerPhysical
public class CanonicalizerPhysical
Serializes the physical representation of the subtree. All the attributes present in the subtree are emitted. The attributes are sorted within an element, with the namespace declarations appearing before the regular attributes. This algorithm is not a true canonicalization since equivalent subtrees may produce different output. It is therefore unsuitable for digital signatures. This same property makes it ideal for XML Encryption Syntax and Processing, because the decrypted XML content will share the same physical representation as the original XML content that was encrypted.
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, nullNode, XML, XMLNS |
Fields inherited from class org.apache.xml.security.c14n.CanonicalizerSpi |
---|
reset |
Constructor Summary | |
---|---|
CanonicalizerPhysical()
Constructor Canonicalizer20010315 |
Method Summary | |
---|---|
protected void |
circumventBugIfNeeded(XMLSignatureInput input)
|
byte[] |
engineCanonicalizeSubTree(org.w3c.dom.Node rootNode,
java.lang.String inclusiveNamespaces)
Always throws a CanonicalizationException. |
byte[] |
engineCanonicalizeXPathNodeSet(java.util.Set<org.w3c.dom.Node> xpathNodeSet,
java.lang.String inclusiveNamespaces)
Always throws a CanonicalizationException. |
boolean |
engineGetIncludeComments()
Returns true if comments are included |
java.lang.String |
engineGetURI()
Returns the URI of this engine. |
protected java.util.Iterator<org.w3c.dom.Attr> |
handleAttributes(org.w3c.dom.Element element,
NameSpaceSymbTable ns)
Returns the Attr[]s to be output for the given element. |
protected java.util.Iterator<org.w3c.dom.Attr> |
handleAttributesSubtree(org.w3c.dom.Element element,
NameSpaceSymbTable ns)
Returns the Attr[]s to be output for the given element. |
protected void |
handleParent(org.w3c.dom.Element e,
NameSpaceSymbTable ns)
|
protected void |
outputCommentToWriter(org.w3c.dom.Comment currentComment,
java.io.OutputStream writer,
int position)
Method outputCommentToWriter |
protected void |
outputPItoWriter(org.w3c.dom.ProcessingInstruction currentPI,
java.io.OutputStream writer,
int position)
Outputs a PI to the internal Writer. |
Methods inherited from class org.apache.xml.security.c14n.implementations.CanonicalizerBase |
---|
canonicalizeSubTree, canonicalizeXPathNodeSet, engineCanonicalize, engineCanonicalizeSubTree, engineCanonicalizeSubTree, engineCanonicalizeXPathNodeSet, getParentNameSpaces, isVisible, isVisibleDO, isVisibleInt, outputAttrToWriter, outputTextToWriter, setWriter |
Methods inherited from class org.apache.xml.security.c14n.CanonicalizerSpi |
---|
engineCanonicalize, engineCanonicalizeXPathNodeSet, engineCanonicalizeXPathNodeSet |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CanonicalizerPhysical()
Method Detail |
---|
public byte[] engineCanonicalizeXPathNodeSet(java.util.Set<org.w3c.dom.Node> xpathNodeSet, java.lang.String inclusiveNamespaces) throws CanonicalizationException
engineCanonicalizeXPathNodeSet
in class CanonicalizerSpi
xpathNodeSet
- inclusiveNamespaces
-
CanonicalizationException
- alwayspublic byte[] engineCanonicalizeSubTree(org.w3c.dom.Node rootNode, java.lang.String inclusiveNamespaces) throws CanonicalizationException
engineCanonicalizeSubTree
in class CanonicalizerSpi
rootNode
- inclusiveNamespaces
-
CanonicalizationException
protected java.util.Iterator<org.w3c.dom.Attr> handleAttributesSubtree(org.w3c.dom.Element element, NameSpaceSymbTable ns) throws CanonicalizationException
handleAttributes(Element,
NameSpaceSymbTable)
,
whereas it takes into account that subtree-c14n is -- well -- subtree-based.
So if the element in question isRoot of c14n, it's parent is not in the
node set, as well as all other ancestors.
element
- ns
-
CanonicalizationException
protected java.util.Iterator<org.w3c.dom.Attr> handleAttributes(org.w3c.dom.Element element, NameSpaceSymbTable ns) throws CanonicalizationException
element
- ns
-
CanonicalizationException
protected void circumventBugIfNeeded(XMLSignatureInput input) throws CanonicalizationException, javax.xml.parsers.ParserConfigurationException, java.io.IOException, org.xml.sax.SAXException
CanonicalizationException
javax.xml.parsers.ParserConfigurationException
java.io.IOException
org.xml.sax.SAXException
protected void handleParent(org.w3c.dom.Element e, NameSpaceSymbTable ns)
handleParent
in class CanonicalizerBase
public final java.lang.String engineGetURI()
CanonicalizerSpi
engineGetURI
in class CanonicalizerSpi
public final boolean engineGetIncludeComments()
CanonicalizerSpi
engineGetIncludeComments
in class CanonicalizerSpi
protected void outputPItoWriter(org.w3c.dom.ProcessingInstruction currentPI, java.io.OutputStream writer, int position) throws java.io.IOException
CanonicalizerBase
outputPItoWriter
in class CanonicalizerBase
writer
- where to write the things
java.io.IOException
protected void outputCommentToWriter(org.w3c.dom.Comment currentComment, java.io.OutputStream writer, int position) throws java.io.IOException
CanonicalizerBase
outputCommentToWriter
in class CanonicalizerBase
writer
- writer where to write the things
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |