[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [emf-dev] XML marchalling/unmarshalling

Thanks a lot for your help, I've tried to switch to 2.0 and now I am
hitting another problem. EMF generates quite a few classes derived from
the abstract enumerator, which has only protected constractor. This
causes problems, compiling generated code. Am I missing something again?


-----Original Message-----
From: emf-dev-admin@xxxxxxxxxxx [mailto:emf-dev-admin@xxxxxxxxxxx] On
Behalf Of Ed Merks
Sent: Thursday, January 29, 2004 2:51 PM
To: emf-dev@xxxxxxxxxxx
Cc: Catherine Griffin
Subject: Re: [emf-dev] XML marchalling/unmarshalling





Boris,

This is a limitation in 1.x.  The XMLMap API has this method:

   EStructuralFeature getFeature(EClass eClass, String namespaceURI,
String
   name);

so it cannot distiguish between an element and an attribute with the
same
name.

In 2.0, the ExtendedMetaData API is used and it has these methods:

     EStructuralFeature getAttribute(EClass eClass, String namespace,
   String name);
     EStructuralFeature getElement(EClass eClass, String namespace,
String
   name);

so it can handle the case of an element and an attribute with the same
name
and namespace.

It's better to discuss issues like this in the newsgroup so that more
folks
will benefit from the questions and the answers...


Ed Merks/Toronto/IBM@IBMCA
mailto: merks@xxxxxxxxxx
905-413-3265  (t/l 969)




 

                      "Lublinsky,Boris

                      S."                      To:
<emf-dev@xxxxxxxxxxx>

                      <Boris.Lublinsky@        cc:       "Catherine
Griffin" <catherine_griffin@xxxxxxxxxx>

                      CNA.com>                 Subject:  [emf-dev] XML
marchalling/unmarshalling

                      Sent by:

                      emf-dev-admin@ecl

                      ipse.org

 

 

                      01/29/2004 03:35

                      PM

                      Please respond to

                      emf-dev

 

 







I was experimenting with marshalling/unmarshalling XML using EMF1.1.1
and
XSD1.1.1 and it works great, except when you have a name collision
between
elements and attributes - quite valid thing for XML. What is happening
in
this case - generation works fine, marshalling to XML works correctly,
but
produced XML won't unmarshall. Enclosed are my schemas - I split them in
4,
but it does not matter

 <<writer.xsd>>  <<Book.xsd>>  <<generic.xsd>>  <<libraryV3.xsd>>
And XML sample, that will not unmarshall correctly

 <<My.library>>







#### writer.xsd has been removed from this note on January 29 2004 by Ed
Merks
#### Book.xsd has been removed from this note on January 29 2004 by Ed
Merks
#### generic.xsd has been removed from this note on January 29 2004 by
Ed
Merks
#### libraryV3.xsd has been removed from this note on January 29 2004 by
Ed
Merks
#### My.library has been removed from this note on January 29 2004 by Ed
Merks


_______________________________________________
emf-dev mailing list
emf-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/emf-dev