23 |
<xsl:output method="xml" encoding="UTF-8"/> |
<xsl:output method="xml" encoding="UTF-8"/> |
24 |
|
|
25 |
<xsl:template match="tmp:field[@name = $fieldname]/tmp:items"> |
<xsl:template match="tmp:field[@name = $fieldname]/tmp:items"> |
26 |
<items> |
<choice> |
27 |
<xsl:apply-templates/> |
<xsl:apply-templates/> |
28 |
</items> |
</choice> |
29 |
</xsl:template> |
</xsl:template> |
30 |
|
|
31 |
<xsl:template match="tmp:field[@name = $fieldname]/tmp:items/tmp:text"> |
<xsl:template match="tmp:field[@name = $fieldname]/tmp:items/tmp:text"> |
32 |
<item> |
<bool> |
33 |
<xsl:attribute name="value"> |
<xsl:attribute name="value"> |
34 |
<xsl:value-of select="count(preceding-sibling::*)"/> |
<xsl:value-of select="count(preceding-sibling::*)"/> |
35 |
</xsl:attribute> |
</xsl:attribute> |
36 |
<xsl:attribute name="description"> |
<xsl:attribute name="description"> |
37 |
<xsl:value-of select="."/> |
<xsl:value-of select="."/> |
38 |
</xsl:attribute> |
</xsl:attribute> |
39 |
</item> |
</bool> |
40 |
</xsl:template> |
</xsl:template> |
41 |
|
|
42 |
<xsl:template match="text()" /> |
<xsl:template match="text()" /> |
43 |
<xsl:template match="/"> |
<xsl:template match="/"> |
44 |
|
<document> |
45 |
<xsl:apply-templates select="//tmp:field[@name = $fieldname]/tmp:items"/> |
<xsl:apply-templates select="//tmp:field[@name = $fieldname]/tmp:items"/> |
46 |
|
</document> |
47 |
</xsl:template> |
</xsl:template> |
48 |
|
|
49 |
</xsl:stylesheet> |
</xsl:stylesheet> |