ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Jan.Mate...@rzf.fin-nrw.de>
Subject AW: XmlProperty - can I specify the property value delimiter?
Date Tue, 23 Oct 2007 12:30:49 GMT
Oh you also could subclass XmlProperty and overwrite that method ;)

Jan 

>-----Urspr√ľngliche Nachricht-----
>Von: Martin Gainty [mailto:mgainty@hotmail.com] 
>Gesendet: Dienstag, 24. Oktober 2000 14:09
>An: Ant Users List
>Betreff: Re: XmlProperty - can I specify the property value delimiter?
>
>I was going to suggest doing an XML Transform but propertregex is much
>easier to implement thru Ant
>
>Vielen Danke Jan!
>Martin--
>----- Original Message -----
>From: <Jan.Materne@rzf.fin-nrw.de>
>To: <user@ant.apache.org>
>Sent: Tuesday, October 23, 2007 2:01 AM
>Subject: AW: XmlProperty - can I specify the property value delimiter?
>
>
>Manual doesnt say anything to delimiters (which in general 
>mean "there is
>no") and source doesnt have one ...
>
>XmlProperty.java:0461:     private void addProperty (String 
>name, String
>value, String id) {
>XmlProperty.java:0468:         if (addedAttributes.containsKey(name)) {
>XmlProperty.java:0477:             value = (String)
>addedAttributes.get(name) + "," + value;
>---------------------------------------------------------------
>-------------
>----^^^
>XmlProperty.java:0489:     }
>
>
>
>If you want to iterate over this list with <antcontrib:for> 
>you can specify
>a delimiter there (but I think it defaults to comma ...)
>
>You can also use <antcontrib:propertregex> for changing the delimiter.
>Something like this:
>  <antcontrib:propertregex
>      property="newlist"
>      input="${oldlist}"
>      regexp=","
>      replace="${newdelimiter}"
>      global="true"
>  />
>
>
>
>Jan
>
>
>>-----Urspr√ľngliche Nachricht-----
>>Von: J MacKay [mailto:jm.junkmail@yahoo.com]
>>Gesendet: Dienstag, 23. Oktober 2007 01:22
>>An: user@ant.apache.org
>>Betreff: XmlProperty - can I specify the property value delimiter?
>>
>>I just started using ant and have a question about XMLProperty.
>>
>><!-- sample-file.xml -->
>><root-tag>
>>  <x>x1</x>
>>  <x>x2</x>
>></root-tag>
>>
>>Using the sample above, XMLProperty will transform"x" into a
>>comma separated list of values:
>>     root-tag.x=x1,x2
>>
>>Is there any way to specify the delimiter used (like a "|") ?
>>ie return this instead
>>  root-tag.x=x1|x2
>>
>>
>> __________________________________________________
>>Do You Yahoo!?
>>Tired of spam?  Yahoo! Mail has the best spam protection around
>>http://mail.yahoo.com
>>
>
>---------------------------------------------------------------------
>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


Mime
View raw message