Project

Profile

Help

Bug #1573 ยป test.xsl

Michael Kay, 2012-07-05 14:48

 
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:math="http://www.w3.org/2005/xpath-functions/math" xmlns:a="AAA" exclude-result-prefixes="xs" version="3.0">
<xsl:function name="a:foo" as="element()*">
<xsl:param name="in" as="element()*"/>
<xsl:sequence select="$in,$in"/>
</xsl:function>
<xsl:template match="/">
<foo>
<xsl:message select="system-property('xsl:product-version')"/>
<xsl:variable name="X" as="element()*">
<a/>
<b/>
</xsl:variable>
<xsl:iterate select="tokenize('a b c','\s+')">
<xsl:param name="pieces" select="a:foo($X)"/>
<xsl:variable name="bar" select="$pieces,$pieces"/>
<xsl:next-iteration>
<xsl:with-param name="pieces" select="$bar"/>
</xsl:next-iteration>
<xsl:on-completion>
<xsl:sequence select="$pieces"/>
</xsl:on-completion>
</xsl:iterate>
</foo>
</xsl:template>
</xsl:stylesheet>
    (1-1/1)