1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
2 | <!--Arbortext, Inc., 1988-2011, v.4002-->
|
---|
3 | <!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN"
|
---|
4 | "reference.dtd">
|
---|
5 | <?Pub Inc?>
|
---|
6 | <reference id="plugin-overridestyle" xml:lang="en-us">
|
---|
7 | <title>Override styles with XSLT</title>
|
---|
8 | <shortdesc>The XSLT import extension points are used to override various
|
---|
9 | steps of XSLT processing. For this, the extension attribute
|
---|
10 | indicates the step that the override applies to; the <codeph>file</codeph> attribute
|
---|
11 | is a relative path to the override within the current plugin. The plugin
|
---|
12 | installer will add an XSL import statement to the default code so
|
---|
13 | that your override becomes a part of the normal build.</shortdesc>
|
---|
14 | <refbody>
|
---|
15 | <section> <p>The following XSLT steps are available to override
|
---|
16 | in the core toolkit: </p><dl><dlentry>
|
---|
17 | <dt><codeph>dita.xsl.xhtml</codeph></dt>
|
---|
18 | <dd>Overrides default (X)HTML output (including HTML Help and Eclipse
|
---|
19 | Help). The referenced file is integrated directly into the XSLT step
|
---|
20 | that generates XHTML.</dd>
|
---|
21 | </dlentry><dlentry>
|
---|
22 | <dt><codeph>dita.xsl.xslfo</codeph></dt>
|
---|
23 | <dd>Overrides default PDF output (formerly known as PDF2). The referenced
|
---|
24 | file is integrated directly into the XSLT step that generates XSL-FO
|
---|
25 | for PDF.</dd>
|
---|
26 | </dlentry><dlentry>
|
---|
27 | <dt><codeph>dita.xsl.docbook</codeph></dt>
|
---|
28 | <dd>Overrides default DocBook output.</dd>
|
---|
29 | </dlentry><dlentry>
|
---|
30 | <dt><codeph>dita.xsl.rtf</codeph></dt>
|
---|
31 | <dd>Overrides default RTF output.</dd>
|
---|
32 | </dlentry><dlentry>
|
---|
33 | <dt><codeph>dita.xsl.eclipse.plugin</codeph></dt>
|
---|
34 | <dd>Overrides the step that generates plugin.xml for Eclipse.</dd>
|
---|
35 | </dlentry><dlentry>
|
---|
36 | <dt><codeph>dita.xsl.conref</codeph></dt>
|
---|
37 | <dd>Overrides the preprocess step that resolves conref.</dd>
|
---|
38 | </dlentry><dlentry>
|
---|
39 | <dt><codeph>dita.xsl.topicpull</codeph></dt>
|
---|
40 | <dd>Overrides the preprocess step "topicpull" (the step that pulls
|
---|
41 | text into <xref> elements, among other things).</dd>
|
---|
42 | </dlentry><dlentry>
|
---|
43 | <dt><codeph>dita.xsl.mapref</codeph></dt>
|
---|
44 | <dd>Overrides the preprocess step "mapref" (the step that resolves
|
---|
45 | references to other maps).</dd>
|
---|
46 | </dlentry><dlentry>
|
---|
47 | <dt><codeph>dita.xsl.mappull</codeph></dt>
|
---|
48 | <dd>Overrides the preprocess step "mappull" (the step that updates
|
---|
49 | navtitles in maps and causes attributes to cascade).</dd>
|
---|
50 | </dlentry><dlentry>
|
---|
51 | <dt><codeph>dita.xsl.maplink</codeph></dt>
|
---|
52 | <dd>Overrides the preprocess step "maplink" (the step that generates
|
---|
53 | map-based links).</dd>
|
---|
54 | </dlentry><dlentry importance="deprecated">
|
---|
55 | <dt><codeph>dita.xsl.fo</codeph></dt>
|
---|
56 | <dd>Override the (now deprecated) original PDF output, which is still
|
---|
57 | available with the transform type "legacypdf".</dd>
|
---|
58 | </dlentry></dl> </section>
|
---|
59 | <example><title>Example</title><p>The following two files represent
|
---|
60 | a complete, simple style plug-in. The <filepath>plugin.xml</filepath> file
|
---|
61 | declares an XSLT file that extends XHTML processing; the XSLT file
|
---|
62 | overrides default header processing to provide a (theoretical) banner.</p><codeblock>plugin.xml:
|
---|
63 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
64 | <plugin id="com.example.brandheader">
|
---|
65 | <feature extension="dita.xsl.xhtml" file="xsl/header.xsl"/>
|
---|
66 | </plugin>
|
---|
67 |
|
---|
68 | xsl/header.xsl:
|
---|
69 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
70 | <xsl:stylesheet version="1.0"
|
---|
71 | xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
---|
72 | <xsl:template name="gen-user-header">
|
---|
73 | <div><img src="http://www.example.com/company_banner.jpg"
|
---|
74 | alt="Example Company Banner"/></div>
|
---|
75 | </xsl:template>
|
---|
76 | </xsl:stylesheet></codeblock><?Pub Caret 410?></example>
|
---|
77 | </refbody>
|
---|
78 | </reference>
|
---|
79 | <?Pub *0000003622?>
|
---|