Skip to content

Instantly share code, notes, and snippets.

@pasaran
Created January 12, 2009 21:49
Show Gist options
  • Save pasaran/46186 to your computer and use it in GitHub Desktop.
Save pasaran/46186 to your computer and use it in GitHub Desktop.
<func:function name="child-node">
<xsl:param name="elements"/>
<xsl:variable name="nodes">
<xsl:element name="{name()}">
<xsl:for-each select="str:tokenize($elements, ',| ')">
<xsl:element name="{normalize-space(.)}"/>
</xsl:for-each>
</xsl:element>
</xsl:variable>
<func:result select="exsl:node-set($nodes)/*/*"/>
</func:function>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment