Skip to content

Instantly share code, notes, and snippets.

@zuk
Created February 17, 2010 19:23
Show Gist options
  • Save zuk/306928 to your computer and use it in GitHub Desktop.
Save zuk/306928 to your computer and use it in GitHub Desktop.
<!-- this is how you generate unique DOM IDs in XSLT for use in generating HTML -->
<!-- generate the unique ID with "uid-" prefix and assign it to the uid variable -->
<xsl:variable name="uid">
<xsl:value-of select="concat('uid-',generate-id(.))"/>
</xsl:variable>
<!-- now use the unique id to generate a <label>-<select> pair -->
<label for="{$uid}">Menu:</label>
<select id="{$uid}">
<!-- etc... -->
</select>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment