cancel
Showing results for 
Search instead for 
Did you mean: 

Base64 encoded content

legolas
Champ in-the-making
Champ in-the-making
Hi all,

I have noticed that the content exported with session.exportSystemView(), gets Base 64 encoded in the class org.alfresco.jcr.exporter.JCRSystemXMLExporter.
Why is this and is there a way to circumvent this behavior?
This does prevent importing the system view into some other JCR compliant repository.

Thanks in advance.
Marcel
2 REPLIES 2

davidc
Star Contributor
Star Contributor
Why is this and is there a way to circumvent this behavior?

I believe the JSR-170 specification dictates this…

The value of each non-BINARY content repository property is
converted to string form (according to 6.2.6 Property Type
Conversion). BINARY values are Base64 encoded. In both
cases the resulting string is included as XML text within an
<sv:value> element within the <svSmiley Tongueroperty> element.
Entity references are used to escape characters which
should not be included as literals within XML text (see 6.4.4
Escaping of Values).

This does prevent importing the system view into some other JCR compliant repository

Which implementation? It may be that they are not compliant.  I'll have to double check the spec.

legolas
Champ in-the-making
Champ in-the-making
Thanks for your quick response David. You are right about the spec, but I was not aware that creating a content item using the web client resulted in a binary property.
I thought that creating content using the inline editor resulted in ASCII content only, I am only entering HTML content. I doubled checked my exported system view and indeed noticed that the type of the cm:content property indeed is set to binary. I think this is causing the confusion.

What do I need to do the change the type of the cm:content property such that it'll be seen as string i/o binary?
I changed the actual definition in dictionaryModel.xml, but that caused problems when storing the content.

I'll give a brief overview of our project to sketch the background of this issue.
We are working on a system that uses alfresco as its web content authoring CMS and after a certain workflow will publish the content to some kind of JCR compliant repository, could be alfresco as well. That repository runs in the same JVM as JBoss Portal does. Some Portlets communicate with the repository using JCR only and show the content.
So now I need to come up with a solution that transfers the content from the authoring CMS to the published CMS.

Regards,
Marcel