home *** CD-ROM | disk | FTP | other *** search
/ Chip 2005 February / CMCD0205.ISO / Software / Freeware / Programare / Sharp / SharpDevelop_1.0.3.1761_Setup.exe / event.xslt < prev    next >
Extensible Markup Language  |  2004-07-05  |  4KB  |  119 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. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
  4. <xsl:include href="common.xslt"/>
  5.  
  6. <xsl:param name='id'/>
  7.  
  8. <xsl:template match="/">
  9.       <xsl:apply-templates select="DOC.NET/assembly/module/namespace/*/event[@id=$id]"/>
  10. </xsl:template>
  11.  
  12. <xsl:template match="event">
  13.  
  14. <html dir="LTR">
  15. <head>
  16. <title>
  17.     <xsl:value-of select="../@name"/>.<xsl:value-of select="@name"/>
  18.     <xsl:text> Event</xsl:text>
  19. </title>
  20. </head>
  21.  
  22. <link rel="stylesheet" type="text/css" href="MsdnHelp.css"/>
  23.  
  24. <body>
  25. <h1><xsl:value-of select="../@name"/>.<xsl:value-of select="@name"/> Event</h1>
  26.  
  27. <xsl:call-template name="summary-section"/>
  28. <xsl:call-template name="field-or-event-syntax"/>
  29. <p/>
  30.  
  31. <xsl:variable name="type" select="@type"/>
  32. <xsl:variable name="eventargs-id" select="concat('T:', //delegate[@id=concat('T:', $type)]/parameter[contains(@type, 'EventArgs')][1]/@type)"/>
  33. <xsl:if test="//class[@id=$eventargs-id]/property[@access='Public' and not(@static)]">
  34.     <h3>Event Data</h3>
  35.     <p class="i1">
  36.         <xsl:text>The event handler receives a </xsl:text>
  37.         <a>
  38.             <xsl:attribute name="href">
  39.                 <xsl:call-template name="get-filename-for-type-members">
  40.                     <xsl:with-param name="id" select="$eventargs-id"/>
  41.                 </xsl:call-template>
  42.             </xsl:attribute>
  43.             <xsl:value-of select="//class[@id=$eventargs-id]/@name"/> 
  44.         </a>
  45.         <xsl:text> containing data related to the </xsl:text>
  46.         <B><xsl:value-of select="@name"/></B>
  47.         <xsl:text> event. The following </xsl:text>
  48.         <B><xsl:value-of select="//class[@id=$eventargs-id]/@name"/></B>
  49.         <xsl:text> properties provide information specific to this event.</xsl:text>
  50.     </p>
  51.     <table cellspacing="0">
  52.         <tr valign="top"><th width="50%">Property</th><th width="50%">Description</th></tr>
  53.           <xsl:apply-templates select="//class[@id=$eventargs-id]/property[@access='Public' and not(@static)]">
  54.               <xsl:sort select="@name"/>
  55.           </xsl:apply-templates>
  56.     </table>
  57. </xsl:if>
  58.  
  59.  
  60. <xsl:call-template name="remarks-section"/>
  61. <xsl:call-template name="example-section"/>
  62. <xsl:call-template name="seealso-section">
  63.     <xsl:with-param name="page">event</xsl:with-param>
  64. </xsl:call-template>
  65.  
  66. <object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e" viewastext="viewastext">
  67.     <xsl:element name="param">
  68.         <xsl:attribute name="name">Keyword</xsl:attribute>
  69.         <xsl:attribute name="value"><xsl:value-of select='@name'/> event</xsl:attribute>
  70.     </xsl:element>
  71.     <xsl:element name="param">
  72.         <xsl:attribute name="name">Keyword</xsl:attribute>
  73.         <xsl:attribute name="value"><xsl:value-of select='@name'/> event, <xsl:value-of select='../@name'/> class</xsl:attribute>
  74.     </xsl:element>
  75.     <xsl:element name="param">
  76.         <xsl:attribute name="name">Keyword</xsl:attribute>
  77.         <xsl:attribute name="value"><xsl:value-of select='../@name'/>.<xsl:value-of select='@name'/> event</xsl:attribute>
  78.     </xsl:element>
  79. </object>
  80.  
  81. </body>
  82. </html>
  83.  
  84. </xsl:template>
  85.  
  86. <xsl:template match="property">
  87.     <xsl:variable name="name" select="@name"/>
  88.     <xsl:if test="not(preceding-sibling::property[@name=$name])">
  89.         <tr VALIGN="top">
  90.             <xsl:choose>
  91.                 <xsl:when test="following-sibling::property[@name=$name]">
  92.                     <td width="50%">
  93.                         <a>
  94.                             <xsl:attribute name="href">
  95.                                 <xsl:call-template name="get-filename-for-current-property-overloads"/>
  96.                             </xsl:attribute>
  97.                             <xsl:value-of select="@name"/>
  98.                         </a>
  99.                     </td>
  100.                     <td width="50%">Overloaded. <xsl:apply-templates select="summary/node()" mode="slashdoc"/></td>
  101.                 </xsl:when>
  102.                 <xsl:otherwise>
  103.                     <td width="50%">
  104.                         <a>
  105.                             <xsl:attribute name="href">
  106.                                 <xsl:call-template name="get-filename-for-current-property"/>
  107.                             </xsl:attribute>
  108.                             <xsl:value-of select="@name"/>
  109.                         </a>
  110.                     </td>
  111.                     <td width="50%"><xsl:apply-templates select="summary/node()" mode="slashdoc"/></td>
  112.                 </xsl:otherwise>
  113.             </xsl:choose>
  114.         </tr>
  115.     </xsl:if>
  116. </xsl:template>
  117.  
  118. </xsl:stylesheet>
  119.