Source

LIME / doc / arch.xsl

Full commit
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
  <html>
  <body>
  <p align="center">
  <h2>Platform Cores</h2>
  <table border="1">
    <tr bgcolor="#9acd32">
      <th>Nr</th>
      <th>Core</th>
      <th>Type</th>
    </tr>
    <xsl:for-each select="arch/core">
    <xsl:variable name="cpu" select="@id"/>
    <xsl:variable name="type" select="@type"/>
    <tr>
      <td><xsl:value-of select="position()"/></td>
      <td><a><xsl:attribute name="href">#<xsl:value-of select="$cpu"/></xsl:attribute>
          <b><xsl:value-of select="$cpu"/></b></a></td>
      <td><xsl:value-of select="$type"/>
          <xsl:for-each select="/arch/type">
	   <xsl:value-of select="@href"/>
	  </xsl:for-each>
      </td>
    </tr>
    </xsl:for-each>
  </table>
  </p>
  <ol>
  <xsl:for-each select="arch/core">
  <xsl:variable name="type" select="@id"/>
  <li><a><xsl:attribute name="name"><xsl:value-of select="$type"/></xsl:attribute><b><xsl:value-of select="$type"/></b>
         <xsl:if test="/arch/core[@id=$type and resource]"> Resources:</xsl:if></a>
  <table>
   <tr><th><xsl:if test="/arch/core[@id=$type]/resource[@clock]"><em>Clocks</em></xsl:if></th>
       <th><xsl:if test="/arch/core[@id=$type]/resource[@amount]"><em>Memory</em></xsl:if></th></tr>
   <tr><td>
    <table border="1">
    <xsl:for-each select="/arch/core[@id=$type]/resource[@clock]">
    <xsl:if test="position()=1">
    <tr bgcolor="#9acd32">
      <th>Nr</th>
      <th>Resource</th>
      <th>Speed</th>
    </tr>
    </xsl:if>
    <tr>
      <td><xsl:value-of select="position()"/></td>
      <td><b><xsl:value-of select="@id"/></b></td>
      <td><em><xsl:value-of select="@clock"/></em></td>
    </tr>
    </xsl:for-each>
    </table>
   </td>
   <td>
    <table border="1">
    <xsl:for-each select="/arch/core[@id=$type]/resource[@amount]">
    <xsl:if test="position()=1">
    <tr bgcolor="#9acd32">
      <th>Nr</th>
      <th>Resource</th>
      <th>Amount</th>
    </tr>
    </xsl:if>
    <tr>
      <td><xsl:value-of select="position()"/></td>
      <td><b><xsl:value-of select="@id"/></b></td>
      <td><em><xsl:value-of select="@amount"/></em></td>
    </tr>
    </xsl:for-each>
    </table>
   </td>
   </tr></table>
   </li>
   <br/>
  </xsl:for-each>
  </ol>
  </body>
  </html>
</xsl:template>

</xsl:stylesheet>