[Mobies-commit] [commit] r3913 - UDM/trunk/src/UdmBase
ksmyth at redhat1.isis.vanderbilt.edu
ksmyth at redhat1.isis.vanderbilt.edu
Fri Oct 7 11:37:12 CDT 2011
Author: ksmyth
Date: Fri Oct 7 11:37:12 2011
New Revision: 3913
Log:
Dont output dup elements
Modified:
UDM/trunk/src/UdmBase/DTDGen.cpp
Modified: UDM/trunk/src/UdmBase/DTDGen.cpp
==============================================================================
--- UDM/trunk/src/UdmBase/DTDGen.cpp Thu Oct 6 11:38:58 2011 (r3912)
+++ UDM/trunk/src/UdmBase/DTDGen.cpp Fri Oct 7 11:37:12 2011 (r3913)
@@ -971,6 +971,7 @@
}
+ bool need_libroot_element = can_be_libroot;
::Uml::Namespace ns = c.parent_ns();
if (!cwcps.empty() || has_text_attr || can_be_libroot)
{
@@ -1023,12 +1024,14 @@
else if (cwcps_i->second.second != 1)
output << " maxOccurs=\"" << cwcps_i->second.second << "\"";
output << "/>" << endl;
+ if (c == cwcps_i->first)
+ need_libroot_element = false;
}
cwcps_i++;
}
// always attach libraries last
- if (can_be_libroot)
+ if (need_libroot_element)
{
output << "\t\t\t<xsd:element name=\"" << name << "\"";
if (ns != ::Uml::Namespace(NULL))
More information about the Mobies-commit
mailing list