<?xml version="1.0"?> 

<!-- My FAQ stylesheet -->

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

  <!-- **************** The entire document *************** -->
  <xsl:template match="/">
    <HTML>
     <HEAD>
       <META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
       <META http-equiv="Expires" content="0"/>
       <TITLE>Jess FAQ</TITLE>
       <LINK REL ="stylesheet" TYPE="text/css" HREF="newstyle.css" TITLE="Style"/>
       <xsl:comment>#include file="lame.stuff"</xsl:comment>
       <BASE TARGET="_top"/>
     </HEAD>
     <BODY>
<xsl:text>&#xA;</xsl:text>
<!-- ************************ Heading ******************************** -->
<xsl:comment>#include file="toolbar.html"</xsl:comment>
         <h2>The Jess FAQ</h2>
         &#169; 2008  Sandia National Laboratories<br/>
         <i>You can obtain the most recent version of this document at
         <a href="http://www.jessrules.com/jess/FAQ.shtml">http://www.jessrules.com/jess/FAQ.shtml</a><br/>Tue Nov 11 10:21:48 EST 2008</i>
<hr/>

       <xsl:apply-templates/>
       <P/>
       <i>Feedback? <a href="mailto:ejfried@sandia.gov">ejfried@sandia.gov</a></i>
     </BODY>
    </HTML>
  </xsl:template>




  <!-- **************** The whole FAQ *************** -->
  <xsl:template match="faq">
    <xsl:apply-templates select="entry" mode="toc-entries"/>
    <xsl:apply-templates select="entry" mode="faq-entries"/>
  </xsl:template>


  <!-- **************** Table of Contents entries ********************* -->

  <xsl:template match="entry" mode="toc-entries">

      <BR/>
      <xsl:apply-templates select="question" mode="toc-entries"/>
  </xsl:template>

  <xsl:template match="question" mode="toc-entries">
      <xsl:variable name="n">
        <xsl:number level="single" count="entry" format="1"/>
      </xsl:variable>
      <a href="#Q{$n}">
        <xsl:number level="single" count="entry" format="1. "/><xsl:apply-templates/>
        </a>
  </xsl:template>

  <!-- **************** Individual entries ********************* -->

  <xsl:template match="entry" mode="faq-entries">

    <HR/>
      <xsl:variable name="n">
        <xsl:number level="single" count="entry" format="1"/>
      </xsl:variable>
      <a name="Q{$n}">
      <xsl:number level="single" count="entry" format="1. "/>
      <b><xsl:apply-templates select="question"/></b></a>
      <BR/>
      <xsl:apply-templates select="answer"/>

  </xsl:template>

  <xsl:template match="pre">
    <pre><xsl:apply-templates/></pre>
  </xsl:template>

  <xsl:template match="p">
    <p/>
  </xsl:template>

  <xsl:template match="li">
    <li><xsl:apply-templates/></li>
  </xsl:template>

  <xsl:template match="ul">
    <ul><xsl:apply-templates/></ul>
  </xsl:template>

  <xsl:template match="ol">
    <ol><xsl:apply-templates/></ol>
  </xsl:template>

  <xsl:template match="tt">
    <tt><xsl:apply-templates/></tt>
  </xsl:template>

  <xsl:template match="b">
    <b><xsl:apply-templates/></b>
  </xsl:template>

  <xsl:template match="i">
    <i><xsl:apply-templates/></i>
  </xsl:template>

  <xsl:template match="a">
    <a href="{@href}"><xsl:apply-templates/></a>
  </xsl:template>


</xsl:stylesheet>





