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