<?xml version="1.0"?>
<!DOCTYPE xsl:stylesheet [
<!ENTITY nbsp "&#160;">
]>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  <xsl:output method="html" indent="yes"/>
  
  <xsl:template match="/">
    
    <html>
      <head>
        <title>Http Snoop</title>
      </head>
      
      <body>
        <h3>Http Snoop</h3>
        
        <xsl:apply-templates select="snoop"/>

        <p><a href="javascript:location.reload()" target="_self">again!</a></p>
        <p><a href="/examples">back to examples</a></p>        
      </body>
    </html>
  </xsl:template>
  
  <xsl:template match="snoop">
    <table cellspacing="0" cellpadding="0" border="1" width="740">
      <xsl:apply-templates select="*"/>
    </table>
  </xsl:template>
  
  <xsl:template match="headers|parameters|session|cookies"/>

  <xsl:template match="header|parameter|attribute|cookie">
    <tr>
      <td width="160"><xsl:value-of select="name"/></td>
      <td width="580"><xsl:value-of select="value"/></td>
    </tr>
  </xsl:template>
  
  <xsl:template match="*">
    <tr>
      <td width="160"><xsl:value-of select="name()"/></td>
      <td width="580"><xsl:value-of select="."/><xsl:if test="not(text())">&nbsp;</xsl:if></td>
    </tr>
  </xsl:template>
  
</xsl:stylesheet>
