⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 instates.xsl

📁 Copyright&copy 2004 Sergiu Dumitriu, Marta G&icirc rdea, C&#259 t&#259 lin Hri&#355 cu Permission is
💻 XSL
字号:
<?xml version="1.0" encoding="UTF-8"?>
<!--
Template: InStates.xsl

Displays the list of states an object flow state represents in an activity diagram
-->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/2000/svg" xmlns:UML="org.omg.xmi.namespace.UML">
	<xsl:import href="../Common/Styling.xsl"/>
	<xsl:import href="../Common/StringTSpan.xsl"/>
	<xsl:output media-type="image/svg+xml" method="xml" indent="yes"/>

	<!-- InStates -->
	<xsl:template name="InStates">
		<xsl:param name="DiagramID" select="@xmi.id"/>
		<xsl:param name="SemanticID" select="../../UML:GraphElement.semanticModel/UML:Uml1SemanticModelBridge/UML:Uml1SemanticModelBridge.element/*/@xmi.idref"/>

		<!-- Main InStates group -->
		<g transform="translate({UML:GraphElement.position/XMI.field[1]}, {UML:GraphElement.position/XMI.field[2]})" id="{$DiagramID}">
			<xsl:apply-templates select="." mode="FontStyle"/>
			<xsl:apply-templates select="." mode="isVisible"/>

			<desc><xsl:text>InStates</xsl:text></desc>

			<!-- InStates text -->
			<text stroke="none" baseline-shift="-100%">
				<xsl:for-each select="UML:GraphElement.contained/UML:GraphNode">
					<xsl:choose>
						<xsl:when test="UML:GraphElement.semanticModel/UML:SimpleSemanticModelElement/@typeInfo = 'InStatesStart'">
							<!-- Statelist start, '[' -->
							<tspan x="{UML:GraphElement.position/XMI.field[1]}" y="{UML:GraphElement.position/XMI.field[2]}"><xsl:text>[</xsl:text></tspan>
						</xsl:when>

						<xsl:when test="UML:GraphElement.semanticModel/UML:Uml1SemanticModelBridge/UML:Uml1SemanticModelBridge.element/*">
							<!-- State -->
							<xsl:variable name="StateSemanticID" select="UML:GraphElement.semanticModel/UML:Uml1SemanticModelBridge/UML:Uml1SemanticModelBridge.element/*/@xmi.idref"/>
							<xsl:call-template name="StringTSpan">
								<xsl:with-param name="SemanticID" select="$StateSemanticID" />
								<xsl:with-param name="String">
									<xsl:value-of select="key('xmi.id', $StateSemanticID)/@name"/>
								</xsl:with-param>
								<xsl:with-param name="x" select="UML:GraphElement.position/XMI.field[1]" />
								<xsl:with-param name="y" select="UML:GraphElement.position/XMI.field[2]" />
							</xsl:call-template>
						</xsl:when>

						<xsl:when test="UML:GraphElement.semanticModel/UML:SimpleSemanticModelElement/@typeInfo = 'InStatesEnd'">
							<!-- Statelist end, ']' -->
							<tspan x="{UML:GraphElement.position/XMI.field[1]}" y="{UML:GraphElement.position/XMI.field[2]}"><xsl:text>]</xsl:text></tspan>
						</xsl:when>
					</xsl:choose>
				</xsl:for-each>
			</text>
		</g>
	</xsl:template>
</xsl:stylesheet>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -