The original version of this post comes from an error i got from ArchGenXML when running it on a UML file, instead of the generally recommended zipped (zargo) version. Why did i want to use UML instead of zargo?
The reason was version control: As a binary (zipped) file, zargo files will be replaced whole, while UML files can be diff'ed. This results in smaller diffs, and diffs that can be scanned for useful information.
However, the difference between two UML files, as output by the diff command, is hardly human-readable: Adding one field to a content class yields a 146 line diff that is almost completely unreadable. Also, the difference in size for changes is small: the patch is about 6k, while the zargo file is 36k. (UML size is 388k.)
So my arguments for running AGX on UML are invalid, i'll use zargo from now on.
Original post: ArchGenXML: xml.parsers.expat.ExpatError: unbound prefix
I was working on a workflow in ArgoUML. After i'd added a transition, I got this error:
Traceback (most recent call last):
File "/usr/lib/python2.6/xml/dom/minidom.py", line 1918, in parse
File "/usr/lib/python2.6/xml/dom/expatbuilder.py", line 924, in parse
result = builder.parseFile(fp)
File "/usr/lib/python2.6/xml/dom/expatbuilder.py", line 207, in parseFile
xml.parsers.expat.ExpatError: unbound prefix: line 3843, column 6
make: *** [default] Error 1
make: Leaving directory `...'
The offending XML is this:
As it turns out, this only happens with ArgoUML 0.28.1, with 0.26.2 all goes well.
The answer is that ArgoUML adds the "<argouml:... />" tag since 0.28, and archgenxml doesn't (yet?) know how to deal with it. However, you can export the model as an xmi profile, and let archgenxml work with that.
See also this part about generating the .xmi file automatically from the .uml.