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

  1. <?xml-stylesheet href="stripDocumentation.xsl" type="text/xsl"?>
  2. <xsl:stylesheet version="1.0" 
  3.                 exclude-result-prefixes="msxsl local doc" 
  4.                 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
  5.                 xmlns:doc="urn:schemas-uspto-gov:document"
  6.                 xmlns:msxsl="urn:schemas-microsoft-com:xslt" 
  7.                 xmlns:local="#local-functions" 
  8.                 extension-element-prefixes="msxsl local">
  9.  
  10.  
  11. <!-- *** these are imported for documentation purposes only! *** -->
  12. <!-- *** see 'xsl:include' elements at the bottom of this file *** -->
  13. <xsl:import href="pap_noscript.xsl"/>
  14. <xsl:import href="figures_detail.xsl"/>
  15. <xsl:import href="figures_noscript.xsl"/>
  16.                 
  17. <doc:summary doc:public="yes" >
  18.     <doc:title>Patent Application Publication Stylesheet</doc:title>
  19.     <doc:filename>pap.xsl</doc:filename>
  20.     <doc:version>1.0</doc:version>
  21.     <doc:doctype>PAP v1.5</doc:doctype>
  22.     <doc:doctype-date>2001-01-31</doc:doctype-date>
  23.     <doc:dateCreated>2001-01-26</doc:dateCreated>
  24.     <doc:lastModified>2001-02-21</doc:lastModified>
  25.     <doc:description>This is the "driver" file for an XSL transformation;        
  26.        all patent-application-publication specific template rules  
  27.        are in this file; component files are "included" below      
  28.     </doc:description>
  29. </doc:summary>
  30.  
  31.  
  32. <xsl:output method="html" indent="yes" omit-xml-declaration="yes" />
  33.  
  34. <xsl:preserve-space elements="*"/>
  35.  
  36. <xsl:template match="*">
  37.     <xsl:apply-templates /> 
  38. </xsl:template>
  39.  
  40. <xsl:template match="/" doc:public="yes" doc:description="The root element of the document instance; creates an HTML document context">
  41.     <html>
  42.         <head>
  43.             <xsl:call-template name="css_styles"/>
  44.     <script language="JScript"><xsl:comment><![CDATA[
  45.     function loadNewDoc(node){
  46.     try {
  47.         var myloc, myNewLoc, myPI, stylePI, newStylePI, r, re, styleNode;
  48.  
  49.         var mydoc = new ActiveXObject("Msxml2.DOMDocument");
  50.         var myNewDoc = new ActiveXObject("Msxml2.DOMDocument");
  51.             myNewDoc.loadXML("<figure></figure>");
  52.             root = myNewDoc.documentElement; // <figure/>
  53.             myloc = new String(window.location);
  54.             myNewLoc = myloc.substr(8); 
  55.  
  56.         var myImages = document.XMLDocument.getElementsByTagName("figure/image");
  57.             for (var i=0;i<myImages.length;i++){
  58.                 myNewDoc.documentElement.appendChild(myImages(i));
  59.         }
  60.  
  61.         for (var i=0;i<document.XMLDocument.documentElement.parentNode.childNodes.length;i++){
  62.             if (document.XMLDocument.documentElement.parentNode.childNodes(i).nodeName == "xml-stylesheet") {
  63.                 stylePI = document.XMLDocument.documentElement.parentNode.childNodes(i).text;
  64.  
  65.                 // test whether pap.xsl or pap_full.xsl is used;
  66.                 if (stylePI.indexOf("full") == -1)
  67.                     re = /pap/g;
  68.                     else
  69.                     re = /pap_full/g;
  70.                 r = stylePI.replace(re,"figures_detail");
  71.                 newStylePI = myNewDoc.createProcessingInstruction("xml-stylesheet",r);
  72.                 }
  73.             }
  74.             styleNode = myNewDoc.insertBefore(newStylePI,root);
  75.  
  76.         // save new file to same directory        
  77.         
  78.             var fileName = "";
  79.             var href= myNewLoc;
  80.             var s = href.split("/");
  81.             for (var i=0;i<(s.length);i++) { 
  82.             fileName=s[i]; 
  83.             }
  84.             var locLen = myNewLoc.length;
  85.             var fileLen = fileName.length;
  86.             var path = myNewLoc.substr(0,(locLen-fileLen));
  87.             
  88.         // now write to a file that can be opened in new browser
  89.         var fso = new ActiveXObject("Scripting.FileSystemObject");
  90.         var a = fso.CreateTextFile(path + "images.xml", true);
  91.         a.Write(myNewDoc.xml);
  92.         a.Close();
  93.             
  94.         var newWin = window.open(path + "images.xml");
  95.     
  96.     }
  97.     
  98.     catch(e) {
  99.         window.alert ("An error has occurred.  Please use the stylesheet 'pap_noscript.xsl'");    
  100.     }
  101. }    
  102.  
  103.  
  104.     ]]></xsl:comment>
  105.     </script>
  106.     </head>
  107.         
  108.         <body>
  109.         <basefont face="Arial Unicode MS, Lucida Sans Unicode, Times New Roman "
  110.                     size="2">
  111.         <div style="margin-left: +35pt;">
  112.             <xsl:apply-templates select=".//subdoc-bibliographic-information | .//subdoc-abstract | .//subdoc-description | .//sequence-cwu | .//subdoc-claims"/>
  113.         </div>
  114.         </basefont>
  115.         </body>
  116.     </html>
  117. </xsl:template>
  118.  
  119.     <!-- *** top-level block (document head) *** -->
  120.  
  121.     <xsl:template match="subdoc-bibliographic-information" doc:public="yes" doc:description="Template rules specific to formatting objects contained in <subdoc-bibliographic-information>. 
  122.                                                           This includes the barcode and the following elements and their children: document-id, publication-filing-type, domestic-filing-data, foreign-priority-data, technical-information, continuity-data, prior-publication, inventors, assignee, correspondence-address, international-conventions, and appendix-data">
  123.         <xsl:param name="subdoc-year" doc:public="yes" doc:description="assigns the year portion of the <document-date> element to a parameter to allow YYYY-MM-DD date formatting.">
  124.             <xsl:value-of select="substring(.//document-date,1,4)"/>
  125.         </xsl:param>
  126.         <xsl:param name="subdoc-month" doc:public="yes" doc:description="assigns the month portion of the <document-date> element to a parameter to allow YYYY-MM-DD date formatting.">
  127.             <xsl:value-of select="substring(.//document-date,5,2)"/>
  128.         </xsl:param>
  129.         <xsl:param name="subdoc-day" doc:public="yes" doc:description="assigns the date portion of the <document-date> element to a parameter to allow YYYY-MM-DD date formatting.">
  130.             <xsl:value-of select="substring(.//document-date,7,2)"/>
  131.         </xsl:param>
  132.  
  133.         <xsl:param name="filing-year" doc:public="yes" doc:description="assigns the year portion of the <filing-date> element to a parameter to allow YYYY-MM-DD date formatting.">
  134.             <xsl:value-of select="substring(.//filing-date,1,4)"/>
  135.         </xsl:param>
  136.         <xsl:param name="filing-month" doc:public="yes" doc:description="assigns the month portion of the <filing-date> element to a parameter to allow YYYY-MM-DD date formatting.">
  137.             <xsl:value-of select="substring(.//filing-date,5,2)"/>
  138.         </xsl:param>
  139.         <xsl:param name="filing-day" doc:public="yes" doc:description="assigns the date portion of the <filing-date> element to a parameter to allow YYYY-MM-DD date formatting.">
  140.             <xsl:value-of select="substring(.//filing-date,7,2)"/>
  141.         </xsl:param>
  142.          
  143.  
  144.      <table width="90%" border="0">
  145.                 <tr>
  146.                 <!-- ***** barcode info ***** -->
  147.                 <td class="bar" align="right">*<xsl:value-of select=".//doc-number"/><xsl:value-of select=".//kind-code" />*</td>        
  148.                 </tr>
  149.         </table>
  150.         <xsl:variable name="doc_len" select="string-length(.//document-id/doc-number)" doc:public="yes" doc:description="gets the length of the doc-number for use in formatting doc-number"/>
  151.         <xsl:variable name="pubno_1" select="substring(.//document-id/doc-number,1,4)" doc:public="yes" doc:description="used to format the first part of the publication number (e.g. "20001-""/>            
  152.         <xsl:variable name="pubno_2" select="substring(.//document-id/doc-number,3,$doc_len)" doc:public="yes" doc:description="used to format the remaining part of the publication number"/>            
  153.  
  154.         <table width="90%" border="0">
  155.             <tr>
  156.                 <td class="headinfo_large" width="43%">
  157.                     <b>Patent Application Publication</b>   <font size="-1" weight="normal">(12)</font>
  158.                 </td>
  159.                 <td class="table_data" width="27%">
  160.                     (10)     <b>Publication Number: </b>
  161.                 </td>
  162.                 <td class="table_data" width="30%" align="right">
  163.                     <b>US <xsl:value-of select="$pubno_1"/>-<xsl:value-of select="$pubno_2" />
  164.                     <xsl:text> </xsl:text>
  165.                         <xsl:value-of select=".//kind-code" />
  166.                     </b>                
  167.                 </td>
  168.             </tr>
  169.             <tr>
  170.                 <td class="headinfo_reg">
  171.                     <b><xsl:value-of select=".//first-named-inventor//family-name"/></b>
  172.                 </td>
  173.                 <td class="table_data">(43)     <b>Publication Date:</b> </td>
  174.                 <td class="headinfo_reg" align="right"><xsl:value-of select="$subdoc-year" />-<xsl:value-of select="$subdoc-month" />-<xsl:value-of select="$subdoc-day" /></td>
  175.             </tr>
  176.         </table>
  177.         <hr width="100%"/>
  178.         <!-- end doc header -->
  179.         
  180.         <!-- bibliographic info -->
  181.         <table width="90%" border="0">
  182.         <tr><td width="10%"/><td width="15%"/><td width="*"/></tr>
  183.             <tr><td class="table_data">(54)</td>
  184.                 <td colspan="2" style="text-transform: uppercase"><b><xsl:value-of select="//title-of-invention"/></b></td>
  185.                 <td/>
  186.             </tr>
  187.             <tr><td class="table_data">(76)</td>
  188.                 <td class="table_data">
  189.                     INVENTOR: 
  190.                 </td>
  191.                 <td class="table_data">
  192.                  <b><xsl:apply-templates select=".//first-named-inventor/name"/>,</b> 
  193.                   <xsl:value-of select=".//first-named-inventor/residence//city"/>
  194.                     <xsl:text> </xsl:text>
  195.                     <xsl:value-of select=".//first-named-inventor/residence//state"/>
  196.                     <xsl:text> </xsl:text>
  197.                     (<xsl:value-of select=".//first-named-inventor/residence//country-code"/>)
  198.                     </td>
  199.             </tr>
  200.             <tr><td/>
  201.             <xsl:variable name="appno_1" select="substring(.//application-number/doc-number,1,2)" doc:public="yes" doc:description="used to format the first part of the application number (e.g. "09/""/>            
  202.             <xsl:variable name="appno_2" select="substring(.//application-number/doc-number,3,8)" doc:public="yes" doc:description="used to format the remaining part of the application number"/>            
  203.             
  204.             <td class="table_data" colspan="2"><xsl:apply-templates select="correspondence-address" /></td></tr>
  205.             <tr><td class="table_data">(21)</td>
  206.                 <td class="table_data">Appl. No.: </td>
  207.                 <td class="table_data"><b><xsl:value-of select="$appno_1"/>/<xsl:value-of select="format-number($appno_2,'###,###')" /></b></td>
  208.             </tr>
  209.             <tr><td class="table_data">(22)</td>
  210.                 <td class="table_data">Filed: </td>
  211.                 <td class="table_data"><b><xsl:value-of select="$filing-year" />-<xsl:value-of select="$filing-month" />-<xsl:value-of select="$filing-day" /></b></td>
  212.             </tr>
  213.             
  214.             <table width="50%" border="0">
  215.                 <xsl:if test="//foreign-priority-data">
  216.                     <xsl:call-template name="foreign_data"/>    
  217.                 </xsl:if>
  218.             </table>
  219.                 <xsl:call-template name="tech_info"/>
  220.             <tr><td> </td></tr>
  221.             <tr><td> </td></tr>
  222.             <xsl:apply-templates select="appendix-data"/>
  223.         </table>
  224.     </xsl:template>
  225.     
  226.     
  227. <xsl:template match="subdoc-description" doc:public="no" doc:description="Template rules specific to <subdoc-description>; uses generic <xsl:apply-templates /> to call included template rules.">
  228.     <div class="smalltitle">
  229.         <xsl:value-of select="//title-of-invention" />
  230.     </div>
  231.         <xsl:apply-templates />
  232. </xsl:template>
  233.  
  234. <xsl:template match="copyright-statement">
  235.         <div style="margin-bottom:  1pc;
  236.                     margin-left:    +10pt;">
  237.                <xsl:apply-templates />
  238.         </div>
  239. </xsl:template>
  240.  
  241. <xsl:template match="cross-reference-to-related-applications">
  242.         <div style="margin-bottom:  1pc;
  243.                     margin-left:    +10pt;">
  244.                <xsl:apply-templates />
  245.         </div>
  246. </xsl:template>
  247.  
  248.     <xsl:template match="cross-reference">
  249.       <b>
  250.            <xsl:choose>
  251.                <xsl:when test="@target='DRAWINGS'">
  252.                 <a href="javascript:loadNewDoc(this);">
  253.                    <xsl:apply-templates />
  254.                 </a>
  255.              </xsl:when>
  256.              <xsl:otherwise>
  257.                 <a href="#{@target}">
  258.                    <xsl:apply-templates />
  259.                 </a>
  260.              </xsl:otherwise>
  261.        </xsl:choose>
  262.       </b>
  263.     </xsl:template>
  264.  
  265.  
  266.  
  267.     <xsl:template name="foreign_data" doc:description="Template rules for <foreign-priority-data> and children">
  268.         <xsl:param name="foreign-year" doc:public="yes" doc:description="assigns the year portion of the foreign-priority-data/filing-date to a parameter to allow YYYY-MM-DD date formatting.">
  269.             <xsl:value-of select="substring(foreign-priority-data/filing-date,1,4)"/>
  270.         </xsl:param>
  271.         <xsl:param name="foreign-month" doc:public="yes" doc:description="assigns the month portion of the foreign-priority-data/filing-date to a parameter to allow YYYY-MM-DD date formatting.">
  272.             <xsl:value-of select="substring(foreign-priority-data/filing-date,5,2)"/>
  273.         </xsl:param>
  274.         <xsl:param name="foreign-day" doc:public="yes" doc:description="assigns the date portion of the foreign-priority-data/filing-date to a parameter to allow YYYY-MM-DD date formatting.">
  275.             <xsl:value-of select="substring(foreign-priority-data/filing-date,7,2)"/>
  276.         </xsl:param>
  277.     
  278.         <tr>
  279.             <td class="table_data" width="9%">(30)</td>
  280.             <td class="table_data" colspan="3" align="center"><b>Foreign Application Priority Data</b></td>
  281.         </tr>
  282.         <tr><td/>
  283.             <td class="table_data"><!--xsl:value-of select="foreign-priority-data/filing-date"/-->
  284.             <xsl:value-of select="$foreign-year" />-<xsl:value-of select="$foreign-month" />-<xsl:value-of select="$foreign-day" /></td>
  285.             <td class="table_data"><xsl:value-of select="foreign-priority-data/country-code"/></td>
  286.             <td class="table_data" align="right"><xsl:value-of select=".//priority-application-number/doc-number"/></td>
  287.         </tr>
  288.     </xsl:template>
  289.     
  290.     <xsl:template name="tech_info" doc:description="Template rules for Publication Classifications (US/International) and children.">
  291.     <table width="50%" border="0" cellpadding="0" cellspacing="0">
  292.         <tr>
  293.             <td width="9%"/>
  294.             <td class="table_data" colspan="4" align="center"><b>Publication Classification</b></td>
  295.         </tr>
  296.         <tr><td class="table_data">(51)</td>
  297.             <td class="table_data" width="15%"><b>Int. Cl.: </b></td>
  298.             <td/>
  299.                 <xsl:call-template name="classifications_ipc" />
  300.         </tr>
  301.         <tr><td class="table_data">(52)</td>
  302.             <td class="table_data"><b>U.S. Cl.:</b></td>
  303.             <td/>
  304.                 <xsl:call-template name="classifications_us" />
  305.         </tr>
  306.     </table>
  307.     </xsl:template>
  308.  
  309.     <!-- hide MathML components -->
  310.     <xsl:template match="//math/*" doc:public="yes" doc:description="Hides MathML components, as an <image> will be supplied" />
  311.     
  312.      <xsl:template match="representative-figure">
  313.          Representative Figure: <xsl:value-of select="." />
  314.      </xsl:template>
  315.     
  316.     <xsl:template match="text()">
  317.         <xsl:value-of select="." />
  318.     </xsl:template>
  319.  
  320. <!-- include component stylesheets, overriding subsequent declarations -->
  321.  
  322. <xsl:include href="abstract.xsl"/>
  323. <xsl:include href="address.xsl"/>
  324. <xsl:include href="appendix.xsl"/>
  325. <xsl:include href="biological-deposit.xsl"/>
  326. <xsl:include href="cals.xsl"/>
  327. <xsl:include href="citation.xsl"/>
  328. <xsl:include href="claims.xsl"/>
  329. <xsl:include href="classifications.xsl"/>
  330. <xsl:include href="common.xsl"/>
  331. <xsl:include href="correspondence-address.xsl"/>
  332. <xsl:include href="css-styles.xsl"/>
  333. <xsl:include href="cwu.xsl"/>
  334. <xsl:include href="document-id.xsl"/>
  335. <xsl:include href="figures.xsl"/>
  336. <xsl:include href="inventor-block.xsl"/>
  337. <xsl:include href="name.xsl"/>
  338. <xsl:include href="para-fed.xsl"/>
  339. <xsl:include href="party.xsl"/>
  340. <xsl:include href="residence.xsl"/>
  341. <xsl:include href="sequence-listing.xsl"/>
  342.  
  343.  
  344. </xsl:stylesheet>