jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting" <jukka.zitt...@gmail.com>
Subject Re: Invalid XML characters in export
Date Tue, 12 Dec 2006 20:53:52 GMT

On 12/12/06, Joshua Levy <levy@csl.sri.com> wrote:
> Recently I happened to create a String property containing chars
> below #x20.   The System View XML export then attempts to escape
> such values (e.g. as &#0; etc.).  However, most chars in this
> range are in fact not valid XML characters at all, so import fails
> javax.jcr.InvalidSerializedDataException: failed to parse XML stream:
> Character reference "&#0" is an invalid XML character.
> Of course, binary data should be in a binary property, but
> in the event some binary does somehow get into a String property,
> it means the XML export appears to work, but is actually not usable.
> Is there a way to deal with this issue? I wasn't able to find
> much clarification on what the correct behavior should
> be from the spec (String properties are supposed to
> be like java.lang.Strings, but Sec 6.4.4 doesn't mention
> ways to escape non-XML characters).

It's a known issue with JSR-170, invalid XML characters in string
properties break the XML imports. See the JSR-170 maintenance draft
for the proposed solution (use Base64 encoding for such string
properties) to this issue.

Note that Jackrabbit does not yet implement this solution, so for now
the only workaround is to either avoid such characters in string
properties or to use custom import/export mechanisms.


Jukka Zitting

View raw message