home *** CD-ROM | disk | FTP | other *** search
/ Internet Magazine 2003 October / INTERNET108.ISO / pc / software / windows / building / xmlspy / xmlspyentcomplete5.exe / Data1.cab / _9529EAB8B63E4F2EBE36992C84408A7B < prev    next >
Encoding:
Extensible Markup Language  |  2002-08-26  |  45.5 KB  |  1,025 lines

  1. <xsl:stylesheet version="1.0" 
  2.                 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  3.  
  4. <!--
  5. *********************************************************************
  6. *  John Dunning: 2001-01-26                                         *
  7. *  DTD: ST32-us-grant-024-xml.dtdV1.4 2001-01-31                    *
  8. *        XSL transformation for ST32 Grant DTD                      *
  9. *                                                                   *
  10. *  This stylesheet follows the basic structure of the DTD           *
  11. *  and is arranged in the following manner:                         *
  12. *       + SDOBI                                                     *
  13. *       + SDOAB                                                     *
  14. *       + SDODE                                                     *
  15. *       + SDOCL                                                     *
  16. *       + SDODR                                                     *
  17. *       + Commonly used elements (listed alphabetically)            *
  18. *********************************************************************
  19. -->
  20.  
  21. <xsl:output method="html" indent="yes" omit-xml-declaration="yes"/>
  22.  
  23. <xsl:preserve-space elements="*"/>
  24.  
  25. <xsl:variable name="doc_kind" select="//B130"/>
  26.  
  27. <!-- ***** establish context of HTML document ***** -->
  28. <xsl:template match="/">
  29.     <html>
  30.         <head>
  31.             <xsl:call-template name="css_styles"/>
  32.             <script language="JScript"><xsl:comment><![CDATA[
  33.  
  34.     function loadNewDoc(node){
  35.     try {
  36.         var myloc, myNewLoc, myPI, stylePI, newStylePI, r, re, styleNode;
  37.  
  38.         var mydoc = new ActiveXObject("Msxml2.DOMDocument");
  39.         var myNewDoc = new ActiveXObject("Msxml2.DOMDocument");
  40.             myNewDoc.loadXML("<FIGURE></FIGURE>");
  41.             root = myNewDoc.documentElement; // <figure/>
  42.             myloc = new String(window.location);
  43.             myNewLoc = myloc.substr(8); 
  44.  
  45.         var myImages = document.XMLDocument.getElementsByTagName("SDODR/EMI");
  46.             for (var i=0;i<myImages.length;i++){
  47.                 myNewDoc.documentElement.appendChild(myImages(i));
  48.         }
  49.  
  50.         for (var i=0;i<document.XMLDocument.documentElement.parentNode.childNodes.length;i++){
  51.             if (document.XMLDocument.documentElement.parentNode.childNodes(i).nodeName == "xml-stylesheet") {
  52.                 stylePI = document.XMLDocument.documentElement.parentNode.childNodes(i).text;
  53.  
  54.                 // test whether grant.xsl or grant_full.xsl is used;
  55.                 if (stylePI.indexOf("full") == -1)
  56.                     re = /grant/g;
  57.                     else
  58.                     re = /grant_full/g;
  59.                 r = stylePI.replace(re,"figures_detail");
  60.                 newStylePI = myNewDoc.createProcessingInstruction("xml-stylesheet",r);
  61.                 }
  62.             }
  63.             styleNode = myNewDoc.insertBefore(newStylePI,root);
  64.  
  65.         // save new file to same directory        
  66.         
  67.             var fileName = "";
  68.             var href= myNewLoc;
  69.             var s = href.split("/");
  70.             for (var i=0;i<(s.length);i++) { 
  71.             fileName=s[i]; 
  72.             }
  73.             var locLen = myNewLoc.length;
  74.             var fileLen = fileName.length;
  75.             var path = myNewLoc.substr(0,(locLen-fileLen));
  76.             
  77.         // now write to a file that can be opened in new browser
  78.         var fso = new ActiveXObject("Scripting.FileSystemObject");
  79.         var a = fso.CreateTextFile(path + "images.xml", true);
  80.         a.Write(myNewDoc.xml);
  81.         a.Close();
  82.             
  83.         var newWin = window.open(path + "images.xml");
  84.     
  85.     }
  86.     
  87.     catch(e) {
  88.         window.alert ("An error has occurred.  Please use the stylesheet 'grant_noscript.xsl'");    
  89.         }
  90.     }    
  91.  
  92.     ]]></xsl:comment>
  93.     </script>
  94.  
  95.         </head>
  96.         <body>
  97.         <basefont face="Arial Unicode MS, Lucida Sans Unicode, Times New Roman "
  98.                     size="2">
  99.         <div style="margin-left: +35pt;">
  100.             <xsl:apply-templates select=".//SDOBI | .//SDOAB | .//SDODE | .//SDOCL | .//SDODR |.//SDOCR"/>
  101.         </div>
  102.         </basefont>
  103.         </body>
  104.     </html>
  105. </xsl:template>
  106.  
  107. <!-- ********************************************************** -->
  108. <!--     SUBDOC BIBLIOGRAPHIC INFORMATION                        -->
  109. <!-- ********************************************************** -->
  110.  
  111. <xsl:param name="cont"/>
  112.     <xsl:template match="SDOBI">
  113.             <xsl:param name="B140-year">
  114.                 <xsl:value-of select="substring(.//B140/DATE/PDAT,1,4)"/>
  115.             </xsl:param>
  116.             <xsl:param name="B140-month">
  117.                 <xsl:value-of select="substring(.//B140/DATE/PDAT,5,2)"/>
  118.             </xsl:param>
  119.             <xsl:param name="B140-day">
  120.                 <xsl:value-of select="substring(.//B140/DATE/PDAT,7,2)"/>
  121.             </xsl:param>
  122.  
  123.             <xsl:param name="B220-year">
  124.                 <xsl:value-of select="substring(.//B220/DATE/PDAT,1,4)"/>
  125.             </xsl:param>
  126.             <xsl:param name="B220-month">
  127.                 <xsl:value-of select="substring(.//B220/DATE/PDAT,5,2)"/>
  128.             </xsl:param>
  129.             <xsl:param name="B220-day">
  130.                 <xsl:value-of select="substring(.//B220/DATE/PDAT,7,2)"/>
  131.             </xsl:param>
  132.  
  133.         <table width="90%" border="0">
  134.             <tr>
  135.                 <!-- ***** Patent number (for barcode) ***** -->
  136.                 <td class="bar" align="right">*<xsl:value-of select=".//B190/PDAT" /><xsl:value-of select=".//B110/DNUM/PDAT"/><xsl:value-of select=".//B130/PDAT" />*</td>        
  137.             </tr>
  138.         </table>
  139.         <table width="90%" border="0">
  140.         <colgroup>
  141.             <col width="40%"/>    <!-- (12) United States [Plant, Design] Patent -->
  142.             <col width="5%" />    <!-- spaceholder -->
  143.             <col width="5%"/>     <!-- (10), (45) -->
  144.             <col width="15%"/>    <!-- Patent No.:, Date of Patent (labels) -->            
  145.             <col width="30%"/>    <!-- Patent No.:, Date of Patent (data) -->
  146.         </colgroup>
  147.  
  148.             <tr>
  149.                 <td class="headinfo_large" colspan="1">
  150.             <!-- ***** test for document kind, add boilerplate ***** -->
  151.             <xsl:choose>
  152.                 <xsl:when test="substring($doc_kind ,1,1)='A'">
  153.                     <font size="-1" weight="normal">(12)</font>  <b>United States Utility Patent</b>                 
  154.                 </xsl:when>
  155.                 <xsl:when test="substring($doc_kind ,1,1)='B'">
  156.                     <font size="-1" weight="normal">(12)</font>  <b>United States Patent</b>                 
  157.                 </xsl:when>
  158.                 <xsl:when test="substring($doc_kind ,1,1)='E'">
  159.                     <font size="-1" weight="normal">(12)</font>  <b>United States Reissue Patent</b>                 
  160.                 </xsl:when>
  161.                 <xsl:when test="substring($doc_kind,1,1)='S'">
  162.                     <font size="-1" weight="normal">(12)</font>  <b>United States Design Patent</b>                 
  163.                 </xsl:when>
  164.                 <xsl:when test="substring($doc_kind,1,1)='P'">
  165.                     <font size="-1" weight="normal">(12)</font>  <b>United States Plant Patent</b>                 
  166.                 </xsl:when>
  167.                 <xsl:otherwise>
  168.                     <font size="-1" weight="normal">(12)</font>  <b>United States Patent</b>                 
  169.                 </xsl:otherwise>
  170.             </xsl:choose>
  171.                 </td>
  172.                 <td/>
  173.                 <td class="table_data" align="right">(10)</td>
  174.                 <td class="table_data" align="right">
  175.                     <b>Patent No: </b>
  176.                 </td>
  177.                 <td class="headinfo_large" align="right">
  178.             <!-- ***** same info that's in the barcode at top ***** -->
  179.                 <!-- country -->
  180.                     <b><xsl:value-of select=".//B190/PDAT" /></b>
  181.                     <xsl:text> </xsl:text>
  182.                 <!-- Patent number -->
  183.                 <xsl:choose>
  184.                 <!-- **** can not format the number of Plant patents, as they start with 'PP' **** -->
  185.                     <xsl:when test="substring($doc_kind,1,1)='P'">
  186.                         <b><xsl:value-of select="substring(.//B110/DNUM/PDAT,1,2)" /><xsl:value-of select="format-number(substring-after(.//B110/DNUM/PDAT,'PP'),'###,###')" /></b>
  187.                     </xsl:when>
  188.                 <!-- **** can not format the number of Design patents, as they start with 'D' **** -->
  189.                     <xsl:when test="substring($doc_kind,1,1)='S'">
  190.                         <b><xsl:value-of select="substring(.//B110/DNUM/PDAT,1,1)" /><xsl:value-of select="format-number(substring-after(.//B110/DNUM/PDAT,'D'),'###,###')" /></b>
  191.                     </xsl:when>
  192.                     <xsl:otherwise>
  193.                         <b><xsl:value-of select="format-number(.//B110/DNUM/PDAT,'##,###,###')"/></b>                
  194.                     </xsl:otherwise>
  195.                 </xsl:choose>
  196.                     <xsl:text> </xsl:text>
  197.                 <!-- kind code -->
  198.                     <b><xsl:value-of select=".//B130/PDAT" /></b>
  199.                 </td>
  200.             </tr>
  201.             <tr>
  202.                 <td class="headinfo_reg">
  203.             <!-- ***** First-named inventor's family name ***** -->
  204.                           
  205.                     <b><xsl:value-of select=".//B721/PARTY-US//SNM"/>
  206.                     <!-- ***** add "et al. " if more than one inventor ***** -->
  207.                     <xsl:if test="count(//B721) >1"> et al.</xsl:if>                    
  208.                     </b>
  209.                 </td>
  210.                 <td/>
  211.                 <td class="table_data" align="right">(45)</td>
  212.                 <td class="table_data" align="right"><b>Date of Patent:</b> </td>
  213.             <!-- date of patent -->
  214.                 <td class="headinfo_reg" align="right">
  215.                     <xsl:value-of select="$B140-year" />-<xsl:value-of select="$B140-month" />-<xsl:value-of select="$B140-day" />
  216.                 </td>
  217.             </tr>
  218.         </table>
  219.         <hr width="100%"/>
  220.     <!-- ***** end page header ***** -->
  221.         
  222.         <!-- ***** bibliographic info ***** -->
  223.         <table width="90%" border="0">
  224.         <tr><td width="10%"/><td width="15%"/><td width="*"/></tr>
  225.             <tr><td class="table_data">(54)</td>
  226.             <!-- ***** title of invention ***** -->
  227.                 <td colspan="2" style="text-transform: uppercase">
  228.                     <b><xsl:value-of select="//B540/*"/></b></td>
  229.                 <td/>
  230.             </tr>
  231.             <xsl:choose>
  232.             <!-- ***** test number of INVENTORs ***** -->
  233.                 <xsl:when test="count(//B721) > 1 ">
  234.                     <tr><td class="table_data">(76)</td>
  235.                     <td class="table_data">
  236.                         Inventors: 
  237.                     </td>
  238.                     <td class="table_data">
  239.                         <b>
  240.                             <xsl:apply-templates select=".//B721[1]/PARTY-US/NAM"/>,                
  241.                         </b>
  242.                             <xsl:apply-templates select=".//B721[1]/PARTY-US/ADR"/>
  243.                          
  244.                     <xsl:for-each select=".//B721[1]/following-sibling::B721">;
  245.                          <b><xsl:apply-templates select=".//NAM"/></b>
  246.                          <xsl:apply-templates select=".//ADR"/>
  247.                     </xsl:for-each>
  248.                     </td>
  249.                     </tr>
  250.                 </xsl:when>
  251.                 <xsl:otherwise>
  252.                     <tr><td class="table_data">(76)</td>
  253.                     <td class="table_data">
  254.                         Inventor: 
  255.                     </td>
  256.                     <td class="table_data">
  257.                          <b><xsl:apply-templates select=".//B721/PARTY-US/NAM"/>, </b>
  258.                             <xsl:apply-templates select=".//B721/PARTY-US/ADR"/>
  259.                     </td>
  260.                     </tr>
  261.                 </xsl:otherwise>
  262.             </xsl:choose>
  263.  
  264.             <!-- ***** test number of ASSIGNEEs ***** -->
  265.             <xsl:choose>
  266.                 <xsl:when test="count(//B731) > 1 ">
  267.                     <tr><td class="table_data">(76)</td>
  268.                     <td class="table_data">
  269.                         Assignees: 
  270.                     </td>
  271.                     <td class="table_data">
  272.                         <b>
  273.                             <xsl:apply-templates select=".//B731[1]/PARTY-US/NAM"/>,                
  274.                         </b>
  275.                             <xsl:apply-templates select=".//B731[1]/PARTY-US/ADR"/>
  276.                          
  277.                     <xsl:for-each select=".//B731[1]/following-sibling::B731">;
  278.                          <b><xsl:apply-templates select=".//NAM"/></b>
  279.                          <xsl:apply-templates select=".//ADR"/>
  280.                     </xsl:for-each>
  281.                     </td>
  282.                     </tr>
  283.                 </xsl:when>
  284.                 <xsl:when test="count(//B731)='1'">
  285.                     <tr><td class="table_data">(73)</td>
  286.                     <td class="table_data">
  287.                         Assignee: 
  288.                     </td>
  289.                     <td class="table_data">
  290.                          <b><xsl:apply-templates select=".//B731/PARTY-US/NAM"/>,</b>
  291.                             <xsl:apply-templates select=".//B731/PARTY-US/ADR"/>
  292.                     </td>
  293.                     </tr>
  294.                 </xsl:when>
  295.             </xsl:choose>
  296.         <!-- ***** test for Term of Grant ***** -->
  297.             <xsl:if test="//B474">
  298.                 <tr><td class="table_data">(**)</td>
  299.                     <td class="table_data">Term:</td>
  300.                     <td class="table_data">
  301.                         <b><xsl:value-of select=".//B474" /></b>
  302.                     </td>
  303.                 </tr>
  304.             </xsl:if>
  305.         <!-- Todo: test for B474US; handle appropriately -->    
  306.             <xsl:variable name="B-210-1" select="substring(.//B210/DNUM/PDAT,1,2)"/>            
  307.             <xsl:variable name="B-210-2" select="substring(.//B210/DNUM/PDAT,3,8)"/>            
  308.  
  309.             <tr><td class="table_data">(21)</td>
  310.                 <td class="table_data">Appl. No.: </td>
  311.         <!-- ***** application number ***** -->
  312.                 <td class="table_data"><b><!--xsl:value-of select=".//B210"/-->
  313.                     <xsl:value-of select="$B-210-1"/>/<xsl:value-of select="format-number($B-210-2,'###,###')" />
  314.                 </b></td>
  315.             </tr>
  316.             <tr><td class="table_data">(22)</td>
  317.                 <td class="table_data">Filed: </td>
  318.         <!-- ***** application-filing-date ***** -->
  319.                 <td class="table_data"><b><xsl:value-of select="$B220-year"/>-<xsl:value-of select="$B220-month"/>-<xsl:value-of select="$B220-day"/></b></td>
  320.             </tr>
  321.             
  322.             <xsl:if test=".//B861">
  323.  
  324.             <xsl:variable name="B861-year" select="substring(.//B861/DOC/DATE/PDAT,1,4)" />
  325.             <xsl:variable name="B861-month" select="substring(.//B861/DOC/DATE/PDAT,5,2)" />
  326.             <xsl:variable name="B861-date" select="substring(.//B861/DOC/DATE/PDAT,7,2)" />
  327.  
  328.             <tr><td class="table_data">(22)</td>
  329.                 <td class="table_data">PCT Filed:</td>
  330.                 <td class="table_data"><b><xsl:value-of select="$B861-year"/>-<xsl:value-of select="$B861-month" />-<xsl:value-of select="$B861-date" /></b></td>
  331.             </tr>
  332.  
  333.             <tr><td class="table_data">(86)</td>
  334.                 <td class="table_data">PCT No.: </td>
  335.             <!-- ***** application number ***** -->
  336.                 <td class="table_data"><b><xsl:value-of select=".//B861/DOC/DNUM/PDAT"/></b></td>
  337.             </tr>
  338.             </xsl:if>
  339.             
  340.             <xsl:if test=".//B863">
  341.                 <xsl:variable name="B863-year" select="substring(.//B863/DATE/PDAT,1,4)" />
  342.                 <xsl:variable name="B863-month" select="substring(.//B863/DATE/PDAT,5,2)" />
  343.                 <xsl:variable name="B863-date" select="substring(.//B863/DATE/PDAT,7,2)" />
  344.  
  345.             <tr><td class="table_data"></td>
  346.                 <td class="table_data">§ 371 Date:</td>
  347.             <!-- ***** application number ***** -->
  348.                 <td class="table_data"><b><xsl:value-of select="$B863-year"/>-<xsl:value-of select="$B863-month" />-<xsl:value-of select="$B863-date" /></b></td>
  349.             </tr>
  350.             </xsl:if>
  351.             
  352.             <xsl:if test=".//B864">
  353.                 <xsl:variable name="B864-year" select="substring(.//B864/DATE/PDAT,1,4)" />
  354.                 <xsl:variable name="B864-month" select="substring(.//B864/DATE/PDAT,5,2)" />
  355.                 <xsl:variable name="B864-date" select="substring(.//B864/DATE/PDAT,7,2)" />
  356.             
  357.             <tr><td class="table_data"></td>
  358.                 <td class="table_data">§ 102(e) Date: </td>
  359.                 <!-- ***** application number ***** -->
  360.                 <td class="table_data"><b><xsl:value-of select="$B864-year"/>-<xsl:value-of select="$B864-month" />-<xsl:value-of select="$B864-date" /></b></td>
  361.             </tr>
  362.             </xsl:if>
  363.         
  364.             <xsl:if test=".//B871">
  365.                 <xsl:variable name="B871-year" select="substring(.//B871/DOC/DATE/PDAT,1,4)" />
  366.                 <xsl:variable name="B871-month" select="substring(.//B871/DOC/DATE/PDAT,5,2)" />
  367.                 <xsl:variable name="B871-date" select="substring(.//B871/DOC/DATE/PDAT,7,2)" />
  368.             
  369.             <tr><td class="table_data">(87)</td>
  370.                 <td class="table_data">PCT Pub. No.:</td>
  371.                 <td class="table_data"><b><xsl:value-of select=".//B871/DOC/DNUM/PDAT" /></b></td>
  372.             </tr>
  373.             
  374.             <tr><td/>
  375.                 <td class="table_data">PCT Pub. Date:</td>
  376.                 <td class="table_data"><b><xsl:value-of select="$B871-year"/>-<xsl:value-of select="$B871-month" />-<xsl:value-of select="$B871-date" /></b></td>
  377.             </tr>
  378.             </xsl:if>
  379.             
  380.             <xsl:if test=".//B300">
  381.                 <xsl:variable name="B300-year" select="substring(.//B320/DATE/PDAT,1,4)" />
  382.                 <xsl:variable name="B300-month" select="substring(.//B320/DATE/PDAT,5,2)" />
  383.                 <xsl:variable name="B300-date" select="substring(.//B320/DATE/PDAT,7,2)" />
  384.             
  385.                 <tr><td class="table_data">(30)</td>
  386.                     <td class="table_data" colspan="3"><b>Foreign Application Priority Data</b></td>
  387.                     <td/>
  388.                 </tr>
  389.                 <tr><td/>
  390.                     <td class="table_data"><xsl:value-of select="$B300-year" />-<xsl:value-of select="$B300-month" />-<xsl:value-of select="$B300-date" />   (<xsl:value-of select=".//B330/CTRY/PDAT" />)</td>
  391.                     <td class="table_data"><xsl:value-of select=".//B310/DNUM/PDAT" /></td>
  392.                 </tr>
  393.             </xsl:if>
  394.             
  395.             
  396.             <!-- ***** Test for Continuity Data ***** -->
  397.         <xsl:for-each select="B600/child::*">
  398.             <tr><td/><td/><td class="table_data" colspan="3" ><b>Related U.S. Application Data</b></td></tr>
  399.             <tr>
  400.             <xsl:choose>
  401.                 <xsl:when test="../B610"><td/>                              <td class="table_data"><xsl:text>Addition to </xsl:text>  <xsl:call-template name="continuity"/></td></xsl:when>
  402.                 <xsl:when test="../B620"><td class="table_data">(62)</td> <td class="table_data" colspan="4"><xsl:text>Division of </xsl:text> <xsl:call-template name="continuity"/></td></xsl:when>
  403.                 <xsl:when test="../B631"><td class="table_data">(63)</td> <td class="table_data" colspan="4"><xsl:text>Continuation of </xsl:text> <xsl:call-template name="continuity"/></td></xsl:when>
  404.                 <xsl:when test="../B632"><td class="table_data">(63)</td> <td class="table_data" colspan="4"><xsl:text>Continuation in part of </xsl:text> <xsl:call-template name="continuity"/></td></xsl:when>
  405.                 <xsl:when test="../B633"><td class="table_data">(63)</td> <td class="table_data" colspan="4"><xsl:text>Continuing reissue of </xsl:text> <xsl:call-template name="continuity"/></td></xsl:when>
  406.                 <xsl:when test="../B640"><td class="table_data">(64)</td> <td class="table_data" colspan="4"><xsl:text>Reissue of </xsl:text> <xsl:call-template name="continuity"/></td></xsl:when>
  407.                 <xsl:when test="../B641US"><td/>                          <td class="table_data" colspan="4"><xsl:text>Divisional reissue of </xsl:text> <xsl:call-template name="continuity"/></td></xsl:when>
  408.                 <xsl:when test="../B645"><td/>                              <td class="table_data" colspan="4"><xsl:text>Reexamination of </xsl:text> <xsl:call-template name="continuity"/></td></xsl:when>
  409.                 <xsl:when test="../B645US"><td/>                          <td class="table_data" colspan="4"><xsl:text>Reissue of reexamination of </xsl:text> <xsl:call-template name="continuity"/></td></xsl:when>
  410.                 <xsl:when test="../B660"><td class="table_data">(66)</td> <td class="table_data" colspan="4"><xsl:text>Substitution for </xsl:text> <xsl:call-template name="continuity"/></td></xsl:when>
  411.                 <xsl:when test="../B680US"><td/>                          <td class="table_data" colspan="4"><xsl:text>Non-provisional of provisional </xsl:text> <xsl:call-template name="continuity"/></td></xsl:when>
  412.             </xsl:choose>        
  413.             </tr>
  414.         </xsl:for-each>
  415.             
  416.             <!-- Todo: table width="50%" border="0">
  417.                 <xsl:if test="//B300">
  418.                     <xsl:call-template name="foreign_data"/>    
  419.                 </xsl:if>
  420.             </table-->
  421.             <xsl:call-template name="tech_info"/>
  422.             <xsl:apply-templates select="appendix-data"/>
  423.             <tr><td class="table_data">(58)</td>
  424.                 <td class="table_data"><b>Field of Search </b></td>
  425.                 <td class="table_data">
  426.             <!-- ***** field of search ***** -->
  427.                 <xsl:value-of select=".//B580/*" />
  428.                 <!-- ***** repeating USPCs ***** -->
  429.                     <xsl:for-each select="//B582[1]/following-sibling::*">,
  430.                         <xsl:value-of select="PDAT" />
  431.                     </xsl:for-each>
  432.                 </td>
  433.             </tr>
  434.         </table>
  435.     <xsl:call-template name="citations"/>
  436.     </xsl:template>
  437.  
  438.     <xsl:template name="continuity">
  439.            <xsl:param name="continuity-year">
  440.             <xsl:value-of select="substring(.//DATE/PDAT,1,4)"/>
  441.         </xsl:param>
  442.         <xsl:param name="continuity-month">
  443.             <xsl:value-of select="substring(.//DATE/PDAT,5,2)"/>
  444.         </xsl:param>
  445.         <xsl:param name="continuity-day">
  446.             <xsl:value-of select="substring(.//DATE/PDAT,7,2)"/>
  447.         </xsl:param>
  448.         <xsl:value-of select=".//PDOC/DOC/DNUM/PDAT" />
  449.         <xsl:text> filed on </xsl:text>
  450.         <xsl:value-of select="$continuity-year"/>-<xsl:value-of select="$continuity-month"/>-<xsl:value-of select="$continuity-day"/>
  451.         <!--xsl:value-of select=".//DATE/PDAT" /-->
  452.     </xsl:template>
  453.  
  454.     <xsl:template name="citations" match="B560">
  455.         <br/><br/>
  456.         <table width="70%" cellpadding="0" cellspacing="0" border="0">     
  457.         <colgroup>
  458.             <col width="10%"/>    <!-- (56) -->
  459.             <col width="15%"/>    <!-- number -->
  460.             <col width="5%"/>     <!-- cited-by-examiner -->
  461.             <col width="20%"/>    <!-- date -->            
  462.             <col width="30%"/>    <!-- name / country -->
  463.             <col width="20%"/>    <!-- PNC -->
  464.         </colgroup>
  465.         <!-- ***** test for cited patent documents ***** -->
  466.         <xsl:if test="//B560">
  467.             <tr><td class="table_data">(56)</td>
  468.                 <td class="table_data" colspan="4" align="center"><b>References Cited</b></td>
  469.                 <td/><td/><td/><td/>
  470.             </tr>
  471.             <tr/>
  472.             <tr><td/>
  473.                 <td class="table_data" colspan="4" align="center">U.S. PATENT DOCUMENTS </td>
  474.                 <td/><td/><td/><td/>
  475.             </tr>
  476.             <!-- ***** no container element for US patent docs; test existence of PARTY-US ***** -->
  477.             <xsl:for-each select=".//PARTY-US/ancestor::B561">
  478.                 <xsl:variable name="citation-year">
  479.                     <xsl:value-of select="substring(.//PCIT/DOC/DATE,1,4)"/>
  480.                 </xsl:variable>
  481.                 <xsl:variable name="citation-month">
  482.                     <xsl:value-of select="substring(.//PCIT/DOC/DATE,5,2)"/>
  483.                 </xsl:variable>
  484.                 <tr><td/>
  485.                 <xsl:choose>
  486.                     <xsl:when test="substring($doc_kind,1,1)='P'">
  487.                         <td class="table_data">
  488.                              <xsl:choose>
  489.                                  <xsl:when test="substring(.//PCIT/DOC/DNUM,1,4)='P.P.'">
  490.                                     <xsl:value-of select="substring(.//PCIT/DOC/DNUM,1,4)" /><xsl:value-of select="format-number(substring-after(.//PCIT/DOC/DNUM,'P.P.'), '##,###,###')" />
  491.                                 </xsl:when>
  492.                                 <xsl:otherwise>
  493.                                     <xsl:value-of select=".//PCIT/DOC/DNUM" />
  494.                                 </xsl:otherwise>
  495.                              </xsl:choose>
  496.                         </td>
  497.                      </xsl:when>
  498.                      <xsl:when test="substring($doc_kind,1,1)='S'">
  499.                      <td class="table_data">
  500.                              <xsl:choose>
  501.                                  <xsl:when test="substring(.//PCIT/DOC/DNUM,1,2)='D.'">
  502.                                     <xsl:value-of select="substring(.//PCIT/DOC/DNUM,1,2)" /><xsl:value-of select="format-number(substring-after(.//PCIT/DOC/DNUM,'D.'), '##,###,###')" />
  503.                                 </xsl:when>
  504.                                 <xsl:otherwise>
  505.                                     <xsl:value-of select=".//PCIT/DOC/DNUM" />
  506.                                 </xsl:otherwise>
  507.                              </xsl:choose>
  508.                          </td>
  509.                      </xsl:when>
  510.                      <xsl:otherwise>
  511.                          <td class="table_data">
  512.                              <xsl:choose>
  513.                                  <!-- *** test for alphabetic characters in DNUM ("Re.", "D", etc.) *** -->
  514.                                  <!-- *** if none, format-number *** -->
  515.                                  <xsl:when test="contains(.//PCIT/DOC/DNUM,'R')">
  516.                                     <xsl:value-of select=".//PCIT/DOC/DNUM" />
  517.                                 </xsl:when>
  518.                                 <xsl:when test="contains(.//PCIT/DOC/DNUM,'D')">
  519.                                     <xsl:value-of select=".//PCIT/DOC/DNUM" />
  520.                                 </xsl:when>
  521.                                 <xsl:when test="contains(.//PCIT/DOC/DNUM,'P')">
  522.                                     <xsl:value-of select=".//PCIT/DOC/DNUM" />
  523.                                 </xsl:when>
  524.                                 <xsl:otherwise>
  525.                                     <xsl:value-of select="format-number(.//PCIT/DOC/DNUM, '##,###,###')" />
  526.                                 </xsl:otherwise>
  527.                             </xsl:choose>
  528.                         </td>
  529.                      </xsl:otherwise>
  530.                 </xsl:choose>
  531.                 <xsl:choose>
  532.                     <xsl:when test=".//CITED-BY-EXAMINER">
  533.                         <td class="table_data" align="center">*</td>
  534.                     </xsl:when>
  535.                     <xsl:otherwise><td/></xsl:otherwise>
  536.                   </xsl:choose>
  537.                     <td class="table_data"><xsl:value-of select="format-number($citation-month,'##')" />/<xsl:value-of select="$citation-year"/></td>
  538.  
  539.                     <td class="table_data"><xsl:value-of select=".//PCIT/PARTY-US/NAM/SNM" /></td>
  540.                     <td class="table_data" align="right"><xsl:value-of select=".//PCIT/PNC" /></td>
  541.                 </tr>                    
  542.             </xsl:for-each>
  543.         </xsl:if>
  544.             <!-- ***** no container element for foreign documents; test existence of CTRY ***** -->
  545.             <xsl:if test=".//B561/descendant::CTRY">    
  546.                 <tr><td> </td></tr>            
  547.                 <tr><td/>
  548.                     <td class="table_data" colspan="4" align="center">FOREIGN PATENT DOCUMENTS </td>
  549.                     <td/>
  550.                     <td/>
  551.                     <td/>
  552.                 </tr>
  553.                 <xsl:for-each select=".//CTRY/ancestor::B561">
  554.  
  555.                 <xsl:variable name="fcitation-year">
  556.                     <xsl:value-of select="substring(.//PCIT/DOC/DATE,1,4)"/>
  557.                 </xsl:variable>
  558.                 <xsl:variable name="fcitation-month">
  559.                     <xsl:value-of select="substring(.//PCIT/DOC/DATE,5,2)"/>
  560.                 </xsl:variable>
  561.  
  562.                         <xsl:variable name="citation-year">
  563.                             <xsl:value-of select="substring(.//PCIT/DOC/DATE,1,4)"/>
  564.                         </xsl:variable>
  565.                         <xsl:variable name="citation-month">
  566.                             <xsl:value-of select="substring(.//PCIT/DOC/DATE,5,2)"/>
  567.                         </xsl:variable>
  568.                         <xsl:variable name="citation-day">
  569.                             <xsl:value-of select="substring(.//PCIT/DOC/DATE,7,2)"/>
  570.                         </xsl:variable>
  571.  
  572.                         <tr><td/>
  573.                         <td class="table_data"><xsl:value-of select=".//PCIT/DOC/DNUM" /></td>
  574.                   <xsl:choose>
  575.                         <xsl:when test=".//CITED-BY-EXAMINER">
  576.                             <td class="table_data" align="center">*</td>
  577.                         </xsl:when>
  578.                         <xsl:otherwise><td/></xsl:otherwise>
  579.                   </xsl:choose>
  580.                         <!--td class="table_data"--><!--xsl:value-of select=".//PCIT/DOC/DATE" /--><!--/td-->
  581.                         <td class="table_data"><xsl:value-of select="format-number($fcitation-month,'##')" />/<xsl:value-of select="$fcitation-year"/></td>
  582.                         <td class="table_data">(<xsl:value-of select=".//PCIT/DOC/CTRY" />)</td>
  583.                         <td class="table_data" align="right"><xsl:value-of select=".//PCIT/PNC" /></td>
  584.                     </tr>                    
  585.                 </xsl:for-each>
  586.             </xsl:if>
  587.  
  588.             <!-- ***** test for OTHER PUBLICATIONS (B562) ***** -->
  589.             <xsl:if test="//B562">
  590.                 <tr><td> </td></tr>
  591.                 <tr><td/>
  592.                     <td class="table_data" align="center" colspan="4">OTHER PUBLICATIONS</td>
  593.                 </tr>
  594.                 <xsl:for-each select="//B562">
  595.                     <tr><td class="table_data" colspan="6">
  596.                         <xsl:apply-templates />
  597.                     </td></tr>
  598.                 </xsl:for-each>
  599.                 <tr><td> </td></tr>
  600.             </xsl:if>
  601.  
  602.             <xsl:if test=".//CITED-BY-EXAMINER">
  603.                 <tr><td colspan="3" class="table_data">* cited by examiner</td></tr>
  604.             </xsl:if>
  605.         <!-- ***** primary examiner ***** -->
  606.             <tr><td class="table_data" colspan="5"><i>Primary Examiner</i>
  607.                 <xsl:text> </xsl:text>
  608.                 —
  609.                 <xsl:value-of select=".//B746/PARTY-US/NAM/FNM"/>
  610.                 <xsl:text> </xsl:text>
  611.                 <xsl:value-of select=".//B746/PARTY-US/NAM/SNM" />
  612.                 </td>
  613.             </tr>
  614.         <!-- ***** test for assistant examiner(s) ***** -->
  615.             <xsl:if test="//B747">
  616.             <!-- ***** assistant examiner(s) ***** -->
  617.             <tr><td class="table_data" colspan="6"><i>Assistant Examiner<xsl:if test="count(//B747) > 1">s</xsl:if></i>
  618.                 <xsl:text> </xsl:text>
  619.                 —
  620.                     <xsl:value-of select=".//B747/PARTY-US/NAM/FNM"/>
  621.                     <xsl:text> </xsl:text>
  622.                     <xsl:value-of select=".//B747/PARTY-US/NAM/SNM" />
  623.             
  624.                 <!-- ***** add commas after each SNM except final ***** -->
  625.                     <xsl:for-each select="//B747[1]/following-sibling::B747">, 
  626.                         <xsl:value-of select="PARTY-US/NAM/FNM"/>
  627.                         <xsl:text> </xsl:text>
  628.                         <xsl:value-of select="PARTY-US/NAM/SNM" />
  629.                     </xsl:for-each>
  630.                 </td>
  631.             </tr>
  632.             </xsl:if>
  633.             <!-- ***** attorney or agent ***** -->
  634.             <xsl:if test="//B740">
  635.             <tr><td class="table_data" colspan="6">(74)
  636.                    <i>Attorney, Agent, or Firm</i>
  637.                 <xsl:text> </xsl:text>
  638.                 —
  639.                 <xsl:text> </xsl:text>
  640.                 <!-- ***** B741+ ***** -->
  641.                 <xsl:value-of select=".//B741/PARTY-US/NAM"/>
  642.                 <!-- ***** additional agents (B741) ***** -->
  643.                 <xsl:for-each select="//B741[2]/descendant::PARTY-US">;
  644.                     <xsl:apply-templates select="NAM"/>
  645.                 </xsl:for-each>
  646.                 </td>
  647.             </tr>
  648.             </xsl:if>
  649.         </table>
  650.     </xsl:template>
  651.  
  652.     <xsl:template name="foreign_data" match="B300">
  653.         <tr>
  654.             <td class="table_data" width="9%">(30)</td>
  655.             <td class="table_data" colspan="3" align="center"><b>Foreign Application Priority Data</b></td>
  656.         </tr>
  657.         <tr><td/>
  658.             <!-- ***** foreign priority data, filing date ***** -->
  659.             <td class="table_data"><xsl:value-of select="B300/B320"/></td>
  660.             <!-- ***** foreign priority data, country code ***** -->
  661.             <td class="table_data"><xsl:value-of select="B300/B330"/></td>
  662.             <!-- ***** foreign priority data, priority application number ***** -->
  663.             <td class="table_data" align="right"><xsl:value-of select=".//B310/DNUM"/></td>
  664.         </tr>
  665.     </xsl:template>
  666.     
  667.     <xsl:template name="tech_info" match="B500">
  668.     <!-- ***** technical information ***** -->
  669.         <tr><td class="table_data">(51)</td>
  670.         <xsl:choose>
  671.             <xsl:when test="substring($doc_kind,1,1)='S'">
  672.                 <td class="table_data" width="15%"><b>LOC (7) Cl.: </b></td>
  673.             </xsl:when>
  674.             <xsl:otherwise>    
  675.                 <td class="table_data" width="15%"><b>Int. Cl.:<font size="1" style="vertical-align: super">7</font></b></td>
  676.             </xsl:otherwise>            
  677.         </xsl:choose>    
  678.                 <xsl:call-template name="ST32classifications_ipc" />
  679.         </tr>
  680.         <tr><td class="table_data">(52)</td>
  681.             <td class="table_data"><b>U.S. Cl.:</b></td>
  682.                 <xsl:call-template name="ST32classifications_us" />
  683.         </tr>
  684.     </xsl:template>
  685.     
  686.     <xsl:template name="ST32classifications_ipc" match="B510">
  687.             <td class="table_data">
  688.             <!-- ***** classification-ipc-primary  ***** -->
  689.             <b><xsl:value-of select=".//B511/*"/></b>
  690.             <!-- ***** classification-ipc-secondary ***** -->
  691.             <xsl:for-each select="descendant::B512">;            
  692.                 <xsl:value-of select="."/>                
  693.             </xsl:for-each>
  694.             </td>
  695.             <xsl:text> </xsl:text>
  696.             <!-- ***** IPC edition ***** -->
  697.             <td class="table_data"><xsl:value-of select="./B516"/></td>
  698.     </xsl:template>
  699.     
  700.     <xsl:template name="ST32classifications_us" match="B520">
  701.     
  702.             <td class="table_data">
  703.             <!-- ***** classification-us-primary ***** -->
  704.                 <b><xsl:value-of select=".//B521/*"/></b>
  705.             <!-- ***** classification-us-secondary, allow multiples ***** -->
  706.                 <xsl:for-each select=".//B520[1]/B522">;
  707.                     <xsl:value-of select="PDAT"/>
  708.                 </xsl:for-each>
  709.             </td>
  710.     </xsl:template>
  711.  
  712.  
  713. <!-- ********************************************************* -->
  714. <!--   SUBDOC ABSTRACT                                            -->
  715. <!-- ********************************************************* -->
  716.  
  717.     <xsl:template match="SDOAB">
  718.         <br/>
  719.         <div class="break_before">
  720.             <xsl:choose>
  721.             <!-- ***** If no H, add heading, text "Abstract" ***** -->
  722.                 <xsl:when test="not(.//H)">
  723.                     <table width="90%" border="0">
  724.                     <tr><td width="9%" class="table_data">(57)</td>
  725.                         <td><h3>Abstract</h3></td>
  726.                     </tr>
  727.                     </table>
  728.                 </xsl:when>
  729.                 <xsl:otherwise>
  730.                     <xsl:apply-templates mode="abstract_heading" select=".//H" />
  731.                 </xsl:otherwise>
  732.             </xsl:choose>
  733.             <xsl:apply-templates mode="abstract_para" select=".//PARA" />
  734.         </div>
  735.         <xsl:apply-templates mode="drawing-section" select="//SDODR"/>
  736.     </xsl:template>
  737.     
  738.     <xsl:template mode="abstract_heading" match="H">
  739.         <h3 align="center">
  740.             <xsl:apply-templates mode="abstract_para" />
  741.         </h3>
  742.     </xsl:template>
  743.     
  744.     <xsl:template mode="abstract_para" match="PARA">
  745.           <div class="left_para">
  746.             <table border="0" width="100%">
  747.                 <tr>
  748.                     <td width="8%" valign="top">
  749.                         <div class="para_text"></div>
  750.                     </td>
  751.                     <td width="85%">
  752.                         <div class="para_text">
  753.                                                
  754.                         <xsl:apply-templates />
  755.                         </div>
  756.                     </td>
  757.                     <td/>
  758.                     </tr>
  759.                 </table>
  760.         </div>
  761.     </xsl:template>
  762.  
  763.  
  764. <!-- ********************************************************** -->
  765. <!--     SUBDOC DESCRIPTION                                         -->
  766. <!-- ********************************************************** -->
  767.     
  768. <xsl:template match="SDODE">
  769.     <div class="smalltitle" style="page-break-before: always;">
  770.     <!-- ***** title of invention ***** -->
  771.         <xsl:value-of select="//B540/*" />
  772.     </div>
  773.          <xsl:apply-templates />
  774. </xsl:template>
  775.     
  776. <!-- ********************************************************** -->
  777. <!--     SUBDOC CLAIMS                                            -->
  778. <!-- ********************************************************** -->
  779.     <xsl:template match="SDOCL">
  780.         <xsl:if test="not(.//H)">
  781.         <!-- ***** if no H, add heading, text "Claim" ***** -->
  782.             <table width="90%" border="0">
  783.                 <tr><td width="9%" class="table_data">(57)</td>
  784.                     <td><h3>Claim</h3></td>
  785.                 </tr>
  786.             </table>
  787.         </xsl:if>
  788.     <xsl:apply-templates />
  789.     </xsl:template>
  790.  
  791.     <xsl:template match="CLM">
  792.         <table border="0" width="90%" cellpadding="0" cellspacing="0">
  793.             <tr>
  794.                 <td width="10%"/>
  795.                 <td width="80%" valign="top" class="para_text">
  796.                        
  797.                     <xsl:apply-templates select=".//PTEXT" mode="claimtext"/>                    
  798.                 </td>
  799.                 <td width="*"/>
  800.             </tr>
  801.         </table>
  802.         <br/><br/>
  803.      </xsl:template>
  804.  
  805.     <xsl:template match="PTEXT" mode="claimtext">
  806.         <xsl:choose>
  807.         <!-- ***** if parent element is CLMSTEP, indent ***** -->
  808.             <xsl:when test="./parent::CLMSTEP">
  809.                 <div class="claim_text">
  810.                     <xsl:apply-templates />
  811.                 </div>
  812.             </xsl:when>
  813.             <xsl:otherwise>        
  814.                 <xsl:apply-templates />
  815.             </xsl:otherwise>
  816.         </xsl:choose>
  817.     </xsl:template>
  818.     
  819.  
  820. <!-- ********************************************************* -->
  821. <!--   SUBDOC DRAWINGS (called by SDOAB)                       -->
  822. <!-- ********************************************************* -->
  823.  
  824.     <!-- ***** if there's no SDOAB, manually trigger drawings ***** -->
  825.     <!--xsl:template match="SDODR">
  826.         <xsl:if test="not(//SDOAB)">
  827.             <xsl:apply-templates select=".//EMI"/>
  828.         </xsl:if>
  829.     </xsl:template-->
  830.     
  831.         <xsl:template match="SDODR">
  832.            <a name="DRAWINGS"/>
  833.         <xsl:choose>
  834.         <!-- **** show 1st image only in Utility documents **** -->
  835.             <xsl:when test="substring($doc_kind,1,1)='S'">
  836.                 <!-- ** hides 1st image [0000] if theres an abstract -->
  837.                 <!--xsl:if test=".//SDOAB"-->
  838.                      <div class="break_before" >
  839.                         [<xsl:value-of select="substring-after(EMI/@ID,'-')"/>]
  840.                         <embed toolbar="off" fit="best" align="top" width="600" height="800" src="{EMI[1]/@FILE}"/>
  841.                     </div>
  842.                  <!--/xsl:if-->
  843.                 <!-- **** show following images in thumbnail size **** -->
  844.                 <xsl:for-each select="EMI[1]/following-sibling::EMI">
  845.                     <div>
  846.                         [<xsl:value-of select="substring-after(@ID,'-')"/>]
  847.                         <embed toolbar="off" fit="best" align="top" width="300" height="400" src="{@FILE}"/>
  848.                     </div>
  849.                 </xsl:for-each>
  850.              </xsl:when>
  851.             <xsl:when test="substring($doc_kind,1,1)='P'">
  852.                 <!-- 1st image should be shown by abstract -->
  853.                 <xsl:if test =".//SDOAB">
  854.                      <div class="break_before" >
  855.                         [<xsl:value-of select="substring-after(EMI/@ID,'-')"/>]
  856.                         <embed toolbar="off" fit="best" align="top" width="600" height="800" src="{EMI[1]/@FILE}"/>
  857.                     </div>
  858.                 </xsl:if>
  859.                 <!-- **** show following images in thumbnail size **** -->
  860.                 <xsl:for-each select="EMI[1]/following-sibling::EMI">
  861.                     <div>
  862.                         [<xsl:value-of select="substring-after(@ID,'-')"/>]
  863.                         <embed toolbar="off" fit="best" align="top" width="300" height="400" src="{@FILE}"/>
  864.                     </div>
  865.                 </xsl:for-each>
  866.              </xsl:when>
  867.              <xsl:otherwise>
  868.                 <!-- **** show first image; click link to see others **** -->
  869.                 <!--div class="break_before" >
  870.                     [<xsl:value-of select="substring-after(EMI[1]/@ID,'-')"/>]
  871.                     <embed toolbar="off" fit="best" align="top" width="600" height="800" src="{EMI[1]/@FILE}"/>
  872.                 </div-->
  873.              </xsl:otherwise>
  874.          </xsl:choose>
  875.     </xsl:template>
  876.     
  877.     <!-- **** show only the first image in the document browser window *** -->
  878.     <!-- **** subsequent images are shown in new window upon clicking cross-reference hyperlink **** -->
  879.     <xsl:template match="SDODR/EMI[1] | EMR">
  880.         <div class="break_before" >
  881.         [<xsl:value-of select="substring-after(@ID,'-')"/>]
  882.         <embed toolbar="off" fit="best" align="top" width="600" height="800" src="{@FILE}"/>
  883.         </div>
  884.     </xsl:template>
  885.     
  886.     <xsl:template match="EMI[not(ancestor::SDODR)]">
  887.         <div class="break_before" >
  888.         [<xsl:value-of select="substring-after(@ID,'-')"/>]
  889.         <embed toolbar="off" fit="best" align="top" width="600" height="800" src="{@FILE}"/>
  890.         </div>
  891.     </xsl:template>
  892.  
  893.  
  894.     <xsl:template mode="drawing-section" match="*">
  895.     <!-- creates an anchor named 'DRAWINGS' after the abstract -->
  896.         <a name="DRAWINGS"/>
  897.          <xsl:apply-templates />
  898.     </xsl:template>
  899.  
  900. <!-- ********************************************************** -->
  901. <!--     COMMON ELEMENTS (in roughly alphabetical order            -->
  902. <!-- ********************************************************** -->
  903.     <xsl:template match="ADR">
  904.         <xsl:text> </xsl:text>
  905.         <xsl:value-of select="STR" />,
  906.         <xsl:text> </xsl:text>
  907.         <xsl:value-of select="OMC" />
  908.         <xsl:text> </xsl:text>
  909.         <xsl:value-of select="CITY" />,
  910.         <xsl:text> </xsl:text>
  911.         <xsl:value-of select="STATE" />
  912.         <xsl:text> </xsl:text>
  913.         <xsl:if test="CTRY">
  914.             (<xsl:value-of select="CTRY" />)
  915.         </xsl:if>
  916.         <xsl:text> </xsl:text>
  917.     </xsl:template>
  918.     
  919.     <xsl:template match="FGREF">
  920.         <xsl:choose>
  921.                <xsl:when test="substring($doc_kind,1,1)='S'">
  922.                  <a href="#{@ID}"><xsl:value-of select="." /></a>
  923.              </xsl:when>
  924.                <xsl:when test="substring($doc_kind,1,1)='P'">
  925.                  <a href="#{@ID}"><xsl:value-of select="." /></a>
  926.              </xsl:when>
  927.              <xsl:otherwise>
  928.                 <a href="javascript:loadNewDoc(this);">
  929.                    <xsl:apply-templates />
  930.                  </a>
  931.              </xsl:otherwise>
  932.          </xsl:choose>
  933.      </xsl:template>
  934.     
  935.     <xsl:template match="HIL/BOLD/PDAT | FGREF/PDAT | BOLD">
  936.         <b>    <xsl:apply-templates /> </b>
  937.     </xsl:template>
  938.     
  939.     <xsl:template match="H">
  940.         <h3><xsl:apply-templates /></h3>
  941.     </xsl:template>
  942.     
  943.     <xsl:template match="HIL">
  944.         <xsl:apply-templates />
  945.         <xsl:text> </xsl:text>
  946.     </xsl:template>
  947.  
  948.     <xsl:template match="ITALIC">
  949.         <i>    <xsl:apply-templates />    </i>
  950.     </xsl:template>
  951.     
  952.     <xsl:template match="NAM">
  953.         <xsl:apply-templates />
  954.     </xsl:template>
  955.     
  956.     <!-- ***** components of NAM ***** -->
  957.     <xsl:template match="ONM | SFX | TTL | FNM | SNM">
  958.             <xsl:text> </xsl:text>
  959.             <xsl:apply-templates />
  960.     </xsl:template>
  961.  
  962.     <xsl:template match="PARA">
  963.         <div class="left_para">
  964.         <table border="0" width="100%">
  965.             <tr>
  966.                 <td width="8%" valign="top" class="para_text">
  967.                     <xsl:text> </xsl:text>
  968.                 </td>
  969.         <!-- ***** test LVL attribute, indent as required ***** -->
  970.             <xsl:choose>
  971.                 <xsl:when test="@LVL='0'">
  972.                     <td width="85%" class="para_text">
  973.                                        
  974.                         <xsl:apply-templates />
  975.                     </td>
  976.                 </xsl:when>
  977.                 <xsl:when test="@LVL='1'"><!-- ***** left-align, no indent ***** -->
  978.                     <td width="85%" class="para_text">
  979.                         <xsl:apply-templates />
  980.                     </td>
  981.                 </xsl:when>
  982.                 <xsl:when test="@LVL='3'">
  983.                     <td width="5%"/>
  984.                     <td width="*" class="para_text">
  985.                         <xsl:apply-templates />
  986.                     </td>
  987.                 </xsl:when>
  988.                 <xsl:otherwise><!-- ***** other value or no value at all ***** -->
  989.                     <td width="85%" class="para_text">
  990.                                        
  991.                         <xsl:apply-templates />
  992.                     </td>
  993.                 </xsl:otherwise>
  994.             </xsl:choose>            
  995.                 <td width="*"></td>
  996.             </tr>
  997.         </table>
  998.         </div>
  999.      </xsl:template>
  1000.  
  1001.     <xsl:template match="PTEXT | STEXT | PDAT">
  1002.         <xsl:apply-templates />
  1003.     </xsl:template>
  1004.  
  1005.     <xsl:template match="ULINE | DULINE">
  1006.         <u>    <xsl:apply-templates />    </u>
  1007.     </xsl:template>
  1008.     
  1009.  
  1010.     <xsl:template match="SMALLCAPS">
  1011.         <span class="smallcaps">
  1012.             <xsl:apply-templates />
  1013.         </span>
  1014.     </xsl:template>
  1015.  
  1016.     <!-- ***** hide MathML elements ***** -->
  1017.     <xsl:template match="//MATH/*" />
  1018.  
  1019. <!-- **** include Grant components **** -->
  1020. <xsl:include href="grant_sequences.xsl"/>
  1021. <xsl:include href="grant_cals.xsl"/>
  1022. <xsl:include href="css-styles.xsl"/>
  1023.  
  1024.  
  1025. </xsl:stylesheet>