Hi,
We dicovered a problem with how JXPath handles default namespaces. We
wrote the following testprogram illustrating the problem:
We also fixed the problem against the HEAD of the jakarta CVS by changing
the way namespace strings are compared.
We ran the JUnit tests against our fix , and no failures were reported.
Is it possible to apply this patch to HEAD of the CVS?
Best regards,
Nick Van den Bleeken,
Nick Hofstede
Index: DOMNodePointer.java
===================================================================
RCS file:
/home/cvspublic/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/model/dom/DOMNodePointer.java,v
retrieving revision 1.24
diff -u -r1.24 DOMNodePointer.java
--- DOMNodePointer.java 29 Jun 2004 22:58:17 -0000 1.24
+++ DOMNodePointer.java 2 Sep 2004 16:48:59 -0000
@@ -130,18 +130,11 @@
}
private static boolean equalStrings(String s1, String s2) {
- if (s1 == null && s2 != null) {
- return false;
+ if (s1 == null || s1.length() == 0) {
+ return s2 == null || s2.length() == 0;
}
- if (s1 != null && s2 == null) {
- return false;
- }
-
- if (s1 != null && !s1.trim().equals(s2.trim())) {
- return false;
- }
-
- return true;
+
+ return s2 != null && s1.trim().equals(s2.trim());
}
public QName getName() {
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]