<xsl:variable name="x2r">
<xsl:choose>
<xsl:when test="position() = last()">
<xsl:value-of select="preceding-sibling::точка[last()]/@x"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="following-sibling::точка[1]/@x"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="y2r">
<xsl:choose>
<xsl:when test="position() = last()">
<xsl:value-of select="preceding-sibling::точка[last()]/@y"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="following-sibling::точка[1]/@y"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="x2" select="number($x2r)"/>
<xsl:variable name="y2" select="number($y2r)"/>
<line
x1="{$x1 * math:cos($alpha-radian) -
$y1 * math:sin($alpha-radian) + 100}"
y1="{$x1 * math:sin($alpha-radian) +
$y1 * math:cos($alpha-radian) + 100}"
x2="{$x2 * math:cos($alpha-radian) -
$y2 * math:sin($alpha-radian) + 100}"
y2="{$x2 * math:sin($alpha-radian) +