Skip to content

Instantly share code, notes, and snippets.

@BDF
Last active November 17, 2015 19:38
Show Gist options
  • Save BDF/76255c60968fa6a4fedf to your computer and use it in GitHub Desktop.
Save BDF/76255c60968fa6a4fedf to your computer and use it in GitHub Desktop.
Pass an xPath as parameter named 'xPathToContent' and evaluate/use that xPath
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:param name="xPathToContent"/>
<xsl:template match="/">
<ol>
<!-- altova has an equivalent 'altova:evaluate' -->
<xsl:for-each select="saxon:evaluate($xPathThing)" xmlns:saxon="http://saxon.sf.net/">
<xsl:apply-templates/>
</xsl:for-each>
</ol>
</xsl:template>
</xsl:stylesheet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment