You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

464 lines
20 KiB

  1. <?xml version="1.0"?>
  2. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  3. <xsl:param name="stylebook.project"/>
  4. <xsl:param name="copyright"/>
  5. <xsl:param name="id"/>
  6. <xsl:template match="/">
  7. <xsl:apply-templates/>
  8. </xsl:template>
  9. <xsl:template match="s1">
  10. <html>
  11. <head>
  12. <meta http-equiv="Content-Type" content="text/html; charset=utf8"/>
  13. <script language="JavaScript" type="text/javascript" src="resources/script.js"/>
  14. <title><xsl:value-of select="@title"/></title>
  15. </head>
  16. <body text="#000000" link="#0000ff" vlink="#0000aa" alink="#ff0000"
  17. topmargin="4" leftmargin="4" marginwidth="4" marginheight="4"
  18. bgcolor="#ffffff">
  19. <!-- THE TOP BAR (HEADER) -->
  20. <table width="620" cellspacing="0" cellpadding="0" border="0">
  21. <tr>
  22. <td width="135" height="60" rowspan="3" valign="top" align="left">
  23. <img width="135" height="60" src="resources/logo.gif" hspace="0" vspace="0" border="0"/></td>
  24. <td width="456" height="5" valign="top" align="left" colspan="4">
  25. <img width="456" height="5" src="resources/line.gif" hspace="0" vspace="0" border="0"/></td>
  26. <td width="29" height="60" rowspan="3" valign="top" align="left">
  27. <img width="29" height="60" src="resources/right.gif" hspace="0" vspace="0" border="0"/></td>
  28. </tr>
  29. <tr>
  30. <td width="456" height="35" valign="top" align="left" colspan="4" bgcolor="#0086b2">
  31. <img src="graphics/{$id}-header.jpg" width="456" height="35" hspace="0" vspace="0" border="0" alt="{s1/@title}"/></td>
  32. </tr>
  33. <tr>
  34. <td width="168" height="20" valign="top" align="left">
  35. <img width="168" height="20" src="resources/bottom.gif" hspace="0" vspace="0" border="0"/></td>
  36. <td width="96" height="20" valign="top" align="left">
  37. <a href="http://xml.apache.org/" onMouseOver="rolloverOn('xml');" onMouseOut="rolloverOff('xml');" target="new">
  38. <img alt="http://xml.apache.org/" width="96" height="20" src="resources/button-xml-lo.gif"
  39. name="xml" hspace="0" vspace="0" border="0"
  40. onLoad="rolloverLoad('xml','resources/button-xml-hi.gif','resources/button-xml-lo.gif');"/>
  41. </a>
  42. </td>
  43. <td width="96" height="20" valign="top" align="left">
  44. <a href="http://www.apache.org/" onMouseOver="rolloverOn('asf');" onMouseOut="rolloverOff('asf');" target="new">
  45. <img alt="http://www.apache.org/" width="96" height="20" src="resources/button-asf-lo.gif"
  46. name="asf" hspace="0" vspace="0" border="0"
  47. onLoad="rolloverLoad('asf','resources/button-asf-hi.gif','resources/button-asf-lo.gif');"/>
  48. </a>
  49. </td>
  50. <td width="96" height="20" valign="top" align="left">
  51. <a href="http://www.w3.org/" onMouseOver="rolloverOn('w3c');" onMouseOut="rolloverOff('w3c');" target="new">
  52. <img alt="http://www.w3.org/" width="96" height="20" src="resources/button-w3c-lo.gif"
  53. name="w3c" hspace="0" vspace="0" border="0"
  54. onLoad="rolloverLoad('w3c','resources/button-w3c-hi.gif','resources/button-w3c-lo.gif');"/>
  55. </a>
  56. </td>
  57. </tr>
  58. </table>
  59. <!-- THE MAIN PANEL (SIDEBAR AND CONTENT) -->
  60. <table width="620" cellspacing="0" cellpadding="0" border="0">
  61. <tr>
  62. <!-- THE SIDE BAR -->
  63. <td width="120" valign="top" align="left">
  64. <img width="120" height="14" src="resources/join.gif" hspace="0" vspace="0" border="0"/><br/>
  65. <xsl:apply-templates select="document($stylebook.project)"/>
  66. <img width="120" height="14" src="resources/close.gif" hspace="0" vspace="0" border="0"/><br/>
  67. </td>
  68. <!-- THE CONTENT PANEL -->
  69. <td width="500" valign="top" align="left">
  70. <table border="0" cellspacing="0" cellpadding="3">
  71. <tr><td><xsl:apply-templates/></td></tr>
  72. </table>
  73. </td>
  74. </tr>
  75. </table><br/>
  76. <table width="620" border="0" cellspacing="0" cellpadding="0">
  77. <tr><td bgcolor="#0086b2"><img src="resources/dot.gif" width="1" height="1"/></td></tr>
  78. <tr>
  79. <td align="center"><font size="-1" color="#0086b2"><i>
  80. Copyright &#169; <xsl:value-of select="$copyright"/>.
  81. All Rights Reserved.
  82. </i></font></td>
  83. </tr>
  84. </table>
  85. </body>
  86. </html>
  87. </xsl:template>
  88. <!-- ###################################################################### -->
  89. <!-- book -->
  90. <xsl:template match="book">
  91. <xsl:apply-templates/>
  92. </xsl:template>
  93. <xsl:template match="document|faqs|changes|group|container">
  94. <xsl:if test="@id=$id">
  95. <img src="graphics/{@id}-label-1.jpg" width="120" height="12" hspace="0" vspace="0" border="0" alt="{@label}"/>
  96. </xsl:if>
  97. <xsl:if test="@id!=$id">
  98. <a href="{@id}.html" onMouseOver="rolloverOn('side-{@id}');" onMouseOut="rolloverOff('side-{@id}');">
  99. <img onLoad="rolloverLoad('side-{@id}','graphics/{@id}-label-2.jpg','graphics/{@id}-label-3.jpg');"
  100. name="side-{@id}" src="graphics/{@id}-label-3.jpg" width="120" height="12" hspace="0" vspace="0" border="0" alt="{@label}"/>
  101. </a>
  102. </xsl:if>
  103. <br/>
  104. </xsl:template>
  105. <xsl:template match="external">
  106. <xsl:variable name="extid" select="concat('ext-',position())"/>
  107. <a href="{@href}" onMouseOver="rolloverOn('side-{$extid}');" onMouseOut="rolloverOff('side-{$extid}');">
  108. <img onLoad="rolloverLoad('side-{$extid}','graphics/{$extid}-label-2.jpg','graphics/{$extid}-label-3.jpg');"
  109. name="side-{$extid}" src="graphics/{$extid}-label-3.jpg" width="120" height="12" hspace="0" vspace="0" border="0" alt="{@label}"/>
  110. </a>
  111. <br/>
  112. </xsl:template>
  113. <xsl:template match="section">
  114. <xsl:variable name="sectid" select="concat('sect-',position())"/>
  115. <img name="side-{$sectid}" src="graphics/{$sectid}-label.jpg" width="120" height="17" hspace="0" vspace="0" border="0" alt="{@label}"/>
  116. <br/>
  117. </xsl:template>
  118. <xsl:template match="separator">
  119. <img src="resources/separator.gif" width="120" height="6" hspace="0" vspace="0" border="0"/><br/>
  120. </xsl:template>
  121. <xsl:template match="separator-space">
  122. <img src="resources/separator-space.gif" width="120" height="6" hspace="0" vspace="0" border="0"/><br/>
  123. </xsl:template>
  124. <!-- ###################################################################### -->
  125. <!-- document -->
  126. <xsl:template match="s2">
  127. <table width="494" cellspacing="0" cellpadding="0" border="0">
  128. <tr>
  129. <td bgcolor="ffffff" colspan="2" width="494">
  130. <table width="494" cellspacing="0" cellpadding="0" border="0">
  131. <tr>
  132. <td bgcolor="#039acc" width="1" height="1"><img src="resources/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  133. <td bgcolor="#039acc" width="492" height="1"><img src="resources/void.gif" width="492" height="1" vspace="0" hspace="0" border="0"/></td>
  134. <td bgcolor="#0086b2" width="1" height="1"><img src="resources/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  135. </tr>
  136. <tr>
  137. <td bgcolor="#039acc" width="1"><img src="resources/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  138. <td bgcolor="#0086b2" width="492">
  139. <font size="+1" face="arial,helvetica,sanserif" color="#ffffff">
  140. <img src="resources/void.gif" width="2" height="2" vspace="0" hspace="0" border="0"/>
  141. <b><xsl:value-of select="@title"/></b>
  142. </font>
  143. </td>
  144. <td bgcolor="#017299" width="1"><img src="resources/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  145. </tr>
  146. <tr>
  147. <td bgcolor="#0086b2" width="1" height="1"><img src="resources/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  148. <td bgcolor="#017299" width="492" height="1"><img src="resources/void.gif" width="492" height="1" vspace="0" hspace="0" border="0"/></td>
  149. <td bgcolor="#017299" width="1" height="1"><img src="resources/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  150. </tr>
  151. </table>
  152. </td>
  153. </tr>
  154. <tr>
  155. <td width="10">&#160;</td>
  156. <td width="484">
  157. <font face="arial,helvetica,sanserif" color="#000000">
  158. <xsl:apply-templates/>
  159. </font>
  160. </td>
  161. </tr>
  162. </table>
  163. <br/>
  164. </xsl:template>
  165. <xsl:template match="s3">
  166. <table width="484" cellspacing="0" cellpadding="0" border="0">
  167. <tr>
  168. <td bgcolor="ffffff" colspan="2" width="484">
  169. <table width="484" cellspacing="0" cellpadding="0" border="0">
  170. <tr>
  171. <td bgcolor="#039acc" width="1" height="1"><img src="resources/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  172. <td bgcolor="#039acc" width="482" height="1"><img src="resources/void.gif" width="482" height="1" vspace="0" hspace="0" border="0"/></td>
  173. <td bgcolor="#0086b2" width="1" height="1"><img src="resources/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  174. </tr>
  175. <tr>
  176. <td bgcolor="#039acc" width="1"><img src="resources/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  177. <td bgcolor="#0086b2" width="482">
  178. <font face="arial,helvetica,sanserif" color="#ffffff">
  179. <img src="resources/void.gif" width="2" height="2" vspace="0" hspace="0" border="0"/>
  180. <b><xsl:value-of select="@title"/></b>
  181. </font>
  182. </td>
  183. <td bgcolor="#017299" width="1"><img src="resources/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  184. </tr>
  185. <tr>
  186. <td bgcolor="#0086b2" width="1" height="1"><img src="resources/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  187. <td bgcolor="#017299" width="482" height="1"><img src="resources/void.gif" width="482" height="1" vspace="0" hspace="0" border="0"/></td>
  188. <td bgcolor="#017299" width="1" height="1"><img src="resources/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  189. </tr>
  190. </table>
  191. </td>
  192. </tr>
  193. <tr>
  194. <td width="10">&#160;</td>
  195. <td width="474">
  196. <font size="-1" face="arial,helvetica,sanserif" color="#000000">
  197. <xsl:apply-templates/>
  198. </font>
  199. </td>
  200. </tr>
  201. </table>
  202. <br/>
  203. </xsl:template>
  204. <xsl:template match="s4">
  205. <table width="474" cellspacing="0" cellpadding="0" border="0">
  206. <tr>
  207. <td bgcolor="ffffff" colspan="2" width="484">
  208. <table width="474" cellspacing="0" cellpadding="0" border="0">
  209. <tr>
  210. <td bgcolor="#039acc" width="1" height="1"><img src="resources/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  211. <td bgcolor="#039acc" width="472" height="1"><img src="resources/void.gif" width="472" height="1" vspace="0" hspace="0" border="0"/></td>
  212. <td bgcolor="#0086b2" width="1" height="1"><img src="resources/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  213. </tr>
  214. <tr>
  215. <td bgcolor="#039acc" width="1"><img src="resources/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  216. <td bgcolor="#0086b2" width="472">
  217. <font size="-1" face="arial,helvetica,sanserif" color="#ffffff">
  218. <img src="resources/void.gif" width="2" height="2" vspace="0" hspace="0" border="0"/>
  219. <b><xsl:value-of select="@title"/></b>
  220. </font>
  221. </td>
  222. <td bgcolor="#017299" width="1"><img src="resources/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  223. </tr>
  224. <tr>
  225. <td bgcolor="#0086b2" width="1" height="1"><img src="resources/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  226. <td bgcolor="#017299" width="472" height="1"><img src="resources/void.gif" width="472" height="1" vspace="0" hspace="0" border="0"/></td>
  227. <td bgcolor="#017299" width="1" height="1"><img src="resources/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  228. </tr>
  229. </table>
  230. </td>
  231. </tr>
  232. <tr>
  233. <td width="10">&#160;</td>
  234. <td width="464">
  235. <font size="-1" face="arial,helvetica,sanserif" color="#000000">
  236. <xsl:apply-templates/>
  237. </font>
  238. </td>
  239. </tr>
  240. </table>
  241. <br/>
  242. </xsl:template>
  243. <!-- ###################################################################### -->
  244. <!-- blocks -->
  245. <xsl:template match="p">
  246. <p><xsl:apply-templates/></p>
  247. </xsl:template>
  248. <xsl:template match="note">
  249. <table width="100%" cellspacing="3" cellpadding="0" border="0">
  250. <tr>
  251. <td width="20" valign="top">
  252. <img src="resources/note.gif" width="20" height="24" vspace="0" hspace="0" border="0" alt="Note"/>
  253. </td>
  254. <td valign="top">
  255. <font size="-1" face="arial,helvetica,sanserif" color="#000000">
  256. <i>
  257. <xsl:apply-templates/>
  258. </i>
  259. </font>
  260. </td>
  261. </tr>
  262. </table>
  263. </xsl:template>
  264. <xsl:template match="ul">
  265. <ul><xsl:apply-templates/></ul>
  266. </xsl:template>
  267. <xsl:template match="ol">
  268. <ol><xsl:apply-templates/></ol>
  269. </xsl:template>
  270. <xsl:template match="li">
  271. <li><xsl:apply-templates/></li>
  272. </xsl:template>
  273. <xsl:template match="sup">
  274. <sup><xsl:apply-templates/></sup>
  275. </xsl:template>
  276. <!--Definition lists: gloss, term, label, item -->
  277. <xsl:template match="gloss">
  278. <dl><xsl:apply-templates/></dl>
  279. </xsl:template>
  280. <!-- <term> contains a single-word, multi-word or symbolic
  281. designation which is regarded as a technical term. -->
  282. <xsl:template match="term">
  283. <dfn><xsl:apply-templates/></dfn>
  284. </xsl:template>
  285. <xsl:template match="label" priority="1">
  286. <dt><xsl:apply-templates/></dt>
  287. </xsl:template>
  288. <xsl:template match="item" priority="2">
  289. <dd>
  290. <xsl:apply-templates/>
  291. </dd>
  292. </xsl:template>
  293. <xsl:template match="source">
  294. <div align="left">
  295. <table width="464" cellspacing="4" cellpadding="0" border="0">
  296. <tr>
  297. <td bgcolor="#0086b2" width="1" height="1"><img src="resources/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  298. <td bgcolor="#0086b2" width="462" height="1"><img src="resources/void.gif" width="462" height="1" vspace="0" hspace="0" border="0"/></td>
  299. <td bgcolor="#0086b2" width="1" height="1"><img src="resources/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  300. </tr>
  301. <tr>
  302. <td bgcolor="#0086b2" width="1"><img src="resources/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  303. <td bgcolor="#ffffff" width="462">
  304. <font size="-1"><pre><xsl:apply-templates/></pre></font>
  305. </td>
  306. <td bgcolor="#0086b2" width="1"><img src="resources/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  307. </tr>
  308. <tr>
  309. <td bgcolor="#0086b2" width="1" height="1"><img src="resources/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  310. <td bgcolor="#0086b2" width="462" height="1"><img src="resources/void.gif" width="462" height="1" vspace="0" hspace="0" border="0"/></td>
  311. <td bgcolor="#0086b2" width="1" height="1"><img src="resources/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  312. </tr>
  313. </table>
  314. </div>
  315. </xsl:template>
  316. <xsl:template match="table">
  317. <table width="100%" border="0" cellspacing="2" cellpadding="2">
  318. <xsl:apply-templates/>
  319. </table>
  320. </xsl:template>
  321. <xsl:template match="tr">
  322. <tr><xsl:apply-templates/></tr>
  323. </xsl:template>
  324. <xsl:template match="th">
  325. <td bgcolor="#039acc" colspan="{@colspan}" rowspan="{@rowspan}" valign="center" align="center">
  326. <font color="#ffffff" size="-1" face="arial,helvetica,sanserif">
  327. <b><xsl:apply-templates/></b>&#160;
  328. </font>
  329. </td>
  330. </xsl:template>
  331. <xsl:template match="td">
  332. <td bgcolor="#a0ddf0" colspan="{@colspan}" rowspan="{@rowspan}" valign="top" align="{@align}">
  333. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  334. <xsl:apply-templates/>&#160;
  335. </font>
  336. </td>
  337. </xsl:template>
  338. <xsl:template match="tn">
  339. <td bgcolor="#ffffff" colspan="{@colspan}" rowspan="{@rowspan}">
  340. &#160;
  341. </td>
  342. </xsl:template>
  343. <!-- ###################################################################### -->
  344. <!-- markup -->
  345. <xsl:template match="em">
  346. <b><xsl:apply-templates/></b>
  347. </xsl:template>
  348. <xsl:template match="ref">
  349. <i><xsl:apply-templates/></i>
  350. </xsl:template>
  351. <xsl:template match="code">
  352. <code><font face="courier, monospaced"><xsl:apply-templates/></font></code>
  353. </xsl:template>
  354. <xsl:template match="br">
  355. <br/>
  356. </xsl:template>
  357. <!-- ###################################################################### -->
  358. <!-- links -->
  359. <xsl:template match="link">
  360. <xsl:if test="string-length(@anchor)=0">
  361. <xsl:if test="string-length(@idref)=0">
  362. <xsl:apply-templates/>
  363. </xsl:if>
  364. <xsl:if test="string-length(@idref)>0">
  365. <a href="{@idref}.html"><xsl:apply-templates/></a>
  366. </xsl:if>
  367. </xsl:if>
  368. <xsl:if test="string-length(@anchor)>0">
  369. <xsl:if test="string-length(@idref)=0">
  370. <a href="#{@anchor}"><xsl:apply-templates/></a>
  371. </xsl:if>
  372. <xsl:if test="string-length(@idref)>0">
  373. <a href="{@idref}.html#{@anchor}"><xsl:apply-templates/></a>
  374. </xsl:if>
  375. </xsl:if>
  376. </xsl:template>
  377. <xsl:template match="anchor">
  378. <a name="{@name}"><xsl:comment>anchor</xsl:comment></a>
  379. </xsl:template>
  380. <xsl:template match="jump">
  381. <a href="{@href}"><xsl:apply-templates/></a>
  382. </xsl:template>
  383. <xsl:template match="img">
  384. <img src="resources/{@src}" border="0" vspace="4" hspace="4" align="right"/>
  385. </xsl:template>
  386. <xsl:template match="resource-ref">
  387. <xsl:variable name="resourceFile"
  388. select="document($stylebook.project)/book/resources/@source"/>
  389. <xsl:variable name="xref" select="@idref"/>
  390. <xsl:variable name="href"
  391. select="document($resourceFile)/resources/resource[@id=$xref]/@location"/>
  392. <xsl:variable name="label"
  393. select="document($resourceFile)/resources/resource[@id=$xref]/@title"/>
  394. <A href="{$href}" target="_top"><xsl:value-of select="$label"/></A>
  395. </xsl:template>
  396. <xsl:template match="human-resource-ref">
  397. <xsl:variable name="resourceFile"
  398. select="document($stylebook.project)/book/resources/@source"/>
  399. <xsl:variable name="ref" select="@idref"/>
  400. <xsl:variable name="mailto"
  401. select="document($resourceFile)/resources/human-resource[@id=$ref]/@mailto"/>
  402. <xsl:variable name="name"
  403. select="document($resourceFile)/resources/human-resource[@id=$ref]/@name"/>
  404. <A href="mailto:{$mailto}"><xsl:value-of select="$name"/></A>
  405. </xsl:template>
  406. <!-- ###################################################################### -->
  407. <!-- ignore -->
  408. <xsl:template match="form">
  409. <xsl:copy-of select="." />
  410. </xsl:template>
  411. <!-- copy
  412. <xsl:template match="@*|node()">
  413. <xsl:copy>
  414. <xsl:apply-templates select="@*|node()"/>
  415. </xsl:copy>
  416. </xsl:template>
  417. -->
  418. </xsl:stylesheet>