回答編集履歴
1
無駄な $index を削除
answer
CHANGED
@@ -5,7 +5,6 @@
|
|
5
5
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
6
6
|
|
7
7
|
<xsl:strip-space elements="*" />
|
8
|
-
|
9
8
|
<xsl:output indent="yes" />
|
10
9
|
|
11
10
|
<xsl:variable as="document-node(element(list))" name="term_list" select="document('list.xml')" />
|
@@ -16,20 +15,15 @@
|
|
16
15
|
<xsl:template as="text()" match="p/text()">
|
17
16
|
<xsl:variable as="xs:string" name="original" select="." />
|
18
17
|
|
19
|
-
<xsl:iterate select="
|
18
|
+
<xsl:iterate select="$paras">
|
20
19
|
<xsl:param as="xs:string" name="source" select="$original" />
|
21
20
|
|
22
21
|
<xsl:on-completion>
|
23
22
|
<xsl:value-of select="$source" />
|
24
23
|
</xsl:on-completion>
|
25
24
|
|
26
|
-
<xsl:variable as="xs:integer" name="index" select="." />
|
27
|
-
|
28
25
|
<xsl:next-iteration>
|
29
|
-
<xsl:with-param name="source"
|
30
|
-
select="
|
31
|
-
$paras[$index]
|
32
|
-
|
26
|
+
<xsl:with-param name="source" select="replace($source, target, replace, 'q')" />
|
33
27
|
</xsl:next-iteration>
|
34
28
|
</xsl:iterate>
|
35
29
|
</xsl:template>
|