ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lopez, William" <william.lo...@eds.com>
Subject RE: ampersand character, <cvstagdiff>, <style>, tagdiff.xml
Date Tue, 05 Aug 2003 23:11:02 GMT
...try <name>flub/Apples&amp;Oranges/foobar.xls</name>

FYI...
The XML specification predefines five internal entities:

&lt; produces the left angle bracket, < 
&gt; produces the right angle bracket, > 
&amp; produces the ampersand, & 
&apos; produces a single quote character (an apostrophe), ' 
&quot; produces a double quote character, " 

-----Original Message-----
From: Sullivan, Sean C - MWT [mailto:Sullivan.Sean@menlolog.com] 
Sent: Tuesday, August 05, 2003 6:04 PM
To: Ant Users List
Subject: ampersand character, <cvstagdiff>, <style>, tagdiff.xml



I am using Ant 1.5.3

My script uses <cvstagdiff> and <style>

########################################

<cvstagdiff cvsRoot="${cvs.root}"
			cvsRsh="${cvs.rsh}"
	
destfile="${tagdiff.current.and.previous.basename}.xml"
			package="${cvs.tagdiff.module}"
			startTag="${tagdiff.previous.tag}"
			endTag="${tagdiff.current.tag}"/>
<style in="${tagdiff.current.and.previous.basename}.xml"
			out="${tagdiff.current.and.previous.basename}.html"
			style="${ant.home}/etc/tagdiff.xsl">
			<param name="title" expression="CVS tagdiff
report"/>
			<param name="module"
expression="${cvs.tagdiff.module}"/>
			<param name="cvsweb" expression="${cvsweb.url}"/>
</style>

########################################


The <style> task fails with this error:

{{
    [style] Loading stylesheet C:\apache-ant-1.5.3\etc\tagdiff.xsl
    [style] : Fatal Error! org.xml.sax.SAXParseException: The reference to
entit y "DDispositionMetrics" must end with the ';' delimiter. Cause:
org.xml.sax.SAXP
arseException: The reference to entity "DDispositionMetrics" must end with
the ' ;' delimiter.
    [style] Failed to process
C:\build\apps\build\tagdiff----internet_2003_08_05
_ant_test4----and----prod_internet_2003_08_01.xml

BUILD FAILED
file:C:/build/apps/build/build.xml:163: Fatal error during transformation

}}


Upon closer inspection, the <style> task is choking when it encounters 
the ampersand character in the tagdiff.xml file:

	<entry>
		<file>
			<name>flub/Apples&Oranges/foobar.xls</name>
		</file>
	</entry>


It appears that the <cvstagdiff> task does not escape the 
ampersand charater.


-Sean


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message