|
From: <pe...@us...> - 2004-03-03 23:36:19
|
Update of /cvsroot/neuclear/neuclear-xmlsig/src/java/org/neuclear/xml/c14 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19311/src/java/org/neuclear/xml/c14 Modified Files: Canonicalizer.java Log Message: Interops with enveloped signatures. Index: Canonicalizer.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-xmlsig/src/java/org/neuclear/xml/c14/Canonicalizer.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Canonicalizer.java 2 Mar 2004 23:50:45 -0000 1.11 --- Canonicalizer.java 3 Mar 2004 23:23:24 -0000 1.12 *************** *** 8,11 **** --- 8,14 ---- * $Id$ * $Log$ + * Revision 1.12 2004/03/03 23:23:24 pelle + * Interops with enveloped signatures. + * * Revision 1.11 2004/03/02 23:50:45 pelle * minor changes. *************** *** 144,147 **** --- 147,151 ---- import org.neuclear.xml.transforms.XPathTransform; import org.neuclear.xml.xmlsec.XMLSecurityException; + import org.neuclear.commons.Utility; import java.io.*; *************** *** 351,366 **** namespaceStack.push(ns); writeNamespace(ns, sorted); ! // } else if (ns.getURI() != null && ! // ns.getURI().equals("") && ! // element.getParent() != null && ! // element.getParent().getNamespaceURI() != null ! // && !element.getParent().getNamespaceURI().equals("") ! } else if ( ! (element.getParent() == null) ! || ( ! !ns.getURI().equals(element.getParent().getNamespaceURI()) ! && ns.getPrefix().equals(element.getParent().getNamespacePrefix())///TODO where the hell and I'm going with this ! ! ) ) { writeNamespace(ns, sorted); --- 355,363 ---- namespaceStack.push(ns); writeNamespace(ns, sorted); ! } else if (ns.getURI() != null && ! ns.getURI().equals("") && ! element.getParent() != null && ! element.getParent().getNamespaceURI() != null ! && !element.getParent().getNamespaceURI().equals("") ) { writeNamespace(ns, sorted); *************** *** 454,459 **** // TODO This breaks example 3 from the Merlin Eight, but I'm not sure how to go about fixing it, due to DOM4J's // nondifferentiation between <test/> and <test xmlns=""/> ! // if (Utility.isEmpty(prefix) && Utility.isEmpty(namespace.getURI())) ! // return; writer.write(" xmlns"); if (prefix != null && prefix.length() > 0) { --- 451,456 ---- // TODO This breaks example 3 from the Merlin Eight, but I'm not sure how to go about fixing it, due to DOM4J's // nondifferentiation between <test/> and <test xmlns=""/> ! if (Utility.isEmpty(prefix) && Utility.isEmpty(namespace.getURI())) ! return; writer.write(" xmlns"); if (prefix != null && prefix.length() > 0) { |