[Uml-devel] Re: Umbrello design (was UML XML tree viewer)

Heiko Nardmann h.nardmann at secunet.de
Thu Nov 7 02:45:04 UTC 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Donnerstag, 7. November 2002 09:53, Andrew Sutton wrote:
> On Thursday 07 November 2002 3:02 am, Heiko Nardmann wrote:
> > > So we need a codegen library which generates the libMOFB? Is there a
> > > computer parsable representation of MOF?
>
> yes. actually, the code generator is specific for the Model namespace so it
> will work for generating both the MOF implementation and the UML
> implementation.
>
> > > Is this the DTD file
> > > 01-08-09.dtd at omg.org? Does someone know whether such an MOF parser
> > > exists which may generate src for us? Or do we have to start with a DTD
> > > parser?
>
> no. the DTDs are used to help validate the XMI files. we don't need to
> parse those. we should just be able to give them to the Qt DOM
> implementation and have it validate for us.
>
> > Is the information in the XML file 01-10-05.xml the same as in the DTD
> > file so that we can use QtDom as a starting point resp. as a
> > implementation base for libMOFB ?
>
> no. the xml files are actually XMI files. the DTDs are used to validate the
> correctness of XMI files. actually, for the most part, we can safely ignore
> the DTD files. but we can we QtDom as a starting point for implementing
> libXMI and the reader interfaces.
>
> andy

Okay, I got that. So looking at the XML/XMI file 01-10-05.xml using the DOM 
viewer of konqueror I would like to discuss the following things:

1. we safely can ignore the header.

2. inside the Model:Package we can ignore both the ModelElement constraints 
and the Contraint definitions in the Model:Namespace at the first step. We 
can implement the handling of OCL stuff later.

3. the PrimitiveTypes package is imported. This one is inside file 
01-10-06.xml. But I did not find a link to this file in the MOF XMI file. So 
how should the parser know where to find the corresponding file? Maybe look 
at all XML files, check whether they describe the imported Package? Or should 
we in this case implement PrimitiveTypes manually? Better not so that we do 
not have inconsistencies inside the code (manually written code <-> generated 
code).

4. how should this initial parser be implemented? There are some alternatives:
	a) manual parser using QtDom and traversing the nodes ...
	b) bison (maybe in combination with QtDom); we do not have a real parsable 
grammar (only in the DTD file) ... so probably bison is oversized ...
	c) XSLT (xerces/xalan); Chris Moore did his first steps using some XSLT stuff 
...
	d) ...

5. what shall be inside those classes? Do we need a reader (parser) and writer 
in each model element (load/save missing as Andrew Sutton stated in a former 
mail)?

- -- 
Heiko Nardmann (Dipl.-Ing.), h.nardmann at secunet.de, Software Development
secunet Security Networks AG - Sicherheit in Netzwerken (www.secunet.de),
Weidenauer Str. 223-225, D-57076 Siegen
Tel. : +49 271 48950-13, Fax  : +49 271 48950-50
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iEYEARECAAYFAj3KQ/QACgkQpm53PRScYyhmDACfVjbVoLgDZTrG4l550oPa3YLj
yBYAn1zt08IUZsN0n8q14jkJPj3dEoG4
=5O4h
-----END PGP SIGNATURE-----





More information about the umbrello-devel mailing list