VirtualBox

source: vbox/trunk/src/libs/dita-ot-1.8.5/plugins/legacypdf/dita2fo-shell.xsl@ 99040

最後變更 在這個檔案從99040是 98584,由 vboxsync 提交於 2 年 前

Docs: bugref:10302. Setting svn properties of DITA-OT library.

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 21.8 KB
 
1<?xml version="1.0" encoding="utf-8"?><!-- This file is part of the DITA Open Toolkit project hosted on
2 Sourceforge.net. See the accompanying license.txt file for
3 applicable licenses.--><!-- (c) Copyright IBM Corp. 2004, 2005 All Rights Reserved. --><!--
4 | Composite DITA topics to FO
5
6 *--><!-- entities for use in the generated output (Unicode typographic glyphs) --><!-- create some fixed values for now for customizing later --><xsl:stylesheet version="1.0" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
7 <!-- stylesheet imports -->
8 <xsl:import href="xslfo/topic2foImpl.xsl"></xsl:import>
9 <xsl:import href="xslfo/domains2fo.xsl"></xsl:import>
10 <!-- XSL-FO output with XML syntax; no actual doctype for FO -->
11 <xsl:output method="xml" version="1.0" indent="yes"></xsl:output>
12 <!-- CONTROL PARAMETERS: -->
13 <!-- offset -->
14 <xsl:param name="basic-start-indent">72pt</xsl:param>
15 <xsl:param name="basic-end-indent">24pt</xsl:param>
16 <xsl:param name="output-related-links" select="&apos;no&apos;"></xsl:param>
17 <!-- GLOBALS: -->
18 <xsl:param name="dflt-ext">.jpg</xsl:param>
19 <!-- For Antenna House, set to ".jpg" -->
20 <!-- Set the prefix for error message numbers -->
21 <xsl:variable name="msgprefix">DOTX</xsl:variable>
22 <!-- =============== start of override tweaks ============== -->
23 <!-- force draft mode on all the time -->
24 <xsl:param name="DRAFT" select="&apos;no&apos;"></xsl:param>
25 <!-- ====================== template rules for merged content ==================== -->
26 <xsl:template match="dita" mode="toplevel">
27 <xsl:call-template name="dita-setup"></xsl:call-template>
28 </xsl:template>
29 <xsl:template match="*[contains(@class,&apos; map/map &apos;)]" mode="toplevel">
30 <xsl:call-template name="dita-setup"></xsl:call-template>
31 </xsl:template>
32 <!-- note that bkinfo provides information for a cover in a bookmap application,
33 hence bkinfo does not need to be instanced. In an application that processes
34 only maps, bkinfo should process as a topic based on default processing. -->
35 <xsl:template match="*[contains(@class,&apos; bkinfo/bkinfo &apos;)]" priority="2">
36 <!-- no operation for bkinfo -->
37 </xsl:template>
38 <!-- =========================== overall output organization ========================= -->
39 <!-- this template rule defines the overall output organization -->
40 <xsl:template name="dita-setup">
41 <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
42 <!-- get the overall master page defs here -->
43 <xsl:call-template name="define-page-masters-dita"></xsl:call-template>
44 <fo:bookmark-tree>
45 <!-- create FOP outline elements for PDF bookmarks -->
46 <xsl:apply-templates mode="outline"></xsl:apply-templates>
47 </fo:bookmark-tree>
48 <!-- place generated content -->
49 <xsl:call-template name="front-covers"></xsl:call-template>
50 <!--xsl:call-template name="titlepage-ednotice"/-->
51 <xsl:call-template name="generated-frontmatter"></xsl:call-template>
52 <!-- place main content (fall through occurs here) -->
53 <xsl:call-template name="main-doc3"></xsl:call-template>
54 <!-- return to place closing generated content -->
55 <!--xsl:call-template name="index-chapter"/-->
56 <!--xsl:call-template name="back-covers"/-->
57 </fo:root>
58 </xsl:template>
59 <!-- create FOP outline elements for PDF bookmarks -->
60 <xsl:template match="*[contains(@class,&apos; topic/topic &apos;)]" mode="outline">
61 <xsl:variable name="id-value">
62 <xsl:choose>
63 <xsl:when test="@id">
64 <xsl:value-of select="@id"></xsl:value-of>
65 </xsl:when>
66 <xsl:otherwise>
67 <xsl:value-of select="generate-id()"></xsl:value-of>
68 </xsl:otherwise>
69 </xsl:choose>
70 </xsl:variable>
71
72 <fo:bookmark>
73 <xsl:attribute name="internal-destination">
74 <!-- use id attribute node to generate anchor for PDF bookmark fix bug#1304859 -->
75 <xsl:value-of select="$id-value"></xsl:value-of>
76 </xsl:attribute>
77 <fo:bookmark-title>
78 <!-- if topic contains navtitle, use that as label for PDF bookmark
79 otherwise, use title -->
80 <xsl:choose>
81 <xsl:when test="*[contains(@class,&apos; topic/titlealts &apos;)]/*[contains(@class, &apos; topic/navtitle &apos;)]">
82 <xsl:apply-templates select="*[contains(@class,&apos; topic/titlealts &apos;)]/*[contains(@class, &apos; topic/navtitle &apos;)]" mode="text-only"></xsl:apply-templates>
83 </xsl:when>
84 <xsl:otherwise>
85 <xsl:apply-templates select="title" mode="text-only"></xsl:apply-templates>
86 </xsl:otherwise>
87 </xsl:choose>
88 </fo:bookmark-title>
89 <xsl:apply-templates select="child::*[contains(@class,&apos; topic/topic &apos;)]" mode="outline"></xsl:apply-templates>
90 </fo:bookmark>
91 </xsl:template>
92
93 <xsl:template match="*" mode="text-only">
94 <xsl:apply-templates select="text()|*" mode="text-only"></xsl:apply-templates>
95 </xsl:template>
96 <xsl:template name="define-page-masters-dita">
97 <fo:layout-master-set>
98 <!-- master set for chapter pages, first page is the title page -->
99 <fo:page-sequence-master master-name="chapter-master">
100 <fo:repeatable-page-master-alternatives>
101 <fo:conditional-page-master-reference page-position="first" odd-or-even="odd" master-reference="common-page"></fo:conditional-page-master-reference>
102 <!-- chapter-first-odd -->
103 <fo:conditional-page-master-reference page-position="first" odd-or-even="even" master-reference="common-page"></fo:conditional-page-master-reference>
104 <!--chapter-first-even"/-->
105 <fo:conditional-page-master-reference page-position="rest" odd-or-even="odd" master-reference="common-page"></fo:conditional-page-master-reference>
106 <!--chapter-rest-odd"/-->
107 <fo:conditional-page-master-reference page-position="rest" odd-or-even="even" master-reference="common-page"></fo:conditional-page-master-reference>
108 <!--chapter-rest-even"/-->
109 </fo:repeatable-page-master-alternatives>
110 </fo:page-sequence-master>
111 <fo:simple-page-master master-name="cover" xsl:use-attribute-sets="common-grid">
112 <fo:region-body margin-top="72pt"></fo:region-body>
113 </fo:simple-page-master>
114 <fo:simple-page-master master-name="common-page" xsl:use-attribute-sets="common-grid">
115 <fo:region-body margin-bottom="36pt" margin-top="12pt"></fo:region-body>
116 <fo:region-before extent="12pt"></fo:region-before>
117 <fo:region-after extent="24pt"></fo:region-after>
118 </fo:simple-page-master>
119 </fo:layout-master-set>
120 </xsl:template>
121 <xsl:template name="front-covers">
122 <!-- generate an "outside front cover" page (right side) (sheet 1) -->
123 <fo:page-sequence master-reference="cover">
124 <fo:flow flow-name="xsl-region-body">
125 <fo:block text-align="right" font-family="Helvetica">
126 <!-- set the title -->
127 <fo:block font-size="30pt" font-weight="bold" line-height="140%">
128 <xsl:choose>
129 <xsl:when test="//*[contains(@class,&apos; bkinfo/bkinfo &apos;)]">
130 <xsl:value-of select="//*[contains(@class,&apos; bkinfo/bkinfo &apos;)]/*[contains(@class,&apos; topic/title &apos;)]"></xsl:value-of>
131 <!-- use the id attribute of the bkinfo element as an anchor for a PDF bookmark to the cover page -->
132 <xsl:apply-templates select="//*[contains(@class,&apos; bkinfo/bkinfo &apos;)]/@id"></xsl:apply-templates>
133 </xsl:when>
134 <xsl:when test="@title"><xsl:value-of select="@title"></xsl:value-of></xsl:when>
135 <xsl:otherwise><xsl:value-of select="//*/title"></xsl:value-of></xsl:otherwise>
136 </xsl:choose>
137 </fo:block>
138 <!-- set the subtitle -->
139 <fo:block font-size="24pt" font-weight="bold" line-height="140%" margin-bottom="1in">
140 <xsl:value-of select="//*[contains(@class,&apos; bkinfo/bkinfo &apos;)]/*[contains(@class,&apos; bkinfo/bktitlealts &apos;)]/*[contains(@class,&apos; bkinfo/bksubtitle &apos;)]"></xsl:value-of>
141 </fo:block>
142 <!-- place authors as a vertical list -->
143 <fo:block font-size="11pt" font-weight="bold" line-height="1.5">
144 <xsl:text>[vertical list of authors]</xsl:text>
145 </fo:block>
146 <xsl:for-each select="//author">
147 <xsl:variable name="authorid1" select="generate-id(.)"></xsl:variable>
148 <xsl:variable name="authorid2" select="generate-id(//author[.=current()])"></xsl:variable>
149 <xsl:if test="$authorid1=$authorid2">
150 <fo:block font-size="11pt" font-weight="bold" line-height="1.5">
151 [<xsl:value-of select="."></xsl:value-of>]
152 </fo:block>
153 </xsl:if>
154 </xsl:for-each>
155 <!-- set the brief copyright notice -->
156 <fo:block margin-top="3pc" font-size="11pt" font-weight="bold" line-height="normal"> ©    Copyright
157   <xsl:value-of select="//*[contains(@class,&apos; bkinfo/orgname &apos;)]"></xsl:value-of>
158 <xsl:text></xsl:text>
159 <xsl:value-of select="//*[contains(@class,&apos; bkinfo/bkcopyrfirst &apos;)]"></xsl:value-of>,<xsl:value-of select="//*[contains(@class,&apos; bkinfo/bkcopyrlast &apos;)]"></xsl:value-of>. </fo:block>
160 </fo:block>
161 <!-- Custom cover art/text goes here -->
162 <xsl:call-template name="place-cover-art"></xsl:call-template>
163 <!-- End of custom art section -->
164 </fo:flow>
165 </fo:page-sequence>
166 <!-- generate an "inside front cover" page (left side) (sheet 2) -->
167 <fo:page-sequence master-reference="cover">
168 <fo:flow flow-name="xsl-region-body">
169 <fo:block xsl:use-attribute-sets="p" color="purple" text-align="center"></fo:block>
170 </fo:flow>
171 </fo:page-sequence>
172 </xsl:template>
173 <xsl:template name="place-cover-art">
174 <!-- product specific art, etc. -->
175 <fo:block margin-top="2pc" font-family="Helvetica" border-style="dashed" border-color="black" border-width="thin" padding="6pt">
176 <fo:block font-size="12pt" line-height="100%" margin-top="12pc" margin-bottom="12pc" text-align="center">
177 <fo:inline color="purple" font-weight="bold">[cover art/text goes here]</fo:inline>
178 <!-- one might imbed SVG directly here for use with FOP, for instance -->
179 </fo:block>
180 </fo:block>
181 </xsl:template>
182 <!-- internal title page -->
183 <!-- edition notices -->
184 <!-- document notice data -->
185 <!-- grant of usage data -->
186 <!-- copyright info -->
187 <!-- disclaimers -->
188 <!-- redirect to notices page -->
189 <!-- definitions for placement of Front Matter content -->
190 <xsl:template name="generated-frontmatter">
191 <fo:page-sequence master-reference="common-page" format="i" initial-page-number="1">
192 <!-- Static setup for the generated pages -->
193 <!-- header -->
194 <fo:static-content flow-name="xsl-region-before">
195 <!-- SF Bug 1407646: uses the map title when it is specified.
196 If the map title is not specified, we fall back to the
197 title of the first topic. -->
198 <xsl:variable name="booktitle">
199 <xsl:choose>
200 <xsl:when test="//*[contains(@class,&apos; bkinfo/bkinfo &apos;)]">
201 <xsl:value-of select="//*[contains(@class,&apos; bkinfo/bkinfo &apos;)]/*[contains(@class,&apos; topic/title &apos;)]"></xsl:value-of>
202 <!-- use the id attribute of the bkinfo element as an anchor for a PDF bookmark to the cover page -->
203 <xsl:apply-templates select="//*[contains(@class,&apos; bkinfo/bkinfo &apos;)]/@id"></xsl:apply-templates>
204 </xsl:when>
205 <xsl:when test="@title">
206 <xsl:value-of select="@title"></xsl:value-of>
207 </xsl:when>
208 <xsl:otherwise><xsl:value-of select="//*/title"></xsl:value-of></xsl:otherwise>
209 </xsl:choose>
210 </xsl:variable>
211 <fo:block font-size="8pt" line-height="8pt">
212 <xsl:value-of select="$booktitle"></xsl:value-of>
213 </fo:block>
214 </fo:static-content>
215 <!-- footer -->
216 <fo:static-content flow-name="xsl-region-after">
217 <fo:block text-align="center" font-size="10pt" font-weight="bold" font-family="Helvetica">
218 <fo:page-number></fo:page-number>
219 </fo:block>
220 </fo:static-content>
221 <!-- Flow setup for the Front Matter "body" (new "chapters" start on odd pages) -->
222 <fo:flow flow-name="xsl-region-body">
223 <!-- first, generate a compulsory Table of Contents -->
224 <fo:block line-height="12pt" font-size="10pt" font-family="Helvetica" id="page1-1">
225 <fo:block text-align="left" font-family="Helvetica">
226 <fo:block>
227 <fo:leader color="black" leader-pattern="rule" rule-thickness="3pt" leader-length="2in"></fo:leader>
228 </fo:block>
229 <fo:block font-size="20pt" font-weight="bold" line-height="140%">
230 Contents </fo:block>
231 <xsl:call-template name="gen-toc"></xsl:call-template>
232 </fo:block>
233 </fo:block>
234 </fo:flow>
235 </fo:page-sequence>
236 </xsl:template>
237 <xsl:template name="unused-toc">
238 <!-- generate the List of Figures -->
239 <!-- To be done
240 <fo:block text-align="left" font-family="Helvetica" break-before="page">
241 <fo:block><fo:leader color="black" leader-pattern="rule" rule-thickness="3pt" leader-length="2in"/></fo:block>
242 <fo:block font-size="20pt" font-weight="bold" line-height="140%">
243 Figures
244 </fo:block>
245 <xsl:call-template name="gen-figlist"/>
246 </fo:block>
247-->
248 <!-- generate the List of Tables -->
249 <!-- To be done
250 <fo:block text-align="left" font-family="Helvetica" break-before="page">
251 <fo:block><fo:leader color="black" leader-pattern="rule" rule-thickness="3pt" leader-length="2in"/></fo:block>
252 <fo:block font-size="20pt" font-weight="bold" line-height="140%">
253 Tables
254 </fo:block>
255 <xsl:call-template name="gen-tlist"/>
256 </fo:block>
257-->
258 <!-- To be done: while still in Roman numbering, all the bkfrontm content... -->
259 </xsl:template>
260 <!-- initiate main content processing within basic page "shell" -->
261 <xsl:template name="main-doc3">
262 <fo:page-sequence master-reference="chapter-master">
263 <!-- header: single page -->
264 <fo:static-content flow-name="xsl-region-before">
265 <!-- SF Bug 1407646: uses the map title when it is specified.
266 If the map title is not specified, we fall back to the
267 title of the first topic. -->
268 <!-- book title here -->
269 <xsl:variable name="booktitle">
270 <xsl:choose>
271 <xsl:when test="//*[contains(@class,&apos; bkinfo/bkinfo &apos;)]">
272 <xsl:value-of select="//*[contains(@class,&apos; bkinfo/bkinfo &apos;)]/*[contains(@class,&apos; topic/title &apos;)]"></xsl:value-of>
273 <!-- use the id attribute of the bkinfo element as an anchor for a PDF bookmark to the cover page -->
274 <xsl:apply-templates select="//*[contains(@class,&apos; bkinfo/bkinfo &apos;)]/@id"></xsl:apply-templates>
275 </xsl:when>
276 <xsl:when test="@title">
277 <xsl:value-of select="@title"></xsl:value-of>
278 </xsl:when>
279 <xsl:otherwise><xsl:value-of select="//*/title"></xsl:value-of></xsl:otherwise>
280 </xsl:choose>
281 </xsl:variable>
282 <fo:block font-size="8pt" line-height="8pt">
283 <xsl:value-of select="$booktitle"></xsl:value-of>
284 </fo:block>
285 </fo:static-content>
286 <!-- footer static stuff -->
287 <fo:static-content flow-name="xsl-region-after">
288 <fo:block text-align="center" font-size="10pt" font-weight="bold" font-family="Helvetica">
289 <fo:page-number></fo:page-number>
290 </fo:block>
291 </fo:static-content>
292 <!-- special footers for first page of new chapter -->
293 <!-- Flow setup for the main content (frontm, body, backm) (new "chapters" start on odd pages) -->
294 <fo:flow flow-name="xsl-region-body">
295 <!-- chapter body content here -->
296 <fo:block text-align="left" font-size="10pt" font-family="Helvetica" break-before="page">
297 <xsl:apply-templates></xsl:apply-templates>
298 </fo:block>
299 </fo:flow>
300 </fo:page-sequence>
301 </xsl:template>
302 <!-- set up common attributes for all page definitions -->
303 <xsl:attribute-set name="common-grid">
304 <xsl:attribute name="page-width">51pc</xsl:attribute>
305 <!-- A4: 210mm -->
306 <xsl:attribute name="page-height">66pc</xsl:attribute>
307 <!-- A4: 297mm -->
308 <xsl:attribute name="margin-top">3pc</xsl:attribute>
309 <xsl:attribute name="margin-bottom">3pc</xsl:attribute>
310 <xsl:attribute name="margin-left">6pc</xsl:attribute>
311 <xsl:attribute name="margin-right">6pc</xsl:attribute>
312 </xsl:attribute-set>
313 <!-- set up common attributes for all page definitions -->
314 <xsl:attribute-set name="maptitle">
315 <xsl:attribute name="font-size">16pt</xsl:attribute>
316 <xsl:attribute name="font-weight">bold</xsl:attribute>
317 </xsl:attribute-set>
318 <!-- set up common attributes for all page definitions -->
319 <xsl:attribute-set name="mapabstract">
320 <xsl:attribute name="margin-top">3pc</xsl:attribute>
321 <xsl:attribute name="margin-bottom">3pc</xsl:attribute>
322 <xsl:attribute name="margin-left">6pc</xsl:attribute>
323 <xsl:attribute name="margin-right">6pc</xsl:attribute>
324 </xsl:attribute-set>
325 <!-- main toc generator -->
326 <xsl:template name="gen-toc">
327 <!-- get by main part: body -->
328 <xsl:for-each select="//bookmap//*[contains(@class,&apos; topic/topic &apos;)]|//map/*[contains(@class,&apos; topic/topic &apos;)]">
329 <fo:block text-align-last="justify" margin-top="6pt" margin-left="4.9pc">
330 <fo:inline font-weight="bold">
331 <!--Chapter <xsl:number level="any" from="bookmap"/>. -->
332 <xsl:value-of select="*[contains(@class,&apos; topic/title &apos;)]"></xsl:value-of>
333 </fo:inline>
334 <fo:leader leader-pattern="dots"></fo:leader>
335 <xsl:variable name="id-value">
336 <xsl:choose>
337 <xsl:when test="@id">
338 <xsl:value-of select="@id"></xsl:value-of>
339 </xsl:when>
340 <xsl:otherwise>
341 <xsl:value-of select="generate-id()"></xsl:value-of>
342 </xsl:otherwise>
343 </xsl:choose>
344 </xsl:variable>
345 <fo:page-number-citation ref-id="{$id-value}"></fo:page-number-citation>
346 </fo:block>
347 <xsl:call-template name="get-tce2-section"></xsl:call-template>
348 </xsl:for-each>
349 </xsl:template>
350 <!-- 2nd level header -->
351 <xsl:template name="get-tce2-section">
352 <xsl:for-each select="*[contains(@class,&apos; topic/topic &apos;)]">
353 <fo:block text-align-last="justify" margin-left="7.5pc">
354 <fo:inline font-weight="bold">
355 <xsl:value-of select="*[contains(@class,&apos; topic/title &apos;)]"></xsl:value-of>
356 </fo:inline>
357 <fo:leader leader-pattern="dots"></fo:leader>
358 <xsl:variable name="id-value">
359 <xsl:choose>
360 <xsl:when test="@id">
361 <xsl:value-of select="@id"></xsl:value-of>
362 </xsl:when>
363 <xsl:otherwise>
364 <xsl:value-of select="generate-id()"></xsl:value-of>
365 </xsl:otherwise>
366 </xsl:choose>
367 </xsl:variable>
368 <fo:page-number-citation ref-id="{$id-value}"></fo:page-number-citation>
369 </fo:block>
370 <xsl:call-template name="get-tce3-section"></xsl:call-template>
371 </xsl:for-each>
372 </xsl:template>
373 <!-- 3nd level header -->
374 <xsl:template name="get-tce3-section">
375 <xsl:for-each select="*[contains(@class,&apos; topic/topic &apos;)]">
376 <fo:block text-align-last="justify" margin-left="9pc">
377 <xsl:value-of select="*[contains(@class,&apos; topic/title &apos;)]"></xsl:value-of>
378 <fo:leader leader-pattern="dots"></fo:leader>
379 <xsl:variable name="id-value">
380 <xsl:choose>
381 <xsl:when test="@id">
382 <xsl:value-of select="@id"></xsl:value-of>
383 </xsl:when>
384 <xsl:otherwise>
385 <xsl:value-of select="generate-id()"></xsl:value-of>
386 </xsl:otherwise>
387 </xsl:choose>
388 </xsl:variable>
389 <fo:page-number-citation ref-id="{$id-value}"></fo:page-number-citation>
390 </fo:block>
391 <xsl:call-template name="get-tce4-section"></xsl:call-template>
392 </xsl:for-each>
393 </xsl:template>
394 <!-- 4th level header -->
395 <xsl:template name="get-tce4-section">
396 <xsl:for-each select="bksubsect1">
397 <fo:block text-align-last="justify" margin-left="+5.9pc">
398 <xsl:value-of select="*/title"></xsl:value-of>
399 <fo:leader leader-pattern="dots"></fo:leader>
400 <xsl:variable name="id-value">
401 <xsl:choose>
402 <xsl:when test="@id">
403 <xsl:value-of select="@id"></xsl:value-of>
404 </xsl:when>
405 <xsl:otherwise>
406 <xsl:value-of select="generate-id()"></xsl:value-of>
407 </xsl:otherwise>
408 </xsl:choose>
409 </xsl:variable>
410 <fo:page-number-citation ref-id="{$id-value}"></fo:page-number-citation>
411 </fo:block>
412 <xsl:call-template name="get-tce5-section"></xsl:call-template>
413 </xsl:for-each>
414 </xsl:template>
415 <!-- 5th level header -->
416 <xsl:template name="get-tce5-section">
417 <xsl:for-each select="bksubsect2">
418 <fo:block text-align-last="justify" margin-left="+5.9pc">
419 <xsl:value-of select="*/title"></xsl:value-of>
420 <fo:leader leader-pattern="dots"></fo:leader>
421 <xsl:variable name="id-value">
422 <xsl:choose>
423 <xsl:when test="@id">
424 <xsl:value-of select="@id"></xsl:value-of>
425 </xsl:when>
426 <xsl:otherwise>
427 <xsl:value-of select="generate-id()"></xsl:value-of>
428 </xsl:otherwise>
429 </xsl:choose>
430 </xsl:variable>
431 <fo:page-number-citation ref-id="{$id-value}"></fo:page-number-citation>
432 </fo:block>
433 <!--xsl:call-template name="get-tce6-section"/-->
434 </xsl:for-each>
435 </xsl:template>
436</xsl:stylesheet>
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette