1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
2 | <!DOCTYPE html
|
---|
3 | PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
---|
4 | <html xml:lang="en-us" lang="en-us">
|
---|
5 | <head>
|
---|
6 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
---|
7 | <meta name="copyright" content="(C) Copyright 2005"/>
|
---|
8 | <meta name="DC.rights.owner" content="(C) Copyright 2005"/>
|
---|
9 | <meta name="DC.Type" content="reference"/>
|
---|
10 | <meta name="DC.Title" content="Override styles with XSLT"/>
|
---|
11 | <meta name="abstract" content="The XSLT import extension points are used to override various steps of XSLT processing. For this, the extension attribute indicates the step that the override applies to; the file attribute is a relative path to the override within the current plugin. The plugin installer will add an XSL import statement to the default code so that your override becomes a part of the normal build."/>
|
---|
12 | <meta name="description" content="The XSLT import extension points are used to override various steps of XSLT processing. For this, the extension attribute indicates the step that the override applies to; the file attribute is a relative path to the override within the current plugin. The plugin installer will add an XSL import statement to the default code so that your override becomes a part of the normal build."/>
|
---|
13 | <meta name="DC.Relation" scheme="URI" content="../dev_ref/plugins-overview.html"/>
|
---|
14 | <meta name="DC.Format" content="XHTML"/>
|
---|
15 | <meta name="DC.Identifier" content="plugin-overridestyle"/>
|
---|
16 | <meta name="DC.Language" content="en-us"/>
|
---|
17 | <link rel="stylesheet" type="text/css" href="../commonltr.css"/>
|
---|
18 | <link rel="stylesheet" type="text/css" href="../dita-ot-doc.css"/>
|
---|
19 | <title>Override styles with XSLT</title>
|
---|
20 | </head>
|
---|
21 | <body id="plugin-overridestyle">
|
---|
22 |
|
---|
23 |
|
---|
24 | <h1 class="title topictitle1">Override styles with XSLT</h1>
|
---|
25 |
|
---|
26 |
|
---|
27 | <div class="body refbody"><p class="shortdesc">The XSLT import extension points are used to override various
|
---|
28 | steps of XSLT processing. For this, the extension attribute
|
---|
29 | indicates the step that the override applies to; the <samp class="ph codeph">file</samp> attribute
|
---|
30 | is a relative path to the override within the current plugin. The plugin
|
---|
31 | installer will add an XSL import statement to the default code so
|
---|
32 | that your override becomes a part of the normal build.</p>
|
---|
33 |
|
---|
34 | <div class="section"> <p class="p">The following XSLT steps are available to override
|
---|
35 | in the core toolkit: </p>
|
---|
36 | <dl class="dl">
|
---|
37 | <dt class="dt dlterm"><samp class="ph codeph">dita.xsl.xhtml</samp></dt>
|
---|
38 |
|
---|
39 | <dd class="dd">Overrides default (X)HTML output (including HTML Help and Eclipse
|
---|
40 | Help). The referenced file is integrated directly into the XSLT step
|
---|
41 | that generates XHTML.</dd>
|
---|
42 |
|
---|
43 |
|
---|
44 | <dt class="dt dlterm"><samp class="ph codeph">dita.xsl.xslfo</samp></dt>
|
---|
45 |
|
---|
46 | <dd class="dd">Overrides default PDF output (formerly known as PDF2). The referenced
|
---|
47 | file is integrated directly into the XSLT step that generates XSL-FO
|
---|
48 | for PDF.</dd>
|
---|
49 |
|
---|
50 |
|
---|
51 | <dt class="dt dlterm"><samp class="ph codeph">dita.xsl.docbook</samp></dt>
|
---|
52 |
|
---|
53 | <dd class="dd">Overrides default DocBook output.</dd>
|
---|
54 |
|
---|
55 |
|
---|
56 | <dt class="dt dlterm"><samp class="ph codeph">dita.xsl.rtf</samp></dt>
|
---|
57 |
|
---|
58 | <dd class="dd">Overrides default RTF output.</dd>
|
---|
59 |
|
---|
60 |
|
---|
61 | <dt class="dt dlterm"><samp class="ph codeph">dita.xsl.eclipse.plugin</samp></dt>
|
---|
62 |
|
---|
63 | <dd class="dd">Overrides the step that generates plugin.xml for Eclipse.</dd>
|
---|
64 |
|
---|
65 |
|
---|
66 | <dt class="dt dlterm"><samp class="ph codeph">dita.xsl.conref</samp></dt>
|
---|
67 |
|
---|
68 | <dd class="dd">Overrides the preprocess step that resolves conref.</dd>
|
---|
69 |
|
---|
70 |
|
---|
71 | <dt class="dt dlterm"><samp class="ph codeph">dita.xsl.topicpull</samp></dt>
|
---|
72 |
|
---|
73 | <dd class="dd">Overrides the preprocess step "topicpull" (the step that pulls
|
---|
74 | text into <xref> elements, among other things).</dd>
|
---|
75 |
|
---|
76 |
|
---|
77 | <dt class="dt dlterm"><samp class="ph codeph">dita.xsl.mapref</samp></dt>
|
---|
78 |
|
---|
79 | <dd class="dd">Overrides the preprocess step "mapref" (the step that resolves
|
---|
80 | references to other maps).</dd>
|
---|
81 |
|
---|
82 |
|
---|
83 | <dt class="dt dlterm"><samp class="ph codeph">dita.xsl.mappull</samp></dt>
|
---|
84 |
|
---|
85 | <dd class="dd">Overrides the preprocess step "mappull" (the step that updates
|
---|
86 | navtitles in maps and causes attributes to cascade).</dd>
|
---|
87 |
|
---|
88 |
|
---|
89 | <dt class="dt dlterm"><samp class="ph codeph">dita.xsl.maplink</samp></dt>
|
---|
90 |
|
---|
91 | <dd class="dd">Overrides the preprocess step "maplink" (the step that generates
|
---|
92 | map-based links).</dd>
|
---|
93 |
|
---|
94 |
|
---|
95 | <dt class="dt dlterm"><samp class="ph codeph">dita.xsl.fo</samp></dt>
|
---|
96 |
|
---|
97 | <dd class="dd">Override the (now deprecated) original PDF output, which is still
|
---|
98 | available with the transform type "legacypdf".</dd>
|
---|
99 |
|
---|
100 | </dl>
|
---|
101 | </div>
|
---|
102 |
|
---|
103 | <div class="example"><h2 class="title sectiontitle">Example</h2><p class="p">The following two files represent
|
---|
104 | a complete, simple style plug-in. The <span class="ph filepath">plugin.xml</span> file
|
---|
105 | declares an XSLT file that extends XHTML processing; the XSLT file
|
---|
106 | overrides default header processing to provide a (theoretical) banner.</p>
|
---|
107 | <pre class="pre codeblock">plugin.xml:
|
---|
108 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
109 | <plugin id="com.example.brandheader">
|
---|
110 | <feature extension="dita.xsl.xhtml" file="xsl/header.xsl"/>
|
---|
111 | </plugin>
|
---|
112 |
|
---|
113 | xsl/header.xsl:
|
---|
114 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
115 | <xsl:stylesheet version="1.0"
|
---|
116 | xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
---|
117 | <xsl:template name="gen-user-header">
|
---|
118 | <div><img src="http://www.example.com/company_banner.jpg"
|
---|
119 | alt="Example Company Banner"/></div>
|
---|
120 | </xsl:template>
|
---|
121 | </xsl:stylesheet></pre>
|
---|
122 | </div>
|
---|
123 |
|
---|
124 | </div>
|
---|
125 |
|
---|
126 | <div class="related-links">
|
---|
127 | <div class="familylinks">
|
---|
128 | <div class="parentlink"><strong>Parent topic:</strong> <a class="link" href="../dev_ref/plugins-overview.html" title="The DITA Open Toolkit comes with a built in mechanism for adding in extensions through plug-ins. These plug-ins may do a wide variety of things, such as adding support for specialized DITA DTDs or Schemas, integrating processing overrides, or even providing entirely new output transforms. Plug-ins are the best way to extend the toolkit in a way that is consistent, easily sharable, and easy to preserve through toolkit upgrades.">Creating DITA-OT plug-ins</a></div>
|
---|
129 | </div>
|
---|
130 | </div>
|
---|
131 |
|
---|
132 | </body>
|
---|
133 | </html>
|
---|