| 1 | <?xml version="1.0" encoding="utf-8"?> |
|---|
| 2 | <xsl:stylesheet |
|---|
| 3 | version="1.0" |
|---|
| 4 | xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
|---|
| 5 | xmlns:fo="http://www.w3.org/1999/XSL/Format"> |
|---|
| 6 | |
|---|
| 7 | |
|---|
| 8 | <!-- |
|---|
| 9 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 10 | % |
|---|
| 11 | % Logtalk - Open source object-oriented logic programming language |
|---|
| 12 | % Release 2.31.0 |
|---|
| 13 | % |
|---|
| 14 | % Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved. |
|---|
| 15 | % |
|---|
| 16 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 17 | --> |
|---|
| 18 | |
|---|
| 19 | |
|---|
| 20 | <xsl:output |
|---|
| 21 | method="xml" |
|---|
| 22 | indent="yes" |
|---|
| 23 | encoding="utf-8"/> |
|---|
| 24 | |
|---|
| 25 | |
|---|
| 26 | <xsl:param name="format"/> |
|---|
| 27 | |
|---|
| 28 | <xsl:variable name="height"> |
|---|
| 29 | <xsl:choose> |
|---|
| 30 | <xsl:when test="$format='a4'">297mm</xsl:when> |
|---|
| 31 | <xsl:when test="$format='us'">11.0in</xsl:when> |
|---|
| 32 | <xsl:otherwise>297mm</xsl:otherwise> |
|---|
| 33 | </xsl:choose> |
|---|
| 34 | </xsl:variable> |
|---|
| 35 | |
|---|
| 36 | <xsl:variable name="width"> |
|---|
| 37 | <xsl:choose> |
|---|
| 38 | <xsl:when test="$format='a4'">210mm</xsl:when> |
|---|
| 39 | <xsl:when test="$format='us'">8.5in</xsl:when> |
|---|
| 40 | <xsl:otherwise>210mm</xsl:otherwise> |
|---|
| 41 | </xsl:choose> |
|---|
| 42 | </xsl:variable> |
|---|
| 43 | |
|---|
| 44 | |
|---|
| 45 | <xsl:template match ="/"> |
|---|
| 46 | |
|---|
| 47 | <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> |
|---|
| 48 | |
|---|
| 49 | <fo:layout-master-set> |
|---|
| 50 | <fo:simple-page-master |
|---|
| 51 | master-name="simple" |
|---|
| 52 | page-height="{$height}" |
|---|
| 53 | page-width="{$width}" |
|---|
| 54 | margin-top="15mm" |
|---|
| 55 | margin-bottom="15mm" |
|---|
| 56 | margin-left="25mm" |
|---|
| 57 | margin-right="25mm"> |
|---|
| 58 | <fo:region-body margin-top="15mm" margin-bottom="15mm"/> |
|---|
| 59 | <fo:region-before extent="15mm"/> |
|---|
| 60 | <fo:region-after extent="15mm"/> |
|---|
| 61 | </fo:simple-page-master> |
|---|
| 62 | </fo:layout-master-set> |
|---|
| 63 | |
|---|
| 64 | <fo:page-sequence master-reference="simple"> |
|---|
| 65 | |
|---|
| 66 | <fo:static-content flow-name="xsl-region-before"> |
|---|
| 67 | <fo:block> |
|---|
| 68 | <fo:leader leader-pattern="rule" leader-length.optimum="100%"/> |
|---|
| 69 | </fo:block> |
|---|
| 70 | <fo:block |
|---|
| 71 | text-align="end" |
|---|
| 72 | font-size="9pt" |
|---|
| 73 | font-family="sans-serif" |
|---|
| 74 | font-weight="bold"> |
|---|
| 75 | <xsl:value-of select="logtalk/entity/type"/>: <xsl:value-of select="logtalk/entity/name"/> |
|---|
| 76 | </fo:block> |
|---|
| 77 | </fo:static-content> |
|---|
| 78 | |
|---|
| 79 | <fo:static-content flow-name="xsl-region-after"> |
|---|
| 80 | <fo:block> |
|---|
| 81 | <fo:leader leader-pattern="rule" leader-length.optimum="100%"/> |
|---|
| 82 | </fo:block> |
|---|
| 83 | <fo:block |
|---|
| 84 | text-align="end" |
|---|
| 85 | font-size="9pt" |
|---|
| 86 | font-family="sans-serif" |
|---|
| 87 | font-weight="bold"> |
|---|
| 88 | <fo:page-number/> of <fo:page-number-citation ref-id="end"/> |
|---|
| 89 | </fo:block> |
|---|
| 90 | </fo:static-content> |
|---|
| 91 | |
|---|
| 92 | <fo:flow flow-name="xsl-region-body"> |
|---|
| 93 | <fo:block |
|---|
| 94 | font-size="18pt" |
|---|
| 95 | font-family="sans-serif" |
|---|
| 96 | font-weight="bold" |
|---|
| 97 | space-after="8pt"> |
|---|
| 98 | <xsl:value-of select="logtalk/entity/name"/> |
|---|
| 99 | </fo:block> |
|---|
| 100 | <xsl:apply-templates select="logtalk/entity"/> |
|---|
| 101 | <xsl:apply-templates select="logtalk/relations"/> |
|---|
| 102 | <xsl:apply-templates select="logtalk/predicates"/> |
|---|
| 103 | <xsl:apply-templates select="logtalk/remarks"/> |
|---|
| 104 | <fo:block id="end"/> |
|---|
| 105 | </fo:flow> |
|---|
| 106 | |
|---|
| 107 | </fo:page-sequence> |
|---|
| 108 | |
|---|
| 109 | </fo:root> |
|---|
| 110 | |
|---|
| 111 | </xsl:template> |
|---|
| 112 | |
|---|
| 113 | |
|---|
| 114 | <xsl:template match="logtalk/entity"> |
|---|
| 115 | |
|---|
| 116 | <xsl:if test="comment"> |
|---|
| 117 | <fo:block |
|---|
| 118 | margin-left="10mm" |
|---|
| 119 | font-size="10pt" |
|---|
| 120 | font-family="serif" |
|---|
| 121 | font-style="italic"> |
|---|
| 122 | <xsl:value-of select="comment"/> |
|---|
| 123 | </fo:block> |
|---|
| 124 | </xsl:if> |
|---|
| 125 | |
|---|
| 126 | <xsl:if test="parameters"> |
|---|
| 127 | <fo:block |
|---|
| 128 | font-size="9pt" |
|---|
| 129 | font-family="monospace" |
|---|
| 130 | margin-left="10mm" |
|---|
| 131 | space-before="4pt"> |
|---|
| 132 | </fo:block> |
|---|
| 133 | <xsl:for-each select="parameters/parameter"> |
|---|
| 134 | <fo:block |
|---|
| 135 | font-size="9pt" |
|---|
| 136 | font-family="monospace" |
|---|
| 137 | margin-left="10mm"> |
|---|
| 138 | <xsl:value-of select="name"/> - <xsl:value-of select="description"/> |
|---|
| 139 | </fo:block> |
|---|
| 140 | </xsl:for-each> |
|---|
| 141 | </xsl:if> |
|---|
| 142 | |
|---|
| 143 | <xsl:if test="author"> |
|---|
| 144 | <fo:block |
|---|
| 145 | font-size="10pt" |
|---|
| 146 | font-family="serif" |
|---|
| 147 | keep-with-next="always" |
|---|
| 148 | space-before="8pt"> |
|---|
| 149 | author: |
|---|
| 150 | </fo:block> |
|---|
| 151 | <fo:block |
|---|
| 152 | font-size="9pt" |
|---|
| 153 | font-family="monospace" |
|---|
| 154 | margin-left="10mm"> |
|---|
| 155 | <xsl:value-of select="author"/> |
|---|
| 156 | </fo:block> |
|---|
| 157 | </xsl:if> |
|---|
| 158 | |
|---|
| 159 | <xsl:if test="version"> |
|---|
| 160 | <fo:block |
|---|
| 161 | font-size="10pt" |
|---|
| 162 | font-family="serif" |
|---|
| 163 | keep-with-next="always"> |
|---|
| 164 | version: |
|---|
| 165 | </fo:block> |
|---|
| 166 | <fo:block |
|---|
| 167 | font-size="9pt" |
|---|
| 168 | font-family="monospace" |
|---|
| 169 | margin-left="10mm"> |
|---|
| 170 | <xsl:value-of select="version"/> |
|---|
| 171 | </fo:block> |
|---|
| 172 | </xsl:if> |
|---|
| 173 | |
|---|
| 174 | <xsl:if test="date"> |
|---|
| 175 | <fo:block |
|---|
| 176 | font-size="10pt" |
|---|
| 177 | font-family="serif" |
|---|
| 178 | keep-with-next="always"> |
|---|
| 179 | date: |
|---|
| 180 | </fo:block> |
|---|
| 181 | <fo:block |
|---|
| 182 | font-size="9pt" |
|---|
| 183 | font-family="monospace" |
|---|
| 184 | margin-left="10mm"> |
|---|
| 185 | <xsl:value-of select="date"/> |
|---|
| 186 | </fo:block> |
|---|
| 187 | </xsl:if> |
|---|
| 188 | |
|---|
| 189 | <xsl:if test="copyright"> |
|---|
| 190 | <fo:block |
|---|
| 191 | font-size="10pt" |
|---|
| 192 | font-family="serif" |
|---|
| 193 | keep-with-next="always"> |
|---|
| 194 | copyright: |
|---|
| 195 | </fo:block> |
|---|
| 196 | <fo:block |
|---|
| 197 | font-size="9pt" |
|---|
| 198 | font-family="monospace" |
|---|
| 199 | margin-left="10mm"> |
|---|
| 200 | <xsl:value-of select="copyright"/> |
|---|
| 201 | </fo:block> |
|---|
| 202 | </xsl:if> |
|---|
| 203 | |
|---|
| 204 | <xsl:if test="license"> |
|---|
| 205 | <fo:block |
|---|
| 206 | font-size="10pt" |
|---|
| 207 | font-family="serif" |
|---|
| 208 | keep-with-next="always"> |
|---|
| 209 | license: |
|---|
| 210 | </fo:block> |
|---|
| 211 | <fo:block |
|---|
| 212 | font-size="9pt" |
|---|
| 213 | font-family="monospace" |
|---|
| 214 | margin-left="10mm"> |
|---|
| 215 | <xsl:value-of select="license"/> |
|---|
| 216 | </fo:block> |
|---|
| 217 | </xsl:if> |
|---|
| 218 | |
|---|
| 219 | <fo:block |
|---|
| 220 | font-size="10pt" |
|---|
| 221 | font-family="serif" |
|---|
| 222 | space-before="8pt" |
|---|
| 223 | keep-with-next="always"> |
|---|
| 224 | compilation: |
|---|
| 225 | </fo:block> |
|---|
| 226 | <fo:block |
|---|
| 227 | font-size="9pt" |
|---|
| 228 | font-family="monospace" |
|---|
| 229 | margin-left="10mm" |
|---|
| 230 | space-after="4pt"> |
|---|
| 231 | <xsl:value-of select="compilation"/> |
|---|
| 232 | </fo:block> |
|---|
| 233 | |
|---|
| 234 | <xsl:if test="info"> |
|---|
| 235 | <xsl:for-each select="info"> |
|---|
| 236 | <fo:block |
|---|
| 237 | font-size="10pt" |
|---|
| 238 | font-family="serif" |
|---|
| 239 | keep-with-next="always"> |
|---|
| 240 | <xsl:value-of select="key"/>: |
|---|
| 241 | </fo:block> |
|---|
| 242 | <fo:block |
|---|
| 243 | font-size="9pt" |
|---|
| 244 | font-family="monospace" |
|---|
| 245 | margin-left="10mm"> |
|---|
| 246 | <xsl:value-of select="value"/> |
|---|
| 247 | </fo:block> |
|---|
| 248 | </xsl:for-each> |
|---|
| 249 | </xsl:if> |
|---|
| 250 | |
|---|
| 251 | </xsl:template> |
|---|
| 252 | |
|---|
| 253 | |
|---|
| 254 | <xsl:template match="logtalk/relations"> |
|---|
| 255 | <fo:block |
|---|
| 256 | font-size="10pt" |
|---|
| 257 | font-family="serif" |
|---|
| 258 | space-before="4pt"> |
|---|
| 259 | </fo:block> |
|---|
| 260 | <xsl:choose> |
|---|
| 261 | <xsl:when test="*"> |
|---|
| 262 | <xsl:if test="implements"> |
|---|
| 263 | <fo:block |
|---|
| 264 | font-size="10pt" |
|---|
| 265 | font-family="serif" |
|---|
| 266 | keep-with-next="always"> |
|---|
| 267 | implements: |
|---|
| 268 | </fo:block> |
|---|
| 269 | <xsl:apply-templates select="implements"/> |
|---|
| 270 | </xsl:if> |
|---|
| 271 | <xsl:if test="imports"> |
|---|
| 272 | <fo:block |
|---|
| 273 | font-size="10pt" |
|---|
| 274 | font-family="serif" |
|---|
| 275 | keep-with-next="always"> |
|---|
| 276 | imports: |
|---|
| 277 | </fo:block> |
|---|
| 278 | <xsl:apply-templates select="imports"/> |
|---|
| 279 | </xsl:if> |
|---|
| 280 | <xsl:if test="extends"> |
|---|
| 281 | <fo:block |
|---|
| 282 | font-size="10pt" |
|---|
| 283 | font-family="serif" |
|---|
| 284 | keep-with-next="always"> |
|---|
| 285 | extends: |
|---|
| 286 | </fo:block> |
|---|
| 287 | <xsl:apply-templates select="extends"/> |
|---|
| 288 | </xsl:if> |
|---|
| 289 | <xsl:if test="instantiates"> |
|---|
| 290 | <fo:block |
|---|
| 291 | font-size="10pt" |
|---|
| 292 | font-family="serif" |
|---|
| 293 | keep-with-next="always"> |
|---|
| 294 | instantiates: |
|---|
| 295 | </fo:block> |
|---|
| 296 | <xsl:apply-templates select="instantiates"/> |
|---|
| 297 | </xsl:if> |
|---|
| 298 | <xsl:if test="specializes"> |
|---|
| 299 | <fo:block |
|---|
| 300 | font-size="10pt" |
|---|
| 301 | font-family="serif" |
|---|
| 302 | keep-with-next="always"> |
|---|
| 303 | specializes: |
|---|
| 304 | </fo:block> |
|---|
| 305 | <xsl:apply-templates select="specializes"/> |
|---|
| 306 | </xsl:if> |
|---|
| 307 | <xsl:if test="uses"> |
|---|
| 308 | <fo:block |
|---|
| 309 | font-size="10pt" |
|---|
| 310 | font-family="serif" |
|---|
| 311 | keep-with-next="always"> |
|---|
| 312 | uses: |
|---|
| 313 | </fo:block> |
|---|
| 314 | <xsl:apply-templates select="uses"/> |
|---|
| 315 | </xsl:if> |
|---|
| 316 | <xsl:if test="calls"> |
|---|
| 317 | <fo:block |
|---|
| 318 | font-size="10pt" |
|---|
| 319 | font-family="serif" |
|---|
| 320 | keep-with-next="always"> |
|---|
| 321 | calls: |
|---|
| 322 | </fo:block> |
|---|
| 323 | <xsl:apply-templates select="calls"/> |
|---|
| 324 | </xsl:if> |
|---|
| 325 | </xsl:when> |
|---|
| 326 | <xsl:otherwise> |
|---|
| 327 | <fo:block |
|---|
| 328 | font-size="10pt" |
|---|
| 329 | font-family="serif" |
|---|
| 330 | font-style="italic" |
|---|
| 331 | space-before="4pt"> |
|---|
| 332 | (no dependencies on other files) |
|---|
| 333 | </fo:block> |
|---|
| 334 | </xsl:otherwise> |
|---|
| 335 | </xsl:choose> |
|---|
| 336 | </xsl:template> |
|---|
| 337 | |
|---|
| 338 | |
|---|
| 339 | <xsl:template match="logtalk/relations/uses"> |
|---|
| 340 | <fo:block |
|---|
| 341 | font-size="9pt" |
|---|
| 342 | font-family="monospace" |
|---|
| 343 | margin-left="10mm"> |
|---|
| 344 | <xsl:value-of select="name"/> |
|---|
| 345 | </fo:block> |
|---|
| 346 | </xsl:template> |
|---|
| 347 | |
|---|
| 348 | |
|---|
| 349 | <xsl:template match="logtalk/relations/calls"> |
|---|
| 350 | <fo:block |
|---|
| 351 | font-size="9pt" |
|---|
| 352 | font-family="monospace" |
|---|
| 353 | margin-left="10mm"> |
|---|
| 354 | <xsl:value-of select="name"/> |
|---|
| 355 | </fo:block> |
|---|
| 356 | </xsl:template> |
|---|
| 357 | |
|---|
| 358 | |
|---|
| 359 | <xsl:template match="logtalk/relations/*"> |
|---|
| 360 | <fo:block |
|---|
| 361 | font-size="9pt" |
|---|
| 362 | font-family="monospace" |
|---|
| 363 | margin-left="10mm"> |
|---|
| 364 | <xsl:value-of select="scope"/><xsl:text> </xsl:text><xsl:value-of select="name"/> |
|---|
| 365 | </fo:block> |
|---|
| 366 | </xsl:template> |
|---|
| 367 | |
|---|
| 368 | |
|---|
| 369 | <xsl:template match="logtalk/predicates"> |
|---|
| 370 | |
|---|
| 371 | <fo:block |
|---|
| 372 | font-size="14pt" |
|---|
| 373 | font-family="sans-serif" |
|---|
| 374 | font-weight="bold" |
|---|
| 375 | keep-with-next="always" |
|---|
| 376 | space-before="18pt"> |
|---|
| 377 | Public interface |
|---|
| 378 | </fo:block> |
|---|
| 379 | <xsl:choose> |
|---|
| 380 | <xsl:when test="public/predicate"> |
|---|
| 381 | <xsl:apply-templates select="public/predicate"/> |
|---|
| 382 | </xsl:when> |
|---|
| 383 | <xsl:when test="/logtalk/relations/*"> |
|---|
| 384 | <fo:block |
|---|
| 385 | font-size="10pt" |
|---|
| 386 | font-family="serif" |
|---|
| 387 | font-style="italic" |
|---|
| 388 | space-before="10pt"> |
|---|
| 389 | (see related entities) |
|---|
| 390 | </fo:block> |
|---|
| 391 | </xsl:when> |
|---|
| 392 | <xsl:otherwise> |
|---|
| 393 | <fo:block |
|---|
| 394 | font-size="10pt" |
|---|
| 395 | font-family="serif" |
|---|
| 396 | font-style="italic" |
|---|
| 397 | space-before="10pt"> |
|---|
| 398 | (none) |
|---|
| 399 | </fo:block> |
|---|
| 400 | </xsl:otherwise> |
|---|
| 401 | </xsl:choose> |
|---|
| 402 | |
|---|
| 403 | <fo:block |
|---|
| 404 | font-size="14pt" |
|---|
| 405 | font-family="sans-serif" |
|---|
| 406 | font-weight="bold" |
|---|
| 407 | keep-with-next="always" |
|---|
| 408 | space-before="18pt"> |
|---|
| 409 | Protected interface |
|---|
| 410 | </fo:block> |
|---|
| 411 | <xsl:choose> |
|---|
| 412 | <xsl:when test="protected/predicate"> |
|---|
| 413 | <xsl:apply-templates select="protected/predicate"/> |
|---|
| 414 | </xsl:when> |
|---|
| 415 | <xsl:when test="/logtalk/relations/*"> |
|---|
| 416 | <fo:block |
|---|
| 417 | font-size="10pt" |
|---|
| 418 | font-family="serif" |
|---|
| 419 | font-style="italic" |
|---|
| 420 | space-before="10pt"> |
|---|
| 421 | (see related entities) |
|---|
| 422 | </fo:block> |
|---|
| 423 | </xsl:when> |
|---|
| 424 | <xsl:otherwise> |
|---|
| 425 | <fo:block |
|---|
| 426 | font-size="10pt" |
|---|
| 427 | font-family="serif" |
|---|
| 428 | font-style="italic" |
|---|
| 429 | space-before="10pt"> |
|---|
| 430 | (none) |
|---|
| 431 | </fo:block> |
|---|
| 432 | </xsl:otherwise> |
|---|
| 433 | </xsl:choose> |
|---|
| 434 | |
|---|
| 435 | <fo:block |
|---|
| 436 | font-size="14pt" |
|---|
| 437 | font-family="sans-serif" |
|---|
| 438 | font-weight="bold" |
|---|
| 439 | keep-with-next="always" |
|---|
| 440 | space-before="18pt"> |
|---|
| 441 | Private predicates |
|---|
| 442 | </fo:block> |
|---|
| 443 | <xsl:choose> |
|---|
| 444 | <xsl:when test="private/predicate"> |
|---|
| 445 | <xsl:apply-templates select="private/predicate"/> |
|---|
| 446 | </xsl:when> |
|---|
| 447 | <xsl:when test="/logtalk/relations/*"> |
|---|
| 448 | <fo:block |
|---|
| 449 | font-size="10pt" |
|---|
| 450 | font-family="serif" |
|---|
| 451 | font-style="italic" |
|---|
| 452 | space-before="10pt"> |
|---|
| 453 | (see related entities) |
|---|
| 454 | </fo:block> |
|---|
| 455 | </xsl:when> |
|---|
| 456 | <xsl:otherwise> |
|---|
| 457 | <fo:block |
|---|
| 458 | font-size="10pt" |
|---|
| 459 | font-family="serif" |
|---|
| 460 | font-style="italic" |
|---|
| 461 | space-before="10pt"> |
|---|
| 462 | (none) |
|---|
| 463 | </fo:block> |
|---|
| 464 | </xsl:otherwise> |
|---|
| 465 | </xsl:choose> |
|---|
| 466 | |
|---|
| 467 | </xsl:template> |
|---|
| 468 | |
|---|
| 469 | |
|---|
| 470 | <xsl:template match="*/predicate"> |
|---|
| 471 | |
|---|
| 472 | <fo:block |
|---|
| 473 | font-size="12pt" |
|---|
| 474 | font-family="sans-serif" |
|---|
| 475 | font-weight="bold" |
|---|
| 476 | keep-with-next="always" |
|---|
| 477 | space-before="10pt"> |
|---|
| 478 | <xsl:value-of select="name"/> |
|---|
| 479 | </fo:block> |
|---|
| 480 | |
|---|
| 481 | <xsl:if test="comment"> |
|---|
| 482 | <fo:block |
|---|
| 483 | margin-left="10mm" |
|---|
| 484 | font-size="10pt" |
|---|
| 485 | font-family="serif" |
|---|
| 486 | font-style="italic" |
|---|
| 487 | space-before="4pt" |
|---|
| 488 | space-after="8pt"> |
|---|
| 489 | <xsl:value-of select="comment"/> |
|---|
| 490 | </fo:block> |
|---|
| 491 | </xsl:if> |
|---|
| 492 | |
|---|
| 493 | <fo:block |
|---|
| 494 | font-size="10pt" |
|---|
| 495 | font-family="serif" |
|---|
| 496 | keep-with-next="always"> |
|---|
| 497 | compilation: |
|---|
| 498 | </fo:block> |
|---|
| 499 | <fo:block |
|---|
| 500 | font-size="9pt" |
|---|
| 501 | font-family="monospace" |
|---|
| 502 | margin-left="10mm"> |
|---|
| 503 | <xsl:value-of select="compilation"/> |
|---|
| 504 | </fo:block> |
|---|
| 505 | |
|---|
| 506 | <xsl:if test="template"> |
|---|
| 507 | <fo:block |
|---|
| 508 | font-size="10pt" |
|---|
| 509 | font-family="serif" |
|---|
| 510 | keep-with-next="always" |
|---|
| 511 | space-before="4pt"> |
|---|
| 512 | template: |
|---|
| 513 | </fo:block> |
|---|
| 514 | <fo:block |
|---|
| 515 | font-size="9pt" |
|---|
| 516 | font-family="monospace" |
|---|
| 517 | margin-left="10mm"> |
|---|
| 518 | <xsl:value-of select="template"/> |
|---|
| 519 | </fo:block> |
|---|
| 520 | </xsl:if> |
|---|
| 521 | |
|---|
| 522 | <xsl:if test="arguments"> |
|---|
| 523 | <fo:block |
|---|
| 524 | font-size="9pt" |
|---|
| 525 | font-family="monospace" |
|---|
| 526 | margin-left="10mm" |
|---|
| 527 | space-before="4pt"> |
|---|
| 528 | </fo:block> |
|---|
| 529 | <xsl:for-each select="arguments/argument"> |
|---|
| 530 | <fo:block |
|---|
| 531 | margin-left="10mm"> |
|---|
| 532 | <fo:inline font-size="9pt" font-family="monospace"><xsl:value-of select="name"/></fo:inline> |
|---|
| 533 | <fo:inline font-size="10pt" font-family="serif" font-style="italic"> - <xsl:value-of select="description"/></fo:inline> |
|---|
| 534 | </fo:block> |
|---|
| 535 | </xsl:for-each> |
|---|
| 536 | </xsl:if> |
|---|
| 537 | |
|---|
| 538 | <xsl:if test="meta"> |
|---|
| 539 | <fo:block |
|---|
| 540 | font-size="10pt" |
|---|
| 541 | font-family="serif" |
|---|
| 542 | keep-with-next="always" |
|---|
| 543 | space-before="4pt"> |
|---|
| 544 | meta-predicate template: |
|---|
| 545 | </fo:block> |
|---|
| 546 | <fo:block |
|---|
| 547 | font-size="9pt" |
|---|
| 548 | font-family="monospace" |
|---|
| 549 | margin-left="10mm"> |
|---|
| 550 | <xsl:value-of select="meta"/> |
|---|
| 551 | </fo:block> |
|---|
| 552 | </xsl:if> |
|---|
| 553 | |
|---|
| 554 | <xsl:if test="mode"> |
|---|
| 555 | <fo:block |
|---|
| 556 | font-size="10pt" |
|---|
| 557 | font-family="serif" |
|---|
| 558 | keep-with-next="always" |
|---|
| 559 | space-before="4pt"> |
|---|
| 560 | mode - number of solutions: |
|---|
| 561 | </fo:block> |
|---|
| 562 | <xsl:for-each select="mode"> |
|---|
| 563 | <fo:block |
|---|
| 564 | font-size="9pt" |
|---|
| 565 | font-family="monospace" |
|---|
| 566 | margin-left="10mm"> |
|---|
| 567 | <xsl:value-of select="template"/> - <xsl:value-of select="solutions"/> |
|---|
| 568 | </fo:block> |
|---|
| 569 | </xsl:for-each> |
|---|
| 570 | </xsl:if> |
|---|
| 571 | |
|---|
| 572 | <xsl:if test="exceptions"> |
|---|
| 573 | <fo:block |
|---|
| 574 | font-size="10pt" |
|---|
| 575 | font-family="serif" |
|---|
| 576 | keep-with-next="always" |
|---|
| 577 | space-before="4pt"> |
|---|
| 578 | exceptions: |
|---|
| 579 | </fo:block> |
|---|
| 580 | <xsl:for-each select="exceptions/exception"> |
|---|
| 581 | <fo:block |
|---|
| 582 | font-size="10pt" |
|---|
| 583 | font-family="serif" |
|---|
| 584 | keep-with-next="always" |
|---|
| 585 | margin-left="10mm"> |
|---|
| 586 | <xsl:value-of select="condition" />: |
|---|
| 587 | </fo:block> |
|---|
| 588 | <fo:block |
|---|
| 589 | font-size="9pt" |
|---|
| 590 | font-family="monospace" |
|---|
| 591 | margin-left="20mm"> |
|---|
| 592 | <xsl:value-of select="term" /> |
|---|
| 593 | </fo:block> |
|---|
| 594 | </xsl:for-each> |
|---|
| 595 | </xsl:if> |
|---|
| 596 | |
|---|
| 597 | <xsl:if test="examples"> |
|---|
| 598 | <fo:block |
|---|
| 599 | font-size="10pt" |
|---|
| 600 | font-family="serif" |
|---|
| 601 | keep-with-next="always" |
|---|
| 602 | space-before="4pt"> |
|---|
| 603 | examples: |
|---|
| 604 | </fo:block> |
|---|
| 605 | <xsl:for-each select="examples/example"> |
|---|
| 606 | <fo:block |
|---|
| 607 | font-size="10pt" |
|---|
| 608 | font-family="serif" |
|---|
| 609 | font-style="italic" |
|---|
| 610 | keep-with-next="always" |
|---|
| 611 | margin-left="10mm"> |
|---|
| 612 | <xsl:value-of select="description" /> |
|---|
| 613 | </fo:block> |
|---|
| 614 | <fo:block |
|---|
| 615 | font-size="9pt" |
|---|
| 616 | font-family="monospace" |
|---|
| 617 | margin-left="20mm"> |
|---|
| 618 | <xsl:value-of select="call" /> |
|---|
| 619 | </fo:block> |
|---|
| 620 | <fo:block |
|---|
| 621 | font-size="9pt" |
|---|
| 622 | font-family="monospace" |
|---|
| 623 | margin-left="20mm" |
|---|
| 624 | space-after="4pt"> |
|---|
| 625 | <xsl:value-of select="bindings" /> |
|---|
| 626 | </fo:block> |
|---|
| 627 | </xsl:for-each> |
|---|
| 628 | </xsl:if> |
|---|
| 629 | |
|---|
| 630 | <xsl:if test="info"> |
|---|
| 631 | <xsl:for-each select="info"> |
|---|
| 632 | <fo:block |
|---|
| 633 | font-size="10pt" |
|---|
| 634 | font-family="serif" |
|---|
| 635 | keep-with-next="always" |
|---|
| 636 | space-before="4pt"> |
|---|
| 637 | <xsl:value-of select="key"/>: |
|---|
| 638 | </fo:block> |
|---|
| 639 | <fo:block |
|---|
| 640 | font-size="9pt" |
|---|
| 641 | font-family="monospace" |
|---|
| 642 | margin-left="10mm"> |
|---|
| 643 | <xsl:value-of select="value"/> |
|---|
| 644 | </fo:block> |
|---|
| 645 | </xsl:for-each> |
|---|
| 646 | </xsl:if> |
|---|
| 647 | |
|---|
| 648 | </xsl:template> |
|---|
| 649 | |
|---|
| 650 | |
|---|
| 651 | <xsl:template match="logtalk/remarks"> |
|---|
| 652 | |
|---|
| 653 | <fo:block |
|---|
| 654 | font-size="14pt" |
|---|
| 655 | font-family="sans-serif" |
|---|
| 656 | font-weight="bold" |
|---|
| 657 | keep-with-next="always" |
|---|
| 658 | space-before="18pt"> |
|---|
| 659 | Remarks |
|---|
| 660 | </fo:block> |
|---|
| 661 | <xsl:choose> |
|---|
| 662 | <xsl:when test="*"> |
|---|
| 663 | <xsl:for-each select="remark"> |
|---|
| 664 | <fo:block |
|---|
| 665 | font-size="10pt" |
|---|
| 666 | font-family="serif" |
|---|
| 667 | font-style="italic" |
|---|
| 668 | keep-with-next="always" |
|---|
| 669 | space-before="10pt"> |
|---|
| 670 | <xsl:value-of select="topic" /> |
|---|
| 671 | </fo:block> |
|---|
| 672 | <fo:block |
|---|
| 673 | font-size="10pt" |
|---|
| 674 | font-family="serif" |
|---|
| 675 | margin-left="10mm"> |
|---|
| 676 | <xsl:value-of select="text" /> |
|---|
| 677 | </fo:block> |
|---|
| 678 | </xsl:for-each> |
|---|
| 679 | </xsl:when> |
|---|
| 680 | <xsl:otherwise> |
|---|
| 681 | <fo:block |
|---|
| 682 | font-size="10pt" |
|---|
| 683 | font-family="serif" |
|---|
| 684 | font-style="italic" |
|---|
| 685 | space-before="10pt"> |
|---|
| 686 | (none) |
|---|
| 687 | </fo:block> |
|---|
| 688 | </xsl:otherwise> |
|---|
| 689 | </xsl:choose> |
|---|
| 690 | |
|---|
| 691 | </xsl:template> |
|---|
| 692 | |
|---|
| 693 | |
|---|
| 694 | </xsl:stylesheet> |
|---|