Re: [mdr-users] XMI Modules supported by MDR?
Pieter Van Gorp <[email protected]>
| Newsgroups | gmane.comp.java.netbeans.modules.mdr.user |
|---|---|
| Message-ID | <[email protected]> |
Hi Martin, thanks for your reply: On 6/14/05, Martin Matula <[email protected]> wrote: > >I'm experiencing problems when processing XMI files using external > >modules in MDR. My input file is a UML file in XMI generated by > >MagicDraw 9. The problem occurred after moving my profile definitions > >to a separate XMI file. MDR throws a "Content is not allowed in > >prolog" exception. > That's weird. MDR definitely does not print anything like that. Maybe > the XML parser does that. Try if the file is a valid XML. Here's the context of the exception: org.netbeans.lib.jmi.util.DebugException: Content is not allowed in prolog. at org.netbeans.lib.jmi.xmi.XmiContext.readExternalDocument(XmiContext.java:927) When validating with Xerces, I get a lot of "undeclared type" errors although MagicDraw happily opens and saves the file... > >I found that AndroMDA contains special code for dealing with modules > >(in the org.andromda.repositories.mdr.MDRXmiReferenceResolverContext > >class). Should I follow the same strategy or does MDR provide > >built-in module-support such that I don't have to wrap repository > >classes? For instance, is there one specific MDR method that I should > >call after loading an XMI file containing hrefs to elements in another > >XMI file to make MDR treat the two XMI files as one large model? > MDR does this automatically. Good to know... it makes me wonder why AndroMDA uses special XMI resolvers... anyway, I'm still wondering where the "content is not allowed in prolog" exception comes from... > In earlier versions of MagicDraw there was > a bug in XMI serialization causing CompositionViolationException. I > don't know if this was fixed in MagicDraw 9, but so far this does not > seem to be your problem. Indeed, in fact I encountered this problem when copying subgraphs across models. It was not a bug of MagicDraw but a consequence of my way of copying model elements. I'll come back to that shortly. Best regards, Pieter.