You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Ron Wheeler <rw...@artifact-software.com> on 2005/08/20 21:20:24 UTC
ant echo problem in cocoon tutorial
The /build-cocoon-targets.xml/
<http://cocoon.zones.apache.org/daisy/cocooninaction/17.html> file halts
with an error at line 325 when I try to run it
I get the same error mesage
C:\eclipse\workspace\Cocoon Tutorial\build-testecho.xml:4: The
processing instru
ction 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.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: ant echo problem in cocoon tutorial
Posted by Joerg Heinicke <jo...@gmx.de>.
On 21.08.2005 21:07, Ron Wheeler wrote:
> The light just came on.
> When I clicked on the link to the file, Firefox opened it in browser
> window and I just copied and pasted it. Probably Firefox removed the CDATA.
>
> How should I have picked up the file?
Right click and "Save link target as ...".
Firefox did not remove CDATA, but it processed the file with an internal
stylesheet for displaying it. The behaviour you see ("removed" CDATA) is
absolutely correct and standard XML.
Joerg
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: ant echo problem in cocoon tutorial
Posted by Ron Wheeler <rw...@artifact-software.com>.
The light just came on.
When I clicked on the link to the file, Firefox opened it in browser
window and I just copied and pasted it. Probably Firefox removed the CDATA.
How should I have picked up the file?
Thanks
Ron.
Joerg Heinicke wrote:
> On 21.08.2005 07:02, Ron Wheeler wrote:
>
>> I am reluctant to start correcting a tutorial when I am just starting
>> out using Cocoon.
>
>
> I guess you viewed the file at
> http://cocoon.zones.apache.org/daisy/cocooninaction/17/version/1/part/4/data/build-cocoon-targets.xml?branch=main&language=default
> with your browser and it shows no CDATA? You have a look into the
> source of this file and you will find it.
>
> Joerg
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: ant echo problem in cocoon tutorial
Posted by Joerg Heinicke <jo...@gmx.de>.
On 21.08.2005 07:02, Ron Wheeler wrote:
> I am reluctant to start correcting a tutorial when I am just starting
> out using Cocoon.
I guess you viewed the file at
http://cocoon.zones.apache.org/daisy/cocooninaction/17/version/1/part/4/data/build-cocoon-targets.xml?branch=main&language=default
with your browser and it shows no CDATA? You have a look into the source
of this file and you will find it.
Joerg
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: ant echo problem in cocoon tutorial
Posted by Joerg Heinicke <jo...@gmx.de>.
On 21.08.2005 07:02, Ron Wheeler wrote:
> http://cocoon.zones.apache.org/daisy/cocooninaction/14.html 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 '<': <?xml version="1.0"?>
Choose yourself what's more readable.
Joerg
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: ant echo problem in cocoon tutorial
Posted by Ron Wheeler <rw...@artifact-software.com>.
http://cocoon.zones.apache.org/daisy/cocooninaction/14.html 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.
I am reluctant to start correcting a tutorial when I am just starting
out using Cocoon.
I have gone backto working with another tutorial until this gets resolved.
Ron
Upayavira wrote:
> Ron Wheeler wrote:
>
>> The /build-cocoon-targets.xml/
>> <http://cocoon.zones.apache.org/daisy/cocooninaction/17.html> file
>> halts with an error at line 325 when I try to run it
>>
>>
>> I get the same error mesage
>>
>> C:\eclipse\workspace\Cocoon Tutorial\build-testecho.xml:4: The
>> processing instru
>> ction 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"?>
> ]]>
>
> Make sure nothing comes before <?. Must be first char in file.
>
> Dunno if that would do it. But then, I'm not sure if I really
> understand what you're trying to do, as I don't know the tutorial
> you're talking about :-(
>
> Upayavira
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: ant echo problem in cocoon tutorial
Posted by Upayavira <uv...@odoko.co.uk>.
Ron Wheeler wrote:
> The /build-cocoon-targets.xml/
> <http://cocoon.zones.apache.org/daisy/cocooninaction/17.html> file halts
> with an error at line 325 when I try to run it
>
>
> I get the same error mesage
>
> C:\eclipse\workspace\Cocoon Tutorial\build-testecho.xml:4: The
> processing instru
> ction 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"?>
]]>
Make sure nothing comes before <?. Must be first char in file.
Dunno if that would do it. But then, I'm not sure if I really understand
what you're trying to do, as I don't know the tutorial you're talking
about :-(
Upayavira
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: ant echo problem in cocoon tutorial
Posted by Ron Wheeler <rw...@artifact-software.com>.
Itwasthe download instructions that need to be modified. If you just
click on te link the browser strips the CDATA. IThe instructions should
say to "Save target as..."
Ron
Steve Loughran wrote:
> Ron Wheeler wrote:
>
>> I added the CDATA and it worked, of course. I still wonder how the
>> person who wrote the tutorial made it work.
>>
>
>
> Presumably, they didnt.
>
> ---------------------------------------------------------------------
> 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
Re: ant echo problem in cocoon tutorial
Posted by Steve Loughran <st...@apache.org>.
Ron Wheeler wrote:
> I added the CDATA and it worked, of course. I still wonder how the
> person who wrote the tutorial made it work.
>
Presumably, they didnt.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: ant echo problem in cocoon tutorial
Posted by Steve Loughran <st...@apache.org>.
Ron Wheeler wrote:
> 1.6.5 did not recognize <echoxml>.
sorry, my mistake. I meant to say "ant1.7".
just stick with CData; I use it to do things like chuck out maven files
from a build:
<echo file="${target.pom}"><![CDATA[<project>
<modelVersion>4.0.0</modelVersion>
<groupId>${m2.groupID}</groupId>
<artifactId>${artifact.name}</artifactId>
<packaging>jar</packaging>
<version>${Version}</version>
</project>
]]></echo>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: ant echo problem in cocoon tutorial
Posted by Ron Wheeler <rw...@artifact-software.com>.
1.6.5 did not recognize <echoxml>.
Ron
Steve Loughran wrote:
> Ron Wheeler wrote:
>
>> I added the CDATA and it worked, of course. I still wonder how the
>> person who wrote the tutorial made it work.
>>
>
> Actually, ant may have changed its processing instruction handling at
> some point from "ignore" to "reject". Either way, it was broken from
> the start, as the PI was there to tell the ant runtime something.
>
> In ant, 1.6, <echoxml> explicitly pumps out XML to a file; but even
> that doesnt handle inline processing instructions.
>
> <echoxml file="subbuild.xml">
> <project default="foo">
> <target name="foo">
> <echo>foo</echo>
> </target>
> </project>
> </echoxml>
>
> ---------------------------------------------------------------------
> 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
Re: ant echo problem in cocoon tutorial
Posted by Steve Loughran <st...@apache.org>.
Ron Wheeler wrote:
> I added the CDATA and it worked, of course. I still wonder how the
> person who wrote the tutorial made it work.
>
Actually, ant may have changed its processing instruction handling at
some point from "ignore" to "reject". Either way, it was broken from the
start, as the PI was there to tell the ant runtime something.
In ant, 1.6, <echoxml> explicitly pumps out XML to a file; but even that
doesnt handle inline processing instructions.
<echoxml file="subbuild.xml">
<project default="foo">
<target name="foo">
<echo>foo</echo>
</target>
</project>
</echoxml>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: ant echo problem in cocoon tutorial
Posted by Ron Wheeler <rw...@artifact-software.com>.
No it was the way that I picked up the file.
I cutand pasted it from the browser and the browser had already stripped
the CDATA.
The procedure should likely be modified to describe how to get the file
more accurately
I am now stuck at the next step where the initial Ant build fails saying
that Cocoon is not installed.
Ron
Stephen McConnell wrote:
>
>
>
>
>>-----Original Message-----
>>From: Ron Wheeler [mailto:rwheeler@artifact-software.com]
>>Sent: Monday, 22 August 2005 3:14 AM
>>To: Ant Users List
>>Subject: Re: ant echo problem in cocoon tutorial
>>
>>I added the CDATA and it worked, of course. I still wonder
>>how the person who wrote the tutorial made it work.
>>
>>
>
>I'm guessing that the content was never tested.
>
>/Steve.
>
>
>
>
>
>>Ron
>>
>>
>>Ron Wheeler wrote:
>>
>>
>>
>>>Is ther any higher level Ant setting that does thios automatically.
>>>The script is written by the person providing a cocoon
>>>
>>>
>>tutorial on the
>>
>>
>>>apache web site. THis makes me a bit reluctant to change the script
>>>since I assume that he has tested it and the fault must be
>>>
>>>
>>in my setup
>>
>>
>>>rather than the script.
>>>
>>>Ron
>>>
>>>Stephen McConnell wrote:
>>>
>>>
>>>
>>>>
>>>>
>>>>
>>>>
>>>>>What has to be done to make echo ignore the contents of what is
>>>>>being echoed.
>>>>>
>>>>>
>>>>>
>>>><echo file="test.out">
>>>> <![CDATA[
>>>> <?xml version="1.0"?>
>>>> ]]>
>>>></echo>
>>>>
>>>>/Steve.
>>>>
>>>>http://www.dpml.net
>>>>
>>>>
>>>>
>>>>
>>>>
>>---------------------------------------------------------------------
>>
>>
>>>>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
>>>
>>>
>>>
>>>
>>>
>>---------------------------------------------------------------------
>>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
>
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
RE: ant echo problem in cocoon tutorial
Posted by Stephen McConnell <mc...@dpml.net>.
> -----Original Message-----
> From: Ron Wheeler [mailto:rwheeler@artifact-software.com]
> Sent: Monday, 22 August 2005 3:14 AM
> To: Ant Users List
> Subject: Re: ant echo problem in cocoon tutorial
>
> I added the CDATA and it worked, of course. I still wonder
> how the person who wrote the tutorial made it work.
I'm guessing that the content was never tested.
/Steve.
>
> Ron
>
>
> Ron Wheeler wrote:
>
> > Is ther any higher level Ant setting that does thios automatically.
> > The script is written by the person providing a cocoon
> tutorial on the
> > apache web site. THis makes me a bit reluctant to change the script
> > since I assume that he has tested it and the fault must be
> in my setup
> > rather than the script.
> >
> > Ron
> >
> > Stephen McConnell wrote:
> >
> >>
> >>
> >>
> >>> What has to be done to make echo ignore the contents of what is
> >>> being echoed.
> >>>
> >>
> >>
> >> <echo file="test.out">
> >> <![CDATA[
> >> <?xml version="1.0"?>
> >> ]]>
> >> </echo>
> >>
> >> /Steve.
> >>
> >> http://www.dpml.net
> >>
> >>
> >>
> ---------------------------------------------------------------------
> >> 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
> >
> >
> >
>
> ---------------------------------------------------------------------
> 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
Re: ant echo problem in cocoon tutorial
Posted by Ron Wheeler <rw...@artifact-software.com>.
I added the CDATA and it worked, of course. I still wonder how the
person who wrote the tutorial made it work.
Ron
Ron Wheeler wrote:
> Is ther any higher level Ant setting that does thios automatically.
> The script is written by the person providing a cocoon tutorial on the
> apache web site. THis makes me a bit reluctant to change the script
> since I assume that he has tested it and the fault must be in my setup
> rather than the script.
>
> Ron
>
> Stephen McConnell wrote:
>
>>
>>
>>
>>> What has to be done to make echo ignore the contents of what is
>>> being echoed.
>>>
>>
>>
>> <echo file="test.out">
>> <![CDATA[
>> <?xml version="1.0"?>
>> ]]>
>> </echo>
>>
>> /Steve.
>>
>> http://www.dpml.net
>>
>>
>> ---------------------------------------------------------------------
>> 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
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: ant echo problem in cocoon tutorial
Posted by Ron Wheeler <rw...@artifact-software.com>.
Is ther any higher level Ant setting that does thios automatically.
The script is written by the person providing a cocoon tutorial on the
apache web site. THis makes me a bit reluctant to change the script
since I assume that he has tested it and the fault must be in my setup
rather than the script.
Ron
Stephen McConnell wrote:
>
>
>
>>What has to be done to make echo ignore the contents of what
>>is being echoed.
>>
>>
>
><echo file="test.out">
> <![CDATA[
> <?xml version="1.0"?>
> ]]>
></echo>
>
>/Steve.
>
>http://www.dpml.net
>
>
>---------------------------------------------------------------------
>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
RE: ant echo problem in cocoon tutorial
Posted by Stephen McConnell <mc...@dpml.net>.
> What has to be done to make echo ignore the contents of what
> is being echoed.
<echo file="test.out">
<![CDATA[
<?xml version="1.0"?>
]]>
</echo>
/Steve.
http://www.dpml.net
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org