Skip to content

Commit 0bacfab

Browse files
committed
Remove superfluous argument $context
1 parent 644a447 commit 0bacfab

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

src/main/resources/content/location.xsl

+8-9
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ SOFTWARE.
2323
-->
2424
<xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
2525
<xsl:template name="location">
26-
<xsl:param name="context" select="."/>
27-
<xsl:for-each select="$context/ancestor::*">
26+
<xsl:for-each select="ancestor::*">
2827
<xsl:variable name="position">
2928
<xsl:number level="single"/>
3029
</xsl:variable>
@@ -36,22 +35,22 @@ SOFTWARE.
3635
</xsl:variable>
3736
<xsl:value-of select="'/'"/>
3837
<xsl:choose>
39-
<xsl:when test="$context/self::*">
40-
<xsl:value-of select="concat('Q{', namespace-uri($context), '}', local-name($context))"/>
38+
<xsl:when test="self::*">
39+
<xsl:value-of select="concat('Q{', namespace-uri(.), '}', local-name(.))"/>
4140
<xsl:value-of select="concat('[', $position, ']')"/>
4241
</xsl:when>
43-
<xsl:when test="count($context/../@*) = count($context|$context/../@*)">
44-
<xsl:value-of select="concat('@Q{', namespace-uri($context), '}', local-name($context))"/>
42+
<xsl:when test="count(../@*) = count(.|../@*)">
43+
<xsl:value-of select="concat('@Q{', namespace-uri(.), '}', local-name(.))"/>
4544
</xsl:when>
46-
<xsl:when test="$context/self::text()">
45+
<xsl:when test="self::text()">
4746
<xsl:value-of select="'text()'"/>
4847
<xsl:value-of select="concat('[', $position, ']')"/>
4948
</xsl:when>
50-
<xsl:when test="$context/self::comment()">
49+
<xsl:when test="self::comment()">
5150
<xsl:value-of select="'comment()'"/>
5251
<xsl:value-of select="concat('[', $position, ']')"/>
5352
</xsl:when>
54-
<xsl:when test="$context/self::processing-instruction()">
53+
<xsl:when test="self::processing-instruction()">
5554
<xsl:value-of select="'processing-instruction()'"/>
5655
<xsl:value-of select="concat('[', $position, ']')"/>
5756
</xsl:when>

0 commit comments

Comments
 (0)