You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Wannheden, Knut" <kn...@paranor.ch> on 2002/11/26 16:49:37 UTC

[PATCH] [jelly] xmlunit tag library

Hi,

This is an initial contribution of the XMLUnit tag library to the Jelly
project.  The purpose of the tag library is to make the XMLUnit
(http://xmlunit.sourceforge.net/) functionality available to Jelly.  In this
initial version there is only a <xu:assertDocumentsEqual/> tag which can be
used to compare two XML documents.

The attached ZIP file contains all the sources and test cases for the tag
library.  As I don't know for sure where in the project tree it will go, I
didn't provide it as a diff.

Some notes:

- To use the tag library the XMLUnit Jar has to be on the classpath
(download at
http://sourceforge.net/project/showfiles.php?group_id=23187&release_id=11210
8).
- The namespace URI of the XMLUnit tag library is currently hardcoded (as a
FQCN) in the suite.jelly test suite.
- The <xu:assertDocumentsEqual/> supports a "ignoreWhitespace" attribute
which defaults to false.  The reason is that "trim" defaults to true in
which case the value of "ignoreWhitespace" doesn't make any difference.
- The class XMLUnitTagSupport is basically a mix of the XML tag library
ParseTagSupport class and the JUnit tag library AssertTagSupport classes.
The resulting code duplication should probably be avoided somehow.

Cheers,

--
knut


Re: [PATCH] [jelly] xmlunit tag library

Posted by James Strachan <ja...@yahoo.co.uk>.
[PATCH] [jelly] xmlunit tag libraryThanks for this excellent patch Knut.
I've committed it into CVS now.

James
-------
http://radio.weblogs.com/0112098/
----- Original Message -----
From: Wannheden, Knut
To: 'commons-dev@jakarta.apache.org'
Sent: Tuesday, November 26, 2002 3:49 PM
Subject: [PATCH] [jelly] xmlunit tag library


Hi,
This is an initial contribution of the XMLUnit tag library to the Jelly
project.  The purpose of the tag library is to make the XMLUnit
(http://xmlunit.sourceforge.net/) functionality available to Jelly.  In this
initial version there is only a <xu:assertDocumentsEqual/> tag which can be
used to compare two XML documents.
The attached ZIP file contains all the sources and test cases for the tag
library.  As I don't know for sure where in the project tree it will go, I
didn't provide it as a diff.
Some notes:
- To use the tag library the XMLUnit Jar has to be on the classpath
(download at
http://sourceforge.net/project/showfiles.php?group_id=23187&release_id=11210
8).
- The namespace URI of the XMLUnit tag library is currently hardcoded (as a
FQCN) in the suite.jelly test suite.
- The <xu:assertDocumentsEqual/> supports a "ignoreWhitespace" attribute
which defaults to false.  The reason is that "trim" defaults to true in
which case the value of "ignoreWhitespace" doesn't make any difference.
- The class XMLUnitTagSupport is basically a mix of the XML tag library
ParseTagSupport class and the JUnit tag library AssertTagSupport classes.
The resulting code duplication should probably be avoided somehow.
Cheers,
--
knut




--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>