You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Konrad Windszus (Jira)" <ji...@apache.org> on 2020/02/10 17:49:00 UTC

[jira] [Comment Edited] (JCRVLT-407) DocView XML: Proper namespace support for node names during import

    [ https://issues.apache.org/jira/browse/JCRVLT-407?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17033803#comment-17033803 ] 

Konrad Windszus edited comment on JCRVLT-407 at 2/10/20 5:48 PM:
-----------------------------------------------------------------

Just take the following file
{code}
<?xml version="1.0" encoding="UTF-8"?>
<jcr2:root xmlns:jcr2="http://www.jcp.org/jcr/1.0" xmlns:rep="internal"
    jcr2:primaryType="nt:unstructured">
    <jcr2:content jcr2:primaryType="nt:unstructured" />
    <jcr2:system/>
</jcr2:root>
{code}
IMHO the namespace prefix in the repository should be independent of the prefix used in the XML (which is already supported for property names, but not yet for node names).


was (Author: kwin):
Just take the following file
{code}
<?xml version="1.0" encoding="UTF-8"?>
<jcr2:root xmlns:jcr2="http://www.jcp.org/jcr/1.0" xmlns:rep="internal"
    jcr2:primaryType="nt:unstructured">
    <jcr2:content  jcr2:primaryType="nt:unstructured" >
    <jcr2:system/>
</jcr2:root>
{code}
IMHO the namespace prefix in the repository should be independent of the prefix used in the XML (which is already supported for property names, but not yet for node names).

> DocView XML: Proper namespace support for node names during import
> ------------------------------------------------------------------
>
>                 Key: JCRVLT-407
>                 URL: https://issues.apache.org/jira/browse/JCRVLT-407
>             Project: Jackrabbit FileVault
>          Issue Type: Bug
>          Components: vlt
>    Affects Versions: 3.4.2
>            Reporter: Konrad Windszus
>            Priority: Major
>             Fix For: 3.4.4
>
>
> Currently any DocView files is processed by the DocViewSAXImporter which creates in the end nodes in the repository via https://github.com/apache/jackrabbit-filevault/blob/e05e3fc8031eb08f6d0815316ec7fff3367df53c/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/io/DocViewSAXImporter.java#L800. That just takes {{DocViewNode}} as parameter. Unfortunately the node name is only contained there in its qualifed (i.e. prefixed) form (https://docs.adobe.com/docs/en/spec/jcr/2.0/3_Repository_Model.html#3.2.5.2%20Qualified%20Form). In case the XML uses other prefixes than the underlying JCR the namespaces won't be correctly resolved, as the node creation happens in https://github.com/apache/jackrabbit-filevault/blob/e05e3fc8031eb08f6d0815316ec7fff3367df53c/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/io/DocViewSAXImporter.java#L1050 with just the qualified form.
> I would propose that the DocView node uses the expanded form (https://docs.adobe.com/docs/en/spec/jcr/2.0/3_Repository_Model.html#3.2.5.1%20Expanded%20Form) for node names, similar to property names!



--
This message was sent by Atlassian Jira
(v8.3.4#803005)