[ 
https://issues.apache.org/jira/browse/TUSCANY-1113?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12473726
 ] 

Christian Landbo Frederiksen commented on TUSCANY-1113:
-------------------------------------------------------

Hi everyone.

There are 4 places in the createFeature method where 
eClass.getEStructuralFeatures().add
is called.

First is when content kind is mixed and type is EFeatureMapEntry (whatever that 
means - but name was 'mixed').
Second is alsp content kind mixed and everything else - eg. xMLNSPrefixMap.

Third is type instanceof EClass which is where I changed the add to set.

Fourth is the attributes.

I believe the issue Frank raised with the attributes is handled if there put:

      int existingIndex = 
eClass.getEAllStructuralFeatures().indexOf(eClass.getEStructuralFeature(name));
      if (existingIndex > -1) {
        eClass.getEStructuralFeatures().set(existingIndex, eAttribute);
      } else {
        eClass.getEStructuralFeatures().add(eAttribute);
      }

I have tried to modify the test case for this and it seems to handle it.

I'll attach the two new versions (still don't know what that Patch thing is).

Are we covered now? And have you thought about how to implement these changes 
the right way?

ps. I haven't looked at the simple type issue you mention Frank.


> Extensible namespaces and types that change
> -------------------------------------------
>
>                 Key: TUSCANY-1113
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1113
>             Project: Tuscany
>          Issue Type: Improvement
>          Components: Java SDO Implementation
>         Environment: Eclipse, EMF 2.2.1
>            Reporter: Christian Landbo Frederiksen
>         Attachments: SDOXSDEcoreBuilder.java, SDOXSDEcoreBuilder.java, 
> SDOXSDEcoreBuilder.java, TestTypeChangesAndExtensibleNamespaces.java, 
> XSDHelperImpl.java
>
>
> Once an xml-schema with a namespace is defined (XSDHelper) you cannot define 
> other schemas with the same namespace.
> I would like namespaces to be extensible.
> Once the types of a schema is defined you cannot change them by defining an 
> altered version of the schema.
> I realize the dangers of modifying already defined types but I believe i 
> ought to be an option.
> Summary from: 
> http://www.mail-archive.com/tuscany-user%40ws.apache.org/msg00624.html
> An xml schema is uploaded and SDO is used to generate a form for
> submitting data as xml-instances of the schema. 
> New schemas in the same namespace may be added often resulting in new
> forms (this is the first issue where I need to extend existing
> namespaces).
> Xml instances may later be edited again.
> This is the most common use case and SDO seems to support this very
> well. 
> BUT xml schemas may be modified, even individual types.
> This of course flagged some warning signs and schema versions were
> considered. 
> But 'use at own risk' was chosen because of its simplicity. To support
> this strategy a status/mode will be introduced so xml-instances cannot
> be edited while schema is in 'administration'-mode. This ought to handle
> the case with instances at schema-modification time.
> With regards to serialized xml instances any data that is rendered
> invalid with type changes will be reset/deleted as of design. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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

Reply via email to