commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oliver Heger (JIRA)" <>
Subject [jira] Reopened: (CONFIGURATION-335) XMLConfiguration: Can't disable attribute splitting
Date Sat, 29 Nov 2008 20:54:44 GMT


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:

config.addProperty("element[@attr]", "value1");
config.addProperty("element[@attr]", "value2");

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

> XMLConfiguration: Can't disable attribute splitting 
> ----------------------------------------------------
>                 Key: CONFIGURATION-335
>                 URL:
>             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="&#x0A;&#x0D;" />
> 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.

View raw message