mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Minor fixes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@6179 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
d2d7ab2c7e
commit
6b575b7a2b
3 changed files with 158 additions and 32 deletions
|
@ -15,6 +15,7 @@
|
|||
<abstract>
|
||||
This documents the GNUstep Documentation markup language and tools
|
||||
</abstract>
|
||||
<copy>Free Software Foundation, Inc.</copy>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
@ -182,11 +183,61 @@
|
|||
The title and at least one author are the only parts of the
|
||||
document head that must be present.
|
||||
</p>
|
||||
<example>
|
||||
<head>
|
||||
<title>GNUstep Documentation XML markup language (GSDoc)</title>
|
||||
<author name="Richard Frith-Macdonald">
|
||||
<email address="rfm@gnu.org"/>
|
||||
<url url="http://www.gnustep.org/developers/whoiswho.html"/>
|
||||
<desc>
|
||||
A person who has devotes far too much time to GNUstep development.
|
||||
</desc>
|
||||
</author>
|
||||
<version>0.1</version>
|
||||
<date>4 march, 2000</date>
|
||||
<abstract>
|
||||
This documents the GNUstep Documentation markup language and tools
|
||||
</abstract>
|
||||
<copy>Free Software Foundation, Inc.</copy>
|
||||
</head>
|
||||
</example>
|
||||
<p>
|
||||
The above axample shows all the elements possible in a document head -
|
||||
</p>
|
||||
<deflist>
|
||||
<term><label id="title">title</label></term>
|
||||
<desc>
|
||||
The title of the document.
|
||||
</desc>
|
||||
<term><label id="author">author</label></term>
|
||||
<desc>
|
||||
<p>
|
||||
The author of the document, also specifying an email address at
|
||||
which the author may be reached, a URL for a web page giving
|
||||
some information about the author, and an additional description
|
||||
of the author.
|
||||
</p>
|
||||
<p>
|
||||
Of course, a document may have more than one author, in which
|
||||
case you simply write multiple author elements.
|
||||
</p>
|
||||
</desc>
|
||||
<term><label id="version">version</label></term>
|
||||
<desc>
|
||||
The version number of the document.
|
||||
</desc>
|
||||
<term><label id="date">date</label></term>
|
||||
<desc>
|
||||
The date at which the document was last modified.
|
||||
</desc>
|
||||
<term><label id="abstract">abstract</label></term>
|
||||
<desc>
|
||||
A <em>short</em> description of the document contents.
|
||||
</desc>
|
||||
<term><label id="copy">copy</label></term>
|
||||
<desc>
|
||||
The copyright owner of the document.
|
||||
</desc>
|
||||
</deflist>
|
||||
</section>
|
||||
<section id="body">
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
<blockquote>
|
||||
This documents the GNUstep Documentation markup language and tools
|
||||
</blockquote>
|
||||
<p>Copyright: Free Software Foundation, Inc.</p>
|
||||
<h1>Contents</h1>
|
||||
<ul>
|
||||
<li><a href="#cont-0">Introduction</a>
|
||||
|
@ -156,6 +157,12 @@
|
|||
format, the outut file name should be based on this - eg.
|
||||
if the base name of a document is <em>foo</em> then an html
|
||||
output for this file would be <em>foo.html</em>.
|
||||
<em>foo</em> then an html
|
||||
output for this file would be <em>foo.html</em>.
|
||||
then an html
|
||||
output for this file would be <em>foo.html</em>.
|
||||
<em>foo.html</em>.
|
||||
.
|
||||
|
||||
<dt>prev
|
||||
<dd>
|
||||
|
@ -192,11 +199,74 @@
|
|||
The title and at least one author are the only parts of the
|
||||
document head that must be present.
|
||||
</p>
|
||||
<a name="label-1">example</a>
|
||||
<pre>
|
||||
|
||||
<head>
|
||||
<title>GNUstep Documentation XML markup language (GSDoc)</title>
|
||||
<author name="Richard Frith-Macdonald">
|
||||
<email address="rfm@gnu.org"/>
|
||||
<url url="http://www.gnustep.org/developers/whoiswho.html"/>
|
||||
<desc>
|
||||
A person who has devotes far too much time to GNUstep development.
|
||||
</desc>
|
||||
</author>
|
||||
<version>0.1</version>
|
||||
<date>4 march, 2000</date>
|
||||
<abstract>
|
||||
This documents the GNUstep Documentation markup language and tools
|
||||
</abstract>
|
||||
<copy>Free Software Foundation, Inc.</copy>
|
||||
</head>
|
||||
|
||||
</pre>
|
||||
<p>
|
||||
|
||||
The above axample shows all the elements possible in a document head -
|
||||
</p>
|
||||
<dl>
|
||||
<dt><a name="title">title</a>
|
||||
<dd>
|
||||
The title of the document.
|
||||
|
||||
<dt><a name="author">author</a>
|
||||
<dd>
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
The author of the document, also specifying an email address at
|
||||
which the author may be reached, a URL for a web page giving
|
||||
some information about the author, and an additional description
|
||||
of the author.
|
||||
</p>
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Of course, a document may have more than one author, in which
|
||||
case you simply write multiple author elements.
|
||||
</p>
|
||||
|
||||
|
||||
<dt><a name="version">version</a>
|
||||
<dd>
|
||||
The version number of the document.
|
||||
|
||||
<dt><a name="date">date</a>
|
||||
<dd>
|
||||
The date at which the document was last modified.
|
||||
|
||||
<dt><a name="abstract">abstract</a>
|
||||
<dd>
|
||||
A <em>short</em> description of the document contents.
|
||||
<em>short</em> description of the document contents.
|
||||
description of the document contents.
|
||||
|
||||
<dt><a name="copy">copy</a>
|
||||
<dd>
|
||||
The copyright owner of the document.
|
||||
|
||||
</dl>
|
||||
<h3><a name="body">The document body</a></h3>
|
||||
<p>
|
||||
|
|
|
@ -1224,42 +1224,47 @@ loader(const char *url, const char* eid, xmlParserCtxtPtr *ctxt)
|
|||
|
||||
- (NSString*) parseDesc: (xmlNodePtr)node
|
||||
{
|
||||
NSMutableString *text = [NSMutableString string];
|
||||
|
||||
node = node->childs;
|
||||
if (node == 0)
|
||||
{
|
||||
return @"";
|
||||
}
|
||||
|
||||
if (strcmp(node->name, "list") == 0
|
||||
|| strcmp(node->name, "enum") == 0
|
||||
|| strcmp(node->name, "deflist") == 0
|
||||
|| strcmp(node->name, "qalist") == 0)
|
||||
while (node != 0)
|
||||
{
|
||||
return [self parseList: node];
|
||||
}
|
||||
|
||||
if (strcmp(node->name, "p") == 0)
|
||||
{
|
||||
NSString *elem = [self parseText: node->childs];
|
||||
|
||||
if (elem == nil)
|
||||
if (strcmp(node->name, "list") == 0
|
||||
|| strcmp(node->name, "enum") == 0
|
||||
|| strcmp(node->name, "deflist") == 0
|
||||
|| strcmp(node->name, "qalist") == 0)
|
||||
{
|
||||
return nil;
|
||||
[text appendString: [self parseList: node]];
|
||||
}
|
||||
return [NSString stringWithFormat: @"<p>\r\n%@</p>\r\n", elem];
|
||||
}
|
||||
else if (strcmp(node->name, "p") == 0)
|
||||
{
|
||||
NSString *elem = [self parseText: node->childs];
|
||||
|
||||
if (strcmp(node->name, "example") == 0)
|
||||
{
|
||||
return [self parseExample: node];
|
||||
}
|
||||
if (elem != nil)
|
||||
{
|
||||
[text appendFormat: @"<p>\r\n%@</p>\r\n", elem];
|
||||
}
|
||||
}
|
||||
else if (strcmp(node->name, "example") == 0)
|
||||
{
|
||||
[text appendString: [self parseExample: node]];
|
||||
}
|
||||
else if (strcmp(node->name, "embed") == 0)
|
||||
{
|
||||
[text appendString: [self parseEmbed: node]];
|
||||
}
|
||||
else
|
||||
{
|
||||
[text appendString: [self parseText: node]];
|
||||
}
|
||||
|
||||
if (strcmp(node->name, "embed") == 0)
|
||||
{
|
||||
return [self parseEmbed: node];
|
||||
node = node->next;
|
||||
}
|
||||
|
||||
return [self parseText: node];
|
||||
return text;
|
||||
}
|
||||
|
||||
- (NSString*) parseDocument
|
||||
|
@ -1484,13 +1489,6 @@ loader(const char *url, const char* eid, xmlParserCtxtPtr *ctxt)
|
|||
[text appendFormat: @"<p>Date: %@</p>\r\n", date];
|
||||
}
|
||||
|
||||
if (node != 0 && strcmp(node->name, "copy") == 0)
|
||||
{
|
||||
copyright = [self parseText: node->childs];
|
||||
node = node->next;
|
||||
[text appendFormat: @"<p>Copyright: %@</p>\r\n", copyright];
|
||||
}
|
||||
|
||||
if (node != 0 && strcmp(node->name, "abstract") == 0)
|
||||
{
|
||||
abstract = [self parseText: node->childs];
|
||||
|
@ -1498,6 +1496,13 @@ loader(const char *url, const char* eid, xmlParserCtxtPtr *ctxt)
|
|||
[text appendFormat: @"<blockquote>%@</blockquote>\r\n", abstract];
|
||||
}
|
||||
|
||||
if (node != 0 && strcmp(node->name, "copy") == 0)
|
||||
{
|
||||
copyright = [self parseText: node->childs];
|
||||
node = node->next;
|
||||
[text appendFormat: @"<p>Copyright: %@</p>\r\n", copyright];
|
||||
}
|
||||
|
||||
return text;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue