mdxslicer.xsl 1.13 KB
Newer Older
Thitichaipun Wutthisak committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
<?xml version="1.0"?>

<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>

<xsl:output method="html" indent="no" encoding="US-ASCII"/>
<xsl:param name="context"/>
<xsl:param name="renderId"/>
<xsl:param name="token"/>
<xsl:param name="imgpath" select="'bii/table'"/>

<xsl:template match="/mdxtable">
  <xsl:apply-templates select="slicer/member"/>
</xsl:template>

<xsl:template match="member[@href]">
  <xsl:text> [</xsl:text>
  <span class="slicer-{@style}">
    <a href="{@href}">
      <xsl:value-of select="@level"/>
      <xsl:text>=</xsl:text>
      <xsl:value-of select="@caption"/>
    </a>
  </span>
  <xsl:text>] </xsl:text>
</xsl:template>

<xsl:template match="member">
  <xsl:text> [</xsl:text>
  <span class="slicer-{@style}">
    <xsl:value-of select="@level"/>
    <xsl:text>=</xsl:text>
    <xsl:value-of select="@caption"/>
  </span>
  <xsl:apply-templates select="property"/>
  <xsl:text>] </xsl:text>
</xsl:template>

<xsl:template match="property">
  <xsl:text>, </xsl:text>
  <xsl:value-of select="@name"/>
  <xsl:text>=</xsl:text>
  <xsl:value-of select="@value"/>
</xsl:template>

</xsl:stylesheet>