sysmodellibs/sysmodelgen/core/joinsysdef-module.xsl
changeset 8 a2e65c705db8
parent 7 3c36c452f013
equal deleted inserted replaced
7:3c36c452f013 8:a2e65c705db8
   465 		</xsl:message>
   465 		</xsl:message>
   466 	</xsl:if>
   466 	</xsl:if>
   467 	<xsl:variable name="prefix" select="name($namespaces[.=$ns])"/>
   467 	<xsl:variable name="prefix" select="name($namespaces[.=$ns])"/>
   468 	<xsl:attribute name="{name()}">
   468 	<xsl:attribute name="{name()}">
   469 	<xsl:choose>
   469 	<xsl:choose>
   470 		<xsl:when test="$prefix = 'id-namespace' or  (not($namespaces[name()='id-namespace']) and $ns=$defaultns)"/> <!-- it's the default namespace, no prefix -->
   470 		<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 -->
   471 		<xsl:when test="$prefix='' and contains(.,':')">
   471 		<xsl:when test="$prefix='' and contains(.,':')">
   472 			<!-- complex: copy id and copy namespace (namespace should be copied already)-->
   472 			<!-- complex: copy id and copy namespace (namespace should be copied already)-->
   473 			<xsl:value-of select="."/>
   473 			<xsl:value-of select="."/>
   474 		</xsl:when>
   474 		</xsl:when>
   475 		<xsl:when test="$prefix='' and $ns=$defaultns"/> <!-- no prefix and it's the default --> 
   475 		<xsl:when test="$prefix='' and $ns=$defaultns"/> <!-- no prefix and it's the default -->