Fork me on GitHub

FileVault DocView

Filevault uses slightly different version of the Document View specified by JCR 2.0. In general all node can cannot be serialized as plain directories or as plain files are either serialized into DocView XML file. If the node can only be partially mapped to a directory or file, it will be accompanied with a .content.xml containing the residual content.

For example, a full coverage content tree, starting at the node example will be serialized into a example.xml file, using the (filevault) DocView format.

For example, a sling:Folder node, named libs will be serialized into a directory libs and a libs/.content.xml file, using the (filevault) DocView format.

Also see the [vault-fs][vaultfs.html] article about this.

Deviations to the JCR DocView

Root Element

The root element of the filevault DocView is always jcr:root no matter of the node name it serializes. Because the the node name is implicitly given by either the filename or the directory name, it would be redundant to repeat the node name in the document.


<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="" xmlns:jcr=""

Empty Elements

The deserialization treats empty elements different as the default JCR 2.0 Import, as empty elements never create a new node in the repository but are merely used to define the childnode sort order.

Property Values

The probably biggest different to the JCR 2.0 is the handling of the property values. All properties are serialized as XML attributes as in JCR, but their values have the property type encoded. The format of the attribute value is:

property-value := [ "{" property-type "}" ] ( value | "[" [ value { "," value } ] "]"

If no type is specified, it defaults to STRING.


Type Value Serialized
String “Hello, world!” “Hello, world!”
Long 42 “{Long}42”
Boolean true “{Boolean}true”
Double[] {1.0, 2.5, 3.0} “{Double}[1.0,2.5,3.0]”


The raw attribute value is escaped in order to preserve the special semantics:

Character Escape Sequence Comment
\ \\
, \, Only for multi value properties
[ \[ Only at the start of single value properties
{ \{ Only at the start of single value properties
invalid xml \uXXXX

Please note, that this escaping only concerns the raw attribute value. If the value contains characters that cannot be used in XML attributes, like quotes ", they will further be escaped by the XML formatter.