6.4.2.6 Example

Given the same subtree and namespace settings as used in the system view example (see 6.4.1.1 Example), the document view would look like this (note that the following example assumes that multi-value property serialization is not supported and therefore escaping of space literals is not done (see 6.4.4 Escaping of Values):


<?xml version="1.0" encoding="UTF-8"?>
<myapp:document xmlns:jcr="http://www.jcp.org/jcr/1.0"
xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
xmlns:mix="http://www.jcp.org/jcr/mix/1.0"
xmlns:myapp="http://mycorp.com/myapp"
xmlns:mynt="http://mycorp.com/mynt"
jcr:primaryType="mynt:document">
myapp:title="JSR 170"
myapp:lead="Content Repository">
<myapp:body jcr:primaryType="mynt:body">
<myapp:paragraph jcr:primaryType="mynt:paragraph"
myapp:title="Node Types"
myapp:text="An important feature..."/>
</myapp:body>
</myapp:document>


Note that in the above, the XML has been formatted for readability. The actual XML stream might not have any extraneous whitespace between elements or attributes.