Shmarya Rubenstein wrote:
> Use the following:
> <fail unless="${property::exists(
>
>     'Loggers')}"><![CDATA[Usage: nant set_log
>     -D:Loggers=" loger_names "]]></fail>
>
Using CDATA here is a bit of a using a sledgehammer to swat a fly.
> On 6/21/06, *Bonio Lopez* <[EMAIL PROTECTED] 
> <mailto:[EMAIL PROTECTED]>> wrote:
>
>     Dear all,
>     Following line
>     <fail unless="${property::exists('Loggers')}">Usage: nant set_log
>     -D:Loggers=&quote loger_names &quote"</fail>
>
First, XML entity references end with a semicolon, so it would need to 
be &quote;.  Second, the XML entity for the quotation marks is &quot; 
and not &quote;.  Finally, there's no reason to escape them at all when 
they appear in the content.

In other words,
 
  <fail unless="${property::exists('Loggers')}">
    Usage: nant set_log -D:Loggers="logger_names"
  </fail>

works just fine.  If, instead of putting the message into the content of 
the <fail> element, you wanted to put it into the message attribute, 
then you would either need to use entity references, or better yet, just 
take advantage of XML's ability to use single quotes:

    <fail unless=...   message=' Usage: nant set_log 
-D:Loggers="logger_names" '/>

(I've added some extra space so that the single quotes are easier to spot.)

Gary


All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
NAnt-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to