[jira] Commented: (JCR-325) docview roundtripping does not work with multivalue non-string properties

View: New views
1 Messages — Rating Filter:   Alert me  

[jira] Commented: (JCR-325) docview roundtripping does not work with multivalue non-string properties

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ https://issues.apache.org/jira/browse/JCR-325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12613783#action_12613783 ]

Alexander Klimetschek commented on JCR-325:
-------------------------------------------

As this is compliant with the spec and implementation is not trivial, this bug hasn't been solved yet. Generally there is no garantee that you can map a JCR structure to an XML document view - especially when you use a JCR-only feature such as multi-value properties. See also the comment above:

> changing type to 'Improvement' as current implementation (skipping mutli-valued properties on document view export) is compliant with "6.4.2.5 Multi-value Properties" of the spec.

> docview roundtripping does not work with multivalue non-string properties
> -------------------------------------------------------------------------
>
>                 Key: JCR-325
>                 URL: https://issues.apache.org/jira/browse/JCR-325
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: xml
>    Affects Versions: 0.9, 1.0
>         Environment: jackrabbit r379292
>            Reporter: Tobias Bocanegra
>            Assignee: Jukka Zitting
>         Attachments: namespace-context.patch, xml-refactoring.patch
>
>
> 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.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

LightInTheBox - Buy quality products at wholesale price