Açıklama Yok
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.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/XSL/Format">
  3. <xsl:template match="/">
  4. <root>
  5. <layout-master-set>
  6. <simple-page-master master-name="cover">
  7. <region-body margin-left="1in" margin-right="1in" margin-top="2.5in" margin-bottom="1in"/>
  8. </simple-page-master>
  9. <!--<simple-page-master master-name="doc_info">
  10. <region-body margin-left="1in" margin-top="1in" margin-right="1in" margin-bottom="1in"/>
  11. </simple-page-master>
  12. <simple-page-master master-name="toc_page">
  13. <region-body margin-left="1in" margin-top="1in" margin-right="1in" margin-bottom="1in"/>
  14. </simple-page-master>-->
  15. <simple-page-master master-name="std_page">
  16. <region-body margin-left="1in" margin-top="1in" margin-right="1in" margin-bottom="1in"/>
  17. <region-before extent="1in" display-align="after"/>
  18. <region-after extent="1in" display-align="before"/>
  19. </simple-page-master>
  20. <page-sequence-master master-name="jep_sequence">
  21. <single-page-master-reference master-reference="cover"/>
  22. <!--<single-page-master-reference master-reference="doc_info"/>
  23. <single-page-master-reference master-reference="toc_page"/>-->
  24. <repeatable-page-master-reference master-reference="std_page"/>
  25. </page-sequence-master>
  26. </layout-master-set>
  27. <page-sequence master-reference="jep_sequence">
  28. <flow flow-name="xsl-region-body" font-family="serif" color="black" font-size="10pt">
  29. <block space-before="1.5in" text-align="right" font-family="sans-serif" font-size="18pt">
  30. XEP-<xsl:value-of select="/jep/header/number"/>
  31. </block>
  32. <block text-align="right" font-family="sans-serif" font-size="18pt">
  33. <xsl:value-of select="/jep/header/title"/>
  34. </block>
  35. <!--</flow>
  36. </page-sequence>
  37. <page-sequence master-reference="doc_info">
  38. <flow flow-name="xsl-region-body" font-family="serif" font-size="10pt" color="black">-->
  39. <block font-family="sans-serif" font-size="14pt" space-after=".5em" break-before="page">Document Information</block>
  40. <block font-size="12pt" font-weight="bold">Document Author(s)</block>
  41. <block>
  42. <inline font-weight="bold">Name: </inline>
  43. <inline>
  44. <xsl:value-of select="/jep/header/author/firstname"/>
  45. <xsl:value-of select="/jep/header/author/surname"/>
  46. </inline>
  47. </block>
  48. <block>
  49. <inline font-weight="bold">Email: </inline>
  50. <inline>
  51. <xsl:value-of select="/jep/header/author/email"/>
  52. </inline>
  53. </block>
  54. <block space-after=".5em">
  55. <inline font-weight="bold">JID: </inline>
  56. <inline>
  57. <xsl:value-of select="/jep/header/author/jid"/>
  58. </inline>
  59. </block>
  60. <block font-size="12pt" font-weight="bold">Abstract</block>
  61. <block space-after=".5em">
  62. <xsl:value-of select="/jep/header/abstract"/>
  63. </block>
  64. <block font-size="12pt" font-weight="bold">Document Status</block>
  65. <block space-after=".5em">
  66. <xsl:value-of select="/jep/header/status"/>
  67. </block>
  68. <block font-size="12pt" font-weight="bold">Dependencies/References</block>
  69. <block space-after=".5em">
  70. <xsl:value-of select="/jep/header/dependencies"/>
  71. </block>
  72. <block font-size="12pt" font-weight="bold">Legal Notice</block>
  73. <block space-after=".5em">
  74. <xsl:value-of select="/jep/header/legal"/>
  75. </block>
  76. <block font-size="12pt" font-weight="bold" space-after=".5em">Revision History</block>
  77. <table table-layout="fixed" border-width=".25pt" border-color="black" border-style="solid">
  78. <table-column text-align="center" column-width=".625in" column-number="1"/>
  79. <table-column text-align="center" column-width=".75in" column-number="2"/>
  80. <table-column text-align="center" column-width=".5in" column-number="3"/>
  81. <table-column column-width="4.125in" column-number="4"/>
  82. <table-body>
  83. <table-row background-color="black" color="white" font-weight="bold">
  84. <table-cell padding="3pt">
  85. <block>Version</block>
  86. </table-cell>
  87. <table-cell padding="3pt">
  88. <block>Date</block>
  89. </table-cell>
  90. <table-cell padding="3pt">
  91. <block>Initials</block>
  92. </table-cell>
  93. <table-cell padding="3pt">
  94. <block>Comment</block>
  95. </table-cell>
  96. </table-row>
  97. <xsl:apply-templates select="/jep/header"/>
  98. </table-body>
  99. </table>
  100. <!--</flow>
  101. </page-sequence>
  102. <page-sequence master-reference="toc_page" force-page-count="no-force" format="i">
  103. <flow flow-name="xsl-region-body" font-family="serif" font-size="10pt" color="black">-->
  104. <xsl:call-template name="processTOC"/>
  105. </flow>
  106. </page-sequence>
  107. <page-sequence master-reference="std_page" initial-page-number="1">
  108. <static-content flow-name="xsl-region-after">
  109. <block margin-left="1in" margin-right="1in" padding-top="10pt" border-before-color="black" border-before-width=".125pt" border-before-style="solid" text-align-last="justify" font-size="8pt" font-family="sans-serif" color="black">
  110. XEP-<xsl:value-of select="/jep/header/number"/>:<xsl:text> </xsl:text>
  111. <xsl:value-of select="/jep/header/title"/>
  112. <leader leader-pattern="space"/>
  113. Page <page-number/> of <page-number-citation ref-id="lastpage"/>
  114. </block>
  115. </static-content>
  116. <flow flow-name="xsl-region-body" font-family="serif" font-size="10pt" color="black">
  117. <xsl:apply-templates select="/jep/section1"/>
  118. <block font-family="sans-serif" font-size="12pt" color="black" space-before=".5em" space-after=".5em">Notes:</block>
  119. <xsl:apply-templates select="//note" mode="endlist"/>
  120. <block id="lastpage"/>
  121. </flow>
  122. </page-sequence>
  123. </root>
  124. </xsl:template>
  125. <!-- From the docbook XSL -->
  126. <xsl:template name="object.id">
  127. <xsl:param name="object" select="."/>
  128. <xsl:choose>
  129. <xsl:when test="$object/@id">
  130. <xsl:value-of select="$object/@id"/>
  131. </xsl:when>
  132. <xsl:otherwise>
  133. <xsl:value-of select="generate-id($object)"/>
  134. </xsl:otherwise>
  135. </xsl:choose>
  136. </xsl:template>
  137. <xsl:template name="processTOC">
  138. <block font-family="sans-serif" font-size="14pt" space-after=".5em" break-before="page">Table of Contents</block>
  139. <xsl:apply-templates select="//section1" mode="toc"/>
  140. </xsl:template>
  141. <xsl:template match="/jep/header/revision">
  142. <table-row>
  143. <table-cell padding="3pt">
  144. <block>
  145. <xsl:value-of select="version"/>
  146. </block>
  147. </table-cell>
  148. <table-cell padding="3pt">
  149. <block>
  150. <xsl:value-of select="date"/>
  151. </block>
  152. </table-cell>
  153. <table-cell padding="3pt">
  154. <block>
  155. <xsl:value-of select="initials"/>
  156. </block>
  157. </table-cell>
  158. <table-cell padding="3pt">
  159. <block>
  160. <xsl:value-of select="remark"/>
  161. </block>
  162. </table-cell>
  163. </table-row>
  164. </xsl:template>
  165. <xsl:template match="section1" mode="toc">
  166. <xsl:variable name="oid">
  167. <xsl:call-template name="object.id"/>
  168. </xsl:variable>
  169. <xsl:variable name="num">
  170. <xsl:number level="multiple" count="section1"/>
  171. <xsl:text>.</xsl:text>
  172. </xsl:variable>
  173. <xsl:variable name="sect2.count" select="count(section2)"/>
  174. <xsl:value-of select="$num"/>
  175. <xsl:text> </xsl:text>
  176. <block text-align-last="justify" font-variant="small-caps">
  177. <xsl:value-of select="$num"/>
  178. <xsl:value-of select="@topic"/>
  179. <xsl:text> </xsl:text>
  180. <leader leader-pattern="rule" space-end=".125in"/>
  181. <xsl:text> </xsl:text>
  182. <page-number-citation ref-id="sect-{$oid}"/>
  183. </block>
  184. <xsl:if test="$sect2.count &gt; 0">
  185. <xsl:apply-templates select="section2" mode="toc">
  186. <xsl:with-param name="prevnum" select="$num"/>
  187. </xsl:apply-templates>
  188. </xsl:if>
  189. </xsl:template>
  190. <xsl:template match="section1">
  191. <xsl:variable name="oid">
  192. <xsl:call-template name="object.id"/>
  193. </xsl:variable>
  194. <xsl:variable name="num">
  195. <xsl:number level="multiple" count="section1"/>
  196. <xsl:text>.</xsl:text>
  197. </xsl:variable>
  198. <!--<xsl:number level="single" count="section1"/>-->
  199. <block id="sect-{$oid}" font-family="sans-serif" font-size="14pt" space-after="1em" space-before="1em" font-weight="bold">
  200. <xsl:value-of select="$num"/>
  201. <xsl:text> </xsl:text>
  202. <xsl:value-of select="@topic"/>
  203. </block>
  204. <xsl:apply-templates/>
  205. </xsl:template>
  206. <xsl:template match="section2" mode="toc">
  207. <xsl:param name="prevnum" select='""'/>
  208. <xsl:variable name="oid">
  209. <xsl:call-template name="object.id"/>
  210. </xsl:variable>
  211. <xsl:variable name="num">
  212. <xsl:value-of select="$prevnum"/>
  213. <xsl:number level="multiple" count="section2"/>
  214. <xsl:text>.</xsl:text>
  215. </xsl:variable>
  216. <xsl:variable name="sect3.count" select="count(section3)"/>
  217. <block text-align-last="justify" margin-left="1em">
  218. <xsl:value-of select="$num"/>
  219. <xsl:text> </xsl:text>
  220. <xsl:value-of select="@topic"/>
  221. <xsl:text> </xsl:text>
  222. <leader leader-pattern="rule" space-end=".125in"/>
  223. <xsl:text> </xsl:text>
  224. <page-number-citation ref-id="sect-{$oid}"/>
  225. </block>
  226. <xsl:if test="$sect3.count &gt; 0">
  227. <xsl:apply-templates select="section3" mode="toc">
  228. <xsl:with-param name="prevnum" select="$num"/>
  229. </xsl:apply-templates>
  230. </xsl:if>
  231. </xsl:template>
  232. <xsl:template match="section2">
  233. <xsl:param name="prevnum" select='""'/>
  234. <xsl:variable name="oid">
  235. <xsl:call-template name="object.id"/>
  236. </xsl:variable>
  237. <xsl:variable name="num">
  238. <xsl:number level="single" count="section1"/>.<xsl:number level="multiple" count="section2"/>
  239. <xsl:text>.</xsl:text>
  240. </xsl:variable>
  241. <xsl:variable name="sect3.count" select="count(section3)"/>
  242. <block id="sect-{$oid}" font-weight="bold" font-family="sans-serif">
  243. <xsl:value-of select="$num"/>
  244. <xsl:text> </xsl:text>
  245. <xsl:value-of select="@topic"/>
  246. </block>
  247. <xsl:apply-templates/>
  248. </xsl:template>
  249. <xsl:template match="section3" mode="toc">
  250. <xsl:param name="prevnum" select='""'/>
  251. <xsl:variable name="oid">
  252. <xsl:call-template name="object.id"/>
  253. </xsl:variable>
  254. <xsl:variable name="num">
  255. <xsl:value-of select="$prevnum"/>
  256. <xsl:number level="multiple" count="section3"/>
  257. <xsl:text>.</xsl:text>
  258. </xsl:variable>
  259. <block text-align-last="justify" margin-left="1em">
  260. <xsl:value-of select="$num"/>
  261. <xsl:text> </xsl:text>
  262. <xsl:value-of select="@topic"/>
  263. <xsl:text> </xsl:text>
  264. <leader leader-pattern="rule" space-end=".125in"/>
  265. <xsl:text> </xsl:text>
  266. <page-number-citation ref-id="sect-{$oid}"/>
  267. </block>
  268. </xsl:template>
  269. <xsl:template match="section3">
  270. <xsl:variable name="oid">
  271. <xsl:call-template name="object.id"/>
  272. </xsl:variable>
  273. <block id="sect-{$oid}" margin-left=".5em">
  274. <xsl:if test="../../@type='functional-spec'">FR-<xsl:number level="single" count="section2"/>.<xsl:number level="single" count="section3"/>
  275. </xsl:if>
  276. <xsl:if test="../../@type='supp-spec'">SS-<xsl:number level="single" count="section2"/>.<xsl:number level="single" count="section3"/>
  277. </xsl:if>
  278. <xsl:text> </xsl:text>
  279. <xsl:value-of select="@topic"/>
  280. <xsl:apply-templates/>
  281. </block>
  282. </xsl:template>
  283. <xsl:template match="p">
  284. <block space-before=".5em" space-after=".5em">
  285. <xsl:apply-templates/>
  286. </block>
  287. </xsl:template>
  288. <xsl:template match="code">
  289. <block space-after="1em" margin-bottom="1em" margin-left="1em" font-family="monospace" font-size="8pt" font-weight="normal" white-space-collapse="false" keep-together.within-page="always">
  290. <xsl:value-of select="."/>
  291. </block>
  292. </xsl:template>
  293. <xsl:template match="example">
  294. <table table-layout="fixed" width="100%" space-after="1em">
  295. <table-column column-width="proportional-column-width(1)"/>
  296. <table-body>
  297. <table-row keep-with-next="always">
  298. <table-cell>
  299. <block margin-left=".5em" space-after=".5em" space-before=".5em" font-weight="600" font-size="9pt">
  300. Example <xsl:number level="any" count="example"/>.<xsl:text> </xsl:text>
  301. <xsl:value-of select="@caption"/>
  302. </block>
  303. </table-cell>
  304. </table-row>
  305. <table-row>
  306. <table-cell>
  307. <block margin-left="1em" font-family="monospace" font-size="8pt" font-weight="normal" white-space-collapse="false" keep-together.within-page="always">
  308. <xsl:value-of select="."/>
  309. </block>
  310. </table-cell>
  311. </table-row>
  312. </table-body>
  313. </table>
  314. </xsl:template>
  315. <xsl:template match="note">
  316. <xsl:variable name="notenum">
  317. <xsl:number level="any" count="note"/>
  318. </xsl:variable>
  319. <xsl:variable name="oid">
  320. <xsl:call-template name="object.id"/>
  321. </xsl:variable>
  322. <inline>[<basic-link color="blue" font-weight="bold" internal-destination="nt-{$oid}">
  323. <xsl:value-of select="$notenum"/>
  324. </basic-link>]</inline>
  325. </xsl:template>
  326. <xsl:template match="note" mode="endlist">
  327. <xsl:variable name="oid">
  328. <xsl:call-template name="object.id"/>
  329. </xsl:variable>
  330. <block id="nt-{$oid}" margin=".5em" font-size="8pt">
  331. <xsl:value-of select="position()"/>. <xsl:apply-templates/>
  332. </block>
  333. </xsl:template>
  334. <xsl:template match="link">
  335. <basic-link external-destination="{@url}" text-decoration="underline" color="blue">
  336. <xsl:apply-templates/>
  337. </basic-link>
  338. </xsl:template>
  339. <xsl:template match="strong">
  340. <inline font-weight="bold">
  341. <xsl:apply-templates/>
  342. </inline>
  343. </xsl:template>
  344. <xsl:template match="em">
  345. <inline font-style="italic">
  346. <xsl:apply-templates/>
  347. </inline>
  348. </xsl:template>
  349. <xsl:template match="ul">
  350. <list-block provisional-distance-between-starts="10pt" provisional-label-separation="3pt" space-after=".5em" space-start="1em" margin-left="1em">
  351. <xsl:apply-templates select="li" mode="ul"/>
  352. </list-block>
  353. </xsl:template>
  354. <xsl:template match="ol">
  355. <list-block provisional-distance-between-starts="10pt" provisional-label-separation="3pt" space-after=".5em" space-start="1em" margin-left="1em">
  356. <xsl:apply-templates select="li" mode="ol"/>
  357. </list-block>
  358. </xsl:template>
  359. <xsl:template match="li" mode="ul">
  360. <list-item>
  361. <list-item-label end-indent="label-end()">
  362. <block>&#x2022;</block>
  363. </list-item-label>
  364. <list-item-body start-indent="body-start()">
  365. <block>
  366. <xsl:value-of select="."/>
  367. </block>
  368. </list-item-body>
  369. </list-item>
  370. </xsl:template>
  371. <xsl:template match="li" mode="ol">
  372. <xsl:variable name="num">
  373. <xsl:number level="multiple" count="li"/>
  374. </xsl:variable>
  375. <list-item>
  376. <list-item-label end-indent="label-end()">
  377. <block>
  378. <xsl:value-of select="$num"/>.</block>
  379. </list-item-label>
  380. <list-item-body start-indent="body-start()">
  381. <block>
  382. <xsl:value-of select="."/>
  383. </block>
  384. </list-item-body>
  385. </list-item>
  386. </xsl:template>
  387. </xsl:stylesheet>