Fix for bug when joining where ID prefixes would be added even if they use the default ID namespace
authorBob Rosenberg <bob.rosenberg@nokia.com>
Tue, 26 Oct 2010 10:43:50 +0100
changeset 8 a2e65c705db8
parent 7 3c36c452f013
child 9 63964d875993
Fix for bug when joining where ID prefixes would be added even if they use the default ID namespace
sysmodellibs/sysmodelgen/core/joinsysdef-module.xsl
--- a/sysmodellibs/sysmodelgen/core/joinsysdef-module.xsl	Wed Oct 13 16:21:25 2010 +0100
+++ b/sysmodellibs/sysmodelgen/core/joinsysdef-module.xsl	Tue Oct 26 10:43:50 2010 +0100
@@ -467,7 +467,7 @@
 	<xsl:variable name="prefix" select="name($namespaces[.=$ns])"/>
 	<xsl:attribute name="{name()}">
 	<xsl:choose>
-		<xsl:when test="$prefix = 'id-namespace' or  (not($namespaces[name()='id-namespace']) and $ns=$defaultns)"/> <!-- it's the default namespace, no prefix -->
+		<xsl:when test="$prefix = 'id-namespace' or $namespaces[name()='id-namespace']=$ns or  (not($namespaces[name()='id-namespace']) and $ns=$defaultns)"/> <!-- it's the default namespace, no prefix -->
 		<xsl:when test="$prefix='' and contains(.,':')">
 			<!-- complex: copy id and copy namespace (namespace should be copied already)-->
 			<xsl:value-of select="."/>