Issue Details (XML | Word | Printable)

Key: JCR-325
Type: Improvement Improvement
Status: Reopened Reopened
Priority: Major Major
Assignee: Jukka Zitting
Reporter: Tobias Bocanegra
Votes: 1
Watchers: 1
Available Workflow Actions

Submit Patch
Operations

If you were logged in you would be able to see more operations.
Jackrabbit Content Repository

docview roundtripping does not work with multivalue non-string properties

Created: 21/Feb/06 10:45 PM   Updated: 15/Jul/08 11:47 PM
Return to search
Component/s: xml
Affects Version/s: 0.9, 1.0
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works namespace-context.patch 2006-03-22 06:33 AM Jukka Zitting 21 kB
Text File Licensed for inclusion in ASF works xml-refactoring.patch 2006-03-19 08:44 PM Jukka Zitting 69 kB
Environment: jackrabbit r379292
Issue Links:
Incorporates
 


 Description  « Hide
when exporting a multivalue property with docview, the property values are serialized to a space delimited list in the xml attributes:
for example:

<?xml version="1.0" encoding="UTF-8"?>
.
.
<testNode
    jcr:primaryType="refTest"
    refs="b5c12524-5446-4c1a-b024-77f623680271 7b4d4e6f-9515-47d8-a77c-b4beeaf469bc"
/>

the refTest nodetype was:

[refTest]
- refs (reference) multiple

importing this docview fails with: javax.jcr.ValueFormatException: not a valid UUID format
this is due to the fact, that the space delimited list is not exploded anymore. actually this code is commented:

org.apache.jackrabbit.core.xml.DocViewImportHandler, lines 191 - 200:
/*
                // @todo should attribute value be interpreted as LIST type (i.e. multi-valued property)?
                String[] strings = Text.explode(attrValue, ' ', true);
                propValues = new Value[strings.length];
                for (int j = 0; j < strings.length; j++) {
                    // decode encoded blanks in value
                    strings[j] = Text.replace(strings[j], "_x0020_", " ");
                    propValues[j] = InternalValue.create(strings[j]);
                }
*/

i haven't tested, but i assume this also fails for all other non-string property types.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
No work has yet been logged on this issue.