Changeset 264


Ignore:
Timestamp:
12/11/14 12:47:20 (9 years ago)
Author:
Maciej Komosinski
Message:

Different colors for files, contexts, and objects

File:
1 edited

Legend:

Unmodified
Added
Removed
  • java/FramclipsePlugin/src/main/resources/framscontext.xsl

    r13 r264  
    99
    1010<xsl:template match="framscontext">
     11<style>
     12.file {color:red;}
     13.context-code {color: #00ee00;}
     14.context-file {color: #007700;}
     15.objects {color: #0000ff;}
     16</style>
     17
    1118  <h1>Framscript Context Configuration</h1>
    12 <i>Note:
     19
     20<b>Each <span class="file">file type</span> may contain <span class="objects">objects</span> from many <span class="context-file">contexts</span>, as specified below.<br/>Each <span class="context-file">context</span> may contain many <span class="objects">objects</span>, as specified below.<br/>Note:
    1321  <xsl:choose><xsl:when test="count(document('framscript.xml')/framscript)=0">
    14         This formatting sheet would also use <a href="framscript.xml">framscript.xml</a> to show object names if that file was available</xsl:when>
    15 <xsl:otherwise>This formatting sheet also includes object names extracted from <a href="framscript.xml">framscript.xml</a></xsl:otherwise>
     22        This formatting sheet (xsl) would use <a href="framscript.xml">framscript.xml</a> to show object names if that file was available!</xsl:when>
     23<xsl:otherwise>This formatting sheet (xsl) includes object names extracted from <a href="framscript.xml">framscript.xml</a>.</xsl:otherwise>
    1624        </xsl:choose>
    17 </i>
     25</b><br/><br/><br/>
    1826
    1927  <table border="1">
     
    2533<xsl:template match="file">
    2634  <tr valign="top">
    27    <td><b><xsl:value-of select="@label"/></b><br/><xsl:value-of select="@pattern"/></td>
     35   <td class="file"><b><xsl:value-of select="@label"/></b><br/><xsl:value-of select="@pattern"/></td>
    2836   <td>
    2937        <xsl:if test="count(code)!=0">
    3038        <p title="Defined by &lt;objects&gt;">
    31         Objects defined in the following contexts can be stored directly in the file: (using the standard framsticks format)<ul><xsl:apply-templates select="objects"/></ul>
     39        Objects defined in the following contexts can be stored directly in the file (using the standard Framsticks <a href="http://www.framsticks.com/common/formatspec.html">format</a>):<ul><xsl:apply-templates select="objects"/></ul>
    3240        </p>
    3341        <xsl:apply-templates select="code"/>
     
    8694</xsl:template>
    8795
     96
     97
     98
     99<xsl:template name="extobjects">
     100  <xsl:param name="objs"/>
     101  <xsl:if test="count($objs)!=0">
     102  (
     103  <xsl:for-each select="$objs">
     104        <font class="objects"><xsl:value-of select="@name"/></font>,
     105  </xsl:for-each>
     106  )
     107  </xsl:if>
     108</xsl:template>
     109
     110
    88111<xsl:template match="objects">
    89   <li><b><xsl:value-of select="@context"/></b>
     112  <li><b><span class="context-file"><xsl:value-of select="@context"/></span></b>
    90113        <xsl:variable name="context" select="@context"/>
    91114        <xsl:call-template name="extobjects"><xsl:with-param name="objs" select="document('framscript.xml')/framscript/type[@context=$context]"/></xsl:call-template>
     
    94117
    95118<xsl:template match="script">
    96   <li><b><xsl:value-of select="@context"/></b>
     119  <li><b><span class="context-code"><xsl:value-of select="@context"/></span></b>
    97120        <xsl:variable name="context" select="@context"/>
    98121        <xsl:call-template name="extobjects"><xsl:with-param name="objs" select="document('framscript.xml')/framscript/type[@context=$context]"/></xsl:call-template>
     
    100123</xsl:template>
    101124
    102 <xsl:template name="extobjects">
    103   <xsl:param name="objs"/>
    104   <xsl:if test="count($objs)!=0">
    105   (
    106   <xsl:for-each select="$objs">
    107         <xsl:value-of select="@name"/>,
    108   </xsl:for-each>
    109   )
    110   </xsl:if>
    111 </xsl:template>
    112 
    113125<xsl:template match="context">
    114   <li><b><xsl:value-of select="@name"/></b>
     126  <li><b><span class="context-code"><xsl:value-of select="@name"/></span></b>
    115127        <xsl:variable name="context" select="@name"/>
    116128        <xsl:call-template name="extobjects"><xsl:with-param name="objs" select="document('framscript.xml')/framscript/type[@context=$context]"/></xsl:call-template>
    117129  </li>
    118130</xsl:template>
     131
     132
    119133
    120134<xsl:template match="code">
     
    126140<xsl:template match="properties">
    127141  <li>
    128   <b><xsl:value-of select="@to"/></b> is defined by "<xsl:value-of select="@from"/>" objects
     142  <span class="objects"><b><xsl:value-of select="@to"/></b></span> is defined by <span class="objects"><xsl:value-of select="@from"/></span> objects
    129143  </li>
    130144</xsl:template>
Note: See TracChangeset for help on using the changeset viewer.