summaryrefslogtreecommitdiffstats
path: root/scripts/xmi2qt.pl
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/xmi2qt.pl')
-rwxr-xr-xscripts/xmi2qt.pl7
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/xmi2qt.pl b/scripts/xmi2qt.pl
index 3be79c35..64e827c5 100755
--- a/scripts/xmi2qt.pl
+++ b/scripts/xmi2qt.pl
@@ -56,6 +56,10 @@ my $tt = Template->new(INTERPOLATE => 1, INCLUDE_PATH => 'templates/');
my $xmi = XML::XPath->new(filename => $options{i});
my $namespace = $xmi->findvalue('//uml:Package/@name');
+if ($namespace eq "") {
+ $namespace = $xmi->findvalue('//uml:Profile/@name');
+}
+
make_path($options{o}."/".$namespace."/"."qobjects");
{
@@ -98,6 +102,9 @@ close STDOUT;
}
my $classset = $xmi->find('//packagedElement[@xmi:type=\'uml:Class\']');
+if ($classset->size() == 0) {
+ $classset = $xmi->find('//packagedElement[@xmi:type=\'uml:Stereotype\']');
+}
foreach my $class ($classset->get_nodelist) {
my $className = $class->findvalue('@name');
die "could not fork" unless defined(my $pid = fork);