[ 
http://issues.apache.org/jira/browse/TUSCANY-474?page=comments#action_12431589 
] 
            
Geoff Winn commented on TUSCANY-474:
------------------------------------


Looking at the example in the oriinal description it appears that the tag of 
the head element is being placed in the output document rather than the tag of 
the actual element from the input document. I created a small test to recreate 
this situation (see the attached patch file) and I think the problem is more 
serious. For example, given an input document like

<?xml version="1.0"?>
<items>
    <substituteA>
        <head-a/>
        <head-b/>
    </substituteA>
</items>

where "substituteA" is a substitute for an element with tag "head", the result 
of serialising is

<?xml version="1.0" encoding="UTF-8"?>
<items xsi:type="ItemsType" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
    <head/>
</items>

So not only is the head of the substitution group being written out rather than 
the actual element, but the contents of the element have been lost too.

Note to committers: The attached patch is not a fix. It just provides an easy 
way to recreate the problem. Please do not apply this, it is a convenience for 
anyone working on this issue.

> substitutionGroup is serialized as parent name. Should be substitute name.
> --------------------------------------------------------------------------
>
>                 Key: TUSCANY-474
>                 URL: http://issues.apache.org/jira/browse/TUSCANY-474
>             Project: Tuscany
>          Issue Type: Bug
>          Components: C++ SDO
>    Affects Versions: Cpp-current
>            Reporter: Pete Robbins
>             Fix For: Cpp-current
>
>         Attachments: TUSCANY-474-recreate.patch
>
>
> loading an instance document that uses substitution groups (such as 
> sca.module) then saving the document results in an invalid document.
> For example this snippet:
>       <component name="MyValueServiceComponent">
>               <implementation.cpp dll="libMyValue.so" 
> header="MyValueImpl.h"></implementation.cpp
> implementation.cpp is a substitute for implementation. When serialised the 
> result is:
>       <component name="MyValueServiceComponent">
>               <implementation dll="libMyValue.so" 
> header="MyValueImpl.h"></implementation>

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

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to