ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Ayers" <may...@NEVIKNETWORKS.com>
Subject RE: junit behavior in ant 1.5 vs 1.3
Date Fri, 21 Feb 2003 18:01:41 GMT

> From: Manish Khettry [mailto:mkhettry@bdnacorp.com]
> Sent: Friday, February 21, 2003 9:40 AM

> In response to the XML output-- what if the XML output of the test
> itself contains a CDATA section? We keep getting parse exceptions from
> the junitreport task.

	Then you're hosed, my friend.  You can put anything into CDATA... *except* the CDATA termination
sequence, which you will get when embedding CDATA.

	To be absolutely clear...

	Manish's test produces XML output, including CDATA:

<tag>
   <otherTag><![CDATA[blah
blah
blah
blah
]]>
   </otherTag>
</tag>


	Now JUnit wraps all the output into a CDATA tag:

  <system-out><![CDATA[<tag>
   <otherTag><![CDATA[blah
blah
blah
blah
]]>
   </otherTag>
</tag>
]]>

	...which results in CDATA ending mismatch:

  <system-out><![CDATA[<tag> <------------+
   <otherTag><![CDATA[blah   <---ignored  |
blah                                      |
blah                                    match
blah                                      |
]]>             <-------------------------+
   </otherTag>  <---error: tag was never started
</tag>          <---error: tag was never started
]]>             <---error: CDATA was never started


	This is a structural issue of XML, and there is no workaround except to preprocess the wrapped
file (and that has issues of its own...).


/|/|ike

Mime
View raw message