Re: [configuration] Re: Space or single quote as a value in properties files

2010-02-05 Thread Oliver Heger

Am 05.02.2010 18:26, schrieb Asterios Katsifodimos:

Thank you Oliver,

However with some simple tests that I've ran, I saw that even
XMLConfiguration does not support this feature.

It would be nice to see that as an option in the Apache configuration
module, at least for me, its been many times that I need such
values in a configuration file.

thank you again,
--
Asterios



With XMLConfiguration it is actually possible to have whitespace in 
property values, but you have to tell the XML parser that it should not 
trim these values. This can be achieved by adding the xml:space 
attribute on an XML element. Have a look at the following example 
extracted from our unit tests:






The value of the space.blanc property will be a space character. (Note 
that the xml:space attribute is a standard XML attribute, not a specific 
extension for XMLConfiguration).


Oliver



On Thu, Feb 4, 2010 at 10:18 PM, Oliver Heger
wrote:


Am 04.02.2010 17:42, schrieb Asterios Katsifodimos:

  Hi all,


I would like to know if there is a way to set the value of a variable
(key)
to be the space character in a PropertiesConfiguration file.

for example

variable = " "

could I use the double quotes to do that?



 From looking at the code it seems that it is not possible to define a space
character as property value. All lines are trimmed after they were read.

Unfortunately, double quotes are also not supported. I am not sure, would
it make sense to add support for this feature? What would be the exact
specification?

Don't know whether this helps you, but with XMLConfiguration you can set
space characters as property values.

Oliver




thank you,
--
Asterios Katsifodimos
INRIA Saclay
France




-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org







-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [configuration] Re: Space or single quote as a value in properties files

2010-02-05 Thread Valentin Rocher
Please file abug in JIRA here : 
https://issues.apache.org/jira/browse/CONFIGURATION, I'm sure someone 
will take care of it :)


Valentin.

Le 05/02/2010 18:26, Asterios Katsifodimos a écrit :

Thank you Oliver,

However with some simple tests that I've ran, I saw that even
XMLConfiguration does not support this feature.

It would be nice to see that as an option in the Apache configuration
module, at least for me, its been many times that I need such
values in a configuration file.

thank you again,
--
Asterios


On Thu, Feb 4, 2010 at 10:18 PM, Oliver Heger
wrote:

   

Am 04.02.2010 17:42, schrieb Asterios Katsifodimos:

  Hi all,
 

I would like to know if there is a way to set the value of a variable
(key)
to be the space character in a PropertiesConfiguration file.

for example

variable = " "

could I use the double quotes to do that?

   

 From looking at the code it seems that it is not possible to define a space
character as property value. All lines are trimmed after they were read.

Unfortunately, double quotes are also not supported. I am not sure, would
it make sense to add support for this feature? What would be the exact
specification?

Don't know whether this helps you, but with XMLConfiguration you can set
space characters as property values.

Oliver



 

thank you,
--
Asterios Katsifodimos
INRIA Saclay
France


   

-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org


 
   


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [configuration] Re: Space or single quote as a value in properties files

2010-02-05 Thread Asterios Katsifodimos
Thank you Oliver,

However with some simple tests that I've ran, I saw that even
XMLConfiguration does not support this feature.

It would be nice to see that as an option in the Apache configuration
module, at least for me, its been many times that I need such
values in a configuration file.

thank you again,
--
Asterios


On Thu, Feb 4, 2010 at 10:18 PM, Oliver Heger
wrote:

> Am 04.02.2010 17:42, schrieb Asterios Katsifodimos:
>
>  Hi all,
>>
>> I would like to know if there is a way to set the value of a variable
>> (key)
>> to be the space character in a PropertiesConfiguration file.
>>
>> for example
>>
>> variable = " "
>>
>> could I use the double quotes to do that?
>>
>
> From looking at the code it seems that it is not possible to define a space
> character as property value. All lines are trimmed after they were read.
>
> Unfortunately, double quotes are also not supported. I am not sure, would
> it make sense to add support for this feature? What would be the exact
> specification?
>
> Don't know whether this helps you, but with XMLConfiguration you can set
> space characters as property values.
>
> Oliver
>
>
>
>> thank you,
>> --
>> Asterios Katsifodimos
>> INRIA Saclay
>> France
>>
>>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> For additional commands, e-mail: user-h...@commons.apache.org
>
>


[configuration] Re: Space or single quote as a value in properties files

2010-02-04 Thread Oliver Heger

Am 04.02.2010 17:42, schrieb Asterios Katsifodimos:

Hi all,

I would like to know if there is a way to set the value of a variable (key)
to be the space character in a PropertiesConfiguration file.

for example

variable = " "

could I use the double quotes to do that?


From looking at the code it seems that it is not possible to define a 
space character as property value. All lines are trimmed after they were 
read.


Unfortunately, double quotes are also not supported. I am not sure, 
would it make sense to add support for this feature? What would be the 
exact specification?


Don't know whether this helps you, but with XMLConfiguration you can set 
space characters as property values.


Oliver



thank you,
--
Asterios Katsifodimos
INRIA Saclay
France




-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org