home *** CD-ROM | disk | FTP | other *** search
/ Chip 2005 February / CMCD0205.ISO / Software / Freeware / Programare / Sharp / SharpDevelop_1.0.3.1761_Setup.exe / filenames.xslt < prev    next >
Extensible Markup Language  |  2004-07-05  |  5KB  |  115 lines

  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  3.  
  4. <xsl:template name="get-filename-for-current-namespace-hierarchy">
  5.     <xsl:value-of select="concat(translate(@name, '.', ''), 'Hierarchy.html')"/>
  6. </xsl:template>
  7.  
  8. <xsl:template name="get-filename-for-namespace">
  9.     <xsl:param name="name"/>
  10.     <xsl:value-of select="concat(translate($name, '.', ''), '.html')"/>
  11. </xsl:template>
  12.  
  13. <xsl:template name="get-filename-for-type">
  14.     <xsl:param name="id"/>
  15.     <xsl:value-of select="concat(translate(substring-after($id, 'T:'), '.', ''), '.html')"/>
  16. </xsl:template>
  17.  
  18. <xsl:template name="get-filename-for-current-constructor-overloads">
  19.     <xsl:variable name="type-part" select="translate(substring-after(../@id, 'T:'), '.', '')"/>
  20.     <xsl:value-of select="concat($type-part, 'ConstructorOverloads.html')"/>
  21. </xsl:template>
  22.  
  23. <xsl:template name="get-filename-for-current-constructor">
  24.     <!-- .#ctor or .#cctor -->
  25.     <xsl:value-of select="concat(translate(substring-after(substring-before(@id, '.#c'), 'M:'), '.', ''), 'Constructor', @overload, '.html')"/>
  26. </xsl:template>
  27.  
  28. <xsl:template name="get-filename-for-type-members">
  29.     <xsl:param name="id"/>
  30.     <xsl:value-of select="concat(translate(substring-after($id, 'T:'), '.', ''), 'Members.html')"/>
  31. </xsl:template>
  32.  
  33. <xsl:template name="get-filename-for-current-field">
  34.     <xsl:value-of select="concat(translate(substring-after(@id, 'F:'), '.', ''), 'Field.html')"/>
  35. </xsl:template>
  36.  
  37. <xsl:template name="get-filename-for-current-event">
  38.     <xsl:value-of select="concat(translate(substring-after(@id, 'E:'), '.', ''), 'Event.html')"/>
  39. </xsl:template>
  40.  
  41. <xsl:template name="get-filename-for-current-property-overloads">
  42.     <xsl:variable name="type-part" select="translate(substring-after(../@id, 'T:'), '.', '')"/>
  43.     <xsl:value-of select="concat($type-part, @name, 'Overloads.html')"/>
  44. </xsl:template>
  45.  
  46. <xsl:template name="get-filename-for-current-property">
  47.     <xsl:choose>
  48.         <xsl:when test="contains(@id, '(')">
  49.             <xsl:value-of select="concat(translate(substring-after(substring-before(@id, '('), 'P:'), '.', ''), 'Property', @overload, '.html')"/>
  50.         </xsl:when>
  51.         <xsl:otherwise>
  52.             <xsl:value-of select="concat(translate(substring-after(@id, 'P:'), '.', ''), 'Property', @overload, '.html')"/>
  53.         </xsl:otherwise>
  54.     </xsl:choose>
  55. </xsl:template>
  56.  
  57. <xsl:template name="get-filename-for-current-method-overloads">
  58.     <xsl:variable name="type-part" select="translate(substring-after(../@id, 'T:'), '.', '')"/>
  59.     <xsl:value-of select="concat($type-part, @name, 'Overloads.html')"/>
  60. </xsl:template>
  61.  
  62. <xsl:template name="get-filename-for-method">
  63.     <xsl:param name="method" select="."/>
  64.     <xsl:choose>
  65.         <xsl:when test="contains($method/@id, '(')">
  66.             <xsl:value-of select="concat(translate(substring-after(substring-before($method/@id, '('), 'M:'), '.', ''), 'Method', $method/@overload, '.html')"/>
  67.         </xsl:when>
  68.         <xsl:otherwise>
  69.             <xsl:value-of select="concat(translate(substring-after($method/@id, 'M:'), '.', ''), 'Method', $method/@overload, '.html')"/>
  70.         </xsl:otherwise>
  71.     </xsl:choose>
  72. </xsl:template>
  73.  
  74. <xsl:template name="get-filename-for-system-method">
  75.     <!-- EXAMPLE:  ms-help://MSDNVS/cpref/html_hh2/frlrfSystemObjectClassEqualsTopic.htm -->
  76.     <xsl:value-of select="concat('ms-help://MSDNVS/cpref/html_hh2/frlrf', translate(@declaringType, '.', ''), 'Class', @name, 'Topic.htm')"/>
  77. </xsl:template>
  78.  
  79. <xsl:template name="get-filename-for-system-class">
  80.     <xsl:param name="class-name"/>
  81.     <xsl:value-of select="concat('ms-help://MSDNVS/cpref/html_hh2/frlrf', translate($class-name, '.', ''), 'ClassTopic.htm')"/>
  82. </xsl:template>
  83.  
  84. <xsl:template name="get-filename-for-individual-member">
  85.     <xsl:param name="member"/>
  86.     <xsl:choose>
  87.         <xsl:when test="$member = 'field'">
  88.             <xsl:call-template name="get-filename-for-current-field"/>
  89.         </xsl:when>
  90.         <xsl:when test="$member = 'property'">
  91.             <xsl:call-template name="get-filename-for-current-property"/>
  92.         </xsl:when>
  93.         <xsl:when test="$member = 'event'">
  94.             <xsl:call-template name="get-filename-for-current-event"/>
  95.         </xsl:when>
  96.         <xsl:otherwise>
  97.             <xsl:call-template name="get-filename-for-method"/>
  98.         </xsl:otherwise>
  99.     </xsl:choose>
  100. </xsl:template>
  101.  
  102. <xsl:template name="get-filename-for-individual-member-overloads">
  103.     <xsl:param name="member"/>
  104.     <xsl:choose>
  105.         <xsl:when test="$member = 'property'">
  106.             <xsl:call-template name="get-filename-for-current-property-overloads"/>
  107.         </xsl:when>
  108.         <xsl:otherwise>
  109.             <xsl:call-template name="get-filename-for-current-method-overloads"/>
  110.         </xsl:otherwise>
  111.     </xsl:choose>
  112. </xsl:template>
  113.  
  114. </xsl:stylesheet>
  115.