:
<xsl:variable name="firstcall" select="$topcall[$topcall] |
$focusedcall[not($topcall)]" />
, $topcall, $topcall nodeet ; $focusedcall, $topcall nodeet .
" 5-6 ":
, 5-6 , .. 3-4, $topcall $focuscall...
- <xsl:choose>:
<xsl:variable name="firstcall">
<xsl:choose>
<xsl:when test="$topcall"> <xsl:copy-of select="$topcall" /></xsl:when>
<xsl:when test="$focusedcall"><xsl:copy-of select="$focusedcall" /></xsl:when>
<xsl:when test="$thiscall"> <xsl:copy-of select="$thiscall" /></xsl:when>
<xsl:otherwise> <xsl:copy-of select="$thatcall" /></xsl:otherwise>
</xsl:choose>
</xsl:variable>
XSLT 1.0 (RTF: , XML). - XPath $firstcall, . XPath $firstcall , . select="$firstcall[1]", ...
<xsl:when> <xsl:otherwise>, , RTF. ,node-set(), RTF , XPath. XSLT-, . ,- XSLT 2.0, RTF . , XPath 2.0 if/then/else XPath, .
- XPath 1.0, ,
:
select="$topcall[$topcall] |
($focusedcall[$focusedcall] | $thiscall[not($focusedcall)])[not($topcall)]"
, . , XPath 2 $focuscall
($focusedcall[$focusedcall] | $thiscall[not($focusedcall)])
$thiscall
($thiscall[$thiscall] | $thatcall[not($thiscall)])
.
, , , .