[jira] Commented: (JCR-690) Nodes' and properties' names with invalid XML characters export as invalid XML
[ http://issues.apache.org/jira/browse/JCR-690?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12461702 ] Jan Kuzniak commented on JCR-690: - I think we should adopt the same policy already now Already? And what about compatibility issues? If there are people using invalid XML characters as nodes' and properties' names, their repositories will become invalid with next release. Well, it's OK if it is introduced in jackrabbit 2.0, but as a user I would not expect such an issue while upgrading to 1.3. Probably we should write some external program checking if given repository is compatible with next release and maybe escaping invalid characters in the repository itself. Another approach is to implement escaping using _X_ pattern as a 1.x solution and restrict allowed characters set starting from jackrabbit 2.x 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 _X_ pattern or not. It just puts it into XML without any validation. It causes e.g. XML attributes to contain entities like #0; -- 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
[jira] Commented: (JCR-690) Nodes' and properties' names with invalid XML characters export as invalid XML
[ 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 _x_ escapes is not a good solution since the JCR spec doesn't specify any transformation for the names. A name like _x_ would be exported in system view as _x_ by Jackrabbit = 1.2 and by all other JCR repostories. With the proposed solution, a Jackrabbit 1.3+ repository would import that name as \u! 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 _X_ pattern or not. It just puts it into XML without any validation. It causes e.g. XML attributes to contain entities like #0; -- 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
[jira] Commented: (JCR-690) Nodes' and properties' names with invalid XML characters export as invalid XML
[ http://issues.apache.org/jira/browse/JCR-690?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12461727 ] Jan Kuzniak commented on JCR-690: - Using the _x_ escapes is not a good solution [...] Agreed. IMHO the only way to make the export/import of such names work is to add some extra attribute that indicates the name encoding. Do you mean something like: sv:node sv:name=[base64 encoded value] jcr:nameEncoding=base64 ? There is one point worth mentioning here: for repositories containing invalid XML values documents exported from Jackrabbit 1.3+ will not be importable by previous versions of Jackrabbit and other JCR repositories. [..] we could for now just make the name parser log warnings of invalid characters Agreed, good idea. 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 _X_ pattern or not. It just puts it into XML without any validation. It causes e.g. XML attributes to contain entities like #0; -- 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
[jira] Commented: (JCR-690) Nodes' and properties' names with invalid XML characters export as invalid XML
[ http://issues.apache.org/jira/browse/JCR-690?page=comments#action_12460966 ] Jukka Zitting commented on JCR-690: --- The JSR 283 early draft only allows XML charactes in JCR names to solve this issue. I think we should adopt the same policy already now, since JSR 170 allows implementations to place custom restrictions on repository content. We should essentially add guards in the name parsing method to prevent invalid XML characters from being entered in JCR names. 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: xml Affects Versions: 1.1, 1.1.1 Reporter: Jan Kuzniak Session.exportSystemView method does check whether character should be escaped using _X_ pattern or not. It just puts it into XML without any validation. It causes e.g. XML attributes to contain entities like #0; -- 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