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

📄 lines.xsl

📁 Copyright&copy 2004 Sergiu Dumitriu, Marta G&icirc rdea, C&#259 t&#259 lin Hri&#355 cu Permission is
💻 XSL
📖 第 1 页 / 共 3 页
字号:
		</xsl:variable>		<!-- The main Abstraction group -->		<g transform="translate({UML:GraphElement.position/XMI.field[1]}, {UML:GraphElement.position/XMI.field[2]})">			<xsl:apply-templates select="." mode="FontStyle"/>			<xsl:apply-templates select="." mode="StrokeStyle"/>			<xsl:apply-templates select="." mode="isVisible" />			<title>Abstraction line <xsl:value-of select="$SemanticID"/></title>			<desc>Abstraction: <xsl:value-of select="key('xmi.id', $SemanticID)/UML:Dependency.client/*/@xmi.idref"/> &#x2192; <xsl:value-of select="key('xmi.id', $SemanticID)/UML:Dependency.supplier/*/@xmi.idref"/></desc>			<!-- The Abstraction marker -->			<xsl:call-template name="GeneralizationArrowhead">				<xsl:with-param name="DiagramID" select="$DiagramID" />			</xsl:call-template>			<!-- The Abstraction line -->			<path d="{$PathData}" fill="none" marker-end="url(#GeneralizationArrowhead{$DiagramID})" stroke-dasharray="6 9"/>			<!-- Display edge properties -->			<xsl:call-template name="EdgeText">				<xsl:with-param name="SemanticID" select="$SemanticID"/>			</xsl:call-template>		</g>	</xsl:template>	<!-- Comment line, displayed as a dashed line -->	<xsl:template name="Comment_Line">		<xsl:param name="Waypoints" select="UML:GraphEdge.waypoints"/>		<xsl:param name="DiagramID" select="@xmi.id"/>		<xsl:param name="SemanticID" select="UML:GraphElement.semanticModel/UML:SimpleSemanticModelElement/@xmi.id"/>		<xsl:variable name="PathData">			<xsl:call-template name="BuildPathData"/>		</xsl:variable>		<!-- The main Comment group -->		<g transform="translate({UML:GraphElement.position/XMI.field[1]}, {UML:GraphElement.position/XMI.field[2]})">			<xsl:apply-templates select="." mode="FontStyle"/>			<xsl:apply-templates select="." mode="StrokeStyle"/>			<xsl:apply-templates select="." mode="isVisible" />			<title>Comment line <xsl:value-of select="$SemanticID"/></title>			<desc>Main Comment line group</desc>			<!-- Comment line -->			<path d="{$PathData}" fill="none" stroke-dasharray="6 4"/>		</g>	</xsl:template>	<!-- ClassifierRole line, displayed as a dashed line -->	<xsl:template name="ClassifierRole_Line">		<xsl:param name="Waypoints" select="UML:GraphEdge.waypoints"/>		<xsl:param name="DiagramID" select="@xmi.id"/>		<xsl:param name="SemanticID" select="UML:GraphElement.semanticModel/UML:Uml1SemanticModelBridge/UML:Uml1SemanticModelBridge.element/*/@xmi.idref"/>		<xsl:variable name="PathData">			<xsl:call-template name="BuildPathData"/>		</xsl:variable>		<!-- The main ClassifierRole group -->		<g transform="translate({UML:GraphElement.position/XMI.field[1]}, {UML:GraphElement.position/XMI.field[2]})">			<xsl:apply-templates select="." mode="FontStyle"/>			<xsl:apply-templates select="." mode="StrokeStyle"/>			<xsl:apply-templates select="." mode="isVisible" />			<title>ClassifierRole line <xsl:value-of select="$SemanticID"/></title>			<desc>ClassifierRole: <xsl:value-of select="key('xmi.id', $SemanticID)/UML:ClassifierRole.base/*/@xmi.idref"/> &#x2192; <xsl:value-of select="key('xmi.id', $SemanticID)/../../@xmi.id"/></desc>			<!-- ClasifierRole line -->			<path d="{$PathData}" fill="none" stroke-dasharray="6 4"/>			<!-- Display edge properties -->			<xsl:call-template name="EdgeText">				<xsl:with-param name="SemanticID" select="$SemanticID"/>			</xsl:call-template>		</g>	</xsl:template>	<!-- Extend line, displayed as a dashed line with a simple arrowhead at the endpoint -->	<xsl:template name="Extend_Line">		<xsl:param name="Waypoints" select="UML:GraphEdge.waypoints"/>		<xsl:param name="DiagramID" select="@xmi.id"/>		<xsl:param name="SemanticID" select="UML:GraphElement.semanticModel/UML:Uml1SemanticModelBridge/UML:Uml1SemanticModelBridge.element/*/@xmi.idref"/>		<xsl:variable name="PathData">			<xsl:call-template name="BuildPathData"/>		</xsl:variable>		<!-- The main Extend group -->		<g transform="translate({UML:GraphElement.position/XMI.field[1]}, {UML:GraphElement.position/XMI.field[2]})">			<xsl:apply-templates select="." mode="FontStyle"/>			<xsl:apply-templates select="." mode="StrokeStyle"/>			<xsl:apply-templates select="." mode="isVisible" />			<title>Extend line <xsl:value-of select="$SemanticID"/></title>			<desc>Extend: <xsl:value-of select="key('xmi.id', $SemanticID)/UML:Extend.extension/*/@xmi.idref"/> &#x2192; <xsl:value-of select="key('xmi.id', $SemanticID)/UML:Extend.base/*/@xmi.idref"/></desc>			<!-- The Extend marker -->			<xsl:call-template name="DependencyArrowhead">				<xsl:with-param name="DiagramID" select="$DiagramID" />			</xsl:call-template>			<!-- The Extend line -->			<path d="{$PathData}" fill="none" marker-end="url(#DependencyArrowhead{$DiagramID})" stroke-dasharray="6 6"/>			<!-- Display edge properties -->			<xsl:call-template name="EdgeText">				<xsl:with-param name="SemanticID" select="$SemanticID"/>			</xsl:call-template>		</g>	</xsl:template>	<!-- Include line, displayed as a dashed line with a simple arrowhead at the endpoint -->	<xsl:template name="Include_Line">		<xsl:param name="Waypoints" select="UML:GraphEdge.waypoints"/>		<xsl:param name="DiagramID" select="@xmi.id"/>		<xsl:param name="SemanticID" select="UML:GraphElement.semanticModel/UML:Uml1SemanticModelBridge/UML:Uml1SemanticModelBridge.element/*/@xmi.idref"/>		<xsl:variable name="PathData">			<xsl:call-template name="BuildPathData"/>		</xsl:variable>		<!-- The main Include group -->		<g transform="translate({UML:GraphElement.position/XMI.field[1]}, {UML:GraphElement.position/XMI.field[2]})">			<xsl:apply-templates select="." mode="FontStyle"/>			<xsl:apply-templates select="." mode="StrokeStyle"/>			<xsl:apply-templates select="." mode="isVisible" />			<title>Include line <xsl:value-of select="$SemanticID"/></title>			<desc>Include: <xsl:value-of select="key('xmi.id', $SemanticID)/UML:Include.addition/*/@xmi.idref"/> &#x2192; <xsl:value-of select="key('xmi.id', $SemanticID)/UML:Include.base/*/@xmi.idref"/></desc>			<!-- The Include marker -->			<xsl:call-template name="DependencyArrowhead">				<xsl:with-param name="DiagramID" select="$DiagramID" />			</xsl:call-template>			<!-- The Include line -->			<path d="{$PathData}" fill="none" marker-end="url(#DependencyArrowhead{$DiagramID})" stroke-dasharray="6 6"/>			<!-- Display edge properties -->			<xsl:call-template name="EdgeText">				<xsl:with-param name="SemanticID" select="$SemanticID"/>			</xsl:call-template>		</g>	</xsl:template>	<!-- Link line from Collaboration diagrams, displayed as a simple line -->	<xsl:template name="Link_Line">		<xsl:param name="Waypoints" select="UML:GraphEdge.waypoints"/>		<xsl:param name="DiagramID" select="@xmi.id"/>		<xsl:param name="SemanticID" select="UML:GraphElement.semanticModel/UML:Uml1SemanticModelBridge/UML:Uml1SemanticModelBridge.element/*/@xmi.idref"/>		<xsl:variable name="PathData">			<xsl:call-template name="BuildPathData"/>		</xsl:variable>		<!-- The main Link group -->		<g transform="translate({UML:GraphElement.position/XMI.field[1]}, {UML:GraphElement.position/XMI.field[2]})">			<xsl:apply-templates select="." mode="FontStyle"/>			<xsl:apply-templates select="." mode="StrokeStyle"/>			<xsl:apply-templates select="." mode="isVisible" />			<title>Link line <xsl:value-of select="$SemanticID"/></title>			<desc>Link: <xsl:value-of select="key('xmi.id', $SemanticID)/UML:LinkEnd.instance[1]/*/@xmi.idref"/> &#x2194; <xsl:value-of select="key('xmi.id', $SemanticID)/UML:LinkEnd.instance[2]/*/@xmi.idref"/></desc>			<!-- The Link line -->			<path d="{$PathData}" fill="none"/>			<!-- Display edge properties -->			<xsl:call-template name="EdgeText">				<xsl:with-param name="SemanticID" select="$SemanticID"/>			</xsl:call-template>		</g>	</xsl:template>	<!-- Link line from Sequence diagrams -->	<xsl:template name="LinkSequence_Line">		<xsl:param name="Waypoints" select="UML:GraphEdge.waypoints"/>		<xsl:param name="DiagramID" select="@xmi.id"/>		<xsl:param name="SemanticID" select="UML:GraphElement.semanticModel/UML:Uml1SemanticModelBridge/UML:Uml1SemanticModelBridge.element/*/@xmi.idref"/>		<xsl:variable name="PathData">			<xsl:call-template name="BuildPathData"/>		</xsl:variable>		<xsl:variable name="StimulusSemanticID" select="UML:GraphElement.contained/*[UML:GraphElement.semanticModel//UML:Stimulus]/UML:GraphElement.semanticModel//*[@xmi.idref]/@xmi.idref"/>		<xsl:variable name="ActionSemanticID" select="key('xmi.id', $StimulusSemanticID)/UML:Stimulus.dispatchAction/*/@xmi.idref"/>		<xsl:variable name="LinkType">			<xsl:choose>				<xsl:when test="key('xmi.id', $ActionSemanticID)/self::UML:ReturnAction">Return</xsl:when>				<xsl:when test="key('xmi.id', $ActionSemanticID)/@isAsynchronous = 'true'">Asynchronous</xsl:when>				<xsl:otherwise>Synchronous</xsl:otherwise>			</xsl:choose>		</xsl:variable>		<!-- The main Link group -->		<g transform="translate({UML:GraphElement.position/XMI.field[1]}, {UML:GraphElement.position/XMI.field[2]})">			<xsl:apply-templates select="." mode="FontStyle"/>			<xsl:apply-templates select="." mode="StrokeStyle"/>			<xsl:apply-templates select="." mode="isVisible" />			<title>Link line <xsl:value-of select="$SemanticID"/></title>			<desc>Link: <xsl:value-of select="key('xmi.id', $SemanticID)/UML:LinkEnd.instance[1]/*/@xmi.idref"/> &#x2194; <xsl:value-of select="key('xmi.id', $SemanticID)/UML:LinkEnd.instance[2]/*/@xmi.idref"/></desc>			<xsl:choose>				<xsl:when test="$LinkType = 'Synchronous'">					<xsl:call-template name="SynchronousArrowhead">						<xsl:with-param name="DiagramID" select="$DiagramID" />					</xsl:call-template>				</xsl:when>				<xsl:otherwise>					<xsl:call-template name="AsynchronousArrowhead">						<xsl:with-param name="DiagramID" select="$DiagramID" />					</xsl:call-template>				</xsl:otherwise>			</xsl:choose>			<!-- The Link line -->			<path d="{$PathData}" fill="none">				<xsl:choose>					<xsl:when test="$LinkType = 'Return'">						<xsl:attribute name="stroke-dasharray"><xsl:text>15 12</xsl:text></xsl:attribute>						<xsl:attribute name="marker-end"><xsl:text>url(#AsynchronousArrowhead</xsl:text><xsl:value-of select="$DiagramID"/>)</xsl:attribute>					</xsl:when>					<xsl:when test="$LinkType = 'Asynchronous'">						<xsl:attribute name="marker-end"><xsl:text>url(#AsynchronousArrowhead</xsl:text><xsl:value-of select="$DiagramID"/>)</xsl:attribute>					</xsl:when>					<xsl:when test="$LinkType = 'Synchronous'">						<xsl:attribute name="marker-end"><xsl:text>url(#SynchronousArrowhead</xsl:text><xsl:value-of select="$DiagramID"/>)</xsl:attribute>					</xsl:when>				</xsl:choose>			</path>			<!-- Display edge properties -->			<xsl:call-template name="EdgeText">				<xsl:with-param name="SemanticID" select="$SemanticID"/>			</xsl:call-template>		</g>	</xsl:template>	<!-- Transition line, displayed as a simple line with a simple arrowhead -->	<xsl:template name="Transition_Line">		<xsl:param name="Waypoints" select="UML:GraphEdge.waypoints"/>		<xsl:param name="DiagramID" select="@xmi.id"/>		<xsl:param name="SemanticID" select="UML:GraphElement.semanticModel/UML:Uml1SemanticModelBridge/UML:Uml1SemanticModelBridge.element/*/@xmi.idref"/>		<xsl:variable name="PathData">			<xsl:call-template name="BuildPathData"/>		</xsl:variable>		<!-- The main Transition group -->		<g transform="translate({UML:GraphElement.position/XMI.field[1]}, {UML:GraphElement.position/XMI.field[2]})">			<xsl:apply-templates select="." mode="FontStyle"/>			<xsl:apply-templates select="." mode="StrokeStyle"/>			<xsl:apply-templates select="." mode="isVisible" />			<title>Transition line <xsl:value-of select="$SemanticID"/></title>			<desc>Transition: <xsl:value-of select="key('xmi.id', $SemanticID)/UML:Transition.source/*/@xmi.idref"/> &#x2194; <xsl:value-of select="key('xmi.id', $SemanticID)/UML:Transition.target/*/@xmi.idref"/></desc>			<!-- The transition marker -->			<xsl:call-template name="DirectedArrowheadEnd">				<xsl:with-param name="DiagramID" select="$DiagramID" />			</xsl:call-template>			<!-- The Transition line -->			<path d="{$PathData}" fill="none" marker-end="url(#DirectedArrowheadEnd{$DiagramID})">				<xsl:if test="key('xmi.id', $SemanticID)/UML:Transition.source/UML:ObjectFlowState or key('xmi.id', $SemanticID)/UML:Transition.target/UML:ObjectFlowState">					<xsl:attribute name="stroke-dasharray"><xsl:text>5</xsl:text></xsl:attribute>				</xsl:if>			</path>			<!-- Display edge properties -->			<xsl:call-template name="EdgeText">				<xsl:with-param name="SemanticID" select="$SemanticID"/>			</xsl:call-template>		</g>	</xsl:template>	<!-- RequiredInterfaceEdge line, displayed as a dashed line with a white triangle marker -->	<xsl:template name="RequiredInterfaceEdge">		<xsl:param name="Waypoints" select="UML:GraphEdge.waypoints"/>		<xsl:param name="DiagramID" select="@xmi.id"/>		<xsl:variable name="PathData">			<xsl:call-template name="BuildPathData"/>		</xsl:variable>		<!-- The main RequiredInterfaceEdge group -->		<g transform="translate({UML:GraphElement.position/XMI.field[1]}, {UML:GraphElement.position/XMI.field[2]})">			<xsl:apply-templates select="." mode="FontStyle"/>			<xsl:apply-templates select="." mode="StrokeStyle"/>			<xsl:apply-templates select="." mode="isVisible" />			<title>RequiredInterfaceEdge line</title>			<desc>RequiredInterfaceEdge</desc>			<!-- The RequiredInterfaceEdge line -->			<!-- The dependency marker -->			<xsl:call-template name="DependencyArrowhead">

⌨️ 快捷键说明

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