« Return to Thread: Session.importXml problem
Session.importXml fails on a simple document like this:
> <html><body>a<b>b</b>c</body></html>
>
With:
> javax.jcr.InvalidItemStateException : Item
> []:1[http://www.us.elsevierhealth.com/now/schema]system:1[]importTest:1[]html:2[]body:1[http://www.jcp.org/jcr/1.0]xmltext:1
> (persisted version: 0) already exists in production. Probably was added by
> another session 99e30a279124482d01131bdebab3ff38
> at
> org.exoplatform.services.jcr.impl.dataflow.persistent.WorkspacePersistentDataManager.doAdd (WorkspacePersistentDataManager.java:295)
> at
> org.exoplatform.services.jcr.impl.dataflow.persistent.WorkspacePersistentDataManager.save(WorkspacePersistentDataManager.java:83)
> at
> org.exoplatform.services.jcr.impl.dataflow.persistent.ACLInheritanceSupportedWorkspaceDataManager.save(ACLInheritanceSupportedWorkspaceDataManager.java:122)
> at
> org.exoplatform.services.jcr.impl.dataflow.persistent.VersionableWorkspaceDataManager.save (VersionableWorkspaceDataManager.java:175)
> at
> org.exoplatform.services.jcr.impl.dataflow.session.LocalWorkspaceStorageDataManagerProxy.save(LocalWorkspaceStorageDataManagerProxy.java:68)
> at
> org.exoplatform.services.jcr.impl.dataflow.session.TransactionableDataManager.save(TransactionableDataManager.java:246)
> at
> org.exoplatform.services.jcr.impl.core.SessionDataManager.commit(SessionDataManager.java :558)
> at
> org.exoplatform.services.jcr.impl.core.ItemImpl.save(ItemImpl.java:542)
> at
> org.exoplatform.services.jcr.impl.core.SessionImpl.save(SessionImpl.java:343)
>
Basically, it won't load two text nodes in the same element.
It also incorrectly imports this:
> <html><body>a<b>b</b></body></html>
>
As:
> html
> body
> b
> jcr:xmltext
> jcr:xmlcharacters="ab"
>
The text node within the <b> tag gets concatenated onto the text node in
the <body> tag and put after the <b> tag. The <b> tag thus loses
its content.
--
View this message in context: http://www.nabble.com/Session.importXml-problem-tf4326065.html#a12320748
Sent from the eXo Platform mailing list archive at Nabble.com.
--
You receive this message as a subscriber of the exoplatform@... mailing list.
To unsubscribe: mailto:exoplatform-unsubscribe@...
For general help: mailto: sympa@...?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
« Return to Thread: Session.importXml problem
| Free embeddable forum powered by Nabble | Forum Help |