[ http://jira.codehaus.org/browse/JIBX-147?page=comments#action_81848 ] 
            
James Abley commented on JIBX-147:
----------------------------------

Revised binding appears to work, which declares the namespaces at the top of 
the binding, rather than just implicitly declaring them when they become the 
default namespace inside the mapping. 

<?xml version="1.0" encoding="UTF-8"?>
<binding>
    <namespace uri="http://www.jibx.com/xmlns/device-hierarchy"; prefix="dh"/>
    <namespace uri="http://www.jibx.com/xmlns/device"; prefix="d"/>
    <mapping name="device" class="multiple.DeviceHierarchyBean"
        ns="http://www.jibx.com/xmlns/device-hierarchy";>
        <namespace uri="http://www.jibx.com/xmlns/device-hierarchy"; 
default="elements"/>
        <value name="parent" field="parent" usage="required" style="attribute"/>
    </mapping>
    <mapping name="device" class="multiple.DeviceBean" 
ns="http://www.jibx.com/xmlns/device";>
        <namespace uri="http://www.jibx.com/xmlns/device"; default="elements"/>
        <value name="name" field="name" usage="required" style="attribute"/>
    </mapping>
</binding>


Presumably this is the recommended approach generally, and the behaviour has 
been tightened up between 1.0 RC1 and 1.1 / HEAD? This would seem to fix my 
problem. I would still be keen to see the test case integrated into the main 
trunk in some form. Is there anything I can do to help with this?

Cheers,

James

> Regression in compiling bindings for same element name in different namespace
> -----------------------------------------------------------------------------
>
>                 Key: JIBX-147
>                 URL: http://jira.codehaus.org/browse/JIBX-147
>             Project: JiBX
>          Issue Type: Bug
>          Components: Generator Tools
>    Affects Versions: JiBX 1.1, JiBX 1.1.2
>         Environment: Ubuntu 6.06, Java(TM) 2 Runtime Environment, Standard 
> Edition (build 1.4.2_05-b04)
> I don't think it's an environment issue.
>            Reporter: James Abley
>         Attachments: namespace-binding-issue-patch-20061202-2250.txt, 
> namespace-binding.zip
>
>
> There seems to be a bug introduced at some point between 1.0 RC1 and 1.1 / 
> CVS HEAD.
> The attached contains a patch made against CVS HEAD as of 2006-12-02 22:00 
> GMT which contains changes which demonstrate this issue 
> (namespace-binding-issue-patch-20061202-2250.txt). This patch contains a new 
> binding.xml, associated bean classes and adds the binding.xml into the 
> project build. This 'test' only demonstrates the issue with the binding, but 
> I have similar production code bindings which work with 1.0 RC1 both from a 
> binding perspective and being able to marshal the XML correctly as well.
> I have also tried putting these changes into a separate project / build and 
> building that against JiBX 1.0 RC1 and 1.1 and HEAD. The latter all fail 
> again. (namespace-binding.zip). This was done to confirm that the simplified 
> form of the test derived from my production bindings was a correct 
> demonstration of the issue.
> I will be trying to create a patch that fixes this as well, but my lack of 
> familiarity with the codebase will probably make that slow work for now.

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

        

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
jibx-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-devs

Reply via email to