You can subscribe to this list here.
2007 |
Jan
|
Feb
(3) |
Mar
(18) |
Apr
(39) |
May
(15) |
Jun
(12) |
Jul
(3) |
Aug
(23) |
Sep
|
Oct
(1) |
Nov
(1) |
Dec
(3) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(21) |
Feb
(23) |
Mar
(33) |
Apr
(8) |
May
(1) |
Jun
(22) |
Jul
|
Aug
(1) |
Sep
(1) |
Oct
(6) |
Nov
|
Dec
(11) |
2009 |
Jan
(5) |
Feb
|
Mar
(2) |
Apr
(24) |
May
(36) |
Jun
(18) |
Jul
(2) |
Aug
(3) |
Sep
(9) |
Oct
(3) |
Nov
(1) |
Dec
|
2010 |
Jan
(5) |
Feb
(3) |
Mar
|
Apr
(15) |
May
(24) |
Jun
(11) |
Jul
(8) |
Aug
(34) |
Sep
(42) |
Oct
|
Nov
|
Dec
|
2011 |
Jan
(13) |
Feb
(32) |
Mar
(35) |
Apr
(31) |
May
(33) |
Jun
(30) |
Jul
(32) |
Aug
(31) |
Sep
(30) |
Oct
(31) |
Nov
(32) |
Dec
(31) |
2012 |
Jan
(35) |
Feb
(31) |
Mar
(31) |
Apr
(30) |
May
(31) |
Jun
(34) |
Jul
(23) |
Aug
(30) |
Sep
(30) |
Oct
(29) |
Nov
(30) |
Dec
(32) |
2013 |
Jan
(25) |
Feb
(39) |
Mar
(1) |
Apr
(18) |
May
(1) |
Jun
|
Jul
(1) |
Aug
(20) |
Sep
(41) |
Oct
(32) |
Nov
(9) |
Dec
(31) |
2014 |
Jan
(31) |
Feb
(30) |
Mar
(34) |
Apr
(60) |
May
(31) |
Jun
(28) |
Jul
(32) |
Aug
(28) |
Sep
(26) |
Oct
(32) |
Nov
(43) |
Dec
(115) |
2015 |
Jan
(106) |
Feb
(101) |
Mar
(51) |
Apr
(32) |
May
(63) |
Jun
(18) |
Jul
|
Aug
(18) |
Sep
|
Oct
(1) |
Nov
(84) |
Dec
(63) |
2016 |
Jan
(26) |
Feb
(17) |
Mar
(104) |
Apr
(30) |
May
(6) |
Jun
(30) |
Jul
|
Aug
|
Sep
|
Oct
(3) |
Nov
(48) |
Dec
(22) |
2017 |
Jan
(15) |
Feb
(29) |
Mar
(43) |
Apr
(29) |
May
(25) |
Jun
(28) |
Jul
(62) |
Aug
(35) |
Sep
(35) |
Oct
(72) |
Nov
(10) |
Dec
(4) |
2018 |
Jan
(7) |
Feb
(4) |
Mar
|
Apr
(46) |
May
(20) |
Jun
(12) |
Jul
(9) |
Aug
(42) |
Sep
(4) |
Oct
(17) |
Nov
(32) |
Dec
(31) |
2019 |
Jan
(21) |
Feb
(14) |
Mar
|
Apr
(74) |
May
(25) |
Jun
(43) |
Jul
(2) |
Aug
(1) |
Sep
|
Oct
(2) |
Nov
|
Dec
(10) |
2020 |
Jan
(1) |
Feb
|
Mar
(26) |
Apr
(8) |
May
(62) |
Jun
(4) |
Jul
(25) |
Aug
|
Sep
(21) |
Oct
(24) |
Nov
(26) |
Dec
(9) |
2021 |
Jan
|
Feb
(4) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(1) |
Sep
(1) |
Oct
(11) |
Nov
(1) |
Dec
(12) |
2022 |
Jan
(47) |
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(14) |
2023 |
Jan
(3) |
Feb
|
Mar
(60) |
Apr
(9) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2024 |
Jan
(5) |
Feb
|
Mar
|
Apr
(10) |
May
(1) |
Jun
|
Jul
|
Aug
(17) |
Sep
(2) |
Oct
|
Nov
|
Dec
(1) |
2025 |
Jan
|
Feb
|
Mar
(88) |
Apr
(64) |
May
(47) |
Jun
(20) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: SourceForge.net <no...@so...> - 2007-12-19 17:43:30
|
Feature Requests item #1854284, was opened at 2007-12-19 18:43 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377771&aid=1854284&group_id=23187 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Jesper Goertz (jgortz) Assigned to: Nobody/Anonymous (nobody) Summary: upgrade difference to irrecoverable Initial Comment: "By providing an implementation of the DifferenceListener interface you can decide for yourself which type of difference is significant in your context. You may “upgrade” differences in element order to irrecoverable ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377771&aid=1854284&group_id=23187 |
From: <bo...@us...> - 2007-11-27 12:27:26
|
Revision: 233 http://xmlunit.svn.sourceforge.net/xmlunit/?rev=233&view=rev Author: bodewig Date: 2007-11-27 04:27:27 -0800 (Tue, 27 Nov 2007) Log Message: ----------- Add test for forum article 'http://sourceforge.net/forum/forum.php?thread_id=1832061&forum_id=73274' Modified Paths: -------------- trunk/xmlunit/tests/java/org/custommonkey/xmlunit/AbstractXpathEngineTests.java Modified: trunk/xmlunit/tests/java/org/custommonkey/xmlunit/AbstractXpathEngineTests.java =================================================================== --- trunk/xmlunit/tests/java/org/custommonkey/xmlunit/AbstractXpathEngineTests.java 2007-10-22 08:12:58 UTC (rev 232) +++ trunk/xmlunit/tests/java/org/custommonkey/xmlunit/AbstractXpathEngineTests.java 2007-11-27 12:27:27 UTC (rev 233) @@ -137,6 +137,39 @@ assertEquals("1", s); } + // http://sourceforge.net/forum/forum.php?thread_id=1832061&forum_id=73274 + public void testXpathExistsWithNsAndLocalNameSelector() throws Exception { + String testDoc = + "<MtcEnv Version=\"1.0\" xmlns=\"http://www.Mtc.com/schemas\" xmlns:bms=\"http://www.cieca.com/BMS\"> " + + "<EnvContext> " + + "<NameValuePair> " + + "<Name>Timestamp</Name> " + + "<Value>2007-07-26T11:59:00</Value> " + + "</NameValuePair> " + + "</EnvContext> " + + "<EnvBodyList> " + + "<EnvBody> " + + "<Metadata> " + + "<Identifier>CIECABMSAssignmentAddRq</Identifier> " + + "</Metadata> " + + "<Content> " + + "<bms:CIECA> " + + "<bms:AssignmentAddRq> " + + "<bms:RqUID>3744f84b-ac18-5303-0082-764bdeb20df9</bms:RqUID> " + + "</bms:AssignmentAddRq> " + + "</bms:CIECA> " + + "</Content> " + + "</EnvBody> " + + "</EnvBodyList> " + + "</MtcEnv>"; + Document d = XMLUnit.buildControlDocument(testDoc); + + XpathEngine engine = newXpathEngine(); + NodeList l = + engine.getMatchingNodes("//*[local-name()='RqUID'][namespace-uri()='http://www.cieca.com/BMS']", d); + assertEquals(1, l.getLength()); + } + public void setUp() throws Exception { testDocument = XMLUnit.buildControlDocument(testString); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bo...@us...> - 2007-10-22 08:12:59
|
Revision: 232 http://xmlunit.svn.sourceforge.net/xmlunit/?rev=232&view=rev Author: bodewig Date: 2007-10-22 01:12:58 -0700 (Mon, 22 Oct 2007) Log Message: ----------- Improve error message on validation errors Modified Paths: -------------- trunk/xmlunit/src/java/org/custommonkey/xmlunit/Validator.java Modified: trunk/xmlunit/src/java/org/custommonkey/xmlunit/Validator.java =================================================================== --- trunk/xmlunit/src/java/org/custommonkey/xmlunit/Validator.java 2007-08-28 10:51:17 UTC (rev 231) +++ trunk/xmlunit/src/java/org/custommonkey/xmlunit/Validator.java 2007-10-22 08:12:58 UTC (rev 232) @@ -476,8 +476,11 @@ /** * Deal with exceptions passed to the ErrorHandler interface by the parser. */ - private void errorHandlerException(Exception e) { - invalidate(e.getMessage()); + private void errorHandlerException(SAXParseException e) { + String msg = "At line " + e.getLineNumber() + ", column: " + + e.getColumnNumber() + " ==> " + e.getMessage(); + if (!msg.endsWith("\n")) msg += "\n"; + invalidate(msg); } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: SourceForge.net <no...@so...> - 2007-08-29 03:59:02
|
Bugs item #1779701, was opened at 2007-08-22 21:58 Message generated for change (Comment added) made by bodewig You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377768&aid=1779701&group_id=23187 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed Resolution: Fixed Priority: 5 Private: No Submitted By: Elias Ross (genman) Assigned to: Stefan Bodewig (bodewig) Summary: XMLUtil.ignoreWhitespace does not work with namespace Initial Comment: Test case: public void testIgnoreWhitespace2() throws Exception { String control = "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" + "\r\n <env:Header/>" + "\r\n </env:Envelope>"; String test = "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" + "<env:Header/>" + "</env:Envelope>"; XMLUnit.setIgnoreWhitespace(true); try { Diff diff = XMLUnit.compareXML(control, test); System.out.println(test); System.out.println(control); System.out.println(new DetailedDiff(diff)); assertEquals("Should be identical", true, new Diff(control, test).identical()); } finally { XMLUnit.setIgnoreWhitespace(false); } } Output: <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'><env:Header/></env:Envelope> <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'> <env:Header/> </env:Envelope> org.custommonkey.xmlunit.DetailedDiff [different] Expected number of child nodes '3' but was '1' - comparing <env:Envelope...> at /Envelope[1] to <env:Envelope...> at /Envelope[1] [different] Expected presence of child node '#text' but was 'null' - comparing <env:Envelope ...> </env:Envelope> at /Envelope[1] to at /Envelope[1]/Header[1] [not identical] Expected sequence of child nodes '1' but was '0' - comparing <env:Header...> at /Envelope[1]/Header[1] to <env:Header...> at /Envelope[1]/Header[1] [different] Expected presence of child node '#text' but was 'null' - comparing <env:Envelope ...> </env:Envelope> at /Envelope[1]/Header[1] to at /Envelope[1]/Header[1] ---------------------------------------------------------------------- >Comment By: Stefan Bodewig (bodewig) Date: 2007-08-29 05:59 Message: Logged In: YES user_id=113148 Originator: NO My guess is that anybody who does serious XSLT uses the endorsed standards override mechanism to use a transformer that actually works. ---------------------------------------------------------------------- Comment By: Elias Ross (genman) Date: 2007-08-28 17:43 Message: Logged In: YES user_id=556458 Originator: YES Thanks a lot for fixing this. I'm surprised nobody else found this, because JDK 1.5 and document namespaces are both fairly common. ---------------------------------------------------------------------- Comment By: Stefan Bodewig (bodewig) Date: 2007-08-28 12:53 Message: Logged In: YES user_id=113148 Originator: NO should be fixed in trunk http://xmlunit.svn.sourceforge.net/viewvc/xmlunit?view=rev&revision=231 ---------------------------------------------------------------------- Comment By: Stefan Bodewig (bodewig) Date: 2007-08-24 08:54 Message: Logged In: YES user_id=113148 Originator: NO http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6413803 probably holds the full story. ---------------------------------------------------------------------- Comment By: Stefan Bodewig (bodewig) Date: 2007-08-24 08:50 Message: Logged In: YES user_id=113148 Originator: NO I can confirm that the test passes on JDK 1.4.2 and 1.6. I'd rather think it is the XSLT transformer since JDK 1.5's XSLTC really is a mess - and responsible for many other problems. XPath assertions in XMLUnit 1.0 don't work because of it either. You could try downloading Xalan-J (for example) and tell XMLUnit to use Xalan instead of the JDK's transformer as a workaround. I'll look into the issue myself as well. ---------------------------------------------------------------------- Comment By: Elias Ross (genman) Date: 2007-08-23 18:03 Message: Logged In: YES user_id=556458 Originator: YES The test works on JDK 1.6.0_02 but does not on JDK 1.5.0_07 or 1.5.0_11, so I suppose it is a difference in XML parsers shipped with the JDK 1.5. (This is on Linux by the way.) If you can reproduce this, is there some sort of work-around you could put into place? My product is JDK 1.5 only. ---------------------------------------------------------------------- Comment By: Stefan Bodewig (bodewig) Date: 2007-08-23 13:01 Message: Logged In: YES user_id=113148 Originator: NO I've added your test and it passes for me (trunk as well as XMLUnit 1.1). http://xmlunit.svn.sourceforge.net/viewvc/xmlunit?view=rev&revision=230 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377768&aid=1779701&group_id=23187 |
From: SourceForge.net <no...@so...> - 2007-08-29 02:20:19
|
Bugs item #1771400, was opened at 2007-08-09 21:06 Message generated for change (Comment added) made by sf-robot You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377768&aid=1771400&group_id=23187 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Interface (example) Group: None >Status: Closed Resolution: Invalid Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: IgnoreValuesDifferenceListener Initial Comment: I created a custom IgnoreValueDifferenceListener and overrided the same in Diff Class e.g. diff.overrideDifferenceListener(new IgnoreSomeValuesDifferenceListener()); But there is a bug in overriden DetailedDiff's int differenceFound() method. In this method the call for allDifferences.add(difference) should be made in case RETURN_ACCEPT_DIFFERENCE:. As of now it adds all the differences to the list and does not cares for the differnces which need to be ignored. Please look into the DetailedDiff's overriden differenceFound method, I guess it needs to be modified. Thanks! Tarun Arora Email: ta...@sa... ---------------------------------------------------------------------- >Comment By: SourceForge Robot (sf-robot) Date: 2007-08-28 19:20 Message: Logged In: YES user_id=1312539 Originator: NO This Tracker item was closed automatically by the system. It was previously set to a Pending status, and the original submitter did not respond within 14 days (the time period specified by the administrator of this Tracker). ---------------------------------------------------------------------- Comment By: Stefan Bodewig (bodewig) Date: 2007-08-14 00:28 Message: Logged In: YES user_id=113148 Originator: NO not a bug, see my last comment ---------------------------------------------------------------------- Comment By: Stefan Bodewig (bodewig) Date: 2007-08-10 05:50 Message: Logged In: YES user_id=113148 Originator: NO DetailedDiff's differenceFound does not add Differences that are marked as identical (there is a return in the switch, so the allDifferences.add line is never reached). If adds differences that have been downgraded to similar, and this is correct. If you want your differences to be ignored completely, return RETURN_IGNORE_DIFFERENCE_NODES_IDENTICAL from your DifferenceListener. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377768&aid=1771400&group_id=23187 |
From: SourceForge.net <no...@so...> - 2007-08-28 15:43:21
|
Bugs item #1779701, was opened at 2007-08-22 12:58 Message generated for change (Comment added) made by genman You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377768&aid=1779701&group_id=23187 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Open Resolution: Fixed Priority: 5 Private: No Submitted By: Elias Ross (genman) Assigned to: Stefan Bodewig (bodewig) Summary: XMLUtil.ignoreWhitespace does not work with namespace Initial Comment: Test case: public void testIgnoreWhitespace2() throws Exception { String control = "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" + "\r\n <env:Header/>" + "\r\n </env:Envelope>"; String test = "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" + "<env:Header/>" + "</env:Envelope>"; XMLUnit.setIgnoreWhitespace(true); try { Diff diff = XMLUnit.compareXML(control, test); System.out.println(test); System.out.println(control); System.out.println(new DetailedDiff(diff)); assertEquals("Should be identical", true, new Diff(control, test).identical()); } finally { XMLUnit.setIgnoreWhitespace(false); } } Output: <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'><env:Header/></env:Envelope> <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'> <env:Header/> </env:Envelope> org.custommonkey.xmlunit.DetailedDiff [different] Expected number of child nodes '3' but was '1' - comparing <env:Envelope...> at /Envelope[1] to <env:Envelope...> at /Envelope[1] [different] Expected presence of child node '#text' but was 'null' - comparing <env:Envelope ...> </env:Envelope> at /Envelope[1] to at /Envelope[1]/Header[1] [not identical] Expected sequence of child nodes '1' but was '0' - comparing <env:Header...> at /Envelope[1]/Header[1] to <env:Header...> at /Envelope[1]/Header[1] [different] Expected presence of child node '#text' but was 'null' - comparing <env:Envelope ...> </env:Envelope> at /Envelope[1]/Header[1] to at /Envelope[1]/Header[1] ---------------------------------------------------------------------- >Comment By: Elias Ross (genman) Date: 2007-08-28 08:43 Message: Logged In: YES user_id=556458 Originator: YES Thanks a lot for fixing this. I'm surprised nobody else found this, because JDK 1.5 and document namespaces are both fairly common. ---------------------------------------------------------------------- Comment By: Stefan Bodewig (bodewig) Date: 2007-08-28 03:53 Message: Logged In: YES user_id=113148 Originator: NO should be fixed in trunk http://xmlunit.svn.sourceforge.net/viewvc/xmlunit?view=rev&revision=231 ---------------------------------------------------------------------- Comment By: Stefan Bodewig (bodewig) Date: 2007-08-23 23:54 Message: Logged In: YES user_id=113148 Originator: NO http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6413803 probably holds the full story. ---------------------------------------------------------------------- Comment By: Stefan Bodewig (bodewig) Date: 2007-08-23 23:50 Message: Logged In: YES user_id=113148 Originator: NO I can confirm that the test passes on JDK 1.4.2 and 1.6. I'd rather think it is the XSLT transformer since JDK 1.5's XSLTC really is a mess - and responsible for many other problems. XPath assertions in XMLUnit 1.0 don't work because of it either. You could try downloading Xalan-J (for example) and tell XMLUnit to use Xalan instead of the JDK's transformer as a workaround. I'll look into the issue myself as well. ---------------------------------------------------------------------- Comment By: Elias Ross (genman) Date: 2007-08-23 09:03 Message: Logged In: YES user_id=556458 Originator: YES The test works on JDK 1.6.0_02 but does not on JDK 1.5.0_07 or 1.5.0_11, so I suppose it is a difference in XML parsers shipped with the JDK 1.5. (This is on Linux by the way.) If you can reproduce this, is there some sort of work-around you could put into place? My product is JDK 1.5 only. ---------------------------------------------------------------------- Comment By: Stefan Bodewig (bodewig) Date: 2007-08-23 04:01 Message: Logged In: YES user_id=113148 Originator: NO I've added your test and it passes for me (trunk as well as XMLUnit 1.1). http://xmlunit.svn.sourceforge.net/viewvc/xmlunit?view=rev&revision=230 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377768&aid=1779701&group_id=23187 |
From: SourceForge.net <no...@so...> - 2007-08-28 10:53:06
|
Bugs item #1779701, was opened at 2007-08-22 21:58 Message generated for change (Comment added) made by bodewig You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377768&aid=1779701&group_id=23187 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Pending >Resolution: Fixed Priority: 5 Private: No Submitted By: Elias Ross (genman) Assigned to: Stefan Bodewig (bodewig) Summary: XMLUtil.ignoreWhitespace does not work with namespace Initial Comment: Test case: public void testIgnoreWhitespace2() throws Exception { String control = "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" + "\r\n <env:Header/>" + "\r\n </env:Envelope>"; String test = "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" + "<env:Header/>" + "</env:Envelope>"; XMLUnit.setIgnoreWhitespace(true); try { Diff diff = XMLUnit.compareXML(control, test); System.out.println(test); System.out.println(control); System.out.println(new DetailedDiff(diff)); assertEquals("Should be identical", true, new Diff(control, test).identical()); } finally { XMLUnit.setIgnoreWhitespace(false); } } Output: <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'><env:Header/></env:Envelope> <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'> <env:Header/> </env:Envelope> org.custommonkey.xmlunit.DetailedDiff [different] Expected number of child nodes '3' but was '1' - comparing <env:Envelope...> at /Envelope[1] to <env:Envelope...> at /Envelope[1] [different] Expected presence of child node '#text' but was 'null' - comparing <env:Envelope ...> </env:Envelope> at /Envelope[1] to at /Envelope[1]/Header[1] [not identical] Expected sequence of child nodes '1' but was '0' - comparing <env:Header...> at /Envelope[1]/Header[1] to <env:Header...> at /Envelope[1]/Header[1] [different] Expected presence of child node '#text' but was 'null' - comparing <env:Envelope ...> </env:Envelope> at /Envelope[1]/Header[1] to at /Envelope[1]/Header[1] ---------------------------------------------------------------------- >Comment By: Stefan Bodewig (bodewig) Date: 2007-08-28 12:53 Message: Logged In: YES user_id=113148 Originator: NO should be fixed in trunk http://xmlunit.svn.sourceforge.net/viewvc/xmlunit?view=rev&revision=231 ---------------------------------------------------------------------- Comment By: Stefan Bodewig (bodewig) Date: 2007-08-24 08:54 Message: Logged In: YES user_id=113148 Originator: NO http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6413803 probably holds the full story. ---------------------------------------------------------------------- Comment By: Stefan Bodewig (bodewig) Date: 2007-08-24 08:50 Message: Logged In: YES user_id=113148 Originator: NO I can confirm that the test passes on JDK 1.4.2 and 1.6. I'd rather think it is the XSLT transformer since JDK 1.5's XSLTC really is a mess - and responsible for many other problems. XPath assertions in XMLUnit 1.0 don't work because of it either. You could try downloading Xalan-J (for example) and tell XMLUnit to use Xalan instead of the JDK's transformer as a workaround. I'll look into the issue myself as well. ---------------------------------------------------------------------- Comment By: Elias Ross (genman) Date: 2007-08-23 18:03 Message: Logged In: YES user_id=556458 Originator: YES The test works on JDK 1.6.0_02 but does not on JDK 1.5.0_07 or 1.5.0_11, so I suppose it is a difference in XML parsers shipped with the JDK 1.5. (This is on Linux by the way.) If you can reproduce this, is there some sort of work-around you could put into place? My product is JDK 1.5 only. ---------------------------------------------------------------------- Comment By: Stefan Bodewig (bodewig) Date: 2007-08-23 13:01 Message: Logged In: YES user_id=113148 Originator: NO I've added your test and it passes for me (trunk as well as XMLUnit 1.1). http://xmlunit.svn.sourceforge.net/viewvc/xmlunit?view=rev&revision=230 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377768&aid=1779701&group_id=23187 |
From: <bo...@us...> - 2007-08-28 10:51:20
|
Revision: 231 http://xmlunit.svn.sourceforge.net/xmlunit/?rev=231&view=rev Author: bodewig Date: 2007-08-28 03:51:17 -0700 (Tue, 28 Aug 2007) Log Message: ----------- Strip element content whitespace manually if using JDK 1.5's XSLTC, bug 1779701 Modified Paths: -------------- trunk/xmlunit/src/java/org/custommonkey/xmlunit/Diff.java trunk/xmlunit/src/java/org/custommonkey/xmlunit/XMLUnit.java trunk/xmlunit/src/java/org/custommonkey/xmlunit/XSLTConstants.java Modified: trunk/xmlunit/src/java/org/custommonkey/xmlunit/Diff.java =================================================================== --- trunk/xmlunit/src/java/org/custommonkey/xmlunit/Diff.java 2007-08-23 10:59:48 UTC (rev 230) +++ trunk/xmlunit/src/java/org/custommonkey/xmlunit/Diff.java 2007-08-28 10:51:17 UTC (rev 231) @@ -178,16 +178,9 @@ * differences ignore whitespace */ private Document getWhitespaceManipulatedDocument(Document originalDoc) { - if (!XMLUnit.getIgnoreWhitespace()) { - return originalDoc; - } - try { - Transform whitespaceStripper = XMLUnit.getStripWhitespaceTransform( - originalDoc); - return whitespaceStripper.getResultDocument(); - } catch (TransformerException e) { - throw new XMLUnitRuntimeException(e.getMessage(), e.getCause()); - } + return XMLUnit.getIgnoreWhitespace() + ? XMLUnit.getWhitespaceStrippedDocument(originalDoc) + : originalDoc; } /** Modified: trunk/xmlunit/src/java/org/custommonkey/xmlunit/XMLUnit.java =================================================================== --- trunk/xmlunit/src/java/org/custommonkey/xmlunit/XMLUnit.java 2007-08-23 10:59:48 UTC (rev 230) +++ trunk/xmlunit/src/java/org/custommonkey/xmlunit/XMLUnit.java 2007-08-28 10:51:17 UTC (rev 231) @@ -37,11 +37,13 @@ package org.custommonkey.xmlunit; import org.custommonkey.xmlunit.exceptions.ConfigurationException; +import org.custommonkey.xmlunit.exceptions.XMLUnitRuntimeException; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.SAXParserFactory; +import javax.xml.transform.TransformerException; import javax.xml.transform.TransformerFactory; import javax.xml.transform.URIResolver; @@ -52,6 +54,8 @@ import java.text.ParseException; import java.util.Locale; import org.w3c.dom.Document; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; import org.xml.sax.InputSource; import org.xml.sax.SAXException; import org.xml.sax.EntityResolver; @@ -458,6 +462,54 @@ return new Transform(forDocument, getStripWhitespaceStylesheet()); } + /** + * Returns a new Document instance that is identical to the one + * passed in with element content whitespace removed. + * + * <p>Will use {@link #getStripWhitespaceTransform + * getStripWhitespaceTransform} unless we are operating under the + * severly broken XSLTC Transformer shipping with JDK 1.5.</p> + */ + public static Document getWhitespaceStrippedDocument(Document forDoc) { + String factory = getTransformerFactory().getClass().getName(); + if (XSLTConstants.JAVA5_XSLTC_FACTORY_NAME.equals(factory)) { + return stripWhiteSpaceWithoutXSLT(forDoc); + } else { + return stripWhiteSpaceUsingXSLT(forDoc); + } + } + + private static Document stripWhiteSpaceUsingXSLT(Document forDoc) { + try { + Transform whitespaceStripper = getStripWhitespaceTransform(forDoc); + return whitespaceStripper.getResultDocument(); + } catch (TransformerException e) { + throw new XMLUnitRuntimeException(e.getMessage(), e.getCause()); + } + } + + private static Document stripWhiteSpaceWithoutXSLT(Document forDoc) { + Document copy = (Document) forDoc.cloneNode(true); + stripEmptyTextNodes(copy); + return copy; + } + + private static void stripEmptyTextNodes(Node n) { + final NodeList nl = n.getChildNodes(); + for (int i = 0; i < nl.getLength(); i++) { + Node child = nl.item(i); + if (child.getNodeType() == Node.ELEMENT_NODE) { + stripEmptyTextNodes(child); + } else if (child.getNodeType() == Node.TEXT_NODE) { + String value = child.getNodeValue(); + if (value == null || value.trim().length() == 0) { + n.removeChild(child); + --i; + } + } + } + } + private static String getStripCommentsStylesheet() { return STRIP_COMMENTS_STYLESHEET_START + getXSLTVersion() + STRIP_COMMENTS_STYLESHEET_END; Modified: trunk/xmlunit/src/java/org/custommonkey/xmlunit/XSLTConstants.java =================================================================== --- trunk/xmlunit/src/java/org/custommonkey/xmlunit/XSLTConstants.java 2007-08-23 10:59:48 UTC (rev 230) +++ trunk/xmlunit/src/java/org/custommonkey/xmlunit/XSLTConstants.java 2007-08-28 10:51:17 UTC (rev 231) @@ -83,4 +83,11 @@ * </xsl:stylesheet> */ String XSLT_END = "</xsl:stylesheet>"; + + /** + * Factory class of the XSLTC version shipping with JDK 1.5 which + * is pretty broken. + */ + String JAVA5_XSLTC_FACTORY_NAME = + "com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl"; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Stefan B. <bo...@ap...> - 2007-08-28 08:25:57
|
To whom it may engage... This is an automated request, but not an unsolicited one. For more information please visit http://gump.apache.org/nagged.html, and/or contact the folk at ge...@gu.... Project xmlunit has an issue affecting its community integration. This issue affects 44 projects, and has been outstanding for 14 runs. The current state of this project is 'Failed', with reason 'Build Failed'. For reference only, the following projects are affected by this: - apollo : Apollo Project - authx-example : Apache Authentication and Authorization Framework - authx-script : Apache Authentication and Authorization Framework - cargo : Cargo provides a Java API to manipulate Java Containers - commons-jelly-tags-jaxme : Commons Jelly - commons-jelly-tags-jmx : Commons Jelly - commons-jelly-tags-ojb : Commons Jelly - commons-jelly-tags-xmlunit : Commons Jelly - db-ojb-from-packages-1-0-release : ObjectRelationalBridge - db-torque : Persistence Layer - fulcrum-cache : Services Framework - groovy : New agile dynamic language using a Java-like syntax for the ... - htmlunit : A tool for testing web based applications - jakarta-cactus-documentation : Cactus Documentation - jakarta-cactus-framework-12 : Cactus Framework (J2EE 1.2) - jakarta-cactus-framework-13 : Cactus Framework (J2EE 1.3) - jakarta-cactus-release-12 : Unit test framework for server-side java code - jakarta-cactus-release-13 : Unit test framework for server-side java code - jakarta-cactus-sample-jetty-13 : Cactus Jetty Sample (J2EE 1.3) - jakarta-cactus-sample-servlet-12 : Cactus Servlet Sample (J2EE 1.2) - jakarta-cactus-sample-servlet-13 : Cactus Servlet Sample (J2EE 1.3) - jakarta-slide : Content Management System based on WebDAV technology - jakarta-turbine-2 : A servlet based framework. - jakarta-turbine-jcs : Cache - jetty : Java HTTP Servlet Server - jgroups : A Reliable Multicast Communication Toolkit for Java - muse : Muse Project - mx4j : OpenSource implementation of a JMX agent - mx4j-remote : OpenSource implementation of a JMX agent - mx4j-tools : OpenSource implementation of a JMX agent - mx4j-tools-from-packaged-jetty : OpenSource implementation of a JMX agent - naming-management : Apache Directory Naming Component - portals-jetspeed-1 : Enterprise Information Portal - strutstestcase : An extension of the standard JUnit TestCase class that provi... - test-ojb-from-packages-1-0-release : ObjectRelationalBridge - ws-axis-test : Apache eXtensible Interaction System - ws-axis2 : Apache Axis2 SOAP Stack - ws-commons-axiom : Common stuff for the WS projects. - ws-commons-policy : Common stuff for the WS projects. - ws-commons-xmlschema : Common stuff for the WS projects. - ws-juddi : ws-juddi -- UDDI Toolkit/Repository - ws-juddi-test : ws-juddi -- UDDI Toolkit/Repository - xml-xindice : native XML database - xmlunit : JUnit extension for XML unit tests. Full details are available at: http://vmgump.apache.org/gump/public/xmlunit/xmlunit/index.html That said, some information snippets are provided here. The following annotations (debug/informational/warning/error messages) were provided: -DEBUG- Sole output [xmlunit-28082007.jar] identifier set to project name -INFO- Failed with reason build failed -INFO- Failed to extract fallback artifacts from Gump Repository The following work was performed: http://vmgump.apache.org/gump/public/xmlunit/xmlunit/gump_work/build_xmlunit_xmlunit.html Work Name: build_xmlunit_xmlunit (Type: Build) Work ended in a state of : Failed Elapsed: 25 secs Command Line: /usr/lib/jvm/java-1.5.0-sun/bin/java -Djava.awt.headless=true -Xbootclasspath/p:/srv/gump/public/workspace/xml-commons/java/external/build/xml-apis.jar:/srv/gump/public/workspace/xml-xerces2/build/xercesImpl.jar:/srv/gump/public/workspace/xml-xalan/build/serializer.jar:/srv/gump/public/workspace/xml-xalan/build/xalan-unbundled.jar org.apache.tools.ant.Main -Dgump.merge=/srv/gump/public/gump/work/merge.xml -Dbuild.sysclasspath=only -Dxmlunit.version=28082007 Gump [Working Directory: /srv/gump/public/workspace/xmlunit] CLASSPATH: /usr/lib/jvm/java-1.5.0-sun/lib/tools.jar:/srv/gump/public/workspace/xmlunit/build/classes:/srv/gump/public/workspace/xmlunit/build/test-classes:/srv/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/srv/gump/public/workspace/ant/dist/lib/ant-swing.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/srv/gump/public/workspace/ant/dist/lib/ant-trax.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit.jar:/srv/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/srv/gump/public/workspace/ant/dist/lib/ant-nodeps.jar:/srv/gump/public/workspace/ant/dist/lib/ant.jar:/srv/gump/packages/junit3.8.1/junit.jar:/srv/gump/public/workspace/xml-commons/java/build/resolver.jar:/srv/gump/public/workspace/junit/dist/junit-28082007.jar:/srv/gump/public/workspace/xml-commons/java/external/build/xml-apis-ext.jar --------------------------------------------- [junit] Running org.custommonkey.xmlunit.test_ElementNameAndTextQualifier [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.004 sec [junit] Running org.custommonkey.xmlunit.test_ElementNameQualifier [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.011 sec [junit] Running org.custommonkey.xmlunit.test_ForumMessage4406472 [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.018 sec [junit] Running org.custommonkey.xmlunit.test_HTMLDocumentBuilder [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.076 sec [junit] Running org.custommonkey.xmlunit.test_IgnoreTextAndAttributeValuesDifferenceListener [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.04 sec [junit] Running org.custommonkey.xmlunit.test_JAXP_1_2_Schema_Validation [junit] Tests run: 7, Failures: 0, Errors: 0, Time elapsed: 0.157 sec [junit] Running org.custommonkey.xmlunit.test_NodeDescriptor [junit] Tests run: 8, Failures: 0, Errors: 0, Time elapsed: 0.024 sec [junit] Running org.custommonkey.xmlunit.test_NodeInputStream [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.021 sec [junit] Running org.custommonkey.xmlunit.test_NodeTest [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.007 sec [junit] Running org.custommonkey.xmlunit.test_Replacement [junit] Tests run: 6, Failures: 0, Errors: 0, Time elapsed: 0.005 sec [junit] Running org.custommonkey.xmlunit.test_SimpleNamespaceContext [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.009 sec [junit] Running org.custommonkey.xmlunit.test_SimpleSerializer [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.006 sec [junit] Running org.custommonkey.xmlunit.test_SimpleXpathEngine [junit] Tests run: 8, Failures: 0, Errors: 0, Time elapsed: 0.153 sec [junit] Running org.custommonkey.xmlunit.test_TolerantSaxDocumentBuilder [junit] Tests run: 7, Failures: 0, Errors: 0, Time elapsed: 0.123 sec [junit] Running org.custommonkey.xmlunit.test_Transform [junit] Tests run: 8, Failures: 0, Errors: 0, Time elapsed: 0.191 sec [junit] Running org.custommonkey.xmlunit.test_Validator [junit] Tests run: 5, Failures: 0, Errors: 0, Time elapsed: 0.106 sec [junit] Running org.custommonkey.xmlunit.test_XMLTestCase [junit] Tests run: 22, Failures: 0, Errors: 0, Time elapsed: 1.123 sec [junit] Running org.custommonkey.xmlunit.test_XMLUnit [junit] Tests run: 6, Failures: 0, Errors: 0, Time elapsed: 0.047 sec [junit] Running org.custommonkey.xmlunit.test_XpathNodeTracker [junit] Tests run: 7, Failures: 0, Errors: 0, Time elapsed: 0.01 sec [junit] Running org.custommonkey.xmlunit.util.test_IntegerBuffer [junit] Tests run: 13, Failures: 0, Errors: 0, Time elapsed: 0.027 sec [junit] Tests FAILED [junitreport] Processing /srv/gump/public/workspace/xmlunit/build/test-report/TESTS-TestSuites.xml to /tmp/null1621153526 [junitreport] Loading stylesheet jar:file:/srv/gump/public/workspace/ant/dist/lib/ant-junit.jar!/org/apache/tools/ant/taskdefs/optional/junit/xsl/junit-frames.xsl [junitreport] Transform time: 10341ms [junitreport] Deleting: /tmp/null1621153526 BUILD FAILED /srv/gump/public/workspace/xmlunit/build.xml:131: Some tests failed Total time: 25 seconds --------------------------------------------- To subscribe to this information via syndicated feeds: - RSS: http://vmgump.apache.org/gump/public/xmlunit/xmlunit/rss.xml - Atom: http://vmgump.apache.org/gump/public/xmlunit/xmlunit/atom.xml ============================== Gump Tracking Only === Produced by Gump version 2.3. Gump Run 20000028082007, vmgump:vmgump-public:20000028082007 Gump E-mail Identifier (unique within run) #4. -- Apache Gump http://gump.apache.org/ [Instance: vmgump] |
From: Stefan B. <bo...@ap...> - 2007-08-27 08:08:37
|
To whom it may engage... This is an automated request, but not an unsolicited one. For more information please visit http://gump.apache.org/nagged.html, and/or contact the folk at ge...@gu.... Project xmlunit has an issue affecting its community integration. This issue affects 44 projects, and has been outstanding for 11 runs. The current state of this project is 'Failed', with reason 'Build Failed'. For reference only, the following projects are affected by this: - apollo : Apollo Project - authx-example : Apache Authentication and Authorization Framework - authx-script : Apache Authentication and Authorization Framework - cargo : Cargo provides a Java API to manipulate Java Containers - commons-jelly-tags-jaxme : Commons Jelly - commons-jelly-tags-jmx : Commons Jelly - commons-jelly-tags-ojb : Commons Jelly - commons-jelly-tags-xmlunit : Commons Jelly - db-ojb-from-packages-1-0-release : ObjectRelationalBridge - db-torque : Persistence Layer - fulcrum-cache : Services Framework - groovy : New agile dynamic language using a Java-like syntax for the ... - htmlunit : A tool for testing web based applications - jakarta-cactus-documentation : Cactus Documentation - jakarta-cactus-framework-12 : Cactus Framework (J2EE 1.2) - jakarta-cactus-framework-13 : Cactus Framework (J2EE 1.3) - jakarta-cactus-release-12 : Unit test framework for server-side java code - jakarta-cactus-release-13 : Unit test framework for server-side java code - jakarta-cactus-sample-jetty-13 : Cactus Jetty Sample (J2EE 1.3) - jakarta-cactus-sample-servlet-12 : Cactus Servlet Sample (J2EE 1.2) - jakarta-cactus-sample-servlet-13 : Cactus Servlet Sample (J2EE 1.3) - jakarta-slide : Content Management System based on WebDAV technology - jakarta-turbine-2 : A servlet based framework. - jakarta-turbine-jcs : Cache - jetty : Java HTTP Servlet Server - jgroups : A Reliable Multicast Communication Toolkit for Java - muse : Muse Project - mx4j : OpenSource implementation of a JMX agent - mx4j-remote : OpenSource implementation of a JMX agent - mx4j-tools : OpenSource implementation of a JMX agent - mx4j-tools-from-packaged-jetty : OpenSource implementation of a JMX agent - naming-management : Apache Directory Naming Component - portals-jetspeed-1 : Enterprise Information Portal - strutstestcase : An extension of the standard JUnit TestCase class that provi... - test-ojb-from-packages-1-0-release : ObjectRelationalBridge - ws-axis-test : Apache eXtensible Interaction System - ws-axis2 : Apache Axis2 SOAP Stack - ws-commons-axiom : Common stuff for the WS projects. - ws-commons-policy : Common stuff for the WS projects. - ws-commons-xmlschema : Common stuff for the WS projects. - ws-juddi : ws-juddi -- UDDI Toolkit/Repository - ws-juddi-test : ws-juddi -- UDDI Toolkit/Repository - xml-xindice : native XML database - xmlunit : JUnit extension for XML unit tests. Full details are available at: http://vmgump.apache.org/gump/public/xmlunit/xmlunit/index.html That said, some information snippets are provided here. The following annotations (debug/informational/warning/error messages) were provided: -DEBUG- Sole output [xmlunit-27082007.jar] identifier set to project name -INFO- Failed with reason build failed -INFO- Failed to extract fallback artifacts from Gump Repository The following work was performed: http://vmgump.apache.org/gump/public/xmlunit/xmlunit/gump_work/build_xmlunit_xmlunit.html Work Name: build_xmlunit_xmlunit (Type: Build) Work ended in a state of : Failed Elapsed: 26 secs Command Line: /usr/lib/jvm/java-1.5.0-sun/bin/java -Djava.awt.headless=true -Xbootclasspath/p:/srv/gump/public/workspace/xml-commons/java/external/build/xml-apis.jar:/srv/gump/public/workspace/xml-xerces2/build/xercesImpl.jar:/srv/gump/public/workspace/xml-xalan/build/serializer.jar:/srv/gump/public/workspace/xml-xalan/build/xalan-unbundled.jar org.apache.tools.ant.Main -Dgump.merge=/srv/gump/public/gump/work/merge.xml -Dbuild.sysclasspath=only -Dxmlunit.version=27082007 Gump [Working Directory: /srv/gump/public/workspace/xmlunit] CLASSPATH: /usr/lib/jvm/java-1.5.0-sun/lib/tools.jar:/srv/gump/public/workspace/xmlunit/build/classes:/srv/gump/public/workspace/xmlunit/build/test-classes:/srv/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/srv/gump/public/workspace/ant/dist/lib/ant-swing.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/srv/gump/public/workspace/ant/dist/lib/ant-trax.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit.jar:/srv/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/srv/gump/public/workspace/ant/dist/lib/ant-nodeps.jar:/srv/gump/public/workspace/ant/dist/lib/ant.jar:/srv/gump/packages/junit3.8.1/junit.jar:/srv/gump/public/workspace/xml-commons/java/build/resolver.jar:/srv/gump/public/workspace/junit/dist/junit-27082007.jar:/srv/gump/public/workspace/xml-commons/java/external/build/xml-apis-ext.jar --------------------------------------------- [junit] Running org.custommonkey.xmlunit.test_ElementNameAndTextQualifier [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.004 sec [junit] Running org.custommonkey.xmlunit.test_ElementNameQualifier [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.004 sec [junit] Running org.custommonkey.xmlunit.test_ForumMessage4406472 [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.017 sec [junit] Running org.custommonkey.xmlunit.test_HTMLDocumentBuilder [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.074 sec [junit] Running org.custommonkey.xmlunit.test_IgnoreTextAndAttributeValuesDifferenceListener [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.032 sec [junit] Running org.custommonkey.xmlunit.test_JAXP_1_2_Schema_Validation [junit] Tests run: 7, Failures: 0, Errors: 0, Time elapsed: 0.143 sec [junit] Running org.custommonkey.xmlunit.test_NodeDescriptor [junit] Tests run: 8, Failures: 0, Errors: 0, Time elapsed: 0.023 sec [junit] Running org.custommonkey.xmlunit.test_NodeInputStream [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.028 sec [junit] Running org.custommonkey.xmlunit.test_NodeTest [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.005 sec [junit] Running org.custommonkey.xmlunit.test_Replacement [junit] Tests run: 6, Failures: 0, Errors: 0, Time elapsed: 0.005 sec [junit] Running org.custommonkey.xmlunit.test_SimpleNamespaceContext [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.007 sec [junit] Running org.custommonkey.xmlunit.test_SimpleSerializer [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.006 sec [junit] Running org.custommonkey.xmlunit.test_SimpleXpathEngine [junit] Tests run: 8, Failures: 0, Errors: 0, Time elapsed: 0.149 sec [junit] Running org.custommonkey.xmlunit.test_TolerantSaxDocumentBuilder [junit] Tests run: 7, Failures: 0, Errors: 0, Time elapsed: 0.034 sec [junit] Running org.custommonkey.xmlunit.test_Transform [junit] Tests run: 8, Failures: 0, Errors: 0, Time elapsed: 0.174 sec [junit] Running org.custommonkey.xmlunit.test_Validator [junit] Tests run: 5, Failures: 0, Errors: 0, Time elapsed: 0.1 sec [junit] Running org.custommonkey.xmlunit.test_XMLTestCase [junit] Tests run: 22, Failures: 0, Errors: 0, Time elapsed: 1.046 sec [junit] Running org.custommonkey.xmlunit.test_XMLUnit [junit] Tests run: 6, Failures: 0, Errors: 0, Time elapsed: 0.046 sec [junit] Running org.custommonkey.xmlunit.test_XpathNodeTracker [junit] Tests run: 7, Failures: 0, Errors: 0, Time elapsed: 0.011 sec [junit] Running org.custommonkey.xmlunit.util.test_IntegerBuffer [junit] Tests run: 13, Failures: 0, Errors: 0, Time elapsed: 0.032 sec [junit] Tests FAILED [junitreport] Processing /srv/gump/public/workspace/xmlunit/build/test-report/TESTS-TestSuites.xml to /tmp/null1076177182 [junitreport] Loading stylesheet jar:file:/srv/gump/public/workspace/ant/dist/lib/ant-junit.jar!/org/apache/tools/ant/taskdefs/optional/junit/xsl/junit-frames.xsl [junitreport] Transform time: 10889ms [junitreport] Deleting: /tmp/null1076177182 BUILD FAILED /srv/gump/public/workspace/xmlunit/build.xml:131: Some tests failed Total time: 25 seconds --------------------------------------------- To subscribe to this information via syndicated feeds: - RSS: http://vmgump.apache.org/gump/public/xmlunit/xmlunit/rss.xml - Atom: http://vmgump.apache.org/gump/public/xmlunit/xmlunit/atom.xml ============================== Gump Tracking Only === Produced by Gump version 2.3. Gump Run 37000027082007, vmgump:vmgump-public:37000027082007 Gump E-mail Identifier (unique within run) #3. -- Apache Gump http://gump.apache.org/ [Instance: vmgump] |
From: Stefan B. <bo...@ap...> - 2007-08-26 08:05:25
|
To whom it may engage... This is an automated request, but not an unsolicited one. For more information please visit http://gump.apache.org/nagged.html, and/or contact the folk at ge...@gu.... Project xmlunit has an issue affecting its community integration. This issue affects 44 projects, and has been outstanding for 8 runs. The current state of this project is 'Failed', with reason 'Build Failed'. For reference only, the following projects are affected by this: - apollo : Apollo Project - authx-example : Apache Authentication and Authorization Framework - authx-script : Apache Authentication and Authorization Framework - cargo : Cargo provides a Java API to manipulate Java Containers - commons-jelly-tags-jaxme : Commons Jelly - commons-jelly-tags-jmx : Commons Jelly - commons-jelly-tags-ojb : Commons Jelly - commons-jelly-tags-xmlunit : Commons Jelly - db-ojb-from-packages-1-0-release : ObjectRelationalBridge - db-torque : Persistence Layer - fulcrum-cache : Services Framework - groovy : New agile dynamic language using a Java-like syntax for the ... - htmlunit : A tool for testing web based applications - jakarta-cactus-documentation : Cactus Documentation - jakarta-cactus-framework-12 : Cactus Framework (J2EE 1.2) - jakarta-cactus-framework-13 : Cactus Framework (J2EE 1.3) - jakarta-cactus-release-12 : Unit test framework for server-side java code - jakarta-cactus-release-13 : Unit test framework for server-side java code - jakarta-cactus-sample-jetty-13 : Cactus Jetty Sample (J2EE 1.3) - jakarta-cactus-sample-servlet-12 : Cactus Servlet Sample (J2EE 1.2) - jakarta-cactus-sample-servlet-13 : Cactus Servlet Sample (J2EE 1.3) - jakarta-slide : Content Management System based on WebDAV technology - jakarta-turbine-2 : A servlet based framework. - jakarta-turbine-jcs : Cache - jetty : Java HTTP Servlet Server - jgroups : A Reliable Multicast Communication Toolkit for Java - muse : Muse Project - mx4j : OpenSource implementation of a JMX agent - mx4j-remote : OpenSource implementation of a JMX agent - mx4j-tools : OpenSource implementation of a JMX agent - mx4j-tools-from-packaged-jetty : OpenSource implementation of a JMX agent - naming-management : Apache Directory Naming Component - portals-jetspeed-1 : Enterprise Information Portal - strutstestcase : An extension of the standard JUnit TestCase class that provi... - test-ojb-from-packages-1-0-release : ObjectRelationalBridge - ws-axis-test : Apache eXtensible Interaction System - ws-axis2 : Apache Axis2 SOAP Stack - ws-commons-axiom : Common stuff for the WS projects. - ws-commons-policy : Common stuff for the WS projects. - ws-commons-xmlschema : Common stuff for the WS projects. - ws-juddi : ws-juddi -- UDDI Toolkit/Repository - ws-juddi-test : ws-juddi -- UDDI Toolkit/Repository - xml-xindice : native XML database - xmlunit : JUnit extension for XML unit tests. Full details are available at: http://vmgump.apache.org/gump/public/xmlunit/xmlunit/index.html That said, some information snippets are provided here. The following annotations (debug/informational/warning/error messages) were provided: -DEBUG- Sole output [xmlunit-26082007.jar] identifier set to project name -INFO- Failed with reason build failed -DEBUG- Extracted fallback artifacts from Gump Repository The following work was performed: http://vmgump.apache.org/gump/public/xmlunit/xmlunit/gump_work/build_xmlunit_xmlunit.html Work Name: build_xmlunit_xmlunit (Type: Build) Work ended in a state of : Failed Elapsed: 26 secs Command Line: /usr/lib/jvm/java-1.5.0-sun/bin/java -Djava.awt.headless=true -Xbootclasspath/p:/srv/gump/public/workspace/xml-commons/java/external/build/xml-apis.jar:/srv/gump/public/workspace/xml-xerces2/build/xercesImpl.jar:/srv/gump/public/workspace/xml-xalan/build/serializer.jar:/srv/gump/public/workspace/xml-xalan/build/xalan-unbundled.jar org.apache.tools.ant.Main -Dgump.merge=/srv/gump/public/gump/work/merge.xml -Dbuild.sysclasspath=only -Dxmlunit.version=26082007 Gump [Working Directory: /srv/gump/public/workspace/xmlunit] CLASSPATH: /usr/lib/jvm/java-1.5.0-sun/lib/tools.jar:/srv/gump/public/workspace/xmlunit/build/classes:/srv/gump/public/workspace/xmlunit/build/test-classes:/srv/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/srv/gump/public/workspace/ant/dist/lib/ant-swing.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/srv/gump/public/workspace/ant/dist/lib/ant-trax.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit.jar:/srv/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/srv/gump/public/workspace/ant/dist/lib/ant-nodeps.jar:/srv/gump/public/workspace/ant/dist/lib/ant.jar:/srv/gump/packages/junit3.8.1/junit.jar:/srv/gump/public/workspace/xml-commons/java/build/resolver.jar:/srv/gump/public/workspace/junit/dist/junit-26082007.jar:/srv/gump/public/workspace/xml-commons/java/external/build/xml-apis-ext.jar --------------------------------------------- [junit] Running org.custommonkey.xmlunit.test_ElementNameAndTextQualifier [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.004 sec [junit] Running org.custommonkey.xmlunit.test_ElementNameQualifier [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.005 sec [junit] Running org.custommonkey.xmlunit.test_ForumMessage4406472 [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.02 sec [junit] Running org.custommonkey.xmlunit.test_HTMLDocumentBuilder [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.169 sec [junit] Running org.custommonkey.xmlunit.test_IgnoreTextAndAttributeValuesDifferenceListener [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.037 sec [junit] Running org.custommonkey.xmlunit.test_JAXP_1_2_Schema_Validation [junit] Tests run: 7, Failures: 0, Errors: 0, Time elapsed: 0.147 sec [junit] Running org.custommonkey.xmlunit.test_NodeDescriptor [junit] Tests run: 8, Failures: 0, Errors: 0, Time elapsed: 0.021 sec [junit] Running org.custommonkey.xmlunit.test_NodeInputStream [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.022 sec [junit] Running org.custommonkey.xmlunit.test_NodeTest [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.013 sec [junit] Running org.custommonkey.xmlunit.test_Replacement [junit] Tests run: 6, Failures: 0, Errors: 0, Time elapsed: 0.006 sec [junit] Running org.custommonkey.xmlunit.test_SimpleNamespaceContext [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.006 sec [junit] Running org.custommonkey.xmlunit.test_SimpleSerializer [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.014 sec [junit] Running org.custommonkey.xmlunit.test_SimpleXpathEngine [junit] Tests run: 8, Failures: 0, Errors: 0, Time elapsed: 0.148 sec [junit] Running org.custommonkey.xmlunit.test_TolerantSaxDocumentBuilder [junit] Tests run: 7, Failures: 0, Errors: 0, Time elapsed: 0.042 sec [junit] Running org.custommonkey.xmlunit.test_Transform [junit] Tests run: 8, Failures: 0, Errors: 0, Time elapsed: 0.121 sec [junit] Running org.custommonkey.xmlunit.test_Validator [junit] Tests run: 5, Failures: 0, Errors: 0, Time elapsed: 0.186 sec [junit] Running org.custommonkey.xmlunit.test_XMLTestCase [junit] Tests run: 22, Failures: 0, Errors: 0, Time elapsed: 1.158 sec [junit] Running org.custommonkey.xmlunit.test_XMLUnit [junit] Tests run: 6, Failures: 0, Errors: 0, Time elapsed: 0.047 sec [junit] Running org.custommonkey.xmlunit.test_XpathNodeTracker [junit] Tests run: 7, Failures: 0, Errors: 0, Time elapsed: 0.01 sec [junit] Running org.custommonkey.xmlunit.util.test_IntegerBuffer [junit] Tests run: 13, Failures: 0, Errors: 0, Time elapsed: 0.027 sec [junit] Tests FAILED [junitreport] Processing /srv/gump/public/workspace/xmlunit/build/test-report/TESTS-TestSuites.xml to /tmp/null862230603 [junitreport] Loading stylesheet jar:file:/srv/gump/public/workspace/ant/dist/lib/ant-junit.jar!/org/apache/tools/ant/taskdefs/optional/junit/xsl/junit-frames.xsl [junitreport] Transform time: 10514ms [junitreport] Deleting: /tmp/null862230603 BUILD FAILED /srv/gump/public/workspace/xmlunit/build.xml:131: Some tests failed Total time: 26 seconds --------------------------------------------- To subscribe to this information via syndicated feeds: - RSS: http://vmgump.apache.org/gump/public/xmlunit/xmlunit/rss.xml - Atom: http://vmgump.apache.org/gump/public/xmlunit/xmlunit/atom.xml ============================== Gump Tracking Only === Produced by Gump version 2.3. Gump Run 26000026082007, vmgump:vmgump-public:26000026082007 Gump E-mail Identifier (unique within run) #3. -- Apache Gump http://gump.apache.org/ [Instance: vmgump] |
From: Stefan B. <bo...@ap...> - 2007-08-25 07:56:41
|
To whom it may engage... This is an automated request, but not an unsolicited one. For more information please visit http://gump.apache.org/nagged.html, and/or contact the folk at ge...@gu.... Project xmlunit has an issue affecting its community integration. This issue affects 44 projects, and has been outstanding for 5 runs. The current state of this project is 'Failed', with reason 'Build Failed'. For reference only, the following projects are affected by this: - apollo : Apollo Project - authx-example : Apache Authentication and Authorization Framework - authx-script : Apache Authentication and Authorization Framework - cargo : Cargo provides a Java API to manipulate Java Containers - commons-jelly-tags-jaxme : Commons Jelly - commons-jelly-tags-jmx : Commons Jelly - commons-jelly-tags-ojb : Commons Jelly - commons-jelly-tags-xmlunit : Commons Jelly - db-ojb-from-packages-1-0-release : ObjectRelationalBridge - db-torque : Persistence Layer - fulcrum-cache : Services Framework - groovy : New agile dynamic language using a Java-like syntax for the ... - htmlunit : A tool for testing web based applications - jakarta-cactus-documentation : Cactus Documentation - jakarta-cactus-framework-12 : Cactus Framework (J2EE 1.2) - jakarta-cactus-framework-13 : Cactus Framework (J2EE 1.3) - jakarta-cactus-release-12 : Unit test framework for server-side java code - jakarta-cactus-release-13 : Unit test framework for server-side java code - jakarta-cactus-sample-jetty-13 : Cactus Jetty Sample (J2EE 1.3) - jakarta-cactus-sample-servlet-12 : Cactus Servlet Sample (J2EE 1.2) - jakarta-cactus-sample-servlet-13 : Cactus Servlet Sample (J2EE 1.3) - jakarta-slide : Content Management System based on WebDAV technology - jakarta-turbine-2 : A servlet based framework. - jakarta-turbine-jcs : Cache - jetty : Java HTTP Servlet Server - jgroups : A Reliable Multicast Communication Toolkit for Java - muse : Muse Project - mx4j : OpenSource implementation of a JMX agent - mx4j-remote : OpenSource implementation of a JMX agent - mx4j-tools : OpenSource implementation of a JMX agent - mx4j-tools-from-packaged-jetty : OpenSource implementation of a JMX agent - naming-management : Apache Directory Naming Component - portals-jetspeed-1 : Enterprise Information Portal - strutstestcase : An extension of the standard JUnit TestCase class that provi... - test-ojb-from-packages-1-0-release : ObjectRelationalBridge - ws-axis-test : Apache eXtensible Interaction System - ws-axis2 : Apache Axis2 SOAP Stack - ws-commons-axiom : Common stuff for the WS projects. - ws-commons-policy : Common stuff for the WS projects. - ws-commons-xmlschema : Common stuff for the WS projects. - ws-juddi : ws-juddi -- UDDI Toolkit/Repository - ws-juddi-test : ws-juddi -- UDDI Toolkit/Repository - xml-xindice : native XML database - xmlunit : JUnit extension for XML unit tests. Full details are available at: http://vmgump.apache.org/gump/public/xmlunit/xmlunit/index.html That said, some information snippets are provided here. The following annotations (debug/informational/warning/error messages) were provided: -DEBUG- Sole output [xmlunit-25082007.jar] identifier set to project name -INFO- Failed with reason build failed -DEBUG- Extracted fallback artifacts from Gump Repository The following work was performed: http://vmgump.apache.org/gump/public/xmlunit/xmlunit/gump_work/build_xmlunit_xmlunit.html Work Name: build_xmlunit_xmlunit (Type: Build) Work ended in a state of : Failed Elapsed: 26 secs Command Line: /usr/lib/jvm/java-1.5.0-sun/bin/java -Djava.awt.headless=true -Xbootclasspath/p:/srv/gump/public/workspace/xml-commons/java/external/build/xml-apis.jar:/srv/gump/public/workspace/xml-xerces2/build/xercesImpl.jar:/srv/gump/public/workspace/xml-xalan/build/serializer.jar:/srv/gump/public/workspace/xml-xalan/build/xalan-unbundled.jar org.apache.tools.ant.Main -Dgump.merge=/srv/gump/public/gump/work/merge.xml -Dbuild.sysclasspath=only -Dxmlunit.version=25082007 Gump [Working Directory: /srv/gump/public/workspace/xmlunit] CLASSPATH: /usr/lib/jvm/java-1.5.0-sun/lib/tools.jar:/srv/gump/public/workspace/xmlunit/build/classes:/srv/gump/public/workspace/xmlunit/build/test-classes:/srv/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/srv/gump/public/workspace/ant/dist/lib/ant-swing.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/srv/gump/public/workspace/ant/dist/lib/ant-trax.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit.jar:/srv/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/srv/gump/public/workspace/ant/dist/lib/ant-nodeps.jar:/srv/gump/public/workspace/ant/dist/lib/ant.jar:/srv/gump/packages/junit3.8.1/junit.jar:/srv/gump/public/workspace/xml-commons/java/build/resolver.jar:/srv/gump/public/workspace/junit/dist/junit-25082007.jar:/srv/gump/public/workspace/xml-commons/java/external/build/xml-apis-ext.jar --------------------------------------------- [junit] Running org.custommonkey.xmlunit.test_ElementNameAndTextQualifier [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.005 sec [junit] Running org.custommonkey.xmlunit.test_ElementNameQualifier [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.004 sec [junit] Running org.custommonkey.xmlunit.test_ForumMessage4406472 [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.019 sec [junit] Running org.custommonkey.xmlunit.test_HTMLDocumentBuilder [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.118 sec [junit] Running org.custommonkey.xmlunit.test_IgnoreTextAndAttributeValuesDifferenceListener [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.036 sec [junit] Running org.custommonkey.xmlunit.test_JAXP_1_2_Schema_Validation [junit] Tests run: 7, Failures: 0, Errors: 0, Time elapsed: 0.144 sec [junit] Running org.custommonkey.xmlunit.test_NodeDescriptor [junit] Tests run: 8, Failures: 0, Errors: 0, Time elapsed: 0.023 sec [junit] Running org.custommonkey.xmlunit.test_NodeInputStream [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.023 sec [junit] Running org.custommonkey.xmlunit.test_NodeTest [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.014 sec [junit] Running org.custommonkey.xmlunit.test_Replacement [junit] Tests run: 6, Failures: 0, Errors: 0, Time elapsed: 0.006 sec [junit] Running org.custommonkey.xmlunit.test_SimpleNamespaceContext [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.013 sec [junit] Running org.custommonkey.xmlunit.test_SimpleSerializer [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.006 sec [junit] Running org.custommonkey.xmlunit.test_SimpleXpathEngine [junit] Tests run: 8, Failures: 0, Errors: 0, Time elapsed: 0.145 sec [junit] Running org.custommonkey.xmlunit.test_TolerantSaxDocumentBuilder [junit] Tests run: 7, Failures: 0, Errors: 0, Time elapsed: 0.032 sec [junit] Running org.custommonkey.xmlunit.test_Transform [junit] Tests run: 8, Failures: 0, Errors: 0, Time elapsed: 0.123 sec [junit] Running org.custommonkey.xmlunit.test_Validator [junit] Tests run: 5, Failures: 0, Errors: 0, Time elapsed: 0.105 sec [junit] Running org.custommonkey.xmlunit.test_XMLTestCase [junit] Tests run: 22, Failures: 0, Errors: 0, Time elapsed: 1.193 sec [junit] Running org.custommonkey.xmlunit.test_XMLUnit [junit] Tests run: 6, Failures: 0, Errors: 0, Time elapsed: 0.045 sec [junit] Running org.custommonkey.xmlunit.test_XpathNodeTracker [junit] Tests run: 7, Failures: 0, Errors: 0, Time elapsed: 0.008 sec [junit] Running org.custommonkey.xmlunit.util.test_IntegerBuffer [junit] Tests run: 13, Failures: 0, Errors: 0, Time elapsed: 0.026 sec [junit] Tests FAILED [junitreport] Processing /srv/gump/public/workspace/xmlunit/build/test-report/TESTS-TestSuites.xml to /tmp/null447175556 [junitreport] Loading stylesheet jar:file:/srv/gump/public/workspace/ant/dist/lib/ant-junit.jar!/org/apache/tools/ant/taskdefs/optional/junit/xsl/junit-frames.xsl [junitreport] Transform time: 10663ms [junitreport] Deleting: /tmp/null447175556 BUILD FAILED /srv/gump/public/workspace/xmlunit/build.xml:131: Some tests failed Total time: 25 seconds --------------------------------------------- To subscribe to this information via syndicated feeds: - RSS: http://vmgump.apache.org/gump/public/xmlunit/xmlunit/rss.xml - Atom: http://vmgump.apache.org/gump/public/xmlunit/xmlunit/atom.xml ============================== Gump Tracking Only === Produced by Gump version 2.3. Gump Run 23000025082007, vmgump:vmgump-public:23000025082007 Gump E-mail Identifier (unique within run) #3. -- Apache Gump http://gump.apache.org/ [Instance: vmgump] |
From: SourceForge.net <no...@so...> - 2007-08-24 06:54:55
|
Bugs item #1779701, was opened at 2007-08-22 21:58 Message generated for change (Comment added) made by bodewig You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377768&aid=1779701&group_id=23187 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: Accepted Priority: 5 Private: No Submitted By: Elias Ross (genman) >Assigned to: Stefan Bodewig (bodewig) Summary: XMLUtil.ignoreWhitespace does not work with namespace Initial Comment: Test case: public void testIgnoreWhitespace2() throws Exception { String control = "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" + "\r\n <env:Header/>" + "\r\n </env:Envelope>"; String test = "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" + "<env:Header/>" + "</env:Envelope>"; XMLUnit.setIgnoreWhitespace(true); try { Diff diff = XMLUnit.compareXML(control, test); System.out.println(test); System.out.println(control); System.out.println(new DetailedDiff(diff)); assertEquals("Should be identical", true, new Diff(control, test).identical()); } finally { XMLUnit.setIgnoreWhitespace(false); } } Output: <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'><env:Header/></env:Envelope> <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'> <env:Header/> </env:Envelope> org.custommonkey.xmlunit.DetailedDiff [different] Expected number of child nodes '3' but was '1' - comparing <env:Envelope...> at /Envelope[1] to <env:Envelope...> at /Envelope[1] [different] Expected presence of child node '#text' but was 'null' - comparing <env:Envelope ...> </env:Envelope> at /Envelope[1] to at /Envelope[1]/Header[1] [not identical] Expected sequence of child nodes '1' but was '0' - comparing <env:Header...> at /Envelope[1]/Header[1] to <env:Header...> at /Envelope[1]/Header[1] [different] Expected presence of child node '#text' but was 'null' - comparing <env:Envelope ...> </env:Envelope> at /Envelope[1]/Header[1] to at /Envelope[1]/Header[1] ---------------------------------------------------------------------- >Comment By: Stefan Bodewig (bodewig) Date: 2007-08-24 08:54 Message: Logged In: YES user_id=113148 Originator: NO http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6413803 probably holds the full story. ---------------------------------------------------------------------- Comment By: Stefan Bodewig (bodewig) Date: 2007-08-24 08:50 Message: Logged In: YES user_id=113148 Originator: NO I can confirm that the test passes on JDK 1.4.2 and 1.6. I'd rather think it is the XSLT transformer since JDK 1.5's XSLTC really is a mess - and responsible for many other problems. XPath assertions in XMLUnit 1.0 don't work because of it either. You could try downloading Xalan-J (for example) and tell XMLUnit to use Xalan instead of the JDK's transformer as a workaround. I'll look into the issue myself as well. ---------------------------------------------------------------------- Comment By: Elias Ross (genman) Date: 2007-08-23 18:03 Message: Logged In: YES user_id=556458 Originator: YES The test works on JDK 1.6.0_02 but does not on JDK 1.5.0_07 or 1.5.0_11, so I suppose it is a difference in XML parsers shipped with the JDK 1.5. (This is on Linux by the way.) If you can reproduce this, is there some sort of work-around you could put into place? My product is JDK 1.5 only. ---------------------------------------------------------------------- Comment By: Stefan Bodewig (bodewig) Date: 2007-08-23 13:01 Message: Logged In: YES user_id=113148 Originator: NO I've added your test and it passes for me (trunk as well as XMLUnit 1.1). http://xmlunit.svn.sourceforge.net/viewvc/xmlunit?view=rev&revision=230 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377768&aid=1779701&group_id=23187 |
From: SourceForge.net <no...@so...> - 2007-08-24 06:50:39
|
Bugs item #1779701, was opened at 2007-08-22 21:58 Message generated for change (Comment added) made by bodewig You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377768&aid=1779701&group_id=23187 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open >Resolution: Accepted Priority: 5 Private: No Submitted By: Elias Ross (genman) Assigned to: Nobody/Anonymous (nobody) Summary: XMLUtil.ignoreWhitespace does not work with namespace Initial Comment: Test case: public void testIgnoreWhitespace2() throws Exception { String control = "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" + "\r\n <env:Header/>" + "\r\n </env:Envelope>"; String test = "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" + "<env:Header/>" + "</env:Envelope>"; XMLUnit.setIgnoreWhitespace(true); try { Diff diff = XMLUnit.compareXML(control, test); System.out.println(test); System.out.println(control); System.out.println(new DetailedDiff(diff)); assertEquals("Should be identical", true, new Diff(control, test).identical()); } finally { XMLUnit.setIgnoreWhitespace(false); } } Output: <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'><env:Header/></env:Envelope> <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'> <env:Header/> </env:Envelope> org.custommonkey.xmlunit.DetailedDiff [different] Expected number of child nodes '3' but was '1' - comparing <env:Envelope...> at /Envelope[1] to <env:Envelope...> at /Envelope[1] [different] Expected presence of child node '#text' but was 'null' - comparing <env:Envelope ...> </env:Envelope> at /Envelope[1] to at /Envelope[1]/Header[1] [not identical] Expected sequence of child nodes '1' but was '0' - comparing <env:Header...> at /Envelope[1]/Header[1] to <env:Header...> at /Envelope[1]/Header[1] [different] Expected presence of child node '#text' but was 'null' - comparing <env:Envelope ...> </env:Envelope> at /Envelope[1]/Header[1] to at /Envelope[1]/Header[1] ---------------------------------------------------------------------- >Comment By: Stefan Bodewig (bodewig) Date: 2007-08-24 08:50 Message: Logged In: YES user_id=113148 Originator: NO I can confirm that the test passes on JDK 1.4.2 and 1.6. I'd rather think it is the XSLT transformer since JDK 1.5's XSLTC really is a mess - and responsible for many other problems. XPath assertions in XMLUnit 1.0 don't work because of it either. You could try downloading Xalan-J (for example) and tell XMLUnit to use Xalan instead of the JDK's transformer as a workaround. I'll look into the issue myself as well. ---------------------------------------------------------------------- Comment By: Elias Ross (genman) Date: 2007-08-23 18:03 Message: Logged In: YES user_id=556458 Originator: YES The test works on JDK 1.6.0_02 but does not on JDK 1.5.0_07 or 1.5.0_11, so I suppose it is a difference in XML parsers shipped with the JDK 1.5. (This is on Linux by the way.) If you can reproduce this, is there some sort of work-around you could put into place? My product is JDK 1.5 only. ---------------------------------------------------------------------- Comment By: Stefan Bodewig (bodewig) Date: 2007-08-23 13:01 Message: Logged In: YES user_id=113148 Originator: NO I've added your test and it passes for me (trunk as well as XMLUnit 1.1). http://xmlunit.svn.sourceforge.net/viewvc/xmlunit?view=rev&revision=230 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377768&aid=1779701&group_id=23187 |
From: SourceForge.net <no...@so...> - 2007-08-23 16:03:07
|
Bugs item #1779701, was opened at 2007-08-22 12:58 Message generated for change (Comment added) made by genman You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377768&aid=1779701&group_id=23187 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Open Resolution: Works For Me Priority: 5 Private: No Submitted By: Elias Ross (genman) Assigned to: Nobody/Anonymous (nobody) Summary: XMLUtil.ignoreWhitespace does not work with namespace Initial Comment: Test case: public void testIgnoreWhitespace2() throws Exception { String control = "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" + "\r\n <env:Header/>" + "\r\n </env:Envelope>"; String test = "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" + "<env:Header/>" + "</env:Envelope>"; XMLUnit.setIgnoreWhitespace(true); try { Diff diff = XMLUnit.compareXML(control, test); System.out.println(test); System.out.println(control); System.out.println(new DetailedDiff(diff)); assertEquals("Should be identical", true, new Diff(control, test).identical()); } finally { XMLUnit.setIgnoreWhitespace(false); } } Output: <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'><env:Header/></env:Envelope> <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'> <env:Header/> </env:Envelope> org.custommonkey.xmlunit.DetailedDiff [different] Expected number of child nodes '3' but was '1' - comparing <env:Envelope...> at /Envelope[1] to <env:Envelope...> at /Envelope[1] [different] Expected presence of child node '#text' but was 'null' - comparing <env:Envelope ...> </env:Envelope> at /Envelope[1] to at /Envelope[1]/Header[1] [not identical] Expected sequence of child nodes '1' but was '0' - comparing <env:Header...> at /Envelope[1]/Header[1] to <env:Header...> at /Envelope[1]/Header[1] [different] Expected presence of child node '#text' but was 'null' - comparing <env:Envelope ...> </env:Envelope> at /Envelope[1]/Header[1] to at /Envelope[1]/Header[1] ---------------------------------------------------------------------- >Comment By: Elias Ross (genman) Date: 2007-08-23 09:03 Message: Logged In: YES user_id=556458 Originator: YES The test works on JDK 1.6.0_02 but does not on JDK 1.5.0_07 or 1.5.0_11, so I suppose it is a difference in XML parsers shipped with the JDK 1.5. (This is on Linux by the way.) If you can reproduce this, is there some sort of work-around you could put into place? My product is JDK 1.5 only. ---------------------------------------------------------------------- Comment By: Stefan Bodewig (bodewig) Date: 2007-08-23 04:01 Message: Logged In: YES user_id=113148 Originator: NO I've added your test and it passes for me (trunk as well as XMLUnit 1.1). http://xmlunit.svn.sourceforge.net/viewvc/xmlunit?view=rev&revision=230 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377768&aid=1779701&group_id=23187 |
From: SourceForge.net <no...@so...> - 2007-08-23 11:01:57
|
Bugs item #1779701, was opened at 2007-08-22 21:58 Message generated for change (Comment added) made by bodewig You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377768&aid=1779701&group_id=23187 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Pending >Resolution: Works For Me Priority: 5 Private: No Submitted By: Elias Ross (genman) Assigned to: Nobody/Anonymous (nobody) Summary: XMLUtil.ignoreWhitespace does not work with namespace Initial Comment: Test case: public void testIgnoreWhitespace2() throws Exception { String control = "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" + "\r\n <env:Header/>" + "\r\n </env:Envelope>"; String test = "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" + "<env:Header/>" + "</env:Envelope>"; XMLUnit.setIgnoreWhitespace(true); try { Diff diff = XMLUnit.compareXML(control, test); System.out.println(test); System.out.println(control); System.out.println(new DetailedDiff(diff)); assertEquals("Should be identical", true, new Diff(control, test).identical()); } finally { XMLUnit.setIgnoreWhitespace(false); } } Output: <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'><env:Header/></env:Envelope> <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'> <env:Header/> </env:Envelope> org.custommonkey.xmlunit.DetailedDiff [different] Expected number of child nodes '3' but was '1' - comparing <env:Envelope...> at /Envelope[1] to <env:Envelope...> at /Envelope[1] [different] Expected presence of child node '#text' but was 'null' - comparing <env:Envelope ...> </env:Envelope> at /Envelope[1] to at /Envelope[1]/Header[1] [not identical] Expected sequence of child nodes '1' but was '0' - comparing <env:Header...> at /Envelope[1]/Header[1] to <env:Header...> at /Envelope[1]/Header[1] [different] Expected presence of child node '#text' but was 'null' - comparing <env:Envelope ...> </env:Envelope> at /Envelope[1]/Header[1] to at /Envelope[1]/Header[1] ---------------------------------------------------------------------- >Comment By: Stefan Bodewig (bodewig) Date: 2007-08-23 13:01 Message: Logged In: YES user_id=113148 Originator: NO I've added your test and it passes for me (trunk as well as XMLUnit 1.1). http://xmlunit.svn.sourceforge.net/viewvc/xmlunit?view=rev&revision=230 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377768&aid=1779701&group_id=23187 |
From: <bo...@us...> - 2007-08-23 10:59:48
|
Revision: 230 http://xmlunit.svn.sourceforge.net/xmlunit/?rev=230&view=rev Author: bodewig Date: 2007-08-23 03:59:48 -0700 (Thu, 23 Aug 2007) Log Message: ----------- Add test for whitespace handling in the presence of namespaces. Bug report 1779701 Modified Paths: -------------- trunk/xmlunit/tests/java/org/custommonkey/xmlunit/test_Diff.java Modified: trunk/xmlunit/tests/java/org/custommonkey/xmlunit/test_Diff.java =================================================================== --- trunk/xmlunit/tests/java/org/custommonkey/xmlunit/test_Diff.java 2007-08-10 07:30:53 UTC (rev 229) +++ trunk/xmlunit/tests/java/org/custommonkey/xmlunit/test_Diff.java 2007-08-23 10:59:48 UTC (rev 230) @@ -706,4 +706,26 @@ assertTrue(d.toString(), d.similar()); } + /** + * Bug Report 1779701 + * @see http://sourceforge.net/tracker/index.php?func=detail&aid=1779701&group_id=23187&atid=377768 + */ + public void testWhitespaceAndNamespaces() throws Exception { + String control = + "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" + + "\r\n <env:Header/>" + + "\r\n </env:Envelope>"; + String test = + "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" + + "<env:Header/>" + + "</env:Envelope>"; + XMLUnit.setIgnoreWhitespace(true); + try { + Diff diff = XMLUnit.compareXML(control, test); + assertTrue(diff.toString(), diff.identical()); + } finally { + XMLUnit.setIgnoreWhitespace(false); + } + } + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: SourceForge.net <no...@so...> - 2007-08-22 19:58:14
|
Bugs item #1779701, was opened at 2007-08-22 12:58 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377768&aid=1779701&group_id=23187 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Elias Ross (genman) Assigned to: Nobody/Anonymous (nobody) Summary: XMLUtil.ignoreWhitespace does not work with namespace Initial Comment: Test case: public void testIgnoreWhitespace2() throws Exception { String control = "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" + "\r\n <env:Header/>" + "\r\n </env:Envelope>"; String test = "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" + "<env:Header/>" + "</env:Envelope>"; XMLUnit.setIgnoreWhitespace(true); try { Diff diff = XMLUnit.compareXML(control, test); System.out.println(test); System.out.println(control); System.out.println(new DetailedDiff(diff)); assertEquals("Should be identical", true, new Diff(control, test).identical()); } finally { XMLUnit.setIgnoreWhitespace(false); } } Output: <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'><env:Header/></env:Envelope> <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'> <env:Header/> </env:Envelope> org.custommonkey.xmlunit.DetailedDiff [different] Expected number of child nodes '3' but was '1' - comparing <env:Envelope...> at /Envelope[1] to <env:Envelope...> at /Envelope[1] [different] Expected presence of child node '#text' but was 'null' - comparing <env:Envelope ...> </env:Envelope> at /Envelope[1] to at /Envelope[1]/Header[1] [not identical] Expected sequence of child nodes '1' but was '0' - comparing <env:Header...> at /Envelope[1]/Header[1] to <env:Header...> at /Envelope[1]/Header[1] [different] Expected presence of child node '#text' but was 'null' - comparing <env:Envelope ...> </env:Envelope> at /Envelope[1]/Header[1] to at /Envelope[1]/Header[1] ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377768&aid=1779701&group_id=23187 |
From: SourceForge.net <no...@so...> - 2007-08-14 07:28:30
|
Bugs item #1771400, was opened at 2007-08-10 06:06 Message generated for change (Comment added) made by bodewig You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377768&aid=1771400&group_id=23187 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Interface (example) Group: None >Status: Pending >Resolution: Invalid Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: IgnoreValuesDifferenceListener Initial Comment: I created a custom IgnoreValueDifferenceListener and overrided the same in Diff Class e.g. diff.overrideDifferenceListener(new IgnoreSomeValuesDifferenceListener()); But there is a bug in overriden DetailedDiff's int differenceFound() method. In this method the call for allDifferences.add(difference) should be made in case RETURN_ACCEPT_DIFFERENCE:. As of now it adds all the differences to the list and does not cares for the differnces which need to be ignored. Please look into the DetailedDiff's overriden differenceFound method, I guess it needs to be modified. Thanks! Tarun Arora Email: ta...@sa... ---------------------------------------------------------------------- >Comment By: Stefan Bodewig (bodewig) Date: 2007-08-14 09:28 Message: Logged In: YES user_id=113148 Originator: NO not a bug, see my last comment ---------------------------------------------------------------------- Comment By: Stefan Bodewig (bodewig) Date: 2007-08-10 14:50 Message: Logged In: YES user_id=113148 Originator: NO DetailedDiff's differenceFound does not add Differences that are marked as identical (there is a return in the switch, so the allDifferences.add line is never reached). If adds differences that have been downgraded to similar, and this is correct. If you want your differences to be ignored completely, return RETURN_IGNORE_DIFFERENCE_NODES_IDENTICAL from your DifferenceListener. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377768&aid=1771400&group_id=23187 |
From: SourceForge.net <no...@so...> - 2007-08-10 12:50:39
|
Bugs item #1771400, was opened at 2007-08-10 06:06 Message generated for change (Comment added) made by bodewig You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377768&aid=1771400&group_id=23187 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Interface (example) Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: IgnoreValuesDifferenceListener Initial Comment: I created a custom IgnoreValueDifferenceListener and overrided the same in Diff Class e.g. diff.overrideDifferenceListener(new IgnoreSomeValuesDifferenceListener()); But there is a bug in overriden DetailedDiff's int differenceFound() method. In this method the call for allDifferences.add(difference) should be made in case RETURN_ACCEPT_DIFFERENCE:. As of now it adds all the differences to the list and does not cares for the differnces which need to be ignored. Please look into the DetailedDiff's overriden differenceFound method, I guess it needs to be modified. Thanks! Tarun Arora Email: ta...@sa... ---------------------------------------------------------------------- >Comment By: Stefan Bodewig (bodewig) Date: 2007-08-10 14:50 Message: Logged In: YES user_id=113148 Originator: NO DetailedDiff's differenceFound does not add Differences that are marked as identical (there is a return in the switch, so the allDifferences.add line is never reached). If adds differences that have been downgraded to similar, and this is correct. If you want your differences to be ignored completely, return RETURN_IGNORE_DIFFERENCE_NODES_IDENTICAL from your DifferenceListener. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377768&aid=1771400&group_id=23187 |
From: <bo...@us...> - 2007-08-10 07:30:51
|
Revision: 229 http://xmlunit.svn.sourceforge.net/xmlunit/?rev=229&view=rev Author: bodewig Date: 2007-08-10 00:30:53 -0700 (Fri, 10 Aug 2007) Log Message: ----------- optionally ignore element content whitespace in MultiLevelElementNameAndTextQualifier Modified Paths: -------------- trunk/xmlunit/src/java/org/custommonkey/xmlunit/examples/MultiLevelElementNameAndTextQualifier.java trunk/xmlunit/src/user-guide/XMLUnit-Java.xml trunk/xmlunit/tests/java/org/custommonkey/xmlunit/examples/test_MultiLevelElementNameAndTextQualifier.java Modified: trunk/xmlunit/src/java/org/custommonkey/xmlunit/examples/MultiLevelElementNameAndTextQualifier.java =================================================================== --- trunk/xmlunit/src/java/org/custommonkey/xmlunit/examples/MultiLevelElementNameAndTextQualifier.java 2007-08-01 07:50:24 UTC (rev 228) +++ trunk/xmlunit/src/java/org/custommonkey/xmlunit/examples/MultiLevelElementNameAndTextQualifier.java 2007-08-10 07:30:53 UTC (rev 229) @@ -52,7 +52,7 @@ * ElementNameQualifier} and MultiLevelElementNameQualifier(1) should * lead to the same results.</p> * - * <p>Any attribute values ar completely ignored. Only works on + * <p>Any attribute values are completely ignored. Only works on * elements with exactly one child element at each level.</p> * * <p>This class mostly exists as an example for custom ElementQualifiers.</p> @@ -61,6 +61,7 @@ implements ElementQualifier { private final int levels; + private final boolean ignoreEmptyTexts; private static final ElementNameQualifier NAME_QUALIFIER = new ElementNameQualifier(); @@ -70,13 +71,28 @@ /** * Uses element names and the text nested <code>levels</code> * child elements deeper into the element to compare elements. + * + * <p>Does not ignore empty text nodes. */ public MultiLevelElementNameAndTextQualifier(int levels) { + this(levels, false); + } + + /** + * Uses element names and the text nested <code>levels</code> + * child elements deeper into the element to compare elements. + * + * @param ignoreEmptyTexts whether whitespace-only textnodes + * should be ignored. + */ + public MultiLevelElementNameAndTextQualifier(int levels, + boolean ignoreEmptyTexts) { if (levels < 1) { throw new IllegalArgumentException("levels must be equal or" + " greater than one"); } this.levels = levels; + this.ignoreEmptyTexts = ignoreEmptyTexts; } public boolean qualifyForComparison(Element control, Element test) { @@ -89,11 +105,12 @@ currentLevel++) { stillSimilar = NAME_QUALIFIER.qualifyForComparison(currentControl, currentTest); + if (stillSimilar) { if (currentControl.hasChildNodes() && currentTest.hasChildNodes()) { - Node n1 = currentControl.getFirstChild(); - Node n2 = currentTest.getFirstChild(); + Node n1 = getFirstEligibleChild(currentControl); + Node n2 = getFirstEligibleChild(currentTest); if (n1.getNodeType() == Node.ELEMENT_NODE && n2.getNodeType() == Node.ELEMENT_NODE) { currentControl = (Element) n1; @@ -115,5 +132,17 @@ return stillSimilar; } - + + private Node getFirstEligibleChild(Node parent) { + Node n1 = parent.getFirstChild(); + if (ignoreEmptyTexts) { + while (n1.getNodeType() == Node.TEXT_NODE + && n1.getNodeValue().trim().length() == 0) { + Node n2 = n1.getNextSibling(); + if (n2 == null) break; + n1 = n2; + } + } + return n1; + } } Modified: trunk/xmlunit/src/user-guide/XMLUnit-Java.xml =================================================================== --- trunk/xmlunit/src/user-guide/XMLUnit-Java.xml 2007-08-01 07:50:24 UTC (rev 228) +++ trunk/xmlunit/src/user-guide/XMLUnit-Java.xml 2007-08-10 07:30:53 UTC (rev 229) @@ -14,8 +14,6 @@ <firstname>Tim</firstname> <surname>Bacon</surname> </author> - </authorgroup> - <authorgroup> <author> <firstname>Stefan</firstname> <surname>Bodewig</surname> @@ -36,6 +34,11 @@ <date>April 2007</date> <revremark>Documentation for XMLUnit Java 1.1</revremark> </revision> + <revision> + <revnumber>1.2</revnumber> + <date>...</date> + <revremark>Documentation for XMLUnit Java 1.2</revremark> + </revision> </revhistory> </articleinfo> @@ -1911,6 +1914,21 @@ identical to <literal>ElementNameAndTextQualifier</literal>. In <xref linkend="htmltable"/> a value of 2 would be needed.</para> + + <para>By default + <literal>MultiLevelElementNameAndTextQualifier</literal> will + not ignore whitespace between the elements leading up to the + nested text. If your piece of XML contains this sort of + whitespace (like <xref linkend="htmltable"/> which contains a + newline and several space characters between + <literal><tr></literal> and + <literal><td></literal>) you can either instruct XMLUnit + to ignore whitespace completely (see + <xref linkend="Whitespace Handling"/>) or use the two-arg + constructor of + <literal>MultiLevelElementNameAndTextQualifier</literal> + introduced with XMLUnit 1.2 and set the + <literal>ignoreEmptyTexts</literal> argument to true.</para> </section> </section> @@ -3215,6 +3233,11 @@ </itemizedlist> </section> </section> + + <section id="Changes 1.2"> + <title>Changes from XMLUnit 1.1 to 1.2</title> + </section> + </appendix> </article> Modified: trunk/xmlunit/tests/java/org/custommonkey/xmlunit/examples/test_MultiLevelElementNameAndTextQualifier.java =================================================================== --- trunk/xmlunit/tests/java/org/custommonkey/xmlunit/examples/test_MultiLevelElementNameAndTextQualifier.java 2007-08-01 07:50:24 UTC (rev 228) +++ trunk/xmlunit/tests/java/org/custommonkey/xmlunit/examples/test_MultiLevelElementNameAndTextQualifier.java 2007-08-10 07:30:53 UTC (rev 229) @@ -140,7 +140,7 @@ } - public void XtestUserGuideExample() throws Exception { + public void testUserGuideExample() throws Exception { String control = "<table>\n" + " <tr>\n" @@ -162,16 +162,21 @@ Diff d = new Diff(control, test); d.overrideElementQualifier(new MultiLevelElementNameAndTextQualifier(2)); - //assertTrue(d.toString(), d.similar()); + assertFalse(d.toString(), d.similar()); - d = new Diff(control, test); - d.overrideElementQualifier(new MultiLevelElementNameAndTextQualifier(2)); try { XMLUnit.setIgnoreWhitespace(true); + d = new Diff(control, test); + d.overrideElementQualifier(new MultiLevelElementNameAndTextQualifier(2)); assertTrue(d.toString(), d.similar()); } finally { XMLUnit.setIgnoreWhitespace(false); } + + d = new Diff(control, test); + d.overrideElementQualifier(new MultiLevelElementNameAndTextQualifier(2, + true)); + assertTrue(d.toString(), d.similar()); } public void setUp() throws Exception { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: SourceForge.net <no...@so...> - 2007-08-10 04:06:27
|
Bugs item #1771400, was opened at 2007-08-09 21:06 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377768&aid=1771400&group_id=23187 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Interface (example) Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: IgnoreValuesDifferenceListener Initial Comment: I created a custom IgnoreValueDifferenceListener and overrided the same in Diff Class e.g. diff.overrideDifferenceListener(new IgnoreSomeValuesDifferenceListener()); But there is a bug in overriden DetailedDiff's int differenceFound() method. In this method the call for allDifferences.add(difference) should be made in case RETURN_ACCEPT_DIFFERENCE:. As of now it adds all the differences to the list and does not cares for the differnces which need to be ignored. Please look into the DetailedDiff's overriden differenceFound method, I guess it needs to be modified. Thanks! Tarun Arora Email: ta...@sa... ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377768&aid=1771400&group_id=23187 |
From: <bo...@us...> - 2007-08-01 07:50:23
|
Revision: 228 http://xmlunit.svn.sourceforge.net/xmlunit/?rev=228&view=rev Author: bodewig Date: 2007-08-01 00:50:24 -0700 (Wed, 01 Aug 2007) Log Message: ----------- show that forum thread 1775186 doesn't exhibit a bug Added Paths: ----------- trunk/xmlunit/tests/java/org/custommonkey/xmlunit/test_ForumMessage4406472.java Added: trunk/xmlunit/tests/java/org/custommonkey/xmlunit/test_ForumMessage4406472.java =================================================================== --- trunk/xmlunit/tests/java/org/custommonkey/xmlunit/test_ForumMessage4406472.java (rev 0) +++ trunk/xmlunit/tests/java/org/custommonkey/xmlunit/test_ForumMessage4406472.java 2007-08-01 07:50:24 UTC (rev 228) @@ -0,0 +1,121 @@ +/* +****************************************************************** +Copyright (c) 2007, Jeff Martin, Tim Bacon +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of the xmlunit.sourceforge.net nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +****************************************************************** +*/ + +package org.custommonkey.xmlunit; + +import java.util.Arrays; +import junit.framework.TestCase; +import org.w3c.dom.Node; + +/** + * @see http://sf.net/forum/message.php?msg_id=4406472 + */ +public class test_ForumMessage4406472 extends TestCase { + + private static final String doc1 = + "<pub:Book xmlns:pub=\"http://www.publishing.org\" date=\"2007-01-01\">" + + " <pub:Title>String</pub:Title>" + + " <pub:Author>String</pub:Author>" + + " <pub:ISBN>String</pub:ISBN>" + + " <pub:Publisher>String</pub:Publisher>" + + " <pub:Price>34.50</pub:Price>" + + "</pub:Book>"; + + private static final String doc2 = + "<p:Book xmlns:p=\"http://www.publishing.org\" date=\"1900-01-01\">" + + " <p:Title>Bla</p:Title>" + + " <p:Author>Bla</p:Author>" + + " <p:ISBN>Bla</p:ISBN>" + + " <p:Publisher>Bla</p:Publisher>" + + " <p:Price>0.00</p:Price>" + + "</p:Book>"; + + private class OriginalDifferenceListener implements DifferenceListener { + private int[] IGNORE = new int[] { + DifferenceConstants.ATTR_VALUE_ID, + DifferenceConstants.ATTR_VALUE_EXPLICITLY_SPECIFIED_ID, + DifferenceConstants.TEXT_VALUE_ID, + DifferenceConstants.NAMESPACE_PREFIX_ID, + DifferenceConstants.NAMESPACE_URI_ID + }; + + public int differenceFound(Difference difference) { + Arrays.sort(IGNORE); + return Arrays.binarySearch(IGNORE, difference.getId()) >= 0 + ? RETURN_IGNORE_DIFFERENCE_NODES_IDENTICAL + : RETURN_ACCEPT_DIFFERENCE; + } + + public void skippedComparison(Node control, Node test) { + } + } + + private class ModifiedDifferenceListener implements DifferenceListener { + private int[] IGNORE = new int[] { + DifferenceConstants.ATTR_VALUE_ID, + DifferenceConstants.ATTR_VALUE_EXPLICITLY_SPECIFIED_ID, + DifferenceConstants.TEXT_VALUE_ID, + DifferenceConstants.NAMESPACE_PREFIX_ID, + }; + + private ModifiedDifferenceListener() { + Arrays.sort(IGNORE); + } + + public int differenceFound(Difference difference) { + return Arrays.binarySearch(IGNORE, difference.getId()) >= 0 + ? RETURN_IGNORE_DIFFERENCE_NODES_IDENTICAL + : difference.isRecoverable() + ? RETURN_IGNORE_DIFFERENCE_NODES_SIMILAR + : RETURN_ACCEPT_DIFFERENCE; + } + + public void skippedComparison(Node control, Node test) { + } + } + + public void testOriginal() throws Exception { + Diff d = new Diff(doc1, doc2); + d.overrideDifferenceListener(new OriginalDifferenceListener()); + assertTrue(d.toString(), d.similar()); + } + + public void testModified() throws Exception { + Diff d = new Diff(doc1, doc2); + d.overrideDifferenceListener(new ModifiedDifferenceListener()); + assertTrue(d.toString(), d.similar()); + } +} \ No newline at end of file Property changes on: trunk/xmlunit/tests/java/org/custommonkey/xmlunit/test_ForumMessage4406472.java ___________________________________________________________________ Name: svn:executable + * Name: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bo...@us...> - 2007-08-01 04:38:44
|
Revision: 227 http://xmlunit.svn.sourceforge.net/xmlunit/?rev=227&view=rev Author: bodewig Date: 2007-07-31 21:38:47 -0700 (Tue, 31 Jul 2007) Log Message: ----------- turn user guide example into a real testcase Modified Paths: -------------- trunk/xmlunit/tests/java/org/custommonkey/xmlunit/examples/test_MultiLevelElementNameAndTextQualifier.java Modified: trunk/xmlunit/tests/java/org/custommonkey/xmlunit/examples/test_MultiLevelElementNameAndTextQualifier.java =================================================================== --- trunk/xmlunit/tests/java/org/custommonkey/xmlunit/examples/test_MultiLevelElementNameAndTextQualifier.java 2007-08-01 04:21:16 UTC (rev 226) +++ trunk/xmlunit/tests/java/org/custommonkey/xmlunit/examples/test_MultiLevelElementNameAndTextQualifier.java 2007-08-01 04:38:47 UTC (rev 227) @@ -1,6 +1,6 @@ /* ****************************************************************** -Copyright (c) 2001, Jeff Martin, Tim Bacon +Copyright (c) 2007, Jeff Martin, Tim Bacon All rights reserved. Redistribution and use in source and binary forms, with or without @@ -140,6 +140,40 @@ } + public void XtestUserGuideExample() throws Exception { + String control = + "<table>\n" + + " <tr>\n" + + " <td>foo</td>\n" + + " </tr>\n" + + " <tr>\n" + + " <td>bar</td>\n" + + " </tr>\n" + + "</table>\n"; + String test = + "<table>\n" + + " <tr>\n" + + " <td>bar</td>\n" + + " </tr>\n" + + " <tr>\n" + + " <td>foo</td>\n" + + " </tr>\n" + + "</table>\n"; + + Diff d = new Diff(control, test); + d.overrideElementQualifier(new MultiLevelElementNameAndTextQualifier(2)); + //assertTrue(d.toString(), d.similar()); + + d = new Diff(control, test); + d.overrideElementQualifier(new MultiLevelElementNameAndTextQualifier(2)); + try { + XMLUnit.setIgnoreWhitespace(true); + assertTrue(d.toString(), d.similar()); + } finally { + XMLUnit.setIgnoreWhitespace(false); + } + } + public void setUp() throws Exception { document = XMLUnit.newControlParser().newDocument(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bo...@us...> - 2007-08-01 04:21:14
|
Revision: 226 http://xmlunit.svn.sourceforge.net/xmlunit/?rev=226&view=rev Author: bodewig Date: 2007-07-31 21:21:16 -0700 (Tue, 31 Jul 2007) Log Message: ----------- oops, re-add instructions Modified Paths: -------------- trunk/xmlunit/KEYS Modified: trunk/xmlunit/KEYS =================================================================== --- trunk/xmlunit/KEYS 2007-08-01 04:15:38 UTC (rev 225) +++ trunk/xmlunit/KEYS 2007-08-01 04:21:16 UTC (rev 226) @@ -1,3 +1,14 @@ +This file contains the PGP keys of various developers. + +Users: pgp < KEYS + gpg --import KEYS +Developers: + pgp -kxa <your name> and append it to this file. + (pgpk -ll <your name> && pgpk -xa <your name>) >> this file. + (gpg --list-sigs <your name> + && gpg --armor --export <your name>) >> this file. + + pub 1024D/5F6B8B72 2001-05-28 uid Stefan Bodewig <bo...@ap...> sig 3 5F6B8B72 2001-05-28 Stefan Bodewig <bo...@ap...> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |