cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <>
Subject Re: ant echo problem in cocoon tutorial
Date Sun, 21 Aug 2005 09:44:27 GMT
On 21.08.2005 07:02, Ron Wheeler wrote:

> is the URL 
> of the tutorial that I am trying to follow.
> The file that is part of the tutorial does not have CDATA in it and I 
> assume that the author has tested it
> That is why I suspect that there must be another setting required to 
> make this work properly.

No, that's not possible. It's nothing about Cocoon or Ant, it's pure 
XML. And with XML the processing instruction <?xml?> can oly occur on 
the very beginning. That's what the error message is saying:

>>> The processing instruction target matching "[xX][mM][lL]" is not allowed.
>>> when I execute a small test file consisting of:
>>> <project>
>>> <echo>This is a test</echo>
>>> <echo file="test.out">
>>>        <?xml version="1.0"?>
>>> </echo>
>>> </project>
>>> What has to be done to make echo ignore the contents of what is being 
>>> echoed.
>> Er, wrap it in CDATA tags?
>> <![CDATA[<?xml version="1.0"?>]]>

This is absolutely correct. Another possibility than escaping the whole 
string is to escape just the '<':    &lt;?xml version="1.0"?>
Choose yourself what's more readable.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message