source: BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/profile-chunk-code.xsl@ c4e20f6c

sysvinit
Last change on this file since c4e20f6c was f8c4e94, checked in by Manuel Canales Esparcia <manuel@…>, 17 years ago

Added LFS XSL Stylesheets.

  • Property mode set to 100644
File size: 23.0 KB
Line 
1<?xml version="1.0" encoding="ASCII"?>
2<!--This file was created automatically by html2xhtml-->
3<!--from the HTML stylesheets.-->
4<!--This file was created automatically by xsl2profile-->
5<!--from the DocBook XSL stylesheets.-->
6<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" xmlns:cf="http://docbook.sourceforge.net/xmlns/chunkfast/1.0" xmlns:ng="http://docbook.org/docbook-ng" xmlns:db="http://docbook.org/ns/docbook" xmlns:exslt="http://exslt.org/common" xmlns="http://www.w3.org/1999/xhtml" exslt:dummy="dummy" ng:dummy="dummy" db:dummy="dummy" extension-element-prefixes="exslt" exclude-result-prefixes="exsl cf ng db exslt" version="1.0">
7
8<!-- ********************************************************************
9 $Id$
10 ********************************************************************
11
12 This file is part of the XSL DocBook Stylesheet distribution.
13 See ../README or http://docbook.sf.net/release/xsl/current/ for
14 copyright and other information.
15
16 ******************************************************************** -->
17
18<!-- ==================================================================== -->
19
20
21<xsl:template match="*" mode="chunk-filename">
22 <!-- returns the filename of a chunk -->
23 <xsl:variable name="ischunk">
24 <xsl:call-template name="chunk"/>
25 </xsl:variable>
26
27 <xsl:variable name="fn">
28 <xsl:apply-templates select="." mode="recursive-chunk-filename"/>
29 </xsl:variable>
30
31 <!--
32 <xsl:message>
33 <xsl:value-of select="$ischunk"/>
34 <xsl:text> (</xsl:text>
35 <xsl:value-of select="local-name(.)"/>
36 <xsl:text>) </xsl:text>
37 <xsl:value-of select="$fn"/>
38 <xsl:text>, </xsl:text>
39 <xsl:call-template name="dbhtml-dir"/>
40 </xsl:message>
41 -->
42
43 <!-- 2003-11-25 by ndw:
44 The following test used to read test="$ischunk != 0 and $fn != ''"
45 I've removed the ischunk part of the test so that href.to.uri and
46 href.from.uri will be fully qualified even if the source or target
47 isn't a chunk. I *think* that if $fn != '' then it's appropriate
48 to put the directory on the front, even if the element isn't a
49 chunk. I could be wrong. -->
50
51 <xsl:if test="$fn != ''">
52 <xsl:call-template name="dbhtml-dir"/>
53 </xsl:if>
54
55 <xsl:value-of select="$fn"/>
56 <!-- You can't add the html.ext here because dbhtml filename= may already -->
57 <!-- have added it. It really does have to be handled in the recursive template -->
58</xsl:template>
59
60<xsl:template match="*" mode="recursive-chunk-filename">
61 <xsl:param name="recursive" select="false()"/>
62
63 <!-- returns the filename of a chunk -->
64 <xsl:variable name="ischunk">
65 <xsl:call-template name="chunk"/>
66 </xsl:variable>
67
68 <xsl:variable name="dbhtml-filename">
69 <xsl:call-template name="pi.dbhtml_filename"/>
70 </xsl:variable>
71
72 <xsl:variable name="filename">
73 <xsl:choose>
74 <xsl:when test="$dbhtml-filename != ''">
75 <xsl:value-of select="$dbhtml-filename"/>
76 </xsl:when>
77 <!-- if this is the root element, use the root.filename -->
78 <xsl:when test="not(parent::*) and $root.filename != ''">
79 <xsl:value-of select="$root.filename"/>
80 <xsl:value-of select="$html.ext"/>
81 </xsl:when>
82 <!-- Special case -->
83 <xsl:when test="self::legalnotice and not($generate.legalnotice.link = 0)">
84 <xsl:choose>
85 <xsl:when test="(@id or @xml:id) and not($use.id.as.filename = 0)">
86 <!-- * if this legalnotice has an ID, then go ahead and use -->
87 <!-- * just the value of that ID as the basename for the file -->
88 <!-- * (that is, without prepending an "ln-" too it) -->
89 <xsl:value-of select="(@id|@xml:id)[1]"/>
90 <xsl:value-of select="$html.ext"/>
91 </xsl:when>
92 <xsl:otherwise>
93 <!-- * otherwise, if this legalnotice does not have an ID, -->
94 <!-- * then we generate an ID... -->
95 <xsl:variable name="id">
96 <xsl:call-template name="object.id"/>
97 </xsl:variable>
98 <!-- * ...and then we take that generated ID, prepend an -->
99 <!-- * "ln-" to it, and use that as the basename for the file -->
100 <xsl:value-of select="concat('ln-',$id,$html.ext)"/>
101 </xsl:otherwise>
102 </xsl:choose>
103 </xsl:when>
104 <!-- if there's no dbhtml filename, and if we're to use IDs as -->
105 <!-- filenames, then use the ID to generate the filename. -->
106 <xsl:when test="(@id or @xml:id) and $use.id.as.filename != 0">
107 <xsl:value-of select="(@id|@xml:id)[1]"/>
108 <xsl:value-of select="$html.ext"/>
109 </xsl:when>
110 <xsl:otherwise/>
111 </xsl:choose>
112 </xsl:variable>
113
114 <xsl:choose>
115 <xsl:when test="$ischunk='0'">
116 <!-- if called on something that isn't a chunk, walk up... -->
117 <xsl:choose>
118 <xsl:when test="count(parent::*)&gt;0">
119 <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
120 <xsl:with-param name="recursive" select="$recursive"/>
121 </xsl:apply-templates>
122 </xsl:when>
123 <!-- unless there is no up, in which case return "" -->
124 <xsl:otherwise/>
125 </xsl:choose>
126 </xsl:when>
127
128 <xsl:when test="not($recursive) and $filename != ''">
129 <!-- if this chunk has an explicit name, use it -->
130 <xsl:value-of select="$filename"/>
131 </xsl:when>
132
133 <xsl:when test="self::set">
134 <xsl:value-of select="$root.filename"/>
135 <xsl:if test="not($recursive)">
136 <xsl:value-of select="$html.ext"/>
137 </xsl:if>
138 </xsl:when>
139
140 <xsl:when test="self::book">
141 <xsl:text>bk</xsl:text>
142 <xsl:number level="any" format="01"/>
143 <xsl:if test="not($recursive)">
144 <xsl:value-of select="$html.ext"/>
145 </xsl:if>
146 </xsl:when>
147
148 <xsl:when test="self::article">
149 <xsl:if test="/set">
150 <!-- in a set, make sure we inherit the right book info... -->
151 <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
152 <xsl:with-param name="recursive" select="true()"/>
153 </xsl:apply-templates>
154 </xsl:if>
155
156 <xsl:text>ar</xsl:text>
157 <xsl:number level="any" format="01" from="book"/>
158 <xsl:if test="not($recursive)">
159 <xsl:value-of select="$html.ext"/>
160 </xsl:if>
161 </xsl:when>
162
163 <xsl:when test="self::preface">
164 <xsl:if test="/set">
165 <!-- in a set, make sure we inherit the right book info... -->
166 <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
167 <xsl:with-param name="recursive" select="true()"/>
168 </xsl:apply-templates>
169 </xsl:if>
170
171 <xsl:text>pr</xsl:text>
172 <xsl:number level="any" format="01" from="book"/>
173 <xsl:if test="not($recursive)">
174 <xsl:value-of select="$html.ext"/>
175 </xsl:if>
176 </xsl:when>
177
178 <xsl:when test="self::chapter">
179 <xsl:if test="/set">
180 <!-- in a set, make sure we inherit the right book info... -->
181 <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
182 <xsl:with-param name="recursive" select="true()"/>
183 </xsl:apply-templates>
184 </xsl:if>
185
186 <xsl:text>ch</xsl:text>
187 <xsl:number level="any" format="01" from="book"/>
188 <xsl:if test="not($recursive)">
189 <xsl:value-of select="$html.ext"/>
190 </xsl:if>
191 </xsl:when>
192
193 <xsl:when test="self::appendix">
194 <xsl:if test="/set">
195 <!-- in a set, make sure we inherit the right book info... -->
196 <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
197 <xsl:with-param name="recursive" select="true()"/>
198 </xsl:apply-templates>
199 </xsl:if>
200
201 <xsl:text>ap</xsl:text>
202 <xsl:number level="any" format="a" from="book"/>
203 <xsl:if test="not($recursive)">
204 <xsl:value-of select="$html.ext"/>
205 </xsl:if>
206 </xsl:when>
207
208 <xsl:when test="self::part">
209 <xsl:choose>
210 <xsl:when test="/set">
211 <!-- in a set, make sure we inherit the right book info... -->
212 <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
213 <xsl:with-param name="recursive" select="true()"/>
214 </xsl:apply-templates>
215 </xsl:when>
216 <xsl:otherwise>
217 </xsl:otherwise>
218 </xsl:choose>
219
220 <xsl:text>pt</xsl:text>
221 <xsl:number level="any" format="01" from="book"/>
222 <xsl:if test="not($recursive)">
223 <xsl:value-of select="$html.ext"/>
224 </xsl:if>
225 </xsl:when>
226
227 <xsl:when test="self::reference">
228 <xsl:choose>
229 <xsl:when test="/set">
230 <!-- in a set, make sure we inherit the right book info... -->
231 <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
232 <xsl:with-param name="recursive" select="true()"/>
233 </xsl:apply-templates>
234 </xsl:when>
235 <xsl:otherwise>
236 </xsl:otherwise>
237 </xsl:choose>
238
239 <xsl:text>rn</xsl:text>
240 <xsl:number level="any" format="01" from="book"/>
241 <xsl:if test="not($recursive)">
242 <xsl:value-of select="$html.ext"/>
243 </xsl:if>
244 </xsl:when>
245
246 <xsl:when test="self::refentry">
247 <xsl:choose>
248 <xsl:when test="parent::reference">
249 <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
250 <xsl:with-param name="recursive" select="true()"/>
251 </xsl:apply-templates>
252 </xsl:when>
253 <xsl:otherwise>
254 </xsl:otherwise>
255 </xsl:choose>
256
257 <xsl:text>re</xsl:text>
258 <xsl:number level="any" format="01" from="book"/>
259 <xsl:if test="not($recursive)">
260 <xsl:value-of select="$html.ext"/>
261 </xsl:if>
262 </xsl:when>
263
264 <xsl:when test="self::colophon">
265 <xsl:choose>
266 <xsl:when test="/set">
267 <!-- in a set, make sure we inherit the right book info... -->
268 <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
269 <xsl:with-param name="recursive" select="true()"/>
270 </xsl:apply-templates>
271 </xsl:when>
272 <xsl:otherwise>
273 </xsl:otherwise>
274 </xsl:choose>
275
276 <xsl:text>co</xsl:text>
277 <xsl:number level="any" format="01" from="book"/>
278 <xsl:if test="not($recursive)">
279 <xsl:value-of select="$html.ext"/>
280 </xsl:if>
281 </xsl:when>
282
283 <xsl:when test="self::sect1 or self::sect2 or self::sect3 or self::sect4 or self::sect5 or self::section">
284 <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
285 <xsl:with-param name="recursive" select="true()"/>
286 </xsl:apply-templates>
287 <xsl:text>s</xsl:text>
288 <xsl:number format="01"/>
289 <xsl:if test="not($recursive)">
290 <xsl:value-of select="$html.ext"/>
291 </xsl:if>
292 </xsl:when>
293
294 <xsl:when test="self::bibliography">
295 <xsl:choose>
296 <xsl:when test="/set">
297 <!-- in a set, make sure we inherit the right book info... -->
298 <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
299 <xsl:with-param name="recursive" select="true()"/>
300 </xsl:apply-templates>
301 </xsl:when>
302 <xsl:otherwise>
303 </xsl:otherwise>
304 </xsl:choose>
305
306 <xsl:text>bi</xsl:text>
307 <xsl:number level="any" format="01" from="book"/>
308 <xsl:if test="not($recursive)">
309 <xsl:value-of select="$html.ext"/>
310 </xsl:if>
311 </xsl:when>
312
313 <xsl:when test="self::glossary">
314 <xsl:choose>
315 <xsl:when test="/set">
316 <!-- in a set, make sure we inherit the right book info... -->
317 <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
318 <xsl:with-param name="recursive" select="true()"/>
319 </xsl:apply-templates>
320 </xsl:when>
321 <xsl:otherwise>
322 </xsl:otherwise>
323 </xsl:choose>
324
325 <xsl:text>go</xsl:text>
326 <xsl:number level="any" format="01" from="book"/>
327 <xsl:if test="not($recursive)">
328 <xsl:value-of select="$html.ext"/>
329 </xsl:if>
330 </xsl:when>
331
332 <xsl:when test="self::index">
333 <xsl:choose>
334 <xsl:when test="/set">
335 <!-- in a set, make sure we inherit the right book info... -->
336 <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
337 <xsl:with-param name="recursive" select="true()"/>
338 </xsl:apply-templates>
339 </xsl:when>
340 <xsl:otherwise>
341 </xsl:otherwise>
342 </xsl:choose>
343
344 <xsl:text>ix</xsl:text>
345 <xsl:number level="any" format="01" from="book"/>
346 <xsl:if test="not($recursive)">
347 <xsl:value-of select="$html.ext"/>
348 </xsl:if>
349 </xsl:when>
350
351 <xsl:when test="self::setindex">
352 <xsl:text>si</xsl:text>
353 <xsl:number level="any" format="01" from="set"/>
354 <xsl:if test="not($recursive)">
355 <xsl:value-of select="$html.ext"/>
356 </xsl:if>
357 </xsl:when>
358
359 <xsl:otherwise>
360 <xsl:text>chunk-filename-error-</xsl:text>
361 <xsl:value-of select="name(.)"/>
362 <xsl:number level="any" format="01" from="set"/>
363 <xsl:if test="not($recursive)">
364 <xsl:value-of select="$html.ext"/>
365 </xsl:if>
366 </xsl:otherwise>
367 </xsl:choose>
368</xsl:template>
369
370<!-- ==================================================================== -->
371
372
373
374<xsl:template match="processing-instruction('dbhtml')">
375 <!-- nop -->
376</xsl:template>
377
378<!-- ==================================================================== -->
379
380
381<xsl:template match="*" mode="find.chunks">
382 <xsl:variable name="chunk">
383 <xsl:call-template name="chunk"/>
384 </xsl:variable>
385
386 <xsl:choose>
387 <xsl:when test="$chunk != 0">
388 <cf:div id="{generate-id()}">
389 <xsl:apply-templates select="." mode="class.attribute"/>
390 <xsl:apply-templates select="*" mode="find.chunks"/>
391 </cf:div>
392 </xsl:when>
393 <xsl:otherwise>
394 <xsl:apply-templates select="*" mode="find.chunks"/>
395 </xsl:otherwise>
396 </xsl:choose>
397</xsl:template>
398
399<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="/">
400 <!-- * Get a title for current doc so that we let the user -->
401 <!-- * know what document we are processing at this point. -->
402 <xsl:variable name="doc.title">
403 <xsl:call-template name="get.doc.title"/>
404 </xsl:variable>
405 <xsl:choose>
406 <!-- Hack! If someone hands us a DocBook V5.x or DocBook NG document,
407 toss the namespace and continue. Use the docbook5 namespaced
408 stylesheets for DocBook5 if you don't want to use this feature.-->
409 <!-- include extra test for Xalan quirk -->
410 <xsl:when test="false()"/>
411 <!-- Can't process unless namespace removed -->
412 <xsl:when test="false()"/>
413 <xsl:otherwise>
414 <xsl:choose>
415 <xsl:when test="$rootid != ''">
416 <xsl:choose>
417 <xsl:when test="count($profiled-nodes//*[@id=$rootid]) = 0">
418 <xsl:message terminate="yes">
419 <xsl:text>ID '</xsl:text>
420 <xsl:value-of select="$rootid"/>
421 <xsl:text>' not found in document.</xsl:text>
422 </xsl:message>
423 </xsl:when>
424 <xsl:otherwise>
425 <xsl:if test="$collect.xref.targets = 'yes' or $collect.xref.targets = 'only'">
426 <xsl:apply-templates select="key('id', $rootid)" mode="collect.targets"/>
427 </xsl:if>
428 <xsl:if test="$collect.xref.targets != 'only'">
429 <xsl:apply-templates select="$profiled-nodes//*[@id=$rootid]" mode="process.root"/>
430 <xsl:if test="$tex.math.in.alt != ''">
431 <xsl:apply-templates select="$profiled-nodes//*[@id=$rootid]" mode="collect.tex.math"/>
432 </xsl:if>
433 <xsl:if test="$generate.manifest != 0">
434 <xsl:call-template name="generate.manifest">
435 <xsl:with-param name="node" select="key('id',$rootid)"/>
436 </xsl:call-template>
437 </xsl:if>
438 </xsl:if>
439 </xsl:otherwise>
440 </xsl:choose>
441 </xsl:when>
442 <xsl:otherwise>
443 <xsl:if test="$collect.xref.targets = 'yes' or $collect.xref.targets = 'only'">
444 <xsl:apply-templates select="$profiled-nodes" mode="collect.targets"/>
445 </xsl:if>
446 <xsl:if test="$collect.xref.targets != 'only'">
447 <xsl:apply-templates select="$profiled-nodes" mode="process.root"/>
448 <xsl:if test="$tex.math.in.alt != ''">
449 <xsl:apply-templates select="$profiled-nodes" mode="collect.tex.math"/>
450 </xsl:if>
451 <xsl:if test="$generate.manifest != 0">
452 <xsl:call-template name="generate.manifest">
453 <xsl:with-param name="node" select="$profiled-nodes"/>
454 </xsl:call-template>
455 </xsl:if>
456 </xsl:if>
457 </xsl:otherwise>
458 </xsl:choose>
459 </xsl:otherwise>
460 </xsl:choose>
461</xsl:template>
462
463<xsl:template match="*" mode="process.root">
464 <xsl:apply-templates select="."/>
465</xsl:template>
466
467<!-- ====================================================================== -->
468
469<xsl:template match="set|book|part|preface|chapter|appendix |article |reference|refentry |book/glossary|article/glossary|part/glossary |book/bibliography|article/bibliography|part/bibliography |colophon">
470 <xsl:choose>
471 <xsl:when test="$onechunk != 0 and parent::*">
472 <xsl:apply-imports/>
473 </xsl:when>
474 <xsl:otherwise>
475 <xsl:call-template name="process-chunk-element"/>
476 </xsl:otherwise>
477 </xsl:choose>
478</xsl:template>
479
480<xsl:template match="sect1|sect2|sect3|sect4|sect5|section">
481 <xsl:variable name="ischunk">
482 <xsl:call-template name="chunk"/>
483 </xsl:variable>
484
485 <xsl:choose>
486 <xsl:when test="not(parent::*)">
487 <xsl:call-template name="process-chunk-element"/>
488 </xsl:when>
489 <xsl:when test="$ischunk = 0">
490 <xsl:apply-imports/>
491 </xsl:when>
492 <xsl:otherwise>
493 <xsl:call-template name="process-chunk-element"/>
494 </xsl:otherwise>
495 </xsl:choose>
496</xsl:template>
497
498<xsl:template match="setindex |book/index |article/index |part/index">
499 <!-- some implementations use completely empty index tags to indicate -->
500 <!-- where an automatically generated index should be inserted. so -->
501 <!-- if the index is completely empty, skip it. -->
502 <xsl:if test="count(*)&gt;0 or $generate.index != '0'">
503 <xsl:call-template name="process-chunk-element"/>
504 </xsl:if>
505</xsl:template>
506
507<!-- Resolve xml:base attributes -->
508<xsl:template match="@fileref">
509 <!-- need a check for absolute urls -->
510 <xsl:choose>
511 <xsl:when test="contains(., ':')">
512 <!-- it has a uri scheme so it is an absolute uri -->
513 <xsl:value-of select="."/>
514 </xsl:when>
515 <xsl:when test="$keep.relative.image.uris != 0">
516 <!-- leave it alone -->
517 <xsl:value-of select="."/>
518 </xsl:when>
519 <xsl:otherwise>
520 <!-- its a relative uri -->
521 <xsl:call-template name="relative-uri">
522 <xsl:with-param name="destdir">
523 <xsl:call-template name="dbhtml-dir">
524 <xsl:with-param name="context" select=".."/>
525 </xsl:call-template>
526 </xsl:with-param>
527 </xsl:call-template>
528 </xsl:otherwise>
529 </xsl:choose>
530</xsl:template>
531
532<!-- ==================================================================== -->
533<xsl:template match="set|book|part|preface|chapter|appendix |article |reference|refentry |sect1|sect2|sect3|sect4|sect5 |section |book/glossary|article/glossary|part/glossary |book/bibliography|article/bibliography|part/bibliography |colophon" mode="enumerate-files">
534 <xsl:variable name="ischunk"><xsl:call-template name="chunk"/></xsl:variable>
535 <xsl:if test="$ischunk='1'">
536 <xsl:call-template name="make-relative-filename">
537 <xsl:with-param name="base.dir">
538 <xsl:if test="$manifest.in.base.dir = 0">
539 <xsl:value-of select="$base.dir"/>
540 </xsl:if>
541 </xsl:with-param>
542 <xsl:with-param name="base.name">
543 <xsl:apply-templates mode="chunk-filename" select="."/>
544 </xsl:with-param>
545 </xsl:call-template>
546 <xsl:text>
547</xsl:text>
548 </xsl:if>
549 <xsl:apply-templates select="*" mode="enumerate-files"/>
550</xsl:template>
551
552<xsl:template match="book/index|article/index|part/index" mode="enumerate-files">
553 <xsl:if test="$htmlhelp.output != 1">
554 <xsl:variable name="ischunk"><xsl:call-template name="chunk"/></xsl:variable>
555 <xsl:if test="$ischunk='1'">
556 <xsl:call-template name="make-relative-filename">
557 <xsl:with-param name="base.dir">
558 <xsl:if test="$manifest.in.base.dir = 0">
559 <xsl:value-of select="$base.dir"/>
560 </xsl:if>
561 </xsl:with-param>
562 <xsl:with-param name="base.name">
563 <xsl:apply-templates mode="chunk-filename" select="."/>
564 </xsl:with-param>
565 </xsl:call-template>
566 <xsl:text>
567</xsl:text>
568 </xsl:if>
569 <xsl:apply-templates select="*" mode="enumerate-files"/>
570 </xsl:if>
571</xsl:template>
572
573<xsl:template match="legalnotice" mode="enumerate-files">
574 <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
575 <xsl:if test="$generate.legalnotice.link != 0">
576 <xsl:call-template name="make-relative-filename">
577 <xsl:with-param name="base.dir">
578 <xsl:if test="$manifest.in.base.dir = 0">
579 <xsl:value-of select="$base.dir"/>
580 </xsl:if>
581 </xsl:with-param>
582 <xsl:with-param name="base.name">
583 <xsl:apply-templates mode="chunk-filename" select="."/>
584 </xsl:with-param>
585 </xsl:call-template>
586 <xsl:text>
587</xsl:text>
588 </xsl:if>
589</xsl:template>
590
591<xsl:template match="mediaobject[imageobject] | inlinemediaobject[imageobject]" mode="enumerate-files">
592 <xsl:variable name="longdesc.uri">
593 <xsl:call-template name="longdesc.uri">
594 <xsl:with-param name="mediaobject" select="."/>
595 </xsl:call-template>
596 </xsl:variable>
597 <xsl:variable name="mediaobject" select="."/>
598
599 <xsl:if test="$html.longdesc != 0 and $mediaobject/textobject[not(phrase)]">
600 <xsl:call-template name="longdesc.uri">
601 <xsl:with-param name="mediaobject" select="$mediaobject"/>
602 </xsl:call-template>
603 <xsl:text>
604</xsl:text>
605 </xsl:if>
606</xsl:template>
607
608<xsl:template match="text()" mode="enumerate-files">
609</xsl:template>
610
611</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.