[
https://issues.apache.org/jira/browse/CONFIGURATION-335?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Oliver Heger reopened CONFIGURATION-335:
----------------------------------------
So I was too quick when closing this ticket.
The attribute splitting functionality was added because there is a mismatch
between the configuration API and the capabilities provided by XML: the
configuration API allows adding multiple values to an attribute while XML only
supports a single value. For instance, you can have something like this:
{code}
config.addProperty("[EMAIL PROTECTED]", "value1");
config.addProperty("[EMAIL PROTECTED]", "value2");
{code}
When storing such a configuration, how should the multiple values of the
attribute be treated so that the file can be loaded again and the resulting
configuration is not changed? Because the problem is inherent there is so far
no possibility of switching off this feature.
It might make sense to introduce a flag for turning off this mechanism. Can you
give an example (other than that with whitespace) where this attribute
splitting functionality caused undesired behavior?
> XMLConfiguration: Can't disable attribute splitting
> ----------------------------------------------------
>
> Key: CONFIGURATION-335
> URL: https://issues.apache.org/jira/browse/CONFIGURATION-335
> Project: Commons Configuration
> Issue Type: Bug
> Components: Format
> Affects Versions: 1.5
> Reporter: Sergey Vladimirov
> Fix For: 1.6
>
>
> My XML configuration has the following attribute:
> <some-element some-attribute="

" />
> But XML Configuration is trying to split this string and trims it after
> splitting. I don't need this behaviour, but setting
> setDelimiterParsingDisabled() just changing delimeter to "|" and not disables
> attribute trimming.
> Need either to disable trimming/splitting if setDelimiterParsingDisabled() is
> set to TRUE (incompatible change), or add something like
> setParseAttributesAsIs() that will prevent attributes to be trimmed and
> splitted
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.