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-482) DocViewSaxEventGenerator may generate non-NS-wellformed XML
Date Tue, 29 Aug 2006 14:34:23 GMT
    [ http://issues.apache.org/jira/browse/JCR-482?page=comments#action_12431254 ] 
            
Julian Reschke commented on JCR-482:
------------------------------------

Related to this, ExportDocViewTest.compareNamespaces() makes the assumption that *all* registered
namespaces need to be serialized in the root element (and refers to 6.4.2.1 as justification).
However, 6.4.2.1 only talks about the "relevant" declarations.

In any case, both the requirement in the spec and the test case should be relaxed to permit
any serialization that produces a valid XML document: it should be left to the implementation
when and where to include namespace declarations, as long as they the result document is namespace-wellformed.


> DocViewSaxEventGenerator may generate non-NS-wellformed XML
> -----------------------------------------------------------
>
>                 Key: JCR-482
>                 URL: http://issues.apache.org/jira/browse/JCR-482
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: xml
>    Affects Versions: 0.9, 1.0, 1.0.1
>         Environment: n/a
>            Reporter: Julian Reschke
>         Assigned To: Jukka Zitting
>            Priority: Minor
>             Fix For: 1.1
>
>         Attachments: JIRA-482.diff.txt
>
>
> The XML serialization code relies on the fact that all required prefix-to-uri mappings
are known beforehand (actually, when serializing the root node). So there's an assumption
that the permanent namespace registry will never change during serialization, which may be
incorrect when another client adds namespace registrations while the XML export is in progress.
> To fix this, "addNamespacePrefixes" should ensure that namespace declarations have been
written for all prefixes used on the current node (node name + properties), potentially going
back to the namespace resolver when needed.
> (Should there be consensus for that change I'm happy to give it a try)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message