Re: Newbie: Generating a class dictionary from a class diagram?

Leif Holmgren <[email protected]> Tue, 21 Oct 2008 18:15:51 +0200
Newsgroups gmane.comp.lang.uml.argouml.user
Message-ID <[email protected]>
Zembower, Kevin wrote:

>I down loaded the documents from the link you provided, Leif, and got some preliminary results. Before I go crazy changing things, I tried to use these files without modification to generate output. I used this command to generate an html file:
>  xsltproc xmi-to-html.xsl test.xmi > test.html
>When I examine test.html with lynx, a text-only browser, I see my two classes, Test and NotTest. However, I don't see the documentation notes in each of these classes. Should I?
>
Well, there seem to be a problem somewhere. This is a bit over my head 
as I am primarily a modeller but:
Documentation is placed in the XMI-file as a tagged value on the 
modelling element it belongs to. Tagged values have their tag name 
placed in a tag definition. It seems as if these are no longer output to 
the XMI files from ArgoUML. Instead it refers to a profile-file.
 <UML:TagDefinition href = 
'http://argouml.org/profiles/uml14/default-uml14.xmi#.:000000000000087C'/>

I don't know how to fix this. Probably you could find the profile file 
somewhere in the project CM system. Perhaps even at the specified path, 
but that is really only an id so don't expect to find it there.
When you find it you could probably somehow merge the XMI files but 
remember that XML only supports one root elemet per file so the profile 
should have to go into the other file.

> Note that I had to manually insert this second line:
>      <!DOCTYPE XMI SYSTEM "UML14.dtd">
>  UML14.dtd from this page: 
>
Must be something specific to xsltproc. Never had to do that but I use 
saxon.

>I'm hoping someone has the patience to give me some suggestions on modifying xmi-to-html.xsl to just produce plain text output of class names and documentation.
>  
>
It's not that difficult. Generating plain text instead of  XML (or HTML 
for that matter) is fully possible. I use XSLT to generate Delphi code 
from my models. Just find the tags that look like HTML and eliminate 
these, or replace them with plain text headers, linebreaks or whatever 
you want. Leave anything starting with <xsl: as that is what defines 
your template structure and queries on the XMI file. I'm sure you will 
find it easy when you start poking around in it. (By the way, )

/Leif