[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jakarta-commons-dev
Subject:    [jira] Reopened: (CONFIGURATION-335) XMLConfiguration: Can't
From:       "Oliver Heger (JIRA)" <jira () apache ! org>
Date:       2008-11-29 20:54:44
Message-ID: 1840089552.1227992084584.JavaMail.jira () brutus
[Download RAW message or body]


     [ 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("element[@attr]", "value1");
config.addProperty("element[@attr]", "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="&#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.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic