[ https://issues.apache.org/jira/browse/JCR-325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12613674#action_12613674 ]
gennadibereshnoi commented on JCR-325: -------------------------------------- I am faced with similar issue... with CND definition ( @see http://wiki.apache.org/jackrabbit/JackRabbitOnWeblogic ) ... - flix:GENRE (string) mandatory multiple < 'Action', 'Comedy', 'Drama', 'Horror', 'Romance', 'Sci-Fi & Fantasy', 'Thrillers' and Java code nodeTmp .setProperty("flix:GENRE", new String[]{"Action", "Comedy"}); Jackrabbit-repo gets the data like ... /Flix Media Auto/Superbad/flix:GENRE[0] ="Comedy" /Flix Media Auto/Superbad/flix:GENRE[1] ="Action" what is confirmed with the Junit assertion assertEquals(retval.getNode("Superbad").getProperty( "flix:GENRE").getValues().length, 2); But the next line session.exportDocumentView(absPath, System.out, false, false); prints only --System.out <?xml version="1.0" encoding="UTF-8"?> <Flix_x0020_Media_x0020_Auto xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:ocm="http://jackrabbit.apache.org/ocm" xmlns:rep="internal" xmlns:oxseed="http://jcr.oxseed.com/jcr/1.0/oxseed" xmlns:sv="http://www.jcp.org/jcr/sv/1.0" xmlns:mix="http://www.jcp.org/jcr/mix/1.0" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:flix="http://wlp.bea.com/jcr/1.0/flix" xmlns:fn_old="http://www.w3.org/2004/10/xpath-functions" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:test="http://www.apache.org/jackrabbit/test" jcr:primaryType="nt:unstructured"> <Superbad jcr:primaryType="flix:MEDIA" flix:CAST="Jonah Hill" flix:DIRECTOR="Greg Mottola" flix:IMDB_LINK="http://www.imdb.com/title/tt0829482/" flix:LENGTH="114" flix:MEDIA_TYPE="DVD" flix:QUOTES="Same-sies!" flix:RELEASE_DATE="2007-09-17T19:33:33.177+02:00" flix:STOCK_STATUS="unreleased" flix:SYNOPSIS="Hilarous!" flix:TITLE="Superbad"/> </Flix_x0020_Media_x0020_Auto> In the same case the SystemViewExport works fine. ... <sv:property sv:name="flix:GENRE" sv:type="String"> <sv:value>Action</sv:value> <sv:value>Comedy</sv:value> </sv:property> ... Is it possible somehow to get DocViewExport for my multi-valued property? > 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.