I observed a possible bug in the CanonicalizerBase class. If the node
passed to method canonicalizeSubTree(Node, NameSpaceSymbTable) is of
type DocumentFragment, currently an exception is thrown. I think the
behavior in such a case should be same as that for a Document type node.
Just wanted to confirm this. I have also pasted the patch below (Note
that the patch is against the 1.2.1 version of the code).
Vishal
--------------------------------------------------------
--- CanonicalizerBase.java.orig Mon Feb 28 21:55:58 2005
+++ CanonicalizerBase.java Sun Jul 24 23:15:33 2005
@@ -165,10 +165,10 @@
case Node.ENTITY_NODE :
case Node.NOTATION_NODE :
- case Node.DOCUMENT_FRAGMENT_NODE :
case Node.ATTRIBUTE_NODE :
// illegal node type during traversal
throw new CanonicalizationException("empty");
+ case Node.DOCUMENT_FRAGMENT_NODE :
case Node.DOCUMENT_NODE :
for (Node currentChild = currentNode.getFirstChild();
currentChild != null;