From aad284351c2915e9328079d0d7563b9c27cd4647 Mon Sep 17 00:00:00 2001 From: richard Date: Sun, 5 Mar 2000 15:45:45 +0000 Subject: [PATCH] Tidy and extend a little git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@6178 72102866-910b-0410-8b05-ffd578937521 --- GSDoc/gsdoc.gsdoc | 29 ++++++++++++++++++++++++++++- GSDoc/gsdoc.html | 47 +++++++++++++++++++++++++++++++++++++---------- GSDoc/gsdoc.m | 9 ++------- 3 files changed, 67 insertions(+), 18 deletions(-) diff --git a/GSDoc/gsdoc.gsdoc b/GSDoc/gsdoc.gsdoc index 9f044ae0e..ba10aaa37 100644 --- a/GSDoc/gsdoc.gsdoc +++ b/GSDoc/gsdoc.gsdoc @@ -108,7 +108,7 @@ (in the GNUstep project) need to devote a lot of time and effort to maintaining documentation tools.

-
+
Overall document structure

A GSDoc document consists of a head and a @@ -173,6 +173,33 @@

+ +
+ The document body +

+ 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. +

+
diff --git a/GSDoc/gsdoc.html b/GSDoc/gsdoc.html index 774dac26c..2b0b2f617 100644 --- a/GSDoc/gsdoc.html +++ b/GSDoc/gsdoc.html @@ -23,9 +23,11 @@
  • The gsdoc DTD and what it means -
  • The gsdoc conversion tool +
  • The gsdoc conversion tool

    Introduction

    @@ -113,11 +115,11 @@ (in the GNUstep project) need to devote a lot of time and effort to maintaining documentation tools.

    -

    Overall document structure

    +

    Overall document structure

    - A GSDoc document consists of a head and a - body wrapped inside the overall document + A GSDoc document consists of a head and a + body wrapped inside the overall document framework that looks like this -

    example @@ -148,7 +150,7 @@

    base -
    +
    This is optional, but recommended - it specifies the base name for the document. When the document is tranlated to another format, the outut file name should be based on this - eg. @@ -156,7 +158,7 @@ output for this file would be foo.html.
    prev -
    +
    This optional attribute may be used as the name of a document that precedes this one in logical reading order. If the converted output format of the document supports some sort of @@ -164,7 +166,7 @@ a link between the two documents.
    next -
    +
    This optional attribute may be used as the name of a document that follows this one in logical reading order. If the converted output format of the document supports some sort of @@ -172,7 +174,7 @@ a link between the two documents.
    up -
    +
    This optional attribute may be used as the name of a document that is above this document in some sort of hierarchical structure (a contents list perhaps). @@ -181,7 +183,32 @@ a link between the two documents.
    -

    The gsdoc conversion tool

    +

    The document head

    +

    + + 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. +

    +
    +
    title +
    + The title of the document. + +
    +

    The document body

    +

    + + 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. +

    +

    The gsdoc conversion tool

    The gsdoc tool is written in Objective-C and uses the GNUstep base diff --git a/GSDoc/gsdoc.m b/GSDoc/gsdoc.m index 438de9bfe..94ae0e6e5 100644 --- a/GSDoc/gsdoc.m +++ b/GSDoc/gsdoc.m @@ -1591,7 +1591,7 @@ loader(const char *url, const char* eid, xmlParserCtxtPtr *ctxt) NSLog(@"term without desc"); return nil; } - [text appendFormat: @"

    %@\r\n", [self parseDesc: node]]; + [text appendFormat: @"
    %@\r\n", [self parseDesc: node]]; node = node->next; } [text appendString: @"\r\n"]; @@ -1899,7 +1899,7 @@ loader(const char *url, const char* eid, xmlParserCtxtPtr *ctxt) else if (strcmp(node->name, "ref") == 0) { 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 *ref = [self getProp: "id" fromNode: node]; @@ -1907,11 +1907,6 @@ loader(const char *url, const char* eid, xmlParserCtxtPtr *ctxt) { elem = ref; } - if (typ == nil) - { - typ = @"label"; - } - ref = [NSString stringWithFormat: @"%@-%@", typ, ref]; [text appendString: [self addLink: ref withText: elem]]; } else if (strcmp(node->name, "uref") == 0)