Skip to content

Instantly share code, notes, and snippets.

@scottkf
Created October 3, 2010 22:14
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 scottkf/cbdc3fb37e7ff256ab3f to your computer and use it in GitHub Desktop.
Save scottkf/cbdc3fb37e7ff256ab3f to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" omit-xml-declaration="yes" encoding="UTF-8" indent="yes" />
<xsl:template match="/">
<chart>
<chart_data>
<!-- top header, x-values -->
<row>
<null />
<xsl:for-each select="/data/fitness-test-participants/entry">
<string><xsl:value-of select="name" /></string>
</xsl:for-each>
</row>
<xsl:for-each select="/data/activities/entry">
<xsl:variable name="activity-id" select="@id" />
<row>
<!-- y value header -->
<string><xsl:value-of select="name" /></string>
<xsl:for-each select="/data/fitness-test-participants/entry">
<xsl:variable name="person-id" select="@id" />
<!-- where x,y meet -->
<number>
<xsl:value-of select="/data/fitness-reports-report/entry[(activity/item/@id = $activity-id) and (member/item/@id = $person-id) and (fitness-report/item/@id = $ds-fitness-reports)]/data" />
</number>
</xsl:for-each>
</row>
</xsl:for-each>
</chart_data>
</chart>
</xsl:template>
</xsl:stylesheet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment