7.3.2.2 Example

The following XML document


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


when imported in document view would result in the addition of the following mapping to the repository namespace registry:

myapp -> http://mycorp.com/myapp

and the creation of the following subtree

Node

Property = "value"


myapp:document

├─jcr:primaryType = "nt:unstructured"

├─myapp:title = "JSR 170"

├─myapp:lead = "Content Repository"

└─myapp:body

├─jcr:primaryType = "nt:unstructured"

└─myapp:paragraph

├─jcr:primaryType = "nt:unstructured"

├─myapp:title = "Node Types"

└─myapp:text = "An important feature..."


Note that the use of nt:unstructured as the default node type is an implementation-level issue, so the example is a valid outcome of the import, but not the only one.