Skip to content

Instantly share code, notes, and snippets.

@cmnstmntmn
Last active February 18, 2019 17:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cmnstmntmn/d6b545b993da1451e22b6b88f55ef1da to your computer and use it in GitHub Desktop.
Save cmnstmntmn/d6b545b993da1451e22b6b88f55ef1da to your computer and use it in GitHub Desktop.
<xsl:template select="people">
// -- return a list
<xsl:apply-templates select="entry" />
<xsl:template>
<xsl:template select="entry">
<xsl:value-of select="entry/id" /><xsl:if test="position() != last()">,</xsl:value-of>
</xsl:template>
<xsl:template name="form">
<xsl:variable name="users">
<xsl:apply-templates select="people" />
</xsl>
<input type="fields[users][{$users}]" />
</xsl:template>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment