jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Julian Reschke (JIRA)" <j...@apache.org>
Subject [jira] Commented: (JCR-2445) Namespace prefix renaming on XML document import over WebDAV does not appropriately handle XML documents with xsi:type content
Date Mon, 28 Dec 2009 10:24:29 GMT

    [ https://issues.apache.org/jira/browse/JCR-2445?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12794795#action_12794795

Julian Reschke commented on JCR-2445:

I would call that a known limitation.

One way to address this would be to make sure that namespace prefixes never need to be rewritten.
This is hard to achieve because JCR only has a global namespace registry.

A different approach would be to special case attributes (and elements) that use QNames in
content. That might be workable for xsi:type, but once you start with it, where do you stop?
How about QNames in XPath expression in XSLTs? That would require adding an XPath parser.

> 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
>         Attachments: WebDAVPutMethodTest.java
> 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.

View raw message