You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Lucas Albers <sm...@hotmail.com> on 2008/10/22 20:06:27 UTC

create property value that has metacharacter by escaping meta characters.

I would like to refer to a url link that has meta-characters in it.

How would I use CDATA or similar to comment out the meta-characters?

 

This is an example of the property value I wish to use.

 

What is the sample syntax to do this?

<![CDATA[http://cvsweb/cgi-bin/cvs/cvshistorycvsroot=blah&dsearch=rnt&dsearc
hsub=on&limit=1&revsel1=na&revsel2=na&datesel1=na&datesel2=na&selop=in&opT=o
n&opM=on&opA=on&opR=on&rss=1]]>

 

I cannot find any sample syntax's to comment out meta-characters in property
values.

 

 


RE: create property value that has metacharacter by escaping meta characters.

Posted by Brian Agnew <br...@oopsconsultancy.com>.
Hi Lucas,

You can do this using XMLTask

e.g. load the property from a file and insert it.

<!-- load an example property called link.to.insert -->
<property file="source.properties"/>

<!-- insert using XMLTask -->
<xmltask source="file.xml" dest="newfile.xml">
   <replace path="xpath to the text node" withText="${link.to.insert}"/>
</xmltask>

http://www.oopsconsultancy.com/software/xmltask

Brian

On Thu, October 23, 2008 13:41, Scot P. Floess wrote:
>
> You will need to use escape characters - for example:
> - greater than character = &gt;
> - ampersand = &amp;
> - quote = &quote;
>
> So, something like
>
> http://cvsweb/cgi-bin/cvs/cvshistorycvsroot=blah&amp;dsearch=rnt&amp;dsearchsub=on&amp;limit=1&amp;
>
> and so on...
>
> Basically, this is an XML document so you need to adhere to the rules of
> XML.
>
> I googled and found this for escape characters:
> http://www.theukwebdesigncompany.com/articles/entity-escape-characters.php
>
> There may be some other built-in mechansim I am unaware of that will do
> the escaping for you automagically.
>
> On Wed, 22 Oct 2008, Lucas Albers wrote:
>
>> I wish to have a property value that contains this:
>> "http://cvsweb/cgi-bin/cvs/cvshistorycvsroot=blah&dsearch=rnt&dsearc
>> hsub=on&limit=1&revsel1=na&revsel2=na&datesel1=na&datesel2=na&selop=in&opT=o
>> n&opM=on&opA=on&opR=on&rss=1"
>>
>> ant complains about the meta-characters inside it.
>>
>> I am trying to check a cvsweb website with funky metacharacters in the
>> address.
>>
>>
>> -----Original Message-----
>> From: Scot P. Floess [mailto:floess@mindspring.com]
>> Sent: Wednesday, October 22, 2008 2:10 PM
>> To: Ant Users List
>> Subject: Re: create property value that has metacharacter by escaping
>> meta
>> characters.
>>
>>
>> Do you mean escape the meta-characters?  Or do you want the actual
>> characters to be contained in the property itself?
>>
>>
>> On Wed, 22 Oct 2008, Lucas Albers wrote:
>>
>>> I would like to refer to a url link that has meta-characters in it.
>>>
>>> How would I use CDATA or similar to comment out the meta-characters?
>>>
>>>
>>>
>>> This is an example of the property value I wish to use.
>>>
>>>
>>>
>>> What is the sample syntax to do this?
>>>
>>>
>> <![CDATA[http://cvsweb/cgi-bin/cvs/cvshistorycvsroot=blah&dsearch=rnt&dsearc
>>>
>> hsub=on&limit=1&revsel1=na&revsel2=na&datesel1=na&datesel2=na&selop=in&opT=o
>>> n&opM=on&opA=on&opR=on&rss=1]]>
>>>
>>>
>>>
>>> I cannot find any sample syntax's to comment out meta-characters in
>> property
>>> values.
>>>
>>>
>>>
>>>
>>>
>>>
>>
>> Scot P. Floess
>> 27 Lake Royale
>> Louisburg, NC  27549
>>
>> 252-478-8087 (Home)
>> 919-754-4592 (Work)
>>
>> Chief Architect JPlate   http://sourceforge.net/projects/jplate
>> Chief Architect JavaPIM  http://sourceforge.net/projects/javapim
>>
>> Architect Keros          http://sourceforge.net/projects/keros
>>
>> ---------------------------------------------------------------------
>> 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
>>
>>
>
> Scot P. Floess
> 27 Lake Royale
> Louisburg, NC  27549
>
> 252-478-8087 (Home)
> 919-754-4592 (Work)
>
> Chief Architect JPlate   http://sourceforge.net/projects/jplate
> Chief Architect JavaPIM  http://sourceforge.net/projects/javapim
>
> Architect Keros          http://sourceforge.net/projects/keros
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>


-- 
Brian Agnew                  http://www.oopsconsultancy.com
OOPS Consultancy Ltd
Tel: +44 (0)7720 397526
Fax: +44 (0)20 8682 0012


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


RE: create property value that has metacharacter by escaping meta characters.

Posted by "Scot P. Floess" <fl...@mindspring.com>.
You will need to use escape characters - for example:
- greater than character = &gt;
- ampersand = &amp;
- quote = &quote;

So, something like

http://cvsweb/cgi-bin/cvs/cvshistorycvsroot=blah&amp;dsearch=rnt&amp;dsearchsub=on&amp;limit=1&amp;

and so on...

Basically, this is an XML document so you need to adhere to the rules of 
XML.

I googled and found this for escape characters: 
http://www.theukwebdesigncompany.com/articles/entity-escape-characters.php

There may be some other built-in mechansim I am unaware of that will do 
the escaping for you automagically.

On Wed, 22 Oct 2008, Lucas Albers wrote:

> I wish to have a property value that contains this:
> "http://cvsweb/cgi-bin/cvs/cvshistorycvsroot=blah&dsearch=rnt&dsearc
> hsub=on&limit=1&revsel1=na&revsel2=na&datesel1=na&datesel2=na&selop=in&opT=o
> n&opM=on&opA=on&opR=on&rss=1"
>
> ant complains about the meta-characters inside it.
>
> I am trying to check a cvsweb website with funky metacharacters in the
> address.
>
>
> -----Original Message-----
> From: Scot P. Floess [mailto:floess@mindspring.com]
> Sent: Wednesday, October 22, 2008 2:10 PM
> To: Ant Users List
> Subject: Re: create property value that has metacharacter by escaping meta
> characters.
>
>
> Do you mean escape the meta-characters?  Or do you want the actual
> characters to be contained in the property itself?
>
>
> On Wed, 22 Oct 2008, Lucas Albers wrote:
>
>> I would like to refer to a url link that has meta-characters in it.
>>
>> How would I use CDATA or similar to comment out the meta-characters?
>>
>>
>>
>> This is an example of the property value I wish to use.
>>
>>
>>
>> What is the sample syntax to do this?
>>
>>
> <![CDATA[http://cvsweb/cgi-bin/cvs/cvshistorycvsroot=blah&dsearch=rnt&dsearc
>>
> hsub=on&limit=1&revsel1=na&revsel2=na&datesel1=na&datesel2=na&selop=in&opT=o
>> n&opM=on&opA=on&opR=on&rss=1]]>
>>
>>
>>
>> I cannot find any sample syntax's to comment out meta-characters in
> property
>> values.
>>
>>
>>
>>
>>
>>
>
> Scot P. Floess
> 27 Lake Royale
> Louisburg, NC  27549
>
> 252-478-8087 (Home)
> 919-754-4592 (Work)
>
> Chief Architect JPlate   http://sourceforge.net/projects/jplate
> Chief Architect JavaPIM  http://sourceforge.net/projects/javapim
>
> Architect Keros          http://sourceforge.net/projects/keros
>
> ---------------------------------------------------------------------
> 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
>
>

Scot P. Floess
27 Lake Royale
Louisburg, NC  27549

252-478-8087 (Home)
919-754-4592 (Work)

Chief Architect JPlate   http://sourceforge.net/projects/jplate
Chief Architect JavaPIM  http://sourceforge.net/projects/javapim

Architect Keros          http://sourceforge.net/projects/keros

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


RE: create property value that has metacharacter by escaping meta characters.

Posted by Lucas Albers <sm...@hotmail.com>.
I wish to have a property value that contains this:
"http://cvsweb/cgi-bin/cvs/cvshistorycvsroot=blah&dsearch=rnt&dsearc
hsub=on&limit=1&revsel1=na&revsel2=na&datesel1=na&datesel2=na&selop=in&opT=o
n&opM=on&opA=on&opR=on&rss=1"

ant complains about the meta-characters inside it.

I am trying to check a cvsweb website with funky metacharacters in the
address.


-----Original Message-----
From: Scot P. Floess [mailto:floess@mindspring.com] 
Sent: Wednesday, October 22, 2008 2:10 PM
To: Ant Users List
Subject: Re: create property value that has metacharacter by escaping meta
characters.


Do you mean escape the meta-characters?  Or do you want the actual 
characters to be contained in the property itself?


On Wed, 22 Oct 2008, Lucas Albers wrote:

> I would like to refer to a url link that has meta-characters in it.
>
> How would I use CDATA or similar to comment out the meta-characters?
>
>
>
> This is an example of the property value I wish to use.
>
>
>
> What is the sample syntax to do this?
>
>
<![CDATA[http://cvsweb/cgi-bin/cvs/cvshistorycvsroot=blah&dsearch=rnt&dsearc
>
hsub=on&limit=1&revsel1=na&revsel2=na&datesel1=na&datesel2=na&selop=in&opT=o
> n&opM=on&opA=on&opR=on&rss=1]]>
>
>
>
> I cannot find any sample syntax's to comment out meta-characters in
property
> values.
>
>
>
>
>
>

Scot P. Floess
27 Lake Royale
Louisburg, NC  27549

252-478-8087 (Home)
919-754-4592 (Work)

Chief Architect JPlate   http://sourceforge.net/projects/jplate
Chief Architect JavaPIM  http://sourceforge.net/projects/javapim

Architect Keros          http://sourceforge.net/projects/keros

---------------------------------------------------------------------
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: create property value that has metacharacter by escaping meta characters.

Posted by "Scot P. Floess" <fl...@mindspring.com>.
Do you mean escape the meta-characters?  Or do you want the actual 
characters to be contained in the property itself?


On Wed, 22 Oct 2008, Lucas Albers wrote:

> I would like to refer to a url link that has meta-characters in it.
>
> How would I use CDATA or similar to comment out the meta-characters?
>
>
>
> This is an example of the property value I wish to use.
>
>
>
> What is the sample syntax to do this?
>
> <![CDATA[http://cvsweb/cgi-bin/cvs/cvshistorycvsroot=blah&dsearch=rnt&dsearc
> hsub=on&limit=1&revsel1=na&revsel2=na&datesel1=na&datesel2=na&selop=in&opT=o
> n&opM=on&opA=on&opR=on&rss=1]]>
>
>
>
> I cannot find any sample syntax's to comment out meta-characters in property
> values.
>
>
>
>
>
>

Scot P. Floess
27 Lake Royale
Louisburg, NC  27549

252-478-8087 (Home)
919-754-4592 (Work)

Chief Architect JPlate   http://sourceforge.net/projects/jplate
Chief Architect JavaPIM  http://sourceforge.net/projects/javapim

Architect Keros          http://sourceforge.net/projects/keros

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