[
http://issues.apache.org/jira/browse/JCR-690?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12461713
]
Jukka Zitting commented on JCR-690:
-----------------------------------
> And what about compatibility issues?
Good point, though I'd assume that this is only a problem for a few isolated
cases. Having control characters in item names sound's reasonable only if you
are integrating with (or importing data from) some legacy system.
Using the _x0000_ escapes is not a good solution since the JCR spec doesn't
specify any transformation for the names. A name like "_x0000_" would be
exported in system view as "_x0000_" by Jackrabbit <= 1.2 and by all other JCR
repostories. With the proposed solution, a Jackrabbit 1.3+ repository would
import that name as "\u0000"!
IMHO the only way to make the export/import of such names work is to add some
extra attribute that indicates the name encoding. Given that this problem
likely only affects few repositories, it might be better to just encourage the
cleanup of those repositories rather than adding workarounds in Jackrabbit.
To keep such troublesome repositories compatible with 1.x, we could for now
just make the name parser log warnings of invalid characters, and replace the
warning with a thrown exception in 2.0.
> Nodes' and properties' names with invalid XML characters export as invalid XML
> ------------------------------------------------------------------------------
>
> Key: JCR-690
> URL: http://issues.apache.org/jira/browse/JCR-690
> Project: Jackrabbit
> Issue Type: Bug
> Components: JCR 2.0, xml
> Affects Versions: 1.1, 1.1.1
> Reporter: Jan Kuzniak
> Priority: Minor
>
> Session.exportSystemView method does check whether character should be
> escaped using _X0000_ pattern or not. It just puts it into XML without any
> validation. It causes e.g. XML attributes to contain entities like �
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira