Changeset 13861 for trunk/gsdl-documentation/manuals/processing/common.xsl
- Timestamp:
- 2007-02-07T13:29:17+13:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl-documentation/manuals/processing/common.xsl
r13785 r13861 6 6 7 7 <xsl:template match="Title"><p><b><i><xsl:apply-templates/></i></b></p></xsl:template> 8 8 9 9 10 <xsl:template match="Title" mode="Figure"> … … 15 16 </xsl:template> 16 17 18 17 19 <xsl:template match="Title" mode="Table"> 18 20 <div style="margin-right:1.7pt;" align="center"> 19 21 <b>Table <xsl:number count="Table[not(@class='hidden')]" level="any"/> <xsl:apply-templates/></b></div> 20 22 </xsl:template> 23 21 24 22 25 <xsl:template match="NumberedList"><ol><xsl:apply-templates/></ol></xsl:template> 23 26 <xsl:template match="NumberedItem"><li><xsl:apply-templates/></li></xsl:template> 24 27 28 25 29 <xsl:template match="BulletList"> 26 30 <xsl:if test="not(parent::Bullet)"> 27 <ul style="list-style-type: disc;"> 28 <xsl:for-each select="Bullet"> 29 <li><xsl:apply-templates/></li> 31 <ul style="list-style-type: disc;"><xsl:for-each select="Bullet"><li><xsl:apply-templates/></li> 30 32 <xsl:if test="BulletList"> 31 <xsl:for-each select="BulletList"> 32 <ul style="list-style-type: disc;"><xsl:for-each select="Bullet"><li><xsl:apply-templates/></li></xsl:for-each></ul> 33 </xsl:for-each> 34 </xsl:if> 35 </xsl:for-each> 36 </ul> 37 <p/> 38 </xsl:if> 33 <xsl:for-each select="BulletList"><ul style="list-style-type: disc;"><xsl:for-each select="Bullet"><li><xsl:apply-templates/></li></xsl:for-each></ul> 34 </xsl:for-each></xsl:if></xsl:for-each></ul><p/></xsl:if> 39 35 </xsl:template> 36 40 37 41 38 <xsl:template match="Text"> 42 39 <xsl:choose> 43 <xsl:when test="parent::Indented"> 44 <p style="font-size=12px; color=black; text-align=justify; margin-left=15pt;"><xsl:apply-templates/></p> 45 </xsl:when> 40 <xsl:when test="parent::Indented"><p class="indented"><xsl:apply-templates/></p> </xsl:when> 46 41 <xsl:when test="parent::Title|parent::Footnote"><xsl:apply-templates/></xsl:when> 47 <xsl:when test="not(parent::Version) and not(parent::Date) and not(parent::NumberedItem) and not(parent::Bullet)"> 48 <p><xsl:apply-templates/></p> 49 </xsl:when> 42 <xsl:when test="not(parent::Version) and not(parent::Date) and not(parent::NumberedItem) and not(parent::Bullet)"><p><xsl:apply-templates/></p></xsl:when> 50 43 <xsl:otherwise><xsl:apply-templates/></xsl:otherwise> 51 44 </xsl:choose> 52 45 </xsl:template> 53 46 47 54 48 <xsl:template match="CodeLine"> 55 49 <xsl:choose> 56 <xsl:when test="parent::Figure or parent::th"> 57 <div style="margin-top:0pt; margin-right:0in; margin-bottom:0in; margin-left:2pt; margin-bottom:0pt; 58 font-family: Courier; font-size: 11px"><xsl:apply-templates/></div> 59 </xsl:when> 60 <xsl:when test="name(preceding-sibling::*[position()=1])='CodeLine' or name(following-sibling::*[position()=1])='CodeLine'"> 61 62 <div style="margin-top:0pt; margin-right:0pt; margin-bottom:0pt; margin-left:2em; font-size:10px; font-family:Courier;"><xsl:apply-templates/></div> 63 64 </xsl:when> 50 <!-- codeline in figure or table --> 51 <xsl:when test="parent::Figure or parent::th"><div class="codeline_figure"><xsl:apply-templates/></div></xsl:when> 52 <!-- consecutive codelines --> 53 <xsl:when test="name(preceding-sibling::*[position()=1])='CodeLine' or name(following-sibling::*[position()=1])='CodeLine'"><div class="codeline"><xsl:apply-templates/></div></xsl:when> 65 54 <!-- a single line of code between two text paragraphs --> 66 <xsl:otherwise> 67 <p><div style="font-size:10px; margin-right:0pt; margin-left:2em; margin-bottom:2px; margin-top:2px; font-family:Courier;"> 68 <xsl:apply-templates/></div></p> 69 </xsl:otherwise> 55 <xsl:otherwise><div class="codeline_single"><xsl:apply-templates/></div></xsl:otherwise> 70 56 </xsl:choose> 71 57 </xsl:template> 58 72 59 73 60 <xsl:template match="Figure"> … … 78 65 <xsl:number count="Figure[Title/SubTitle and substring(translate(@id, '_0123456789', '99999999999'), string-length(@id)-1, string-length(@id))='99']" level="any"/> 79 66 </xsl:variable> 80 <xsl:variable name="no"><xsl:value-of select="$temp_total_figs - $temp_num_of_sub_figs"/></xsl:variable> 67 <xsl:variable name="no"><xsl:value-of select="$temp_total_figs - $temp_num_of_sub_figs"/></xsl:variable> 68 81 69 <p/> 82 70 <xsl:apply-templates select="Title" mode="Figure"><xsl:with-param name="no" select="$no"/></xsl:apply-templates> … … 87 75 <tr> 88 76 <xsl:if test="parent::Figure[@class='withLineNumber']"> 89 <td><div style="linenumber"><xsl:number value="position()" format="1"/>  </div></td></xsl:if>77 <td><div class="linenumber"><xsl:number value="position()" format="1"/>  </div></td></xsl:if> 90 78 <td><xsl:apply-templates select="."/></td></tr> 91 79 </xsl:for-each> … … 98 86 </xsl:template> 99 87 88 100 89 <xsl:template match="Table"> 101 <p/> 102 <a id="Table_{@id}"/> 90 <p/><a id="Table_{@id}"/> 103 91 <xsl:if test="not(@class='hidden') and not(normalize-space(Title/Text)='')"><xsl:apply-templates select="Title" mode="Table"/></xsl:if> 104 92 <table cellpadding="2pt" cellspacing="2pt"> 105 93 <xsl:if test="not(@class='hidden')"> 106 94 <xsl:if test="not(../../@class='hidden')"><xsl:attribute name="style">border-collapse:collapse;border:1px solid black;</xsl:attribute></xsl:if> 107 95 <xsl:attribute name="rules">rows</xsl:attribute><xsl:attribute name="align">center</xsl:attribute> 108 96 </xsl:if> 109 97 <xsl:if test="@class='hidden'"><xsl:attribute name="width">90%</xsl:attribute><xsl:attribute name="align">center</xsl:attribute></xsl:if> 110 111 98 <xsl:for-each select="TableContent/tr"> 99 <tr> 112 100 <xsl:if test="not(../../@class='hidden')"><xsl:attribute name="style">border-collapse:collapse;border:1px solid black;</xsl:attribute></xsl:if> 113 114 101 <xsl:for-each select="th"><td valign="top"><xsl:if test="File"><xsl:attribute name="align">right</xsl:attribute></xsl:if> 102 <xsl:apply-templates select="node()"/></td></xsl:for-each> 115 103 </tr> 116 </xsl:for-each>104 </xsl:for-each> 117 105 </table> 118 106 <br/> 119 107 </xsl:template> 120 108 109 121 110 <xsl:template match="Section"> 122 <a name="Section_{@id}"/> 123 <h3><xsl:if test="not(starts-with(../../@id, 'appendix'))"> 111 <a name="Section_{@id}"/><h3><xsl:if test="not(starts-with(../../@id, 'appendix'))"> 124 112 <xsl:number level="multiple" format="1.1" count="//Chapter|//Chapter//Section"/> </xsl:if> 125 <xsl:apply-templates select="Title/Text"/></h3> 126 <xsl:apply-templates select="Content/*"/> 113 <xsl:apply-templates select="Title/Text"/></h3><xsl:apply-templates select="Content/*"/> 127 114 </xsl:template> 115 128 116 129 117 <xsl:template match="Section" mode="preface"> … … 131 119 <xsl:apply-templates select="Content/*"/> 132 120 </xsl:template> 121 133 122 134 123 <xsl:template match="Subsection"> … … 138 127 </xsl:template> 139 128 129 140 130 <xsl:template match="Part"><a id="Part_{@id}"/><xsl:apply-templates/></xsl:template> 141 142 131 <xsl:template match="Comment"><xsl:apply-templates/></xsl:template> 143 132 <xsl:template match="Indented"><p><div style="margin-left: 1em;"><xsl:apply-templates/></div></p></xsl:template> … … 146 135 </xsl:template> 147 136 <xsl:template match="i|b|u"><xsl:element name="{name()}"><xsl:apply-templates/></xsl:element></xsl:template> 148 <xsl:template match="File"><a href="{@url}" target="_blank"><img src="../{@url}" width="{@width}" height="{@height}" border="0"/></a></xsl:template> 149 150 151 152 <xsl:template match="text()"><xsl:value-of select="."/></xsl:template> 153 137 <xsl:template match="File"><a href="../{@url}" target="_blank"><img src="../{@url}" width="{@width}" height="{@height}" border="0"/></a></xsl:template> 138 <xsl:template match="text()"><xsl:value-of select="."/></xsl:template> 154 139 <xsl:template match="Author"><b><xsl:apply-templates/></b></xsl:template> 155 140 <xsl:template match="Affiliation"><i><xsl:apply-templates/></i></xsl:template> 156 <xsl:template name="version_and_date"><p><b><xsl:apply-templates select="Version/Text"/></b>  <xsl:apply-templates select="Date/Text"/></p></xsl:template> 141 <xsl:template name="version_and_date"><p><b><xsl:apply-templates select="Version/Text"/></b>  <xsl:apply-templates select="Date/Text"/></p></xsl:template> 142 157 143 158 144 <xsl:template match="Chapter|Appendix|Bibliography" mode="index"> … … 161 147 </xsl:template> 162 148 149 163 150 <xsl:template match="Section" mode="index"> 164 151 <dt><a href="#Section_{@id}"><xsl:apply-templates select="Title/Text"/></a></dt> 165 152 </xsl:template> 153 166 154 167 155 <xsl:template match="Chapter"> … … 171 159 <xsl:apply-templates select="Content/*"/> 172 160 </xsl:template> 173 174 161 175 162 … … 185 172 <xsl:value-of select="concat($no, $subtitle)"/> 186 173 </xsl:template> 187 <xsl:template match="Table" mode="ref"><xsl:number level="any"/></xsl:template>174 <xsl:template match="Table" mode="ref"><xsl:number count="Table[not(@class='hidden')]" level="any"/></xsl:template> 188 175 <xsl:template match="Chapter" mode="ref"><xsl:number level="any"/></xsl:template> 189 176 <xsl:template match="Section" mode="ref"><xsl:number count="//Chapter|//Chapter//Section" format="1.1" level="multiple"/></xsl:template> … … 191 178 192 179 193 180 <xsl:template match="SupplementaryText"> 194 181 <xsl:param name="manual_id" select="''"/> 195 182 <xsl:param name="manual_lang" select="''"/> … … 201 188 </xsl:for-each> 202 189 </xsl:template> 203 204 190 </xsl:stylesheet>
Note:
See TracChangeset
for help on using the changeset viewer.