Skip to content

Commit 3805698

Browse files
committed
XML Formatting
1 parent c97ceab commit 3805698

File tree

17 files changed

+25597
-5113
lines changed

17 files changed

+25597
-5113
lines changed

Customization/xsl/class.xsl

Lines changed: 72 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,22 @@
33
This file is part of the DITA-OT Doxygen Plug-in project.
44
See the accompanying LICENSE file for applicable licenses.
55
-->
6-
<xsl:stylesheet exclude-result-prefixes="dita-ot" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
7-
xmlns:xs="http://www.w3.org/2001/XMLSchema"
8-
xmlns:dita-ot="http://dita-ot.sourceforge.net/ns/201007/dita-ot"
9-
version="2.0">
6+
<xsl:stylesheet
7+
exclude-result-prefixes="dita-ot"
8+
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
9+
xmlns:xs="http://www.w3.org/2001/XMLSchema"
10+
xmlns:dita-ot="http://dita-ot.sourceforge.net/ns/201007/dita-ot"
11+
version="2.0"
12+
>
1013
<!--
1114
Class Overview
1215
-->
1316
<xsl:template match="compounddef" mode="class">
14-
<topic domains="(topic abbrev-d) a(props deliveryTarget) (topic equation-d) (topic hazard-d) (topic hi-d) (topic indexing-d) (topic markup-d) (topic mathml-d) (topic pr-d) (topic relmgmt-d) (topic sw-d) (topic svg-d) (topic ui-d) (topic ut-d) (topic markup-d xml-d)" class="- topic/topic " props="doxygen">
17+
<topic
18+
domains="(topic abbrev-d) a(props deliveryTarget) (topic equation-d) (topic hazard-d) (topic hi-d) (topic indexing-d) (topic markup-d) (topic mathml-d) (topic pr-d) (topic relmgmt-d) (topic sw-d) (topic svg-d) (topic ui-d) (topic ut-d) (topic markup-d xml-d)"
19+
class="- topic/topic "
20+
props="doxygen"
21+
>
1522
<xsl:attribute name="id">
1623
<xsl:value-of select="dita-ot:name-to-id(compoundname)"/>
1724
</xsl:attribute>
@@ -42,10 +49,10 @@
4249
<ul class="- topic/ul ">
4350
<xsl:for-each select="basecompoundref">
4451
<li class="- topic/li ">
45-
<xsl:call-template name="add-link" >
46-
<xsl:with-param name="type" select="'topic'" />
47-
<xsl:with-param name="href" select="concat('#', .)" />
48-
<xsl:with-param name="text" select="." />
52+
<xsl:call-template name="add-link">
53+
<xsl:with-param name="type" select="'topic'"/>
54+
<xsl:with-param name="href" select="concat('#', .)"/>
55+
<xsl:with-param name="text" select="."/>
4956
</xsl:call-template>
5057
</li>
5158
</xsl:for-each>
@@ -61,10 +68,10 @@
6168
<ul class="- topic/ul ">
6269
<xsl:for-each select="derivedcompoundref">
6370
<li class="- topic/li ">
64-
<xsl:call-template name="add-link" >
65-
<xsl:with-param name="type" select="'topic'" />
66-
<xsl:with-param name="href" select="concat('#', .)" />
67-
<xsl:with-param name="text" select="." />
71+
<xsl:call-template name="add-link">
72+
<xsl:with-param name="type" select="'topic'"/>
73+
<xsl:with-param name="href" select="concat('#', .)"/>
74+
<xsl:with-param name="text" select="."/>
6875
</xsl:call-template>
6976
</li>
7077
</xsl:for-each>
@@ -79,10 +86,13 @@
7986
<xsl:when test="basecompoundref/@refid">
8087
<xsl:variable name="extends" select="basecompoundref/@refid"/>
8188
<xsl:text> extends </xsl:text>
82-
<xsl:call-template name="add-link" >
83-
<xsl:with-param name="type" select="'topic'" />
84-
<xsl:with-param name="href" select="concat('#', dita-ot:name-to-id(//compounddef[@id=$extends]/compoundname))" />
85-
<xsl:with-param name="text" select="replace(basecompoundref,'^.*\.','')" />
89+
<xsl:call-template name="add-link">
90+
<xsl:with-param name="type" select="'topic'"/>
91+
<xsl:with-param
92+
name="href"
93+
select="concat('#', dita-ot:name-to-id(//compounddef[@id=$extends]/compoundname))"
94+
/>
95+
<xsl:with-param name="text" select="replace(basecompoundref,'^.*\.','')"/>
8696
</xsl:call-template>
8797
</xsl:when>
8898
<xsl:when test="basecompoundref">
@@ -95,7 +105,7 @@
95105
<xsl:if test="sectiondef[contains(@kind,'-attrib')]/memberdef[@kind='variable' and @prot='public']">
96106
<!-- Class Field Summary -->
97107
<section class="- topic/section " outputclass="fields_summary">
98-
<title class="- topic/title " >
108+
<title class="- topic/title ">
99109
<xsl:text>Field Summary</xsl:text>
100110
</title>
101111
<xsl:call-template name="add-field-summary"/>
@@ -104,18 +114,20 @@
104114
<xsl:if test="sectiondef[contains(@kind,'-func')]/memberdef[@kind='function' and type='' and @prot='public']">
105115
<!-- Class Constructor Summary -->
106116
<section class="- topic/section " outputclass="contructors_summary">
107-
<title class="- topic/title " >
117+
<title class="- topic/title ">
108118
<xsl:text>Constructor Summary</xsl:text>
109119
</title>
110120
<xsl:call-template name="add-constructor-summary"/>
111121
</section>
112122
</xsl:if>
113123
<!-- Class Method Summary -->
114124
<section class="- topic/section " outputclass="methods_summary">
115-
<title class="- topic/title " >
125+
<title class="- topic/title ">
116126
<xsl:text>Method Summary</xsl:text>
117127
</title>
118-
<xsl:if test="sectiondef[contains(@kind,'-func')]/memberdef[@kind='function' and not(type='') and @prot='public']">
128+
<xsl:if
129+
test="sectiondef[contains(@kind,'-func')]/memberdef[@kind='function' and not(type='') and @prot='public']"
130+
>
119131
<xsl:call-template name="add-method-summary"/>
120132
</xsl:if>
121133
<xsl:call-template name="add-inherited-method-summary"/>
@@ -127,10 +139,13 @@
127139
<xsl:attribute name="id">
128140
<xsl:value-of select="concat(compoundname, '_fields')"/>
129141
</xsl:attribute>
130-
<title class="- topic/title " >
142+
<title class="- topic/title ">
131143
<xsl:text>Field Detail</xsl:text>
132144
</title>
133-
<xsl:apply-templates select="sectiondef[contains(@kind,'-attrib')]/memberdef[@kind='variable' and @prot='public']" mode="field" >
145+
<xsl:apply-templates
146+
select="sectiondef[contains(@kind,'-attrib')]/memberdef[@kind='variable' and @prot='public']"
147+
mode="field"
148+
>
134149
<xsl:sort select="@id"/>
135150
</xsl:apply-templates>
136151
</section>
@@ -142,25 +157,33 @@
142157
<xsl:attribute name="id">
143158
<xsl:value-of select="concat(compoundname, '_constructors')"/>
144159
</xsl:attribute>
145-
<title class="- topic/title " >
160+
<title class="- topic/title ">
146161
<xsl:text>Constructor Detail</xsl:text>
147162
</title>
148-
<xsl:apply-templates select="sectiondef[contains(@kind,'-func')]/memberdef[@kind='function' and type='' and @prot='public']" mode="constructor" >
163+
<xsl:apply-templates
164+
select="sectiondef[contains(@kind,'-func')]/memberdef[@kind='function' and type='' and @prot='public']"
165+
mode="constructor"
166+
>
149167
<xsl:sort select="name"/>
150168
</xsl:apply-templates>
151169
</section>
152170
</xsl:if>
153171

154-
<xsl:if test="sectiondef[contains(@kind,'-func')]/memberdef[@kind='function' and not(type='') and @prot='public']">
172+
<xsl:if
173+
test="sectiondef[contains(@kind,'-func')]/memberdef[@kind='function' and not(type='') and @prot='public']"
174+
>
155175
<!-- Method Detail-->
156176
<section class="- topic/section " outputclass="methods">
157177
<xsl:attribute name="id">
158178
<xsl:value-of select="concat(compoundname, '_methods')"/>
159179
</xsl:attribute>
160-
<title class="- topic/title " >
180+
<title class="- topic/title ">
161181
<xsl:text>Method Detail</xsl:text>
162182
</title>
163-
<xsl:apply-templates select="sectiondef[contains(@kind,'-func')]/memberdef[@kind='function' and not(type='') and @prot='public']" mode="method">
183+
<xsl:apply-templates
184+
select="sectiondef[contains(@kind,'-func')]/memberdef[@kind='function' and not(type='') and @prot='public']"
185+
mode="method"
186+
>
164187
<xsl:sort select="name"/>
165188
</xsl:apply-templates>
166189
</section>
@@ -184,22 +207,26 @@
184207
</row>
185208
</thead>
186209
<tbody class="- topic/tbody ">
187-
<xsl:for-each select="sectiondef[contains(@kind,'-func')]/memberdef[@kind='function' and type='' and @prot='public']">
210+
<xsl:for-each
211+
select="sectiondef[contains(@kind,'-func')]/memberdef[@kind='function' and type='' and @prot='public']"
212+
>
188213
<xsl:sort select="name"/>
189214
<xsl:variable name="constructor" select="name"/>
190215
<row class="- topic/row ">
191-
<entry class="- topic/entry " colname="c1" align="left">
216+
<entry class="- topic/entry " colname="c1" align="left">
192217
<codeph class="+ topic/ph pr-d/codeph ">
193218
<xsl:attribute name="xtrc" select="concat('codeph:',generate-id(.),'1')"/>
194-
<xsl:call-template name="add-link" >
195-
<xsl:with-param name="type" select="'table'" />
219+
<xsl:call-template name="add-link">
220+
<xsl:with-param name="type" select="'table'"/>
196221
<xsl:with-param name="href">
197-
<xsl:value-of select="concat('#', dita-ot:name-to-id(ancestor::compounddef/compoundname), '/constructors_', $constructor)" />
222+
<xsl:value-of
223+
select="concat('#', dita-ot:name-to-id(ancestor::compounddef/compoundname), '/constructors_', $constructor)"
224+
/>
198225
<xsl:if test="count(../memberdef[name=$constructor])&gt;1">
199226
<xsl:value-of select="count(following-sibling::memberdef[name=$constructor])"/>
200227
</xsl:if>
201228
</xsl:with-param>
202-
<xsl:with-param name="text" select="$constructor" />
229+
<xsl:with-param name="text" select="$constructor"/>
203230
</xsl:call-template>
204231
<xsl:call-template name="add-signature"/>
205232
</codeph>
@@ -243,7 +270,7 @@
243270
<xsl:value-of select="count(following-sibling::memberdef[name=$constructor])"/>
244271
</xsl:if>
245272
</xsl:attribute>
246-
<xsl:call-template name="mini-table" >
273+
<xsl:call-template name="mini-table">
247274
<xsl:with-param name="header">
248275
<xsl:value-of select="$constructor"/>
249276
</xsl:with-param>
@@ -276,7 +303,7 @@
276303
<xsl:sort select="name"/>
277304
<xsl:variable name="field" select="name"/>
278305
<row class="- topic/row ">
279-
<entry class="- topic/entry " colname="c1" align="left">
306+
<entry class="- topic/entry " colname="c1" align="left">
280307
<codeph class="+ topic/ph pr-d/codeph ">
281308
<xsl:attribute name="xtrc" select="concat('codeph:',generate-id(.),'3')"/>
282309
<xsl:call-template name="add-modifiers"/>
@@ -285,18 +312,20 @@
285312
</xsl:call-template>
286313
</codeph>
287314
</entry>
288-
<entry class="- topic/entry " colname="c2" align="left">
315+
<entry class="- topic/entry " colname="c2" align="left">
289316
<codeph class="+ topic/ph pr-d/codeph ">
290317
<xsl:attribute name="xtrc" select="concat('codeph:',generate-id(.),'4')"/>
291-
<xsl:call-template name="add-link" >
292-
<xsl:with-param name="type" select="'table'" />
318+
<xsl:call-template name="add-link">
319+
<xsl:with-param name="type" select="'table'"/>
293320
<xsl:with-param name="href">
294-
<xsl:value-of select="concat('#', dita-ot:name-to-id(ancestor::compounddef/compoundname), '/fields_', $field)"/>
321+
<xsl:value-of
322+
select="concat('#', dita-ot:name-to-id(ancestor::compounddef/compoundname), '/fields_', $field)"
323+
/>
295324
<xsl:if test="count(../memberdef[name=$field])&gt;1">
296325
<xsl:value-of select="count(following-sibling::memberdef[name=$field])"/>
297326
</xsl:if>
298327
</xsl:with-param>
299-
<xsl:with-param name="text" select="$field" />
328+
<xsl:with-param name="text" select="$field"/>
300329
</xsl:call-template>
301330
</codeph>
302331
<xsl:if test="normalize-space(briefdescription)!=''">
@@ -330,7 +359,7 @@
330359
</xsl:call-template>
331360
<xsl:value-of select="concat(' ',$field)"/>
332361
</codeph>
333-
<xsl:call-template name="parse-detailed-description"/>
362+
<xsl:call-template name="parse-detailed-description"/>
334363
</xsl:variable>
335364

336365
<table class="- topic/table " outputclass="field_details">
@@ -340,7 +369,7 @@
340369
<xsl:value-of select="count(following-sibling::memberdef[name=$field])"/>
341370
</xsl:if>
342371
</xsl:attribute>
343-
<xsl:call-template name="mini-table" >
372+
<xsl:call-template name="mini-table">
344373
<xsl:with-param name="header">
345374
<xsl:value-of select="$field"/>
346375
</xsl:with-param>

Customization/xsl/enum.xsl

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,23 @@
33
This file is part of the DITA-OT Doxygen Plug-in project.
44
See the accompanying LICENSE file for applicable licenses.
55
-->
6-
<xsl:stylesheet exclude-result-prefixes="dita-ot" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
7-
xmlns:xs="http://www.w3.org/2001/XMLSchema"
8-
xmlns:dita-ot="http://dita-ot.sourceforge.net/ns/201007/dita-ot"
9-
version="2.0">
6+
<xsl:stylesheet
7+
exclude-result-prefixes="dita-ot"
8+
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
9+
xmlns:xs="http://www.w3.org/2001/XMLSchema"
10+
xmlns:dita-ot="http://dita-ot.sourceforge.net/ns/201007/dita-ot"
11+
version="2.0"
12+
>
1013

1114
<!--
1215
Enumeration Overview
1316
-->
1417
<xsl:template match="compounddef" mode="enum">
15-
<topic domains="(topic abbrev-d) a(props deliveryTarget) (topic equation-d) (topic hazard-d) (topic hi-d) (topic indexing-d) (topic markup-d) (topic mathml-d) (topic pr-d) (topic relmgmt-d) (topic sw-d) (topic svg-d) (topic ui-d) (topic ut-d) (topic markup-d xml-d)" class="- topic/topic " props="doxygen">
18+
<topic
19+
domains="(topic abbrev-d) a(props deliveryTarget) (topic equation-d) (topic hazard-d) (topic hi-d) (topic indexing-d) (topic markup-d) (topic mathml-d) (topic pr-d) (topic relmgmt-d) (topic sw-d) (topic svg-d) (topic ui-d) (topic ut-d) (topic markup-d xml-d)"
20+
class="- topic/topic "
21+
props="doxygen"
22+
>
1623
<xsl:attribute name="id">
1724
<xsl:value-of select="dita-ot:name-to-id(compoundname)"/>
1825
</xsl:attribute>
@@ -38,7 +45,7 @@
3845
<xsl:if test="sectiondef[contains(@kind,'-attrib')]/memberdef[@kind='variable']">
3946
<!-- Enumeration Constants Summary -->
4047
<section class="- topic/section " outputclass="constants_summary">
41-
<title class="- topic/title " >
48+
<title class="- topic/title ">
4249
<xsl:text>Enum constants</xsl:text>
4350
</title>
4451
<xsl:call-template name="add-constant-summary"/>
@@ -57,7 +64,7 @@
5764
<xsl:sort select="name"/>
5865
<xsl:variable name="constant" select="name"/>
5966
<li class="- topic/li ">
60-
<xsl:value-of select="$constant" />
67+
<xsl:value-of select="$constant"/>
6168
<xsl:if test="comment">
6269
<xsl:value-of select="concat (' - ',substring-before(comment,'.'),'.')"/>
6370
</xsl:if>
@@ -67,4 +74,4 @@
6774
</xsl:template>
6875

6976

70-
</xsl:stylesheet>
77+
</xsl:stylesheet>

Customization/xsl/html-processing.xsl

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@
33
This file is part of the DITA-OT Doxygen Plug-in project.
44
See the accompanying LICENSE file for applicable licenses.
55
-->
6-
<xsl:stylesheet exclude-result-prefixes="dita-ot" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
7-
xmlns:xs="http://www.w3.org/2001/XMLSchema"
8-
xmlns:dita-ot="http://dita-ot.sourceforge.net/ns/201007/dita-ot"
9-
version="2.0">
6+
<xsl:stylesheet
7+
exclude-result-prefixes="dita-ot"
8+
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
9+
xmlns:xs="http://www.w3.org/2001/XMLSchema"
10+
xmlns:dita-ot="http://dita-ot.sourceforge.net/ns/201007/dita-ot"
11+
version="2.0"
12+
>
1013

1114
<!--
1215
Iterate over all nodes - this should remove unprocessed elements
@@ -155,4 +158,4 @@
155158
</xsl:choose>
156159
</xsl:template>
157160

158-
</xsl:stylesheet>
161+
</xsl:stylesheet>

0 commit comments

Comments
 (0)