mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +00:00
Tidy and extend a little
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@6178 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
721c313d2b
commit
aad284351c
3 changed files with 67 additions and 18 deletions
|
@ -108,7 +108,7 @@
|
||||||
(in the GNUstep project) need to devote a lot of time and effort
|
(in the GNUstep project) need to devote a lot of time and effort
|
||||||
to maintaining documentation tools.
|
to maintaining documentation tools.
|
||||||
</p>
|
</p>
|
||||||
<section>
|
<section id="gsdoc">
|
||||||
<heading>Overall document structure</heading>
|
<heading>Overall document structure</heading>
|
||||||
<p>
|
<p>
|
||||||
A GSDoc document consists of a <ref id="head">head</ref> and a
|
A GSDoc document consists of a <ref id="head">head</ref> and a
|
||||||
|
@ -173,6 +173,33 @@
|
||||||
</desc>
|
</desc>
|
||||||
</deflist>
|
</deflist>
|
||||||
</section>
|
</section>
|
||||||
|
<section id="head">
|
||||||
|
<heading>The document head</heading>
|
||||||
|
<p>
|
||||||
|
The document head contains information about the document as
|
||||||
|
a whole: its title, authors, version, modification date,
|
||||||
|
copyright, and perhaps an abstract of its contents.
|
||||||
|
The title and at least one author are the only parts of the
|
||||||
|
document head that must be present.
|
||||||
|
</p>
|
||||||
|
<deflist>
|
||||||
|
<term><label id="title">title</label></term>
|
||||||
|
<desc>
|
||||||
|
The title of the document.
|
||||||
|
</desc>
|
||||||
|
</deflist>
|
||||||
|
</section>
|
||||||
|
<section id="body">
|
||||||
|
<heading>The document body</heading>
|
||||||
|
<p>
|
||||||
|
The document body contains the main part of the document, it
|
||||||
|
consists of an optional front part (for contents pages, overview
|
||||||
|
etc), a sequence of any number of chapters, and an optional back
|
||||||
|
part (for indexes, appendices etc). Normally, each of these three
|
||||||
|
parts of the document woudl be expected to have their own separate
|
||||||
|
page numbering schemes.
|
||||||
|
</p>
|
||||||
|
</section>
|
||||||
</chapter>
|
</chapter>
|
||||||
|
|
||||||
<chapter>
|
<chapter>
|
||||||
|
|
|
@ -23,9 +23,11 @@
|
||||||
</ul>
|
</ul>
|
||||||
<li><a href="#cont-2">The gsdoc DTD and what it means</a>
|
<li><a href="#cont-2">The gsdoc DTD and what it means</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#cont-3">Overall document structure</a>
|
<li><a href="#gsdoc">Overall document structure</a>
|
||||||
|
<li><a href="#head">The document head</a>
|
||||||
|
<li><a href="#body">The document body</a>
|
||||||
</ul>
|
</ul>
|
||||||
<li><a href="#cont-4">The gsdoc conversion tool</a>
|
<li><a href="#cont-3">The gsdoc conversion tool</a>
|
||||||
</ul>
|
</ul>
|
||||||
<h2><a name="cont-0">Introduction</a></h2>
|
<h2><a name="cont-0">Introduction</a></h2>
|
||||||
<p>
|
<p>
|
||||||
|
@ -113,11 +115,11 @@
|
||||||
(in the GNUstep project) need to devote a lot of time and effort
|
(in the GNUstep project) need to devote a lot of time and effort
|
||||||
to maintaining documentation tools.
|
to maintaining documentation tools.
|
||||||
</p>
|
</p>
|
||||||
<h3><a name="cont-3">Overall document structure</a></h3>
|
<h3><a name="gsdoc">Overall document structure</a></h3>
|
||||||
<p>
|
<p>
|
||||||
|
|
||||||
A GSDoc document consists of a <a href="#label-head">head</a> and a
|
A GSDoc document consists of a <a href="#head">head</a> and a
|
||||||
<a href="#label-body">body</a> wrapped inside the overall document
|
<a href="#body">body</a> wrapped inside the overall document
|
||||||
framework that looks like this -
|
framework that looks like this -
|
||||||
</p>
|
</p>
|
||||||
<a name="label-0">example</a>
|
<a name="label-0">example</a>
|
||||||
|
@ -148,7 +150,7 @@
|
||||||
</p>
|
</p>
|
||||||
<dl>
|
<dl>
|
||||||
<dt>base
|
<dt>base
|
||||||
<dt>
|
<dd>
|
||||||
This is optional, but recommended - it specifies the base name
|
This is optional, but recommended - it specifies the base name
|
||||||
for the document. When the document is tranlated to another
|
for the document. When the document is tranlated to another
|
||||||
format, the outut file name should be based on this - eg.
|
format, the outut file name should be based on this - eg.
|
||||||
|
@ -156,7 +158,7 @@
|
||||||
output for this file would be <em>foo.html</em>.
|
output for this file would be <em>foo.html</em>.
|
||||||
|
|
||||||
<dt>prev
|
<dt>prev
|
||||||
<dt>
|
<dd>
|
||||||
This optional attribute may be used as the name of a document
|
This optional attribute may be used as the name of a document
|
||||||
that precedes this one in logical reading order. If the
|
that precedes this one in logical reading order. If the
|
||||||
converted output format of the document supports some sort of
|
converted output format of the document supports some sort of
|
||||||
|
@ -164,7 +166,7 @@
|
||||||
a link between the two documents.
|
a link between the two documents.
|
||||||
|
|
||||||
<dt>next
|
<dt>next
|
||||||
<dt>
|
<dd>
|
||||||
This optional attribute may be used as the name of a document
|
This optional attribute may be used as the name of a document
|
||||||
that follows this one in logical reading order. If the
|
that follows this one in logical reading order. If the
|
||||||
converted output format of the document supports some sort of
|
converted output format of the document supports some sort of
|
||||||
|
@ -172,7 +174,7 @@
|
||||||
a link between the two documents.
|
a link between the two documents.
|
||||||
|
|
||||||
<dt>up
|
<dt>up
|
||||||
<dt>
|
<dd>
|
||||||
This optional attribute may be used as the name of a document
|
This optional attribute may be used as the name of a document
|
||||||
that is above this document in some sort of hierarchical
|
that is above this document in some sort of hierarchical
|
||||||
structure (a contents list perhaps).
|
structure (a contents list perhaps).
|
||||||
|
@ -181,7 +183,32 @@
|
||||||
a link between the two documents.
|
a link between the two documents.
|
||||||
|
|
||||||
</dl>
|
</dl>
|
||||||
<h2><a name="cont-4">The gsdoc conversion tool</a></h2>
|
<h3><a name="head">The document head</a></h3>
|
||||||
|
<p>
|
||||||
|
|
||||||
|
The document head contains information about the document as
|
||||||
|
a whole: its title, authors, version, modification date,
|
||||||
|
copyright, and perhaps an abstract of its contents.
|
||||||
|
The title and at least one author are the only parts of the
|
||||||
|
document head that must be present.
|
||||||
|
</p>
|
||||||
|
<dl>
|
||||||
|
<dt><a name="title">title</a>
|
||||||
|
<dd>
|
||||||
|
The title of the document.
|
||||||
|
|
||||||
|
</dl>
|
||||||
|
<h3><a name="body">The document body</a></h3>
|
||||||
|
<p>
|
||||||
|
|
||||||
|
The document body contains the main part of the document, it
|
||||||
|
consists of an optional front part (for contents pages, overview
|
||||||
|
etc), a sequence of any number of chapters, and an optional back
|
||||||
|
part (for indexes, appendices etc). Normally, each of these three
|
||||||
|
parts of the document woudl be expected to have their own separate
|
||||||
|
page numbering schemes.
|
||||||
|
</p>
|
||||||
|
<h2><a name="cont-3">The gsdoc conversion tool</a></h2>
|
||||||
<p>
|
<p>
|
||||||
|
|
||||||
The gsdoc tool is written in Objective-C and uses the GNUstep base
|
The gsdoc tool is written in Objective-C and uses the GNUstep base
|
||||||
|
|
|
@ -1591,7 +1591,7 @@ loader(const char *url, const char* eid, xmlParserCtxtPtr *ctxt)
|
||||||
NSLog(@"term without desc");
|
NSLog(@"term without desc");
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
[text appendFormat: @"<dt>%@\r\n", [self parseDesc: node]];
|
[text appendFormat: @"<dd>%@\r\n", [self parseDesc: node]];
|
||||||
node = node->next;
|
node = node->next;
|
||||||
}
|
}
|
||||||
[text appendString: @"</dl>\r\n"];
|
[text appendString: @"</dl>\r\n"];
|
||||||
|
@ -1899,7 +1899,7 @@ loader(const char *url, const char* eid, xmlParserCtxtPtr *ctxt)
|
||||||
else if (strcmp(node->name, "ref") == 0)
|
else if (strcmp(node->name, "ref") == 0)
|
||||||
{
|
{
|
||||||
NSString *elem = [self parseText: node->childs];
|
NSString *elem = [self parseText: node->childs];
|
||||||
NSString *typ = [self getProp: "type" fromNode: node];
|
// NSString *typ = [self getProp: "type" fromNode: node];
|
||||||
// NSString *cls = [self getProp: "class" fromNode: node];
|
// NSString *cls = [self getProp: "class" fromNode: node];
|
||||||
NSString *ref = [self getProp: "id" fromNode: node];
|
NSString *ref = [self getProp: "id" fromNode: node];
|
||||||
|
|
||||||
|
@ -1907,11 +1907,6 @@ loader(const char *url, const char* eid, xmlParserCtxtPtr *ctxt)
|
||||||
{
|
{
|
||||||
elem = ref;
|
elem = ref;
|
||||||
}
|
}
|
||||||
if (typ == nil)
|
|
||||||
{
|
|
||||||
typ = @"label";
|
|
||||||
}
|
|
||||||
ref = [NSString stringWithFormat: @"%@-%@", typ, ref];
|
|
||||||
[text appendString: [self addLink: ref withText: elem]];
|
[text appendString: [self addLink: ref withText: elem]];
|
||||||
}
|
}
|
||||||
else if (strcmp(node->name, "uref") == 0)
|
else if (strcmp(node->name, "uref") == 0)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue