| 1 |
<?xml version="1.0" encoding="UTF-8" ?> |
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
<!DOCTYPE xsl:transform [ |
| 46 |
|
| 47 |
<!ENTITY gt ">"> |
| 48 |
<!ENTITY lt "<"> |
| 49 |
<!ENTITY rbl " "> |
| 50 |
<!ENTITY nbsp " "> |
| 51 |
<!ENTITY quot """> |
| 52 |
<!ENTITY quotedblleft "“"> |
| 53 |
<!ENTITY quotedblright "”"> |
| 54 |
<!ENTITY bullet "•"> |
| 55 |
<!ENTITY middot "‣"> |
| 56 |
|
| 57 |
<!ENTITY section "§"> |
| 58 |
<!ENTITY endash "–"> |
| 59 |
<!ENTITY emdash "—"> |
| 60 |
|
| 61 |
<!ENTITY copyr "©"> |
| 62 |
<!ENTITY trademark "™"> |
| 63 |
<!ENTITY registered "®"> |
| 64 |
]> |
| 65 |
<xsl:transform version="1.0" xmlns:fo="http://www.w3.org/1999/XSL/Format" |
| 66 |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
| 67 |
xmlns:saxon="http://icl.com/saxon" extension-element-prefixes="saxon"> |
| 68 |
|
| 69 |
<xsl:import href="../../../xsl/common/output-message.xsl"/> |
| 70 |
|
| 71 |
|
| 72 |
<xsl:param name="paper.type" select="'A4'"/> |
| 73 |
<xsl:param name="page.orientation" select="'portrait'"/> |
| 74 |
<xsl:param name="page.margin.bottom" select="'0cm'"/> |
| 75 |
<xsl:param name="page.margin.top" select="'0cm'"/> |
| 76 |
<xsl:param name="page.margin.inner">2cm</xsl:param> |
| 77 |
<xsl:param name="page.margin.outer">2cm</xsl:param> |
| 78 |
<xsl:param name="body.margin.bottom" select="'2cm'"/> |
| 79 |
<xsl:param name="body.margin.top" select="'2cm'"/> |
| 80 |
<xsl:param name="body.font.family" select="'Helvetica'"/> |
| 81 |
<xsl:param name="body.font.size">9pt</xsl:param> |
| 82 |
<xsl:include href="dita-page-setup.xsl"/> |
| 83 |
|
| 84 |
<xsl:strip-space elements="*"/> |
| 85 |
<xsl:preserve-space elements="pre lines"/> |
| 86 |
|
| 87 |
|
| 88 |
<xsl:attribute-set name="block.properties"> |
| 89 |
<xsl:attribute name="border-bottom-width">0.5em</xsl:attribute> |
| 90 |
</xsl:attribute-set> |
| 91 |
|
| 92 |
<xsl:variable name="newline"/> |
| 93 |
|
| 94 |
<xsl:template match="*[contains(@class,' topic/prolog ')]"/> |
| 95 |
|
| 96 |
|
| 97 |
<xsl:include href="dita2fo-parms.xsl"/> |
| 98 |
|
| 99 |
<xsl:include href="dita2fo-titles.xsl"/> |
| 100 |
<xsl:include href="dita2fo-elems.xsl"/> |
| 101 |
<xsl:include href="dita2fo-lists.xsl"/> |
| 102 |
<xsl:include href="dita2fo-links.xsl"/> |
| 103 |
<xsl:include href="dita2fo-simpletable.xsl"/> |
| 104 |
<xsl:include href="dita2fo-calstable.xsl"/> |
| 105 |
<xsl:include href="dita2fo-subroutines.xsl"/> |
| 106 |
|
| 107 |
<xsl:include href="../../../xsl/common/dita-utilities.xsl"/> |
| 108 |
|
| 109 |
|
| 110 |
<xsl:variable name="msgprefix">DOTX</xsl:variable> |
| 111 |
|
| 112 |
|
| 113 |
|
| 114 |
|
| 115 |
|
| 116 |
|
| 117 |
|
| 118 |
|
| 119 |
|
| 120 |
|
| 121 |
<xsl:output method="xml" version="1.0" indent="no"/> |
| 122 |
|
| 123 |
|
| 124 |
|
| 125 |
|
| 126 |
<xsl:template match="/" priority="3"> |
| 127 |
<xsl:apply-templates mode="toplevel"/> |
| 128 |
</xsl:template> |
| 129 |
|
| 130 |
|
| 131 |
|
| 132 |
<xsl:template match="*[contains(@class,' topic/topic ')]" name="toptopic" mode="toplevel"> |
| 133 |
|
| 134 |
<xsl:call-template name="chapter-setup"/> |
| 135 |
</xsl:template> |
| 136 |
|
| 137 |
|
| 138 |
<xsl:template match="*[contains(@class,' topic/topic ')]"> |
| 139 |
<fo:block> |
| 140 |
|
| 141 |
<xsl:apply-templates/> |
| 142 |
</fo:block> |
| 143 |
</xsl:template> |
| 144 |
|
| 145 |
|
| 146 |
<xsl:template name="script-sample"> |
| 147 |
|
| 148 |
</xsl:template> |
| 149 |
|
| 150 |
<xsl:template name="gen-att-label"> |
| 151 |
<xsl:if test="@spectitle"> |
| 152 |
<fo:block font-weight="bold"> |
| 153 |
<xsl:value-of select="@spectitle"/> |
| 154 |
</fo:block> |
| 155 |
</xsl:if> |
| 156 |
</xsl:template> |
| 157 |
|
| 158 |
|
| 159 |
<xsl:template name="br-replace"> |
| 160 |
<xsl:param name="word"/> |
| 161 |
|
| 162 |
<xsl:variable name="cr"> |
| 163 |
<xsl:text/> |
| 164 |
</xsl:variable> |
| 165 |
<xsl:choose> |
| 166 |
<xsl:when test="contains($word,$cr)"> |
| 167 |
<xsl:value-of select="substring-before($word,$cr)"/> |
| 168 |
|
| 169 |
<xsl:call-template name="br-replace"> |
| 170 |
<xsl:with-param name="word" select="substring-after($word,$cr)"/> |
| 171 |
</xsl:call-template> |
| 172 |
</xsl:when> |
| 173 |
<xsl:otherwise> |
| 174 |
<xsl:value-of select="$word"/> |
| 175 |
</xsl:otherwise> |
| 176 |
</xsl:choose> |
| 177 |
</xsl:template> |
| 178 |
|
| 179 |
<xsl:template name="breadcrumbs"> |
| 180 |
<xsl:variable name="full-path"> |
| 181 |
<xsl:for-each select="ancestor-or-self::*"> |
| 182 |
<xsl:value-of select="concat('/',name())"/> |
| 183 |
</xsl:for-each> |
| 184 |
</xsl:variable> |
| 185 |
<fo:block font-weight="bold"> |
| 186 |
<xsl:value-of select="$full-path"/> |
| 187 |
</fo:block> |
| 188 |
</xsl:template> |
| 189 |
|
| 190 |
|
| 191 |
<xsl:template name="apply-for-phrases"> |
| 192 |
<xsl:choose> |
| 193 |
<xsl:when test="not(text()[normalize-space(.)] | *)"> |
| 194 |
|
| 195 |
</xsl:when> |
| 196 |
<xsl:otherwise> |
| 197 |
<xsl:apply-templates/> |
| 198 |
</xsl:otherwise> |
| 199 |
</xsl:choose> |
| 200 |
</xsl:template> |
| 201 |
|
| 202 |
<xsl:variable name="fmt-fig-lbl-loc">over</xsl:variable> |
| 203 |
|
| 204 |
<xsl:variable name="fmt-tbl-lbl-loc">over</xsl:variable> |
| 205 |
|
| 206 |
<xsl:variable name="link-top-section">no</xsl:variable> |
| 207 |
|
| 208 |
<xsl:variable name="do-place-ing">no</xsl:variable> |
| 209 |
|
| 210 |
|
| 211 |
|
| 212 |
<xsl:variable name="fig-pfx-txt"/> |
| 213 |
<xsl:variable name="xfig-pfx-txt"> |
| 214 |
<xsl:call-template name="getString"> |
| 215 |
<xsl:with-param name="stringName" select="'Figure'"/> |
| 216 |
</xsl:call-template> |
| 217 |
<xsl:number level="any" count="label" from="/"/> of <xsl:value-of |
| 218 |
select="count(//fig/label)"/>. </xsl:variable> |
| 219 |
|
| 220 |
<xsl:variable name="tbl-pfx-txt"/> |
| 221 |
|
| 222 |
|
| 223 |
|
| 224 |
|
| 225 |
|
| 226 |
|
| 227 |
<xsl:template name="place-tbl-width"> |
| 228 |
<xsl:variable name="twidth-fixed">100%</xsl:variable> |
| 229 |
<xsl:if test="$twidth-fixed != ''"> |
| 230 |
<xsl:attribute name="width"> |
| 231 |
<xsl:value-of select="$twidth-fixed"/> |
| 232 |
</xsl:attribute> |
| 233 |
</xsl:if> |
| 234 |
</xsl:template> |
| 235 |
<xsl:template name="proc-ing"> |
| 236 |
<xsl:if test="$do-place-ing = 'yes'"> |
| 237 |
|
| 238 |
<fo:external-graphic src="url(image/tip-ing.jpg)"/> |
| 239 |
|
| 240 |
|
| 241 |
|
| 242 |
|
| 243 |
</xsl:if> |
| 244 |
</xsl:template> |
| 245 |
|
| 246 |
|
| 247 |
|
| 248 |
<xsl:template name="gen-user-header"> |
| 249 |
|
| 250 |
|
| 251 |
</xsl:template> |
| 252 |
<xsl:template name="gen-user-footer"> |
| 253 |
|
| 254 |
|
| 255 |
</xsl:template> |
| 256 |
<xsl:template name="gen-user-sidetoc"> |
| 257 |
|
| 258 |
|
| 259 |
|
| 260 |
</xsl:template> |
| 261 |
<xsl:template name="gen-user-scripts"> |
| 262 |
|
| 263 |
|
| 264 |
|
| 265 |
</xsl:template> |
| 266 |
<xsl:template name="gen-user-styles"> |
| 267 |
|
| 268 |
</xsl:template> |
| 269 |
<xsl:template name="gen-user-panel-title-pfx"> |
| 270 |
|
| 271 |
|
| 272 |
|
| 273 |
</xsl:template> |
| 274 |
<xsl:template name="gen-main-panel-title"> |
| 275 |
|
| 276 |
<xsl:variable name="schtitle"> |
| 277 |
<xsl:value-of select="/*[contains(@class,' topic/topic ')]/*[contains(@class,' topic/titlealts ')]/*[contains(@class,' topic/searchtitle ')]"/> |
| 278 |
</xsl:variable> |
| 279 |
<xsl:variable name="ditaschtitle"> |
| 280 |
<xsl:value-of select="/dita/*[contains(@class,' topic/topic ')][1]/*[contains(@class,' topic/titlealts ')]/*[contains(@class,' topic/searchtitle ')]"/> |
| 281 |
</xsl:variable> |
| 282 |
<xsl:variable name="maintitle"> |
| 283 |
<xsl:value-of select="/*[contains(@class,' topic/topic ')]/*[contains(@class,' topic/title ')]"/> |
| 284 |
</xsl:variable> |
| 285 |
<xsl:variable name="ditamaintitle"> |
| 286 |
<xsl:value-of select="/dita/*[contains(@class,' topic/topic ')][1]/*[contains(@class,' topic/title ')]"/> |
| 287 |
</xsl:variable> |
| 288 |
<xsl:choose> |
| 289 |
<xsl:when test="string-length($schtitle) > 0"> |
| 290 |
<xsl:value-of select="$schtitle"/> |
| 291 |
</xsl:when> |
| 292 |
<xsl:when test="string-length($ditaschtitle) > 0"> |
| 293 |
<xsl:value-of select="$ditaschtitle"/> |
| 294 |
</xsl:when> |
| 295 |
<xsl:when test="string-length($maintitle) > 0"> |
| 296 |
<xsl:value-of select="$maintitle"/> |
| 297 |
</xsl:when> |
| 298 |
<xsl:when test="string-length($ditamaintitle) > 0"> |
| 299 |
<xsl:value-of select="$ditamaintitle"/> |
| 300 |
</xsl:when> |
| 301 |
<xsl:otherwise> |
| 302 |
<xsl:text>***</xsl:text> |
| 303 |
<xsl:call-template name="output-message"> |
| 304 |
<xsl:with-param name="msgnum">037</xsl:with-param> |
| 305 |
<xsl:with-param name="msgsev">W</xsl:with-param> |
| 306 |
</xsl:call-template> |
| 307 |
</xsl:otherwise> |
| 308 |
</xsl:choose> |
| 309 |
</xsl:template> |
| 310 |
<xsl:template name="gen-user-metadata"/> |
| 311 |
|
| 312 |
|
| 313 |
|
| 314 |
<xsl:template name="chapter-setup"> |
| 315 |
|
| 316 |
<xsl:variable name="newline"/> |
| 317 |
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> |
| 318 |
<fo:layout-master-set> |
| 319 |
<fo:simple-page-master master-name="cover" page-height="792pt" |
| 320 |
page-width="612pt" margin-top="36pt" margin-bottom="36pt" |
| 321 |
margin-left="36pt" margin-right="36pt"> |
| 322 |
<fo:region-body margin-top="120pt"/> |
| 323 |
</fo:simple-page-master> |
| 324 |
<fo:simple-page-master master-name="leftPage" page-height="792pt" |
| 325 |
page-width="612pt" margin-top="36pt" margin-bottom="36pt" |
| 326 |
margin-left="72pt" margin-right="60pt"> |
| 327 |
<fo:region-body margin-bottom="36pt" margin-top="24pt"/> |
| 328 |
<fo:region-before extent="24pt"/> |
| 329 |
<fo:region-after extent="36pt"/> |
| 330 |
</fo:simple-page-master> |
| 331 |
<fo:simple-page-master master-name="rightPage" page-height="792pt" |
| 332 |
page-width="612pt" margin-top="36pt" margin-bottom="36pt" |
| 333 |
margin-left="60pt" margin-right="72pt"> |
| 334 |
<fo:region-body margin-bottom="36pt" margin-top="24pt"/> |
| 335 |
<fo:region-before extent="24pt"/> |
| 336 |
<fo:region-after extent="36pt"/> |
| 337 |
</fo:simple-page-master> |
| 338 |
<fo:simple-page-master master-name="common-page" page-height="792pt" |
| 339 |
page-width="612pt" margin-top="36pt" margin-bottom="36pt" |
| 340 |
margin-left="60pt" margin-right="60pt"> |
| 341 |
<fo:region-body margin-bottom="36pt" margin-top="24pt"/> |
| 342 |
<fo:region-before extent="24pt"/> |
| 343 |
<fo:region-after extent="36pt"/> |
| 344 |
</fo:simple-page-master> |
| 345 |
</fo:layout-master-set> |
| 346 |
|
| 347 |
|
| 348 |
<fo:page-sequence master-reference="common-page" force-page-count="no-force"> |
| 349 |
|
| 350 |
<fo:static-content flow-name="xsl-region-before" font-size="9pt" font-family="Helvetica"> |
| 351 |
<fo:block linefeed-treatment="ignore" text-align-last="justify"> |
| 352 |
<fo:inline text-align="start"> |
| 353 |
<xsl:text>Stub for header content</xsl:text> |
| 354 |
</fo:inline> |
| 355 |
|
| 356 |
|
| 357 |
<fo:leader rule-style="solid" leader-length.maximum="100%" |
| 358 |
leader-length.optimum="60%" leader-length.minimum="10pt"> </fo:leader> |
| 359 |
<fo:inline text-align="end" font-weight="bold"> |
| 360 |
<xsl:text>right side content</xsl:text> |
| 361 |
</fo:inline> |
| 362 |
</fo:block> |
| 363 |
|
| 364 |
</fo:static-content> |
| 365 |
|
| 366 |
<fo:static-content flow-name="xsl-region-after"> |
| 367 |
<fo:block linefeed-treatment="ignore" text-align-last="justify"> |
| 368 |
<fo:inline text-align="start" font-size="10pt" font-family="Helvetica"> |
| 369 |
<xsl:value-of select="//*/*[contains(@class, ' topic/title ')]"/> |
| 370 |
</fo:inline> |
| 371 |
|
| 372 |
<fo:inline text-align="end" font-size="10pt" font-weight="bold" font-family="Helvetica"> |
| 373 |
<xsl:text>Page </xsl:text> |
| 374 |
<fo:page-number/> |
| 375 |
</fo:inline> |
| 376 |
</fo:block> |
| 377 |
</fo:static-content> |
| 378 |
|
| 379 |
<fo:flow flow-name="xsl-region-body"> |
| 380 |
<fo:block line-height="10pt" font-size="9pt" font-family="Helvetica" id="page1-1"> |
| 381 |
<xsl:apply-templates/> |
| 382 |
</fo:block> |
| 383 |
</fo:flow> |
| 384 |
</fo:page-sequence> |
| 385 |
</fo:root> |
| 386 |
</xsl:template> |
| 387 |
<xsl:template name="gen-cover-page"> |
| 388 |
|
| 389 |
<fo:page-sequence master-reference="cover"> |
| 390 |
<fo:flow flow-name="xsl-region-body"> |
| 391 |
<fo:block text-align="center"> |
| 392 |
<fo:block space-after.optimum="40pt" space-before.optimum="40pt" |
| 393 |
line-height="80pt" font-size="32pt" font-family="Helvetica"> |
| 394 |
<xsl:value-of select="/topic/title"/> |
| 395 |
</fo:block> |
| 396 |
<fo:block line-height="50pt" font-size="24pt" font-family="Helvetica"> |
| 397 |
<fo:block font-style="italic"> |
| 398 |
<xsl:value-of select="*[contains(@class, ' topic/title ')]"/> |
| 399 |
</fo:block> |
| 400 |
</fo:block> |
| 401 |
</fo:block> |
| 402 |
</fo:flow> |
| 403 |
</fo:page-sequence> |
| 404 |
|
| 405 |
<fo:page-sequence master-reference="cover"> |
| 406 |
<fo:flow flow-name="xsl-region-body"> |
| 407 |
<fo:block xsl:use-attribute-sets="p" color="purple" text-align="center"/> |
| 408 |
</fo:flow> |
| 409 |
</fo:page-sequence> |
| 410 |
</xsl:template> |
| 411 |
|
| 412 |
</xsl:transform> |