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

  1. <xsl:stylesheet version="1.0" 
  2.                 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
  3.                 xmlns:doc="urn:schemas-uspto-gov:document"
  4.                 exclude-result-prefixes="doc">
  5.  
  6. <doc:summary doc:public="yes" >
  7.     <doc:title>Component stylesheet for figures</doc:title>
  8.     <doc:filename>figures.xsl</doc:filename>
  9.     <doc:version>1.0</doc:version>
  10.     <doc:doctype>numerous</doc:doctype>
  11.     <doc:doctype-date>N/A</doc:doctype-date>
  12.     <doc:dateCreated>2001-01-26</doc:dateCreated>
  13.     <doc:lastModified>2001-02-16</doc:lastModified>
  14.     <doc:description>
  15.       Template rules for embedding TIFFs from <image> and <figure> elements
  16.       into an HTML browser.  Calls script from 'pap.xsl' to create a new document
  17.       with all images contained within a <figure> element and load into a 
  18.       separate window.
  19.     <pre style="font-face:arial; font-size:10pt;">
  20.       Notes: 
  21.       sets width & height of embedded plug-in to width & height         
  22.       attributes of image if present; otherwise sets 800 X 600        
  23.     
  24.       preset to "best" fit; fits entire image to width & height      
  25.                                                                         
  26.       NOTE:  width & height are plug-in, not image!                  
  27.  
  28.       96 pixels per inch on Windows screens using Small Icons/fonts; 
  29.       72 pixels per inch on Windows screens using Large Icons/fonts; 
  30.       use 84 to allow for header and footer                          
  31.                                                                    
  32.       300 pixels per inch for USPTO scans           
  33.        </pre>               
  34.     </doc:description>
  35. </doc:summary>
  36.  
  37. <!--
  38. *********************************************************************
  39. * John Dunning: 2001-01-26                                          *
  40. * Component file for image viewing: <image>                         *
  41. *                                                                      *
  42. * sets width & height of embedded plug-in to width & height         *
  43. *   attributes of image if present; otherwise sets 800 X 600        *
  44. *                                                                   *
  45. *    preset to "best" fit; fits entire image to width & height      *
  46. *                                                                   *
  47. *    NOTE:  width & height are plug-in, not image!                  *
  48. *                                                                   *
  49. *    96 pixels per inch on Windows screens using Small Icons/fonts; *
  50. *    72 pixels per inch on Windows screens using Large Icons/fonts; *
  51. *    use 84 to allow for header and footer                          *
  52. *                                                                   *
  53. *    300 pixels per inch for USPTO scans                            *
  54. *********************************************************************
  55. -->
  56.  
  57.     <xsl:template match="figure[1]">
  58.        <br/>
  59.       [<xsl:value-of select="substring-after(@id,'-')"/>]
  60.        <xsl:apply-templates />
  61.     </xsl:template>
  62.  
  63.     <xsl:template match="drawing-reference-character">
  64.         <xsl:apply-templates />
  65.     </xsl:template>
  66.     
  67.     <xsl:template match="figure[1]/image[1]">
  68.         <xsl:choose>
  69.             <xsl:when test="@he"><!-- if it has height and width attributes -->
  70.                 <embed toolbar="off" fit="best" align="top" src="{@file}" height="{round(@he)}" width="{round(@wi)}"/>
  71.             </xsl:when>
  72.             <xsl:otherwise><!-- otherwise, preset TIFF viewer size -->
  73.                 <embed toolbar="off" fit="best" align="top" width="600" height="800" src="{@file}"/>
  74.             </xsl:otherwise>
  75.         </xsl:choose>
  76.         <div class="break_before" />
  77.     </xsl:template>
  78.  
  79.  
  80.     <xsl:template match="image[not(ancestor::figure)]">
  81.        <xsl:choose>
  82.             <xsl:when test="@he"><!-- if it has height and width attributes -->
  83.                 <embed toolbar="off" fit="best" align="top" src="{@file}" height="{round(@he)}" width="{round(@wi)}"/>
  84.             </xsl:when>
  85.             <xsl:otherwise><!-- otherwise, preset TIFF viewer size -->
  86.                 <embed toolbar="off" fit="best" align="top" width="600" height="800" src="{@file}"/>
  87.             </xsl:otherwise>
  88.         </xsl:choose>
  89.     </xsl:template>
  90.  
  91.  
  92. </xsl:stylesheet>