home *** CD-ROM | disk | FTP | other *** search
/ Internet Magazine 2003 October / INTERNET108.ISO / pc / software / windows / building / xmlspy / xmlspyentcomplete5.exe / Data1.cab / _74A5620E957D4ABC82B741CB54C2F553 < prev    next >
Encoding:
Extensible Markup Language  |  2002-08-26  |  2.7 KB  |  54 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 <document-id></doc:title>
  8.     <doc:filename>document-id.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 <document-id> and children.  Returns a whitespace delmited
  16.         string of sub-elements.
  17.     </doc:description>
  18. </doc:summary>
  19. <!--
  20. *****************************************************************
  21. *  John Dunning: 2001-01-29:                                    *
  22. *  Component file for document-id and children                  *
  23. *****************************************************************
  24. -->
  25.  
  26.     <xsl:template match="document-id">
  27.         <xsl:apply-templates select="country-code"/>
  28.         <xsl:text> </xsl:text>
  29.         <xsl:apply-templates select="doc-number"/>
  30.         <xsl:text> </xsl:text>
  31.         <xsl:apply-templates select="kind-code"/>
  32.         <xsl:text> </xsl:text>
  33.         <xsl:apply-templates select="document-date"/>
  34.         <xsl:text> </xsl:text>
  35.     </xsl:template>
  36.  
  37.     <xsl:template match="country-code | doc-number | kind-code">
  38.         <xsl:value-of select= "."/>
  39.     </xsl:template>
  40.     
  41.     <xsl:template match="document-date" doc:public="yes" doc:description="uses <xsl:param> elements to present <document-date> in YYYY-MM-DD format">
  42.             <xsl:param name="document-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.">
  43.                 <xsl:value-of select="substring(.//document-date,1,4)"/>
  44.             </xsl:param>
  45.             <xsl:param name="document-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.">
  46.                 <xsl:value-of select="substring(.//document-date,5,2)"/>
  47.             </xsl:param>
  48.             <xsl:param name="document-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.">
  49.                 <xsl:value-of select="substring(.//document-date,7,2)"/>
  50.             </xsl:param>
  51.             <xsl:value-of select="$document-year" />-<xsl:value-of select="$document-month" />-<xsl:value-of select="$document-day" />
  52.     </xsl:template>
  53.  
  54. </xsl:stylesheet>