site.xsl 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741
  1. <?xml version="1.0"?>
  2. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  3. <xsl:output method="xml" encoding="ISO-8859-1" indent="yes"
  4. doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
  5. doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
  6. <xsl:variable name="href_base" select="''"/>
  7. <xsl:variable name="menu_name">Main Menu</xsl:variable>
  8. <!--
  9. - returns the filename associated to an ID in the original file
  10. -->
  11. <xsl:template name="tocfilename">
  12. <xsl:param name="name" select="string(@href)"/>
  13. <xsl:choose>
  14. <xsl:when test="$name = '#Introducti'">
  15. <xsl:text>intro.html</xsl:text>
  16. </xsl:when>
  17. <xsl:when test="$name = '#Documentat'">
  18. <xsl:text>docs.html</xsl:text>
  19. </xsl:when>
  20. <xsl:when test="$name = '#Reporting'">
  21. <xsl:text>bugs.html</xsl:text>
  22. </xsl:when>
  23. <xsl:when test="$name = '#help'">
  24. <xsl:text>help.html</xsl:text>
  25. </xsl:when>
  26. <xsl:when test="$name = '#Help'">
  27. <xsl:text>help.html</xsl:text>
  28. </xsl:when>
  29. <xsl:when test="$name = '#Downloads'">
  30. <xsl:text>downloads.html</xsl:text>
  31. </xsl:when>
  32. <xsl:when test="$name = '#News'">
  33. <xsl:text>news.html</xsl:text>
  34. </xsl:when>
  35. <xsl:when test="$name = '#Contributi'">
  36. <xsl:text>contribs.html</xsl:text>
  37. </xsl:when>
  38. <xsl:when test="$name = '#xsltproc'">
  39. <xsl:text>xsltproc2.html</xsl:text>
  40. </xsl:when>
  41. <xsl:when test="$name = '#API'">
  42. <xsl:text></xsl:text>
  43. </xsl:when>
  44. <xsl:when test="$name = '#XSLT'">
  45. <xsl:text>XSLT.html</xsl:text>
  46. </xsl:when>
  47. <xsl:when test="$name = '#XML'">
  48. <xsl:text>XMLinfo.html</xsl:text>
  49. </xsl:when>
  50. <xsl:when test="$name = '#Validation'">
  51. <xsl:text>xmldtd.html</xsl:text>
  52. </xsl:when>
  53. <xsl:when test="$name = '#tree'">
  54. <xsl:text></xsl:text>
  55. </xsl:when>
  56. <xsl:when test="$name = '#library'">
  57. <xsl:text></xsl:text>
  58. </xsl:when>
  59. <xsl:when test="$name = '#interface'">
  60. <xsl:text></xsl:text>
  61. </xsl:when>
  62. <xsl:when test="$name = '#Example'">
  63. <xsl:text></xsl:text>
  64. </xsl:when>
  65. <xsl:when test="$name = '#Entities'">
  66. <xsl:text></xsl:text>
  67. </xsl:when>
  68. <xsl:when test="$name = '#architecture'">
  69. <xsl:text></xsl:text>
  70. </xsl:when>
  71. <xsl:when test="$name = '#Namespaces'">
  72. <xsl:text>namespaces.html</xsl:text>
  73. </xsl:when>
  74. <xsl:when test="$name = '#DOM'">
  75. <xsl:text></xsl:text>
  76. </xsl:when>
  77. <xsl:when test="$name = '#Catalog'">
  78. <xsl:text>catalog.html</xsl:text>
  79. </xsl:when>
  80. <xsl:when test="$name = '#Upgrading'">
  81. <xsl:text></xsl:text>
  82. </xsl:when>
  83. <xsl:when test="$name = '#Encodings'">
  84. <xsl:text>encoding.html</xsl:text>
  85. </xsl:when>
  86. <xsl:when test="$name = '#IO'">
  87. <xsl:text></xsl:text>
  88. </xsl:when>
  89. <xsl:when test="$name = '#Memory'">
  90. <xsl:text></xsl:text>
  91. </xsl:when>
  92. <xsl:when test="$name = '#Thread'">
  93. <xsl:text></xsl:text>
  94. </xsl:when>
  95. <xsl:when test="$name = '#FAQ'">
  96. <xsl:text>FAQ.html</xsl:text>
  97. </xsl:when>
  98. <xsl:when test="$name = '#Python'">
  99. <xsl:text></xsl:text>
  100. </xsl:when>
  101. <xsl:when test="$name = ''">
  102. <xsl:text>unknown.html</xsl:text>
  103. </xsl:when>
  104. <xsl:otherwise>
  105. <xsl:value-of select="$name"/>
  106. </xsl:otherwise>
  107. </xsl:choose>
  108. </xsl:template>
  109. <xsl:template name="docfilename">
  110. <xsl:param name="name" select="string(@href)"/>
  111. <xsl:choose>
  112. <xsl:when test="$name = '#Introducti'">
  113. <xsl:text></xsl:text>
  114. </xsl:when>
  115. <xsl:when test="$name = '#Documentat'">
  116. <xsl:text></xsl:text>
  117. </xsl:when>
  118. <xsl:when test="$name = '#Reporting'">
  119. <xsl:text></xsl:text>
  120. </xsl:when>
  121. <xsl:when test="$name = '#help'">
  122. <xsl:text></xsl:text>
  123. </xsl:when>
  124. <xsl:when test="$name = '#Help'">
  125. <xsl:text></xsl:text>
  126. </xsl:when>
  127. <xsl:when test="$name = '#Downloads'">
  128. <xsl:text></xsl:text>
  129. </xsl:when>
  130. <xsl:when test="$name = '#News'">
  131. <xsl:text></xsl:text>
  132. </xsl:when>
  133. <xsl:when test="$name = '#Contributi'">
  134. <xsl:text></xsl:text>
  135. </xsl:when>
  136. <xsl:when test="$name = '#xsltproc'">
  137. <xsl:text>xsltproc2.html</xsl:text>
  138. </xsl:when>
  139. <xsl:when test="$name = '#API'">
  140. <xsl:text>API.html</xsl:text>
  141. </xsl:when>
  142. <xsl:when test="$name = '#XSLT'">
  143. <xsl:text>XSLT.html</xsl:text>
  144. </xsl:when>
  145. <xsl:when test="$name = '#XML'">
  146. <xsl:text></xsl:text>
  147. </xsl:when>
  148. <xsl:when test="$name = '#Validation'">
  149. <xsl:text></xsl:text>
  150. </xsl:when>
  151. <xsl:when test="$name = '#tree'">
  152. <xsl:text>tree.html</xsl:text>
  153. </xsl:when>
  154. <xsl:when test="$name = '#library'">
  155. <xsl:text>library.html</xsl:text>
  156. </xsl:when>
  157. <xsl:when test="$name = '#interface'">
  158. <xsl:text>interface.html</xsl:text>
  159. </xsl:when>
  160. <xsl:when test="$name = '#Example'">
  161. <xsl:text>example.html</xsl:text>
  162. </xsl:when>
  163. <xsl:when test="$name = '#Entities'">
  164. <xsl:text>entities.html</xsl:text>
  165. </xsl:when>
  166. <xsl:when test="$name = '#architecture'">
  167. <xsl:text>architecture.html</xsl:text>
  168. </xsl:when>
  169. <xsl:when test="$name = '#Namespaces'">
  170. <xsl:text>namespaces.html</xsl:text>
  171. </xsl:when>
  172. <xsl:when test="$name = '#DOM'">
  173. <xsl:text>DOM.html</xsl:text>
  174. </xsl:when>
  175. <xsl:when test="$name = '#Catalog'">
  176. <xsl:text></xsl:text>
  177. </xsl:when>
  178. <xsl:when test="$name = '#Upgrading'">
  179. <xsl:text>upgrade.html</xsl:text>
  180. </xsl:when>
  181. <xsl:when test="$name = '#Encodings'">
  182. <xsl:text></xsl:text>
  183. </xsl:when>
  184. <xsl:when test="$name = '#IO'">
  185. <xsl:text>xmlio.html</xsl:text>
  186. </xsl:when>
  187. <xsl:when test="$name = '#Memory'">
  188. <xsl:text>xmlmem.html</xsl:text>
  189. </xsl:when>
  190. <xsl:when test="$name = '#Thread'">
  191. <xsl:text>threads.html</xsl:text>
  192. </xsl:when>
  193. <xsl:when test="$name = '#FAQ'">
  194. <xsl:text></xsl:text>
  195. </xsl:when>
  196. <xsl:when test="$name = '#Python'">
  197. <xsl:text>python.html</xsl:text>
  198. </xsl:when>
  199. <xsl:when test="$name = ''">
  200. <xsl:text>unknown.html</xsl:text>
  201. </xsl:when>
  202. <xsl:otherwise>
  203. <xsl:value-of select="$name"/>
  204. </xsl:otherwise>
  205. </xsl:choose>
  206. </xsl:template>
  207. <xsl:template name="filename">
  208. <xsl:param name="name" select="string(@href)"/>
  209. <xsl:choose>
  210. <xsl:when test="$name = '#Introducti'">
  211. <xsl:text>intro.html</xsl:text>
  212. </xsl:when>
  213. <xsl:when test="$name = '#Documentat'">
  214. <xsl:text>docs.html</xsl:text>
  215. </xsl:when>
  216. <xsl:when test="$name = '#Reporting'">
  217. <xsl:text>bugs.html</xsl:text>
  218. </xsl:when>
  219. <xsl:when test="$name = '#help'">
  220. <xsl:text>help.html</xsl:text>
  221. </xsl:when>
  222. <xsl:when test="$name = '#Help'">
  223. <xsl:text>help.html</xsl:text>
  224. </xsl:when>
  225. <xsl:when test="$name = '#Downloads'">
  226. <xsl:text>downloads.html</xsl:text>
  227. </xsl:when>
  228. <xsl:when test="$name = '#News'">
  229. <xsl:text>news.html</xsl:text>
  230. </xsl:when>
  231. <xsl:when test="$name = '#Contributi'">
  232. <xsl:text>contribs.html</xsl:text>
  233. </xsl:when>
  234. <xsl:when test="$name = '#xsltproc'">
  235. <xsl:text>xsltproc2.html</xsl:text>
  236. </xsl:when>
  237. <xsl:when test="$name = '#API'">
  238. <xsl:text>API.html</xsl:text>
  239. </xsl:when>
  240. <xsl:when test="$name = '#XSLT'">
  241. <xsl:text>XSLT.html</xsl:text>
  242. </xsl:when>
  243. <xsl:when test="$name = '#XML'">
  244. <xsl:text>XMLinfo.html</xsl:text>
  245. </xsl:when>
  246. <xsl:when test="$name = '#Validation'">
  247. <xsl:text>xmldtd.html</xsl:text>
  248. </xsl:when>
  249. <xsl:when test="$name = '#tree'">
  250. <xsl:text>tree.html</xsl:text>
  251. </xsl:when>
  252. <xsl:when test="$name = '#library'">
  253. <xsl:text>library.html</xsl:text>
  254. </xsl:when>
  255. <xsl:when test="$name = '#interface'">
  256. <xsl:text>interface.html</xsl:text>
  257. </xsl:when>
  258. <xsl:when test="$name = '#Example'">
  259. <xsl:text>example.html</xsl:text>
  260. </xsl:when>
  261. <xsl:when test="$name = '#Entities'">
  262. <xsl:text>entities.html</xsl:text>
  263. </xsl:when>
  264. <xsl:when test="$name = '#architecture'">
  265. <xsl:text>architecture.html</xsl:text>
  266. </xsl:when>
  267. <xsl:when test="$name = '#Namespaces'">
  268. <xsl:text>namespaces.html</xsl:text>
  269. </xsl:when>
  270. <xsl:when test="$name = '#DOM'">
  271. <xsl:text>DOM.html</xsl:text>
  272. </xsl:when>
  273. <xsl:when test="$name = '#Catalog'">
  274. <xsl:text>catalog.html</xsl:text>
  275. </xsl:when>
  276. <xsl:when test="$name = '#Upgrading'">
  277. <xsl:text>upgrade.html</xsl:text>
  278. </xsl:when>
  279. <xsl:when test="$name = '#Encodings'">
  280. <xsl:text>encoding.html</xsl:text>
  281. </xsl:when>
  282. <xsl:when test="$name = '#IO'">
  283. <xsl:text>xmlio.html</xsl:text>
  284. </xsl:when>
  285. <xsl:when test="$name = '#Memory'">
  286. <xsl:text>xmlmem.html</xsl:text>
  287. </xsl:when>
  288. <xsl:when test="$name = '#Thread'">
  289. <xsl:text>threads.html</xsl:text>
  290. </xsl:when>
  291. <xsl:when test="$name = '#FAQ'">
  292. <xsl:text>FAQ.html</xsl:text>
  293. </xsl:when>
  294. <xsl:when test="$name = '#Python'">
  295. <xsl:text>python.html</xsl:text>
  296. </xsl:when>
  297. <xsl:when test="$name = ''">
  298. <xsl:text>unknown.html</xsl:text>
  299. </xsl:when>
  300. <xsl:otherwise>
  301. <xsl:value-of select="$name"/>
  302. </xsl:otherwise>
  303. </xsl:choose>
  304. </xsl:template>
  305. <!--
  306. - The global title
  307. -->
  308. <xsl:variable name="globaltitle" select="string(/html/body/h1[1])"/>
  309. <!--
  310. - The table of content
  311. -->
  312. <xsl:variable name="toc">
  313. <form action="search.php"
  314. enctype="application/x-www-form-urlencoded" method="get">
  315. <input name="query" type="text" size="20" value=""/>
  316. <input name="submit" type="submit" value="Search ..."/>
  317. </form>
  318. <ul><!-- style="margin-left: -1em" -->
  319. <li><a href="index.html">Home</a></li>
  320. <!--<li><a href="http://xmlsoft.org/wiki">Wiki</a></li> -->
  321. <li><a href="html/index.html">Reference Manual</a></li>
  322. <xsl:for-each select="/html/body/h2">
  323. <xsl:variable name="filename">
  324. <xsl:call-template name="tocfilename">
  325. <xsl:with-param name="name" select="concat('#', string(a[1]/@name))"/>
  326. </xsl:call-template>
  327. </xsl:variable>
  328. <xsl:if test="$filename != ''">
  329. <li>
  330. <xsl:element name="a">
  331. <xsl:attribute name="href">
  332. <xsl:value-of select="$filename"/>
  333. </xsl:attribute>
  334. <xsl:if test="$filename = 'docs.html'">
  335. <xsl:attribute name="style">font-weight:bold</xsl:attribute>
  336. </xsl:if>
  337. <xsl:value-of select="."/>
  338. </xsl:element>
  339. </li>
  340. </xsl:if>
  341. </xsl:for-each>
  342. <li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li>
  343. <li><a href="html/index.html" style="font-weight:bold">API Menu</a></li>
  344. <li><a href="guidelines.html">XML Guidelines</a></li>
  345. <li><a href="ChangeLog.html">Recent Changes</a></li>
  346. </ul>
  347. </xsl:variable>
  348. <xsl:variable name="develtoc">
  349. <form action="search.php"
  350. enctype="application/x-www-form-urlencoded" method="get">
  351. <input name="query" type="text" size="20" value=""/>
  352. <input name="submit" type="submit" value="Search ..."/>
  353. </form>
  354. <ul><!-- style="margin-left: -1em" -->
  355. <li><a href="index.html" style="font-weight:bold">Main Menu</a></li>
  356. <li><a href="html/index.html" style="font-weight:bold">Reference Manual</a></li>
  357. <li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li>
  358. <li><a href="guidelines.html">XML Guidelines</a></li>
  359. <li><a href="tutorial/index.html">Tutorial</a></li>
  360. <li><a href="xmlreader.html">The Reader Interface</a></li>
  361. <li><a href="ChangeLog.html">ChangeLog</a></li>
  362. <xsl:for-each select="/html/body/h2">
  363. <xsl:variable name="filename">
  364. <xsl:call-template name="docfilename">
  365. <xsl:with-param name="name" select="concat('#', string(a[1]/@name))"/>
  366. </xsl:call-template>
  367. </xsl:variable>
  368. <xsl:if test="$filename != ''">
  369. <li>
  370. <xsl:element name="a">
  371. <xsl:attribute name="href">
  372. <xsl:value-of select="$filename"/>
  373. </xsl:attribute>
  374. <xsl:value-of select="."/>
  375. </xsl:element>
  376. </li>
  377. </xsl:if>
  378. </xsl:for-each>
  379. <li><a href="xml.html">flat page</a>, <a href="site.xsl">stylesheet</a></li>
  380. </ul>
  381. </xsl:variable>
  382. <xsl:variable name="api">
  383. <ul><!-- style="margin-left: -1em" -->
  384. <li><a href="{$href_base}APIchunk0.html">Alphabetic</a></li>
  385. <li><a href="{$href_base}APIconstructors.html">Constructors</a></li>
  386. <li><a href="{$href_base}APIfunctions.html">Functions/Types</a></li>
  387. <li><a href="{$href_base}APIfiles.html">Modules</a></li>
  388. <li><a href="{$href_base}APIsymbols.html">Symbols</a></li>
  389. </ul>
  390. </xsl:variable>
  391. <xsl:variable name="related">
  392. <ul><!-- style="margin-left: -1em" -->
  393. <li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li>
  394. <li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li>
  395. <li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li>
  396. <li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li>
  397. <li><a href="ftp://xmlsoft.org/">FTP</a></li>
  398. <li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li>
  399. <li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li>
  400. <li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li>
  401. <li><a href="http://codespeak.net/lxml/">lxml Python bindings</a></li>
  402. <li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li>
  403. <li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li>
  404. <li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li>
  405. <li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li>
  406. <li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li>
  407. <li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li>
  408. <li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li>
  409. </ul>
  410. </xsl:variable>
  411. <xsl:template name="toc">
  412. <table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
  413. <tr>
  414. <td>
  415. <table width="100%" border="0" cellspacing="1" cellpadding="3">
  416. <tr>
  417. <td colspan="1" bgcolor="#eecfa1" align="center">
  418. <center>
  419. <b><xsl:value-of select="$menu_name"/></b>
  420. </center>
  421. </td>
  422. </tr>
  423. <tr>
  424. <td bgcolor="#fffacd">
  425. <xsl:copy-of select="$toc"/>
  426. </td>
  427. </tr>
  428. </table>
  429. <table width="100%" border="0" cellspacing="1" cellpadding="3">
  430. <tr>
  431. <td colspan="1" bgcolor="#eecfa1" align="center">
  432. <center>
  433. <b>Related links</b>
  434. </center>
  435. </td>
  436. </tr>
  437. <tr>
  438. <td bgcolor="#fffacd">
  439. <xsl:copy-of select="$related"/>
  440. </td>
  441. </tr>
  442. </table>
  443. </td>
  444. </tr>
  445. </table>
  446. </xsl:template>
  447. <xsl:template name="develtoc">
  448. <table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
  449. <tr>
  450. <td>
  451. <table width="100%" border="0" cellspacing="1" cellpadding="3">
  452. <tr>
  453. <td colspan="1" bgcolor="#eecfa1" align="center">
  454. <center>
  455. <b>Developer Menu</b>
  456. </center>
  457. </td>
  458. </tr>
  459. <tr>
  460. <td bgcolor="#fffacd">
  461. <xsl:copy-of select="$develtoc"/>
  462. </td>
  463. </tr>
  464. </table>
  465. <table width="100%" border="0" cellspacing="1" cellpadding="3">
  466. <tr>
  467. <td colspan="1" bgcolor="#eecfa1" align="center">
  468. <center>
  469. <b>API Indexes</b>
  470. </center>
  471. </td>
  472. </tr>
  473. <tr>
  474. <td bgcolor="#fffacd">
  475. <xsl:copy-of select="$api"/>
  476. </td>
  477. </tr>
  478. </table>
  479. <table width="100%" border="0" cellspacing="1" cellpadding="3">
  480. <tr>
  481. <td colspan="1" bgcolor="#eecfa1" align="center">
  482. <center>
  483. <b>Related links</b>
  484. </center>
  485. </td>
  486. </tr>
  487. <tr>
  488. <td bgcolor="#fffacd">
  489. <xsl:copy-of select="$related"/>
  490. </td>
  491. </tr>
  492. </table>
  493. </td>
  494. </tr>
  495. </table>
  496. </xsl:template>
  497. <xsl:template mode="head" match="title">
  498. <title>
  499. <xsl:apply-templates/>
  500. </title>
  501. </xsl:template>
  502. <xsl:template mode="head" match="meta">
  503. </xsl:template>
  504. <!--
  505. - Write the styles in the head
  506. -->
  507. <xsl:template name="style">
  508. <link rel="SHORTCUT ICON" href="/favicon.ico"/>
  509. <style type="text/css">
  510. TD {font-family: Verdana,Arial,Helvetica}
  511. BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
  512. H1 {font-family: Verdana,Arial,Helvetica}
  513. H2 {font-family: Verdana,Arial,Helvetica}
  514. H3 {font-family: Verdana,Arial,Helvetica}
  515. A:link, A:visited, A:active { text-decoration: underline }
  516. </style>
  517. </xsl:template>
  518. <!--
  519. - Write the title box on top
  520. -->
  521. <xsl:template name="titlebox">
  522. <xsl:param name="title" select="'Main Page'"/>
  523. <table border="0" width="100%" cellpadding="5" cellspacing="0" align="center">
  524. <tr>
  525. <td width="120">
  526. <a href="http://swpat.ffii.org/"><img src="{$href_base}epatents.png" alt="Action against software patents"/></a>
  527. </td>
  528. <td width="180">
  529. <a href="http://www.gnome.org/"><img src="{$href_base}gnome2.png" alt="Gnome2 Logo"/></a>
  530. <a href="http://www.w3.org/Status"><img src="{$href_base}w3c.png" alt="W3C Logo"/></a>
  531. <a href="http://www.redhat.com/"><img src="{$href_base}redhat.gif" alt="Red Hat Logo"/></a>
  532. <div align="left">
  533. <a href="http://xmlsoft.org/"><img src="{$href_base}Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo"/></a>
  534. </div>
  535. </td>
  536. <td>
  537. <table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000">
  538. <tr>
  539. <td>
  540. <table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd">
  541. <tr>
  542. <td align="center">
  543. <xsl:element name="h1">
  544. <xsl:value-of select="$globaltitle"/>
  545. </xsl:element>
  546. <xsl:element name="h2">
  547. <xsl:value-of select="$title"/>
  548. </xsl:element>
  549. </td>
  550. </tr>
  551. </table>
  552. </td>
  553. </tr>
  554. </table>
  555. </td>
  556. </tr>
  557. </table>
  558. </xsl:template>
  559. <!--
  560. - Handling of nodes in the body before the first H2, table of content
  561. - Everything is just copied over, except href which may get rewritten
  562. - and h1/h2/a at the top level
  563. -->
  564. <xsl:template priority="2" mode="subcontent" match="a">
  565. <xsl:variable name="filename">
  566. <xsl:call-template name="filename">
  567. <xsl:with-param name="name" select="string(@href)"/>
  568. </xsl:call-template>
  569. </xsl:variable>
  570. <xsl:copy>
  571. <xsl:attribute name="href">
  572. <xsl:value-of select="$filename"/>
  573. </xsl:attribute>
  574. <xsl:apply-templates mode="subcontent" select="node()"/>
  575. </xsl:copy>
  576. </xsl:template>
  577. <xsl:template mode="subcontent" match="@*|node()">
  578. <xsl:copy>
  579. <xsl:apply-templates mode="subcontent" select="@*|node()"/>
  580. </xsl:copy>
  581. </xsl:template>
  582. <xsl:template mode="content" match="@*|node()">
  583. <xsl:if test="name() != 'h1' and name() != 'h2'">
  584. <xsl:copy>
  585. <xsl:apply-templates mode="subcontent" select="@*|node()"/>
  586. </xsl:copy>
  587. </xsl:if>
  588. </xsl:template>
  589. <!--
  590. - Handling of nodes in the body after an H2
  591. - Open a new file and dump all the siblings up to the next H2
  592. -->
  593. <xsl:template name="subfile">
  594. <xsl:param name="header" select="following-sibling::h2[1]"/>
  595. <xsl:variable name="filename">
  596. <xsl:call-template name="filename">
  597. <xsl:with-param name="name" select="concat('#', string($header/a[1]/@name))"/>
  598. </xsl:call-template>
  599. </xsl:variable>
  600. <xsl:variable name="tocfilename">
  601. <xsl:call-template name="tocfilename">
  602. <xsl:with-param name="name" select="concat('#', string($header/a[1]/@name))"/>
  603. </xsl:call-template>
  604. </xsl:variable>
  605. <xsl:variable name="title">
  606. <xsl:value-of select="$header"/>
  607. </xsl:variable>
  608. <xsl:document href="{$filename}" method="xml" encoding="ISO-8859-1"
  609. doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
  610. doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  611. <html>
  612. <head>
  613. <xsl:call-template name="style"/>
  614. <xsl:element name="title">
  615. <xsl:value-of select="$title"/>
  616. </xsl:element>
  617. </head>
  618. <body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000">
  619. <xsl:call-template name="titlebox">
  620. <xsl:with-param name="title" select="$title"/>
  621. </xsl:call-template>
  622. <table border="0" cellpadding="4" cellspacing="0" width="100%" align="center">
  623. <tr>
  624. <td bgcolor="#8b7765">
  625. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  626. <tr>
  627. <td valign="top" width="200" bgcolor="#8b7765">
  628. <xsl:choose>
  629. <xsl:when test="$filename = 'docs.html'">
  630. <xsl:call-template name="develtoc"/>
  631. </xsl:when>
  632. <xsl:when test="$tocfilename = ''">
  633. <xsl:call-template name="develtoc"/>
  634. </xsl:when>
  635. <xsl:otherwise>
  636. <xsl:call-template name="toc"/>
  637. </xsl:otherwise>
  638. </xsl:choose>
  639. </td>
  640. <td valign="top" bgcolor="#8b7765">
  641. <table border="0" cellspacing="0" cellpadding="1" width="100%">
  642. <tr>
  643. <td>
  644. <table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
  645. <tr>
  646. <td>
  647. <table border="0" cellpadding="3" cellspacing="1" width="100%">
  648. <tr>
  649. <td bgcolor="#fffacd">
  650. <xsl:apply-templates mode="subfile" select="$header/following-sibling::*[preceding-sibling::h2[1] = $header and name() != 'h2' ]"/>
  651. <p><a href="bugs.html">Daniel Veillard</a></p>
  652. </td>
  653. </tr>
  654. </table>
  655. </td>
  656. </tr>
  657. </table>
  658. </td>
  659. </tr>
  660. </table>
  661. </td>
  662. </tr>
  663. </table>
  664. </td>
  665. </tr>
  666. </table>
  667. </body>
  668. </html>
  669. </xsl:document>
  670. </xsl:template>
  671. <xsl:template mode="subfile" match="@*|node()">
  672. <xsl:copy>
  673. <xsl:apply-templates mode="content" select="@*|node()"/>
  674. </xsl:copy>
  675. </xsl:template>
  676. <!--
  677. - Handling of the initial body and head HTML document
  678. -->
  679. <xsl:template match="body">
  680. <xsl:variable name="firsth2" select="./h2[1]"/>
  681. <xsl:variable name="rest2" select="./h2[position()&gt;1]"/>
  682. <body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000">
  683. <xsl:call-template name="titlebox">
  684. <xsl:with-param name="title" select="'libxml'"/>
  685. </xsl:call-template>
  686. <table border="0" cellpadding="4" cellspacing="0" width="100%" align="center">
  687. <tr>
  688. <td bgcolor="#8b7765">
  689. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  690. <tr>
  691. <td valign="top" width="200" bgcolor="#8b7765">
  692. <xsl:call-template name="toc"/>
  693. </td>
  694. <td valign="top" bgcolor="#8b7765">
  695. <table border="0" cellspacing="0" cellpadding="1" width="100%">
  696. <tr>
  697. <td>
  698. <table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
  699. <tr>
  700. <td>
  701. <table border="0" cellpadding="3" cellspacing="1" width="100%">
  702. <tr>
  703. <td bgcolor="#fffacd">
  704. <xsl:apply-templates mode="content" select="($firsth2/preceding-sibling::*)"/>
  705. <xsl:for-each select="./h2">
  706. <xsl:call-template name="subfile">
  707. <xsl:with-param name="header" select="."/>
  708. </xsl:call-template>
  709. </xsl:for-each>
  710. <p><a href="bugs.html">Daniel Veillard</a></p>
  711. </td>
  712. </tr>
  713. </table>
  714. </td>
  715. </tr>
  716. </table>
  717. </td>
  718. </tr>
  719. </table>
  720. </td>
  721. </tr>
  722. </table>
  723. </td>
  724. </tr>
  725. </table>
  726. </body>
  727. </xsl:template>
  728. <xsl:template match="head">
  729. <head>
  730. <xsl:call-template name="style"/>
  731. <xsl:apply-templates mode="head"/>
  732. </head>
  733. </xsl:template>
  734. <xsl:template match="html">
  735. <xsl:message>Generating the Web pages</xsl:message>
  736. <html>
  737. <xsl:apply-templates/>
  738. </html>
  739. </xsl:template>
  740. </xsl:stylesheet>