Namespace prefix renaming on XML document import over WebDAV does not
appropriately handle XML documents with xsi:type content
------------------------------------------------------------------------------------------------------------------------------
Key: JCR-2445
URL: https://issues.apache.org/jira/browse/JCR-2445
Project: Jackrabbit Content Repository
Issue Type: Bug
Components: jackrabbit-webdav, namespace, xml
Affects Versions: 1.6.0
Environment: jackrabbit-standalone 1.6.0
Reporter: Eric Konieczny
When importing XML documents over WebDAV PUT, namespace prefix renaming
functionality does not account for namespace prefixes used within xsi:type
attribute values. For example, assume the following XML content is imported
into the WebDAV repository:
<?xml version="1.0" encoding="UTF-8"?>
<Catalog xmlns="urn:catalog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Item xsi:type="JournalType">
<JournalTitle>IEEE Review</JournalTitle>
</Item>
</Catalog>
The corresponding parsed and persisted document, as retrieved via HTTP GET, is
as follows:
<?xml version="1.0" encoding="UTF-8"?>
<ns:Catalog jcr:primaryType="nt:unstructured"
xmlns:fn="http://www.w3.org/2005/xpath-functions"
xmlns:fn_old="http://www.w3.org/2004/10/xpath-functions"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:ns="urn:catalog"
xmlns:mix="http://www.jcp.org/jcr/mix/1.0"
xmlns:sv="http://www.jcp.org/jcr/sv/1.0"
xmlns:rep="internal" xmlns:nt="http://www.jcp.org/jcr/nt/1.0">
<!-- xsi:type value should be ns:JournalType -->
<ns:Item jcr:primaryType="nt:unstructured" xsi:type="JournalType">
<ns:JournalTitle jcr:primaryType="nt:unstructured">IEEE
Review</ns:JournalTitle>
</ns:Item>
</ns:Catalog>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.