Skip to content

Commit e37b569

Browse files
committed
Reflect changes in VSS's XML Template engine.
1 parent e995335 commit e37b569

File tree

3 files changed

+29
-45
lines changed

3 files changed

+29
-45
lines changed

share/gnatdoc/html/template/doc.xhtml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!DOCTYPE html>
2-
<html class='main' xmlns="http://www.w3.org/1999/xhtml" xmlns:tal="http://xml.zope.org/namespaces/tal">
2+
<html class='main' xmlns="http://www.w3.org/1999/xhtml" xmlns:tal="http://xml.adacore.com/namespaces/tal">
33
<head>
44
<link rel='stylesheet' href='gnatdoc.css'/>
55
</head>
@@ -143,19 +143,19 @@
143143
</div>
144144

145145
<h2>Description</h2>
146-
<div tal:omit-tag='' tal:content='structure gnatdoc/entity/documentation/description'>Description of the entity</div>
146+
<div tal:omit-tag='' tal:content='gnatdoc/entity/documentation/description'>Description of the entity</div>
147147

148148
<div tal:omit-tag='' tal:repeat='item gnatdoc/entity/all'>
149149
<h4 tal:content='item/name' tal:attributes='id item/id'>Entity Name</h4>
150150
<pre class='ada-code-snippet'><code xml:space='preserve' tal:content='item/code'>Source code of the entity declaration</code></pre>
151-
<div tal:omit-tag='' tal:content='structure item/documentation/description'>Description of the entity</div>
151+
<div tal:omit-tag='' tal:content='item/documentation/description'>Description of the entity</div>
152152

153153
<div tal:omit-tag='' tal:condition='item/documentation/enumeration_literals'>
154154
<h5>Enumeration Literal</h5>
155155
<dl>
156156
<div tal:omit-tag='' tal:repeat='literal item/documentation/enumeration_literals'>
157157
<dt tal:content='literal/name'>Name of the literal</dt>
158-
<dd tal:content='structure literal/description'>Description of the literal</dd>
158+
<dd tal:content='literal/description'>Description of the literal</dd>
159159
</div>
160160
</dl>
161161
</div>
@@ -165,7 +165,7 @@
165165
<dl>
166166
<div tal:omit-tag='' tal:repeat='formal item/documentation/fields'>
167167
<dt tal:content='formal/name'>Name of the field</dt>
168-
<dd tal:content='structure formal/description'>Description of the field</dd>
168+
<dd tal:content='formal/description'>Description of the field</dd>
169169
</div>
170170
</dl>
171171
</div>
@@ -175,7 +175,7 @@
175175
<dl>
176176
<div tal:omit-tag='' tal:repeat='formal item/documentation/formals'>
177177
<dt tal:content='formal/name'>name of the parameter</dt>
178-
<dd tal:content='structure formal/description'>description of the parameter</dd>
178+
<dd tal:content='formal/description'>description of the parameter</dd>
179179
</div>
180180
</dl>
181181
</div>
@@ -185,7 +185,7 @@
185185
<dl>
186186
<div tal:omit-tag='' tal:repeat='parameter item/documentation/parameters'>
187187
<dt tal:content='parameter/name'>Name of the parameter</dt>
188-
<dd tal:content='structure parameter/description'>Description of the parameter</dd>
188+
<dd tal:content='parameter/description'>Description of the parameter</dd>
189189
</div>
190190
</dl>
191191
</div>
@@ -194,7 +194,7 @@
194194
<h5>Return Value</h5>
195195
<dl>
196196
<div tal:omit-tag='' tal:repeat='return item/documentation/returns'>
197-
<dd tal:content='structure return/description'>Description of the return value</dd>
197+
<dd tal:content='return/description'>Description of the return value</dd>
198198
</div>
199199
</dl>
200200
</div>
@@ -204,7 +204,7 @@
204204
<dl>
205205
<div tal:omit-tag='' tal:repeat='exception item/documentation/exceptions'>
206206
<dt tal:content='exception/name'>name of the exception</dt>
207-
<dd tal:content='structure exception/description'>description of the exception</dd>
207+
<dd tal:content='exception/description'>description of the exception</dd>
208208
</div>
209209
</dl>
210210
</div>

share/gnatdoc/html/template/index.xhtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!DOCTYPE html>
2-
<html class='main' xmlns="http://www.w3.org/1999/xhtml" xmlns:tal="http://xml.zope.org/namespaces/tal">
2+
<html class='main' xmlns="http://www.w3.org/1999/xhtml" xmlns:tal="http://xml.adacore.com/namespaces/tal">
33
<head>
44
<link rel='stylesheet' href='gnatdoc.css'/>
55
</head>

source/backend/gnatdoc-comments-proxies.adb

Lines changed: 19 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
with VSS.XML.Event_Vectors;
1919
with VSS.XML.Templates.Proxies.Strings;
20+
with VSS.XML.Templates.Values;
2021

2122
with GNATdoc.Backend.HTML_Markup;
2223

@@ -65,19 +66,14 @@ package body GNATdoc.Comments.Proxies is
6566
Name : VSS.Strings.Virtual_String)
6667
return VSS.XML.Templates.Proxies.Abstract_Proxy'Class;
6768

68-
type Text_Markup_Proxy is
69-
limited new VSS.XML.Templates.Proxies.Abstract_Text_Content_Proxy
70-
and VSS.XML.Templates.Proxies.Abstract_Structure_Content_Proxy with
69+
type Markup_Proxy is
70+
limited new VSS.XML.Templates.Proxies.Abstract_Value_Proxy with
7171
record
72-
Text : VSS.String_Vectors.Virtual_String_Vector;
7372
Markup : VSS.XML.Event_Vectors.Vector;
7473
end record;
7574

76-
overriding function Content
77-
(Self : Text_Markup_Proxy) return VSS.Strings.Virtual_String;
78-
79-
overriding function Content
80-
(Self : in out Text_Markup_Proxy) return VSS.XML.Event_Vectors.Vector;
75+
overriding function Value
76+
(Self : Markup_Proxy) return VSS.XML.Templates.Values.Value;
8177

8278
---------------
8379
-- Component --
@@ -126,9 +122,8 @@ package body GNATdoc.Comments.Proxies is
126122
end loop;
127123

128124
return
129-
Text_Markup_Proxy'
130-
(Text => Text,
131-
Markup => GNATdoc.Backend.HTML_Markup.Build_Markup (Text));
125+
Markup_Proxy'
126+
(Markup => GNATdoc.Backend.HTML_Markup.Build_Markup (Text));
132127
end;
133128

134129
elsif Name = "enumeration_literals" then
@@ -176,9 +171,8 @@ package body GNATdoc.Comments.Proxies is
176171

177172
elsif Name = "description" then
178173
return
179-
Text_Markup_Proxy'
180-
(Text => Self.Section.Text,
181-
Markup =>
174+
Markup_Proxy'
175+
(Markup =>
182176
GNATdoc.Backend.HTML_Markup.Build_Markup (Self.Section.Text));
183177

184178
else
@@ -188,26 +182,6 @@ package body GNATdoc.Comments.Proxies is
188182
end if;
189183
end Component;
190184

191-
-------------
192-
-- Content --
193-
-------------
194-
195-
overriding function Content
196-
(Self : Text_Markup_Proxy) return VSS.Strings.Virtual_String is
197-
begin
198-
return Self.Text.Join_Lines (VSS.Strings.LF);
199-
end Content;
200-
201-
-------------
202-
-- Content --
203-
-------------
204-
205-
overriding function Content
206-
(Self : in out Text_Markup_Proxy) return VSS.XML.Event_Vectors.Vector is
207-
begin
208-
return Self.Markup;
209-
end Content;
210-
211185
-------------
212186
-- Element --
213187
-------------
@@ -261,4 +235,14 @@ package body GNATdoc.Comments.Proxies is
261235
return Section_Vectors.Has_Element (Self.Position);
262236
end Next;
263237

238+
-----------
239+
-- Value --
240+
-----------
241+
242+
overriding function Value
243+
(Self : Markup_Proxy) return VSS.XML.Templates.Values.Value is
244+
begin
245+
return (VSS.XML.Templates.Values.Content, Self.Markup);
246+
end Value;
247+
264248
end GNATdoc.Comments.Proxies;

0 commit comments

Comments
 (0)