jstrachan 2002/11/08 10:35:06 Modified: jelly/src/test/org/apache/commons/jelly/junit suite.jelly Log: enhanced test case to demonstrate that XPath should not find elements in a document with a namespace URI but no prefix - unless the XPath expression has a prefix. This is a very common XPath gotcha. Revision Changes Path 1.5 +5 -1 jakarta-commons-sandbox/jelly/src/test/org/apache/commons/jelly/junit/suite.jelly Index: suite.jelly =================================================================== RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/test/org/apache/commons/jelly/junit/suite.jelly,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- suite.jelly 8 Nov 2002 18:27:52 -0000 1.4 +++ suite.jelly 8 Nov 2002 18:35:06 -0000 1.5 @@ -54,7 +54,11 @@ <test:assert test="${ex != null}">We should have created an exception</test:assert> - The exception was: ${ex.message} + <j:catch var="ex"> + <test:assert xpath="$doc/foo/bar">This should always fail, since foo is not in the empty namespace</test:assert> + </j:catch> + + <test:assert test="${ex != null}">We should have created an exception</test:assert> </test:case>
-- To unsubscribe, e-mail: <mailto:commons-dev-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:commons-dev-help@;jakarta.apache.org>