profile-javahelp.xsl 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545
  1. <?xml version="1.0" encoding="US-ASCII"?>
  2. <!--This file was created automatically by xsl2profile-->
  3. <!--from the DocBook XSL stylesheets.-->
  4. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" xmlns:ng="http://docbook.org/docbook-ng" xmlns:db="http://docbook.org/ns/docbook" xmlns:exsl="http://exslt.org/common" xmlns:exslt="http://exslt.org/common" exslt:dummy="dummy" ng:dummy="dummy" db:dummy="dummy" extension-element-prefixes="exslt" version="1.0" exclude-result-prefixes="doc ng db exsl exslt">
  5. <xsl:import href="../html/chunk.xsl"/>
  6. <xsl:output method="html"/>
  7. <!-- ********************************************************************
  8. $Id: javahelp.xsl 9152 2011-11-12 00:17:33Z bobstayton $
  9. ********************************************************************
  10. This file is part of the XSL DocBook Stylesheet distribution.
  11. See ../README or http://docbook.sf.net/release/xsl/current/ for
  12. copyright and other information.
  13. ******************************************************************** -->
  14. <!-- ==================================================================== -->
  15. <xslo:include xmlns:xslo="http://www.w3.org/1999/XSL/Transform" href="../profiling/profile-mode.xsl"/><xslo:variable xmlns:xslo="http://www.w3.org/1999/XSL/Transform" name="profiled-content"><xslo:choose><xslo:when test="*/self::ng:* or */self::db:*"><xslo:message>Note: namesp. cut : stripped namespace before processing</xslo:message><xslo:variable name="stripped-content"><xslo:apply-templates select="/" mode="stripNS"/></xslo:variable><xslo:message>Note: namesp. cut : processing stripped document</xslo:message><xslo:apply-templates select="exslt:node-set($stripped-content)" mode="profile"/></xslo:when><xslo:otherwise><xslo:apply-templates select="/" mode="profile"/></xslo:otherwise></xslo:choose></xslo:variable><xslo:variable xmlns:xslo="http://www.w3.org/1999/XSL/Transform" name="profiled-nodes" select="exslt:node-set($profiled-content)"/><xsl:template match="/">
  16. <!-- * Get a title for current doc so that we let the user -->
  17. <!-- * know what document we are processing at this point. -->
  18. <xsl:variable name="doc.title">
  19. <xsl:call-template name="get.doc.title"/>
  20. </xsl:variable>
  21. <xsl:choose>
  22. <!-- Hack! If someone hands us a DocBook V5.x or DocBook NG document,
  23. toss the namespace and continue. Use the docbook5 namespaced
  24. stylesheets for DocBook5 if you don't want to use this feature.-->
  25. <xsl:when test="false()"/>
  26. <xsl:otherwise>
  27. <xsl:choose>
  28. <xsl:when test="$rootid != ''">
  29. <xsl:choose>
  30. <xsl:when test="count($profiled-nodes//*[@id=$rootid or @xml:id=$rootid]) = 0">
  31. <xsl:message terminate="yes">
  32. <xsl:text>ID '</xsl:text>
  33. <xsl:value-of select="$rootid"/>
  34. <xsl:text>' not found in document.</xsl:text>
  35. </xsl:message>
  36. </xsl:when>
  37. <xsl:otherwise>
  38. <xsl:message>Formatting from <xsl:value-of select="$rootid"/></xsl:message>
  39. <xsl:apply-templates select="$profiled-nodes//*[@id=$rootid or @xml:id=$rootid]" mode="process.root"/>
  40. </xsl:otherwise>
  41. </xsl:choose>
  42. </xsl:when>
  43. <xsl:otherwise>
  44. <xsl:apply-templates select="$profiled-nodes" mode="process.root"/>
  45. </xsl:otherwise>
  46. </xsl:choose>
  47. <xsl:for-each select="$profiled-nodes"> <!-- This is just a hook for building profiling stylesheets -->
  48. <xsl:call-template name="helpset"/>
  49. <xsl:call-template name="helptoc"/>
  50. <xsl:call-template name="helpmap"/>
  51. <xsl:call-template name="helpidx"/>
  52. </xsl:for-each>
  53. </xsl:otherwise>
  54. </xsl:choose>
  55. </xsl:template>
  56. <xsl:param name="suppress.navigation" select="1"/>
  57. <!-- ==================================================================== -->
  58. <xsl:template name="helpset">
  59. <xsl:call-template name="write.chunk.with.doctype">
  60. <xsl:with-param name="filename" select="concat($chunk.base.dir,'jhelpset.hs')"/>
  61. <xsl:with-param name="method" select="'xml'"/>
  62. <xsl:with-param name="indent" select="'yes'"/>
  63. <xsl:with-param name="doctype-public" select="'-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 1.0//EN'"/>
  64. <xsl:with-param name="doctype-system" select="'http://java.sun.com/products/javahelp/helpset_1_0.dtd'"/>
  65. <xsl:with-param name="content">
  66. <xsl:call-template name="helpset.content"/>
  67. </xsl:with-param>
  68. <xsl:with-param name="quiet" select="$chunk.quietly"/>
  69. </xsl:call-template>
  70. </xsl:template>
  71. <xsl:template name="helpset.content">
  72. <xsl:variable name="title">
  73. <xsl:apply-templates select="." mode="title.markup"/>
  74. </xsl:variable>
  75. <helpset version="1.0">
  76. <title>
  77. <xsl:value-of select="normalize-space($title)"/>
  78. </title>
  79. <!-- maps -->
  80. <maps>
  81. <homeID>top</homeID>
  82. <mapref location="jhelpmap.jhm"/>
  83. </maps>
  84. <!-- views -->
  85. <view>
  86. <name>TOC</name>
  87. <label>Table Of Contents</label>
  88. <type>javax.help.TOCView</type>
  89. <data>jhelptoc.xml</data>
  90. </view>
  91. <view>
  92. <name>Index</name>
  93. <label>Index</label>
  94. <type>javax.help.IndexView</type>
  95. <data>jhelpidx.xml</data>
  96. </view>
  97. <view>
  98. <name>Search</name>
  99. <label>Search</label>
  100. <type>javax.help.SearchView</type>
  101. <data engine="com.sun.java.help.search.DefaultSearchEngine">JavaHelpSearch</data>
  102. </view>
  103. </helpset>
  104. </xsl:template>
  105. <!-- ==================================================================== -->
  106. <xsl:template name="helptoc">
  107. <xsl:call-template name="write.chunk.with.doctype">
  108. <xsl:with-param name="filename" select="concat($chunk.base.dir,'jhelptoc.xml')"/>
  109. <xsl:with-param name="method" select="'xml'"/>
  110. <xsl:with-param name="indent" select="'yes'"/>
  111. <xsl:with-param name="doctype-public" select="'-//Sun Microsystems Inc.//DTD JavaHelp TOC Version 1.0//EN'"/>
  112. <xsl:with-param name="doctype-system" select="'http://java.sun.com/products/javahelp/toc_1_0.dtd'"/>
  113. <xsl:with-param name="encoding" select="$javahelp.encoding"/>
  114. <xsl:with-param name="content">
  115. <xsl:call-template name="helptoc.content"/>
  116. </xsl:with-param>
  117. <xsl:with-param name="quiet" select="$chunk.quietly"/>
  118. </xsl:call-template>
  119. </xsl:template>
  120. <xsl:template name="helptoc.content">
  121. <toc version="1.0">
  122. <xsl:choose>
  123. <xsl:when test="$rootid != ''">
  124. <xsl:apply-templates select="key('id',$rootid)" mode="jhtoc"/>
  125. </xsl:when>
  126. <xsl:otherwise>
  127. <xsl:apply-templates select="." mode="jhtoc"/>
  128. </xsl:otherwise>
  129. </xsl:choose>
  130. </toc>
  131. </xsl:template>
  132. <xsl:template match="set" mode="jhtoc">
  133. <xsl:variable name="id">
  134. <xsl:call-template name="object.id">
  135. <xsl:with-param name="object" select="."/>
  136. </xsl:call-template>
  137. </xsl:variable>
  138. <xsl:variable name="title">
  139. <xsl:apply-templates select="." mode="title.markup"/>
  140. </xsl:variable>
  141. <tocitem target="{$id}">
  142. <xsl:attribute name="text">
  143. <xsl:value-of select="normalize-space($title)"/>
  144. </xsl:attribute>
  145. <xsl:apply-templates select="book" mode="jhtoc"/>
  146. </tocitem>
  147. </xsl:template>
  148. <xsl:template match="book" mode="jhtoc">
  149. <xsl:variable name="id">
  150. <xsl:call-template name="object.id"/>
  151. </xsl:variable>
  152. <xsl:variable name="title">
  153. <xsl:apply-templates select="." mode="title.markup"/>
  154. </xsl:variable>
  155. <tocitem target="{$id}">
  156. <xsl:attribute name="text">
  157. <xsl:value-of select="normalize-space($title)"/>
  158. </xsl:attribute>
  159. <xsl:apply-templates select="part|reference|preface|chapter|appendix|article|colophon|glossary|bibliography" mode="jhtoc"/>
  160. </tocitem>
  161. </xsl:template>
  162. <xsl:template match="part|reference|preface|chapter|appendix|article" mode="jhtoc">
  163. <xsl:variable name="id">
  164. <xsl:call-template name="object.id"/>
  165. </xsl:variable>
  166. <xsl:variable name="title">
  167. <xsl:apply-templates select="." mode="title.markup"/>
  168. </xsl:variable>
  169. <tocitem target="{$id}">
  170. <xsl:attribute name="text">
  171. <xsl:value-of select="normalize-space($title)"/>
  172. </xsl:attribute>
  173. <xsl:apply-templates select="article|preface|chapter|appendix|refentry|section|sect1|glossary|bibliography" mode="jhtoc"/>
  174. </tocitem>
  175. </xsl:template>
  176. <xsl:template match="section" mode="jhtoc">
  177. <xsl:variable name="id">
  178. <xsl:call-template name="object.id"/>
  179. </xsl:variable>
  180. <xsl:variable name="title">
  181. <xsl:apply-templates select="." mode="title.markup"/>
  182. </xsl:variable>
  183. <tocitem target="{$id}">
  184. <xsl:attribute name="text">
  185. <xsl:value-of select="normalize-space($title)"/>
  186. </xsl:attribute>
  187. <xsl:apply-templates select="section" mode="jhtoc"/>
  188. </tocitem>
  189. </xsl:template>
  190. <xsl:template match="sect1" mode="jhtoc">
  191. <xsl:variable name="id">
  192. <xsl:call-template name="object.id"/>
  193. </xsl:variable>
  194. <xsl:variable name="title">
  195. <xsl:apply-templates select="." mode="title.markup"/>
  196. </xsl:variable>
  197. <tocitem target="{$id}">
  198. <xsl:attribute name="text">
  199. <xsl:value-of select="normalize-space($title)"/>
  200. </xsl:attribute>
  201. <xsl:apply-templates select="sect2" mode="jhtoc"/>
  202. </tocitem>
  203. </xsl:template>
  204. <xsl:template match="sect2" mode="jhtoc">
  205. <xsl:variable name="id">
  206. <xsl:call-template name="object.id"/>
  207. </xsl:variable>
  208. <xsl:variable name="title">
  209. <xsl:apply-templates select="." mode="title.markup"/>
  210. </xsl:variable>
  211. <tocitem target="{$id}">
  212. <xsl:attribute name="text">
  213. <xsl:value-of select="normalize-space($title)"/>
  214. </xsl:attribute>
  215. <xsl:apply-templates select="sect3" mode="jhtoc"/>
  216. </tocitem>
  217. </xsl:template>
  218. <xsl:template match="sect3" mode="jhtoc">
  219. <xsl:variable name="id">
  220. <xsl:call-template name="object.id"/>
  221. </xsl:variable>
  222. <xsl:variable name="title">
  223. <xsl:apply-templates select="." mode="title.markup"/>
  224. </xsl:variable>
  225. <tocitem target="{$id}">
  226. <xsl:attribute name="text">
  227. <xsl:value-of select="normalize-space($title)"/>
  228. </xsl:attribute>
  229. <xsl:apply-templates select="sect4" mode="jhtoc"/>
  230. </tocitem>
  231. </xsl:template>
  232. <xsl:template match="sect4" mode="jhtoc">
  233. <xsl:variable name="id">
  234. <xsl:call-template name="object.id"/>
  235. </xsl:variable>
  236. <xsl:variable name="title">
  237. <xsl:apply-templates select="." mode="title.markup"/>
  238. </xsl:variable>
  239. <tocitem target="{$id}">
  240. <xsl:attribute name="text">
  241. <xsl:value-of select="normalize-space($title)"/>
  242. </xsl:attribute>
  243. <xsl:apply-templates select="sect5" mode="jhtoc"/>
  244. </tocitem>
  245. </xsl:template>
  246. <xsl:template match="sect5|colophon|refentry" mode="jhtoc">
  247. <xsl:variable name="id">
  248. <xsl:call-template name="object.id"/>
  249. </xsl:variable>
  250. <xsl:variable name="title">
  251. <xsl:apply-templates select="." mode="title.markup"/>
  252. </xsl:variable>
  253. <tocitem target="{$id}">
  254. <xsl:attribute name="text">
  255. <xsl:value-of select="normalize-space($title)"/>
  256. </xsl:attribute>
  257. </tocitem>
  258. </xsl:template>
  259. <xsl:template match="glossary" mode="jhtoc">
  260. <xsl:variable name="id">
  261. <xsl:call-template name="object.id"/>
  262. </xsl:variable>
  263. <xsl:variable name="title">
  264. <xsl:call-template name="gentext">
  265. <xsl:with-param name="key" select="'Glossary'"/>
  266. </xsl:call-template>
  267. </xsl:variable>
  268. <tocitem target="{$id}">
  269. <xsl:attribute name="text">
  270. <xsl:value-of select="$title"/>
  271. </xsl:attribute>
  272. </tocitem>
  273. </xsl:template>
  274. <xsl:template match="bibliography" mode="jhtoc">
  275. <xsl:variable name="id">
  276. <xsl:call-template name="object.id"/>
  277. </xsl:variable>
  278. <xsl:variable name="title">
  279. <xsl:call-template name="gentext">
  280. <xsl:with-param name="key" select="'Bibliography'"/>
  281. </xsl:call-template>
  282. </xsl:variable>
  283. <tocitem target="{$id}">
  284. <xsl:attribute name="text">
  285. <xsl:value-of select="$title"/>
  286. </xsl:attribute>
  287. </tocitem>
  288. </xsl:template>
  289. <!-- ==================================================================== -->
  290. <xsl:template name="helpmap">
  291. <xsl:call-template name="write.chunk.with.doctype">
  292. <xsl:with-param name="filename" select="concat($chunk.base.dir, 'jhelpmap.jhm')"/>
  293. <xsl:with-param name="method" select="'xml'"/>
  294. <xsl:with-param name="indent" select="'yes'"/>
  295. <xsl:with-param name="doctype-public" select="'-//Sun Microsystems Inc.//DTD JavaHelp Map Version 1.0//EN'"/>
  296. <xsl:with-param name="doctype-system" select="'http://java.sun.com/products/javahelp/map_1_0.dtd'"/>
  297. <xsl:with-param name="encoding" select="$javahelp.encoding"/>
  298. <xsl:with-param name="content">
  299. <xsl:call-template name="helpmap.content"/>
  300. </xsl:with-param>
  301. <xsl:with-param name="quiet" select="$chunk.quietly"/>
  302. </xsl:call-template>
  303. </xsl:template>
  304. <xsl:template name="helpmap.content">
  305. <map version="1.0">
  306. <xsl:choose>
  307. <xsl:when test="$rootid != ''">
  308. <xsl:apply-templates select="key('id',$rootid)//set | key('id',$rootid)//book | key('id',$rootid)//part | key('id',$rootid)//reference | key('id',$rootid)//preface | key('id',$rootid)//chapter | key('id',$rootid)//appendix | key('id',$rootid)//article | key('id',$rootid)//colophon | key('id',$rootid)//refentry | key('id',$rootid)//section | key('id',$rootid)//sect1 | key('id',$rootid)//sect2 | key('id',$rootid)//sect3 | key('id',$rootid)//sect4 | key('id',$rootid)//sect5 | key('id',$rootid)//indexterm | key('id',$rootid)//glossary | key('id',$rootid)//bibliography | key('id',$rootid)//*[@id]" mode="map"/>
  309. </xsl:when>
  310. <xsl:otherwise>
  311. <xsl:apply-templates select="//set | //book | //part | //reference | //preface | //chapter | //appendix | //article | //colophon | //refentry | //section | //sect1 | //sect2 | //sect3 | //sect4 | //sect5 | //indexterm | //glossary | //bibliography | //*[@id]" mode="map"/>
  312. </xsl:otherwise>
  313. </xsl:choose>
  314. </map>
  315. </xsl:template>
  316. <xsl:template match="set" mode="map">
  317. <xsl:variable name="id">
  318. <xsl:call-template name="object.id">
  319. <xsl:with-param name="object" select="."/>
  320. </xsl:call-template>
  321. </xsl:variable>
  322. <mapID target="{$id}">
  323. <xsl:attribute name="url">
  324. <xsl:call-template name="href.target.uri"/>
  325. </xsl:attribute>
  326. </mapID>
  327. </xsl:template>
  328. <xsl:template match="book" mode="map">
  329. <xsl:variable name="id">
  330. <xsl:call-template name="object.id"/>
  331. </xsl:variable>
  332. <mapID target="{$id}">
  333. <xsl:attribute name="url">
  334. <xsl:call-template name="href.target.uri"/>
  335. </xsl:attribute>
  336. </mapID>
  337. </xsl:template>
  338. <xsl:template match="part|reference|preface|chapter|appendix|refentry|article|glossary|bibliography" mode="map">
  339. <xsl:variable name="id">
  340. <xsl:call-template name="object.id"/>
  341. </xsl:variable>
  342. <mapID target="{$id}">
  343. <xsl:attribute name="url">
  344. <xsl:call-template name="href.target.uri"/>
  345. </xsl:attribute>
  346. </mapID>
  347. </xsl:template>
  348. <xsl:template match="section|sect1|sect2|sect3|sect4|sect5|colophon" mode="map">
  349. <xsl:variable name="id">
  350. <xsl:call-template name="object.id"/>
  351. </xsl:variable>
  352. <mapID target="{$id}">
  353. <xsl:attribute name="url">
  354. <xsl:call-template name="href.target.uri"/>
  355. </xsl:attribute>
  356. </mapID>
  357. </xsl:template>
  358. <xsl:template match="indexterm[@class='endofrange']" mode="map"/>
  359. <xsl:template match="indexterm" mode="map">
  360. <xsl:variable name="id">
  361. <xsl:call-template name="object.id"/>
  362. </xsl:variable>
  363. <mapID target="{$id}">
  364. <xsl:attribute name="url">
  365. <xsl:call-template name="href.target.uri"/>
  366. </xsl:attribute>
  367. </mapID>
  368. </xsl:template>
  369. <xsl:template match="*[@id]" mode="map">
  370. <xsl:variable name="id">
  371. <xsl:call-template name="object.id"/>
  372. </xsl:variable>
  373. <mapID target="{$id}">
  374. <xsl:attribute name="url">
  375. <xsl:call-template name="href.target.uri"/>
  376. </xsl:attribute>
  377. </mapID>
  378. </xsl:template>
  379. <!-- ==================================================================== -->
  380. <xsl:template name="helpidx">
  381. <xsl:call-template name="write.chunk.with.doctype">
  382. <xsl:with-param name="filename" select="concat($chunk.base.dir, 'jhelpidx.xml')"/>
  383. <xsl:with-param name="method" select="'xml'"/>
  384. <xsl:with-param name="indent" select="'yes'"/>
  385. <xsl:with-param name="doctype-public" select="'-//Sun Microsystems Inc.//DTD JavaHelp Index Version 1.0//EN'"/>
  386. <xsl:with-param name="doctype-system" select="'http://java.sun.com/products/javahelp/index_1_0.dtd'"/>
  387. <xsl:with-param name="encoding" select="$javahelp.encoding"/>
  388. <xsl:with-param name="content">
  389. <xsl:call-template name="helpidx.content"/>
  390. </xsl:with-param>
  391. <xsl:with-param name="quiet" select="$chunk.quietly"/>
  392. </xsl:call-template>
  393. </xsl:template>
  394. <xsl:template name="helpidx.content">
  395. <index version="1.0">
  396. <xsl:choose>
  397. <xsl:when test="$rootid != ''">
  398. <xsl:apply-templates select="key('id',$rootid)//indexterm" mode="idx">
  399. <xsl:sort select="primary"/>
  400. <xsl:sort select="secondary"/>
  401. <xsl:sort select="tertiary"/>
  402. </xsl:apply-templates>
  403. </xsl:when>
  404. <xsl:otherwise>
  405. <xsl:apply-templates select="//indexterm" mode="idx">
  406. <xsl:sort select="primary"/>
  407. <xsl:sort select="secondary"/>
  408. <xsl:sort select="tertiary"/>
  409. </xsl:apply-templates>
  410. </xsl:otherwise>
  411. </xsl:choose>
  412. </index>
  413. </xsl:template>
  414. <xsl:template match="indexterm[@class='endofrange']" mode="idx"/>
  415. <xsl:template match="indexterm" mode="idx">
  416. <xsl:variable name="id">
  417. <xsl:call-template name="object.id"/>
  418. </xsl:variable>
  419. <xsl:variable name="text">
  420. <xsl:value-of select="normalize-space(primary)"/>
  421. <xsl:if test="secondary">
  422. <xsl:text>, </xsl:text>
  423. <xsl:value-of select="normalize-space(secondary)"/>
  424. </xsl:if>
  425. <xsl:if test="tertiary">
  426. <xsl:text>, </xsl:text>
  427. <xsl:value-of select="normalize-space(tertiary)"/>
  428. </xsl:if>
  429. </xsl:variable>
  430. <xsl:choose>
  431. <xsl:when test="see">
  432. <xsl:variable name="see"><xsl:value-of select="normalize-space(see)"/></xsl:variable>
  433. <indexitem text="{$text} see '{$see}'"/>
  434. </xsl:when>
  435. <xsl:otherwise>
  436. <indexitem text="{$text}" target="{$id}"/>
  437. </xsl:otherwise>
  438. </xsl:choose>
  439. </xsl:template>
  440. <!-- ==================================================================== -->
  441. <!-- Kludge for Xalan outputting &trade; which fails in javahelp -->
  442. <xsl:template name="dingbat.characters">
  443. <!-- now that I'm using the real serializer, all that dingbat malarky -->
  444. <!-- isn't necessary anymore... -->
  445. <xsl:param name="dingbat">bullet</xsl:param>
  446. <xsl:choose>
  447. <xsl:when test="$dingbat='bullet'">&#8226;</xsl:when>
  448. <xsl:when test="$dingbat='copyright'">&#169;</xsl:when>
  449. <xsl:when test="$dingbat='trademark' or $dingbat='trade'">
  450. <xsl:choose>
  451. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  452. <sup>TM</sup>
  453. </xsl:when>
  454. <xsl:otherwise>&#8482;</xsl:otherwise>
  455. </xsl:choose>
  456. </xsl:when>
  457. <xsl:when test="$dingbat='registered'">&#174;</xsl:when>
  458. <xsl:when test="$dingbat='service'">(SM)</xsl:when>
  459. <xsl:when test="$dingbat='nbsp'">&#160;</xsl:when>
  460. <xsl:when test="$dingbat='ldquo'">&#8220;</xsl:when>
  461. <xsl:when test="$dingbat='rdquo'">&#8221;</xsl:when>
  462. <xsl:when test="$dingbat='lsquo'">&#8216;</xsl:when>
  463. <xsl:when test="$dingbat='rsquo'">&#8217;</xsl:when>
  464. <xsl:when test="$dingbat='em-dash'">&#8212;</xsl:when>
  465. <xsl:when test="$dingbat='mdash'">&#8212;</xsl:when>
  466. <xsl:when test="$dingbat='en-dash'">&#8211;</xsl:when>
  467. <xsl:when test="$dingbat='ndash'">&#8211;</xsl:when>
  468. <xsl:otherwise>
  469. <xsl:text>&#8226;</xsl:text>
  470. </xsl:otherwise>
  471. </xsl:choose>
  472. </xsl:template>
  473. </xsl:stylesheet>