[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

XMI tools

  • From: Pete Kirkham <pete@c...>
  • To: xml-dev <xml-dev@l...>
  • Date: Mon, 15 Oct 2001 21:56:23 +0100

xmi tools
Does anyone know of a decent tool support for mapping of
  MOF model -> XMI Schema -> Java?

The XMI spec gives rules for generating DTDs from MOF, but these are not
strong enough to generate Java from, though if you make certain
assumptions about the way the latest UML DTD uses entities you can get
most of the way there automatically (the dtd uses entities to add
structure, so you can generate a schema by mapping entity names to
xs:complexType definitions then edit results by hand).

The way XMI is defined, there are multiple equivalent representations of
data, so most schema to java tools won't work; it assumes a level of
abstraction between data and implementation.

XMI specifies that attributes of MOF constructs can be represented as
either attributes of elements or sub elements, and where both are
present the subelement takes precedence, eg:
  <ping pong="true"/>
  
  <ping><ping.pong xmi.value="true"/></ping>
  
  <ping pong="false"><ping.pong>< xmi.value="true"/></ping>
  
are all equivalent representations, and lists can be IDREFS attributes,
lists of references or objects:

 <XMI.content>
  <bucket name="bob" paints="z0 z1"/>
  <paint id="z0" color="red"/>
  <paint id="z1" color="blue"/>
 </XMI.content>
  
 <XMI.content>
  <bucket name="bob">
   <bucket.paints>
     <paint xmi.idref="z0"/>
     <paint xmi.idref="z1"/>
   </bucket.paints>	
  </bucket>
  <paint id="z0" color="red"/>
  <paint id="z1" color="blue"/>
 </XMI.content>
  
 <XMI.content>
  <bucket>
   <bucket.name>bob</bucket.name>
   <bucket.paints>
     <paint color="red"/>
     <paint>
      <paint.color>blue</paint.color>
    </paint>
   </bucket.paints>	
  </bucket>
 </XMI.content>

are equivalent representations of the same three objects.

It is required to parse all representations, but only one representation
needs to be generated

Pete.

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.