cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wadim Kruse (JIRA)" <j...@apache.org>
Subject [jira] Commented: (COCOON-1893) XML-Binding: Problem creating a new element
Date Wed, 06 Sep 2006 23:13:26 GMT
    [ http://issues.apache.org/jira/browse/COCOON-1893?page=comments#action_12432994 ] 
            
Wadim Kruse commented on COCOON-1893:
-------------------------------------

The patch solves the described error above. Thanks a lot!
Additionally I had to apply a patch from: http://issues.apache.org/jira/browse/COCOON-1686
in order to solve a problem with unknown namespaces in the result document (xmlns:xi="<<unknown
namespace>>"). 

> XML-Binding: Problem creating a new element
> -------------------------------------------
>
>                 Key: COCOON-1893
>                 URL: http://issues.apache.org/jira/browse/COCOON-1893
>             Project: Cocoon
>          Issue Type: Bug
>          Components: Blocks: Forms
>    Affects Versions: 2.1.9
>            Reporter: Fabian Linz
>         Attachments: diff.txt, DOMFactory_PATCH.java
>
>
> Creating a new element with a namespace fails, if no parent element of the new element
already defines the namespace. In this case the operation org.apache.cocoon.util.jxpath.DOMFactory#getNamespaceURI(Element
element, String prefix) returns null which result in the following exception:
> org.w3c.dom.DOMException: NAMESPACE_ERR: An attempt is made to create or change an object
in a way which is incorrect with regard to namespaces.
> Instead of just relying on the parents to define the namespace the element should define
the namespace itself if no parent provides the definition. To do so we need to map the prefix
of the element to the namespace the prefix refers to. This can be done using the namespaces
the JXPathContext knows. To use the JXPathContext we need to pass the context to the operation
that does the mapping. 
> This is done by the attached DOMFactory.

-- 
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