Updates to support detailed versioning of methods etc in documentation.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@21202 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
CaS 2005-05-08 20:14:19 +00:00
parent 1c1bead0fd
commit 7cb1df3b30
10 changed files with 822 additions and 5320 deletions

View file

@ -1,3 +1,20 @@
2005-05-08 Richard Frith-Macdonald <rfm@gnu.org>
* Tools/AGSHtml.h: Support versioning info instead of standards
* Tools/AGSHtml.m: ditto
* Tools/AGSOutput.m: ditto
* Tools/AGSParser.m: ditto
* Tools/GNUmakefile: Add new dtd and remove old tool.
* Tools/autogsdoc.m: ditto
* Tools/gsdoc-1_0_2.dtd: ditto
* Tools/gsdoc.m: Remove obsolete tool.
* Tools/gsdoc.gsdoc: Updated
Changes to support OpenStep/OPENSTEP/MacOS-X versioning and
GNUstep versioning, using add/rem attributes to specify the
version at which a feature was added to or removed from the
API. Drop the old 'standards' mechanism which was too rigid
for detailed versioning.
2005-05-08 14:11 Gregory John Casamento <greg_casamento@yahoo.com>
* Source/NSPropertyList.m: Corrected setup so that compilation

View file

@ -72,6 +72,7 @@
- (GSXMLNode*) outputList: (GSXMLNode*)node to: (NSMutableString*)buf;
- (GSXMLNode*) outputText: (GSXMLNode*)node to: (NSMutableString*)buf;
- (void) outputUnit: (GSXMLNode*)node to: (NSMutableString*)buf;
- (void) outputVersion: (NSDictionary*)prop to: (NSMutableString*)buf;
- (NSString*) protocolRef: (NSString*)t;
- (void) setGlobalRefs: (AGSIndex*)r;
- (void) setLocalRefs: (AGSIndex*)r;

View file

@ -702,8 +702,9 @@ static NSString *mainFont = nil;
children = node;
if ([[children name] isEqual: @"standards"])
{
[self outputNode: children to: buf];
node = [node nextElement];
}
[self outputVersion: prop to: buf];
if ([[node name] isEqual: @"desc"])
{
@ -1021,8 +1022,9 @@ static NSString *mainFont = nil;
children = node;
if ([[children name] isEqual: @"standards"])
{
[self outputNode: children to: buf];
node = [node nextElement];
}
[self outputVersion: prop to: buf];
if ([[node name] isEqual: @"desc"])
{
@ -1320,10 +1322,7 @@ static NSString *mainFont = nil;
/*
* List standards with which ivar complies
*/
if ([[children name] isEqual: @"standards"])
{
[self outputNode: children to: buf];
}
[self outputVersion: prop to: buf];
if ([[tmp name] isEqual: @"desc"])
{
[self outputNode: tmp to: buf];
@ -1449,8 +1448,9 @@ static NSString *mainFont = nil;
children = node;
if ([[children name] isEqual: @"standards"])
{
[self outputNode: children to: buf];
node = [node nextElement];
}
[self outputVersion: prop to: buf];
if ([[node name] isEqual: @"desc"])
{
@ -1584,11 +1584,12 @@ static NSString *mainFont = nil;
/*
* List standards with which method complies
*/
children = firstElement(node);
children = node;
if ([[children name] isEqual: @"standards"])
{
[self outputNode: children to: buf];
node = [node nextElement];
}
[self outputVersion: prop to: buf];
if ((str = [prop objectForKey: @"init"]) != nil
&& [str boolValue] == YES)
@ -1724,32 +1725,6 @@ static NSString *mainFont = nil;
}
else if ([name isEqual: @"standards"])
{
GSXMLNode *tmp = [node firstChild];
BOOL first = YES;
if (tmp != nil)
{
[buf appendString: indent];
[buf appendString: @"<b>Standards:</b>"];
while (tmp != nil)
{
if ([tmp type] == XML_ELEMENT_NODE)
{
if (first == YES)
{
first = NO;
[buf appendString: @" "];
}
else
{
[buf appendString: @", "];
}
[buf appendString: [tmp name]];
}
tmp = [tmp nextElement];
}
[buf appendString: @"<br />\n"];
}
}
else if ([name isEqual: @"strong"] == YES)
{
@ -1815,8 +1790,9 @@ static NSString *mainFont = nil;
children = node;
if ([[children name] isEqual: @"standards"])
{
[self outputNode: children to: buf];
node = [node nextElement];
}
[self outputVersion: prop to: buf];
if (node != nil && [[node name] isEqual: @"desc"] == YES)
{
@ -1893,8 +1869,9 @@ static NSString *mainFont = nil;
children = node;
if ([[children name] isEqual: @"standards"])
{
[self outputNode: children to: buf];
node = [node nextElement];
}
[self outputVersion: prop to: buf];
if ([[node name] isEqual: @"desc"])
{
@ -2250,10 +2227,10 @@ static NSString *mainFont = nil;
- (void) outputUnit: (GSXMLNode*)node to: (NSMutableString*)buf
{
GSXMLNode *t;
NSArray *a;
NSMutableString *ivarBuf = ivarsAtEnd ?
[NSMutableString stringWithCapacity: 1024] : nil;
NSDictionary *prop = [node attributes];
node = [node firstChildElement];
if (node != nil && [[node name] isEqual: @"declared"] == YES)
@ -2291,40 +2268,11 @@ static NSString *mainFont = nil;
[buf appendString: @"</blockquote>\n"];
}
t = node;
while (t != nil && [[t name] isEqual: @"standards"] == NO)
while (node != nil && [[node name] isEqual: @"desc"] == NO)
{
t = [t nextElement];
}
if (t != nil && [t firstChild] != nil)
{
t = [t firstChild];
[buf appendString: indent];
[buf appendString: @"<blockquote>\n"];
[self incIndent];
[buf appendString: indent];
[buf appendString: @"<b>Standards:</b>\n"];
[buf appendString: indent];
[buf appendString: @"<ul>\n"];
[self incIndent];
while (t != nil)
{
if ([t type] == XML_ELEMENT_NODE)
{
[buf appendString: indent];
[buf appendString: @"<li>"];
[buf appendString: [t name]];
[buf appendString: @"</li>\n"];
}
t = [t nextElement];
}
[self decIndent];
[buf appendString: indent];
[buf appendString: @"</ul>\n"];
[self decIndent];
[buf appendString: indent];
[buf appendString: @"</blockquote>\n"];
node = [node nextElement];
}
[self outputVersion: prop to: buf];
if (node != nil && [[node name] isEqual: @"desc"] == YES)
{
@ -2394,6 +2342,79 @@ static NSString *mainFont = nil;
}
}
- (void) outputVersion: (NSDictionary*)prop to: (NSMutableString*)buf
{
NSString *ovadd = [prop objectForKey: @"ovadd"];
NSString *gvadd = [prop objectForKey: @"gvadd"];
NSString *ovrem = [prop objectForKey: @"ovrem"];
NSString *gvrem = [prop objectForKey: @"gvrem"];
if ([ovadd length] > 0)
{
int add = [ovadd intValue];
int rem = [ovrem intValue];
[buf appendString: indent];
[buf appendString: @"<b>Standards:</b>"];
if (add < 4)
{
[buf appendString: @" OpenStep"];
}
else if (add < 10)
{
[buf appendString: @" OPENSTEP "];
[buf appendString: ovadd];
}
else
{
[buf appendString: @" MacOS-X "];
[buf appendString: ovadd];
}
if (rem > add)
{
[buf appendString: @" removed at "];
if (add < 4)
{
[buf appendString: @" OpenStep"];
}
else if (add < 10)
{
[buf appendString: @" OPENSTEP "];
[buf appendString: ovadd];
}
else
{
[buf appendString: @" MacOS-X "];
[buf appendString: ovadd];
}
}
if ([gvadd length] > 0)
{
[buf appendString: @", GNUstep "];
[buf appendString: gvadd];
if ([gvrem length] > 0)
{
[buf appendString: @" removed at "];
[buf appendString: gvrem];
}
}
[buf appendString: @"<br />\n"];
}
else if ([gvadd length] > 0)
{
[buf appendString: indent];
[buf appendString: @"<b>Standards:</b>"];
[buf appendString: @"GNUstep "];
[buf appendString: gvadd];
if ([gvrem length] > 0)
{
[buf appendString: @" removed at "];
[buf appendString: gvrem];
}
[buf appendString: @"<br />\n"];
}
}
/**
* Try to make a link to the documentation for the supplied protocol.
*/

View file

@ -85,6 +85,14 @@ static BOOL snuggleStart(NSString *t)
*/
@implementation AGSOutput
- (void) appendVersions: (NSString*)versions to: (NSMutableString*)str
{
if ([versions length] > 0)
{
[str appendString: versions];
}
}
- (NSString*) checkComment: (NSString*)comment
unit: (NSString*)unit
info: (NSDictionary*)d
@ -288,8 +296,8 @@ static BOOL snuggleStart(NSString *t)
[str appendString: @"<?xml version=\"1.0\"?>\n"];
[str appendString: @"<!DOCTYPE gsdoc PUBLIC "];
[str appendString: @"\"-//GNUstep//DTD gsdoc 1.0.1//EN\" "];
[str appendString: @"\"http://www.gnustep.org/gsdoc-1_0_1.xml\">\n"];
[str appendString: @"\"-//GNUstep//DTD gsdoc 1.0.2//EN\" "];
[str appendString: @"\"http://www.gnustep.org/gsdoc-1_0_2.xml\">\n"];
[str appendFormat: @"<gsdoc"];
if (base != nil)
@ -687,16 +695,11 @@ static BOOL snuggleStart(NSString *t)
NSString *name = [d objectForKey: @"Name"];
NSString *comment = [d objectForKey: @"Comment"];
NSString *declared = [d objectForKey: @"Declared"];
NSString *standards = nil;
if (warn == YES && [[d objectForKey: @"Implemented"] isEqual: @"YES"] == NO)
{
NSLog(@"Warning ... %@ %@ is not implemented where expected", kind, name);
}
if (standards == nil)
{
standards = [d objectForKey: @"Standards"];
}
[str appendFormat: @" <%@ type=\"", kind];
[str appendString: escapeType(type)];
@ -706,7 +709,9 @@ static BOOL snuggleStart(NSString *t)
}
[str appendString: @"\" name=\""];
[str appendString: name];
[str appendString: @"\">\n"];
[str appendString: @"\""];
[self appendVersions: [d objectForKey: @"Versions"] to: str];
[str appendString: @">\n"];
if (declared != nil)
{
@ -719,10 +724,6 @@ static BOOL snuggleStart(NSString *t)
comment = [self checkComment: comment unit: nil info: d];
[self reformat: comment withIndent: 10 to: str];
[str appendString: @" </desc>\n"];
if (standards != nil)
{
[self reformat: standards withIndent: 8 to: str];
}
[str appendFormat: @" </%@>\n", kind];
}
@ -737,7 +738,6 @@ static BOOL snuggleStart(NSString *t)
NSString *name = [d objectForKey: @"Name"];
NSString *comment = [d objectForKey: @"Comment"];
NSString *declared = [d objectForKey: @"Declared"];
NSString *standards = nil;
unsigned i = [aa count];
if (warn == YES && [[d objectForKey: @"Implemented"] isEqual: @"YES"] == NO)
@ -769,51 +769,6 @@ static BOOL snuggleStart(NSString *t)
}
}
/**
* Check special markup which should be removed from the text
* actually placed in the gsdoc method documentation ... the
* special markup is included in the gsdoc markup differently.
*/
if (comment != nil)
{
NSMutableString *m = nil;
NSRange r;
r = [comment rangeOfString: @"<standards>"];
if (r.length > 0)
{
unsigned i = r.location;
r = NSMakeRange(i, [comment length] - i);
r = [comment rangeOfString: @"</standards>"
options: NSLiteralSearch
range: r];
if (r.length > 0)
{
r = NSMakeRange(i, NSMaxRange(r) - i);
standards = [comment substringWithRange: r];
if (m == nil)
{
m = [comment mutableCopy];
}
[m deleteCharactersInRange: r];
comment = m;
}
else
{
NSLog(@"unterminated <standards> in comment for %@", name);
}
}
if (m != nil)
{
AUTORELEASE(m);
}
}
if (standards == nil)
{
standards = [d objectForKey: @"Standards"];
}
[str appendString: @" <function type=\""];
[str appendString: escapeType(type)];
if ([pref length] > 0)
@ -822,7 +777,9 @@ static BOOL snuggleStart(NSString *t)
}
[str appendString: @"\" name=\""];
[str appendString: name];
[str appendString: @"\">\n"];
[str appendString: @"\""];
[self appendVersions: [d objectForKey: @"Versions"] to: str];
[str appendString: @">\n"];
for (i = 0; i < [aa count]; i++)
{
@ -861,10 +818,6 @@ static BOOL snuggleStart(NSString *t)
comment = [self checkComment: comment unit: nil info: d];
[self reformat: comment withIndent: 10 to: str];
[str appendString: @" </desc>\n"];
if (standards != nil)
{
[self reformat: standards withIndent: 8 to: str];
}
[str appendString: @" </function>\n"];
args = nil;
}
@ -881,7 +834,6 @@ static BOOL snuggleStart(NSString *t)
NSString *validity = [d objectForKey: @"Validity"];
NSString *name = [d objectForKey: @"Name"];
NSString *comment = [d objectForKey: @"Comment"];
NSString *standards = [d objectForKey: @"Standards"];
[str appendString: @" <ivariable type=\""];
[str appendString: escapeType(type)];
@ -896,16 +848,14 @@ static BOOL snuggleStart(NSString *t)
[str appendString: @"\" validity=\""];
[str appendString: validity];
}
[str appendString: @"\">\n"];
[str appendString: @"\""];
[self appendVersions: [d objectForKey: @"Versions"] to: str];
[str appendString: @">\n"];
[str appendString: @" <desc>\n"];
comment = [self checkComment: comment unit: unit info: d];
[self reformat: comment withIndent: 12 to: str];
[str appendString: @" </desc>\n"];
if (standards != nil)
{
[self reformat: standards withIndent: 10 to: str];
}
[str appendString: @" </ivariable>\n"];
}
@ -918,17 +868,13 @@ static BOOL snuggleStart(NSString *t)
NSString *name = [d objectForKey: @"Name"];
NSString *comment = [d objectForKey: @"Comment"];
NSString *declared = [d objectForKey: @"Declared"];
NSString *standards = nil;
unsigned i;
if (standards == nil)
{
standards = [d objectForKey: @"Standards"];
}
[str appendString: @" <macro name=\""];
[str appendString: name];
[str appendString: @"\">\n"];
[str appendString: @"\""];
[self appendVersions: [d objectForKey: @"Versions"] to: str];
[str appendString: @">\n"];
/*
* Storing the argument names array in the 'args' ivar ensures that
@ -959,10 +905,6 @@ static BOOL snuggleStart(NSString *t)
comment = [self checkComment: comment unit: nil info: d];
[self reformat: comment withIndent: 10 to: str];
[str appendString: @" </desc>\n"];
if (standards != nil)
{
[self reformat: standards withIndent: 8 to: str];
}
[str appendString: @" </macro>\n"];
args = nil;
}
@ -982,7 +924,6 @@ static BOOL snuggleStart(NSString *t)
unsigned i;
BOOL isInitialiser = NO;
NSString *override = nil;
NSString *standards = nil;
if (warn == YES && unit != nil
&& [[d objectForKey: @"Implemented"] isEqual: @"YES"] == NO)
@ -1059,40 +1000,11 @@ static BOOL snuggleStart(NSString *t)
override = @"never";
}
} while (r.length > 0);
r = [comment rangeOfString: @"<standards>"];
if (r.length > 0)
{
unsigned i = r.location;
r = NSMakeRange(i, [comment length] - i);
r = [comment rangeOfString: @"</standards>"
options: NSLiteralSearch
range: r];
if (r.length > 0)
{
r = NSMakeRange(i, NSMaxRange(r) - i);
standards = [comment substringWithRange: r];
if (m == nil)
{
m = [comment mutableCopy];
}
[m deleteCharactersInRange: r];
comment = m;
}
else
{
NSLog(@"unterminated <standards> in comment for %@", name);
}
}
if (m != nil)
{
AUTORELEASE(m);
}
}
if (standards == nil)
{
standards = [d objectForKey: @"Standards"];
}
[str appendString: @" <method type=\""];
[str appendString: escapeType([d objectForKey: @"ReturnType"])];
@ -1109,7 +1021,9 @@ static BOOL snuggleStart(NSString *t)
[str appendString: @"\" override=\""];
[str appendString: override];
}
[str appendString: @"\">\n"];
[str appendString: @"\""];
[self appendVersions: [d objectForKey: @"Versions"] to: str];
[str appendString: @">\n"];
for (i = 0; i < [sels count]; i++)
{
@ -1134,10 +1048,6 @@ static BOOL snuggleStart(NSString *t)
comment = [self checkComment: comment unit: unit info: d];
[self reformat: comment withIndent: 12 to: str];
[str appendString: @" </desc>\n"];
if (standards != nil)
{
[self reformat: standards withIndent: 10 to: str];
}
[str appendString: @" </method>\n"];
args = nil;
}
@ -1153,7 +1063,6 @@ static BOOL snuggleStart(NSString *t)
NSString *unitName = nil;
NSArray *names;
NSArray *protocols;
NSString *standards = nil;
NSString *tmp;
NSString *unit = nil;
NSRange r;
@ -1192,39 +1101,6 @@ static BOOL snuggleStart(NSString *t)
unitName = name;
}
if (comment != nil)
{
r = [comment rangeOfString: @"<standards>"];
if (r.length > 0)
{
unsigned i = r.location;
r = NSMakeRange(i, [comment length] - i);
r = [comment rangeOfString: @"</standards>"
options: NSLiteralSearch
range: r];
if (r.length > 0)
{
NSMutableString *m;
r = NSMakeRange(i, NSMaxRange(r) - i);
standards = [comment substringWithRange: r];
m = [comment mutableCopy];
[m deleteCharactersInRange: r];
comment = m;
AUTORELEASE(m);
}
else
{
NSLog(@"unterminated <standards> in comment for %@", name);
}
}
}
if (standards == nil)
{
standards = [d objectForKey: @"Standards"];
}
/*
* Make sure we have a 'unit' part and a class 'desc' part (comment)
* to be output.
@ -1332,7 +1208,9 @@ static BOOL snuggleStart(NSString *t)
}
[str appendString: tmp];
}
[str appendString: @"\">\n"];
[str appendString: @"\""];
[self appendVersions: [d objectForKey: @"Versions"] to: str];
[str appendString: @">\n"];
ind += 2;
for (j = 0; j < ind; j++) [str appendString: @" "];
@ -1379,10 +1257,6 @@ static BOOL snuggleStart(NSString *t)
for: unitName];
}
if (standards != nil)
{
[self reformat: standards withIndent: ind to: str];
}
ind -= 2;
for (j = 0; j < ind; j++) [str appendString: @" "];
[str appendString: @"</"];

View file

@ -3287,17 +3287,28 @@ fail:
if ([set count] > 0)
{
NSMutableString *s = nil;
NSEnumerator *e = [set objectEnumerator];
NSString *name;
NSString *s = nil;
s = [NSMutableString stringWithCString: "<standards>"];
while ((name = [e nextObject]) != nil)
if ([set member: @"NotOpenStep"] && [set member: @"NotMacOS-X"])
{
[s appendFormat: @"<%@ />", name];
s = @" gvadd=\"0.0\""; // GNUstep
}
else if ([set member: @"NotOpenStep"] && ![set member: @"NotMacOS-X"])
{
s = @" ovadd=\"10.0\""; // MacOS-X
}
else if (![set member: @"NotOpenStep"] && [set member: @"NotMacOS-X"])
{
s = @" ovadd=\"0.0\" ovrem=\"4.0\""; // OpenStep only
}
else if ([set member: @"OpenStep"] && ![set member: @"NotMacOS-X"])
{
s = @" ovadd=\"0.0\""; // OpenStep
}
if (s != nil)
{
[dict setObject: s forKey: @"Versions"];
}
[s appendString: @"</standards>"];
[dict setObject: s forKey: @"Standards"];
}
}
}

View file

@ -37,6 +37,7 @@ DTD_FILES = plist-0_9.dtd \
gsdoc-0_6_7.dtd \
gsdoc-1_0_0.dtd \
gsdoc-1_0_1.dtd \
gsdoc-1_0_2.dtd \
gsdoc-1_0_1.rnc
# Manual pages to install
@ -62,7 +63,6 @@ autogsdoc_OBJC_FILES = autogsdoc.m AGSParser.m AGSOutput.m AGSIndex.m AGSHtml.m
cvtenc_OBJC_FILES = cvtenc.m
gdomap_C_FILES = gdomap.c
gdnc_OBJC_FILES = gdnc.m
gsdoc_OBJC_FILES = gsdoc.m
defaults_OBJC_FILES = defaults.m
dread_OBJC_FILES = dread.m
dremove_OBJC_FILES = dremove.m

View file

@ -207,11 +207,6 @@
The method is marked as being one which subclasses should <em>NOT</em>
override.
</item>
<item><strong>&lt;standards&gt; ... &lt;/standards&gt;</strong>
The markup is removed from the description and placed <em>after</em>
it in the GSDoc output - so that the method is described as
conforming (or not conforming) to the specified standards.
</item>
</list>
</section>
<section>

647
Tools/gsdoc-1_0_2.dtd Normal file
View file

@ -0,0 +1,647 @@
<!--
XML Document Type Definition for GNUstep Documentation Markup
Language (gsdoc).
Written by Richard Frith-Macdonald
Based on GDML by 1997 Yoo C. Chung
This is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later
version.
This document is distributed in the hope that it will be
useful, but WITHOUT ANY WARRANTY; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General
Public License along with this software; if not, write to the
Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA
02139, USA.
-->
<!--
gsdoc is an XML language - Typical usage:
<?xml version="1.0"?>
<!DOCTYPE gsdoc PUBLIC "-//GNUstep//DTD gsdoc 1.0.2//EN"
"http://www.gnustep.org/gsdoc.xml">
<gsdoc base="myDocName">
</gsdoc>
-->
<!--***** Character entities. *****-->
<!-- General purpose characters for gsdoc. -->
<!ENTITY copy "&#169;"> <!-- copyright symbol -->
<!ENTITY tm "&#174;"> <!-- trademark symbol -->
<!ENTITY reg "&#174;">
<!ENTITY dots "&#8230;"> <!-- ellipsis (...) -->
<!ENTITY nbsp "&#160;"> <!-- non breakable space -->
<!ENTITY amp "&#38;#38;"> <!-- ampersand -->
<!ENTITY apos "&#39;"> <!-- apos -->
<!ENTITY quot "&#34;"> <!-- quotation mark (") -->
<!ENTITY lt "&#38;#60;"> <!-- lesser than symbol -->
<!ENTITY gt "&#62;"> <!-- greater than symbol -->
<!--***** Entity declarations. *****-->
<!-- Boolean values for attributes -->
<!ENTITY % boolean "(yes|no)">
<!-- Entity for phrase elements. -->
<!ENTITY % phrase "var | ivar | em | code | strong | file | site">
<!-- Entity for cross references. -->
<!ENTITY % xref "ref | uref | url | email | prjref">
<!-- Entity for anchors. -->
<!ENTITY % anchor "label | entry">
<!-- Entity for simple text level elements. -->
<!ENTITY % text "#PCDATA | %xref; | %anchor; | %phrase; | footnote | br">
<!-- Entity for list elements. -->
<!ENTITY % list "list | enum | deflist | qalist | dictionary">
<!-- Entity for block level elements. -->
<!ENTITY % block "%text; | %list; | p | example | embed | index">
<!-- Entity for definition elements and blocks. -->
<!ENTITY % defblock "%text; | %list; | heading | p | example | embed | index | class | category | protocol | function | macro | type | variable | constant | EOModel | EOEntity">
<!--**********-->
<!-- Used for describing something. -->
<!ELEMENT desc (%block;)*>
<!-- A footnote. -->
<!ELEMENT footnote (%text;)*>
<!--***** Phrase elements. *****-->
<!-- The content is a metasyntactic variable or argument name. -->
<!ELEMENT var (%text;)*>
<!-- The content is a metasyntactic ivariable name. -->
<!ELEMENT ivar (%text;)*>
<!-- Emphasize the content. -->
<!ELEMENT em (%text;)*>
<!-- The content is too important that simple emphasizing isn't
enough. -->
<!ELEMENT strong (%text;)*>
<!-- The content is either a name for code (e.g. class names), or a
relatively short code fragment. -->
<!ELEMENT code (%text;)*>
<!-- The content is a file name. -->
<!ELEMENT file (#PCDATA)*>
<!-- The content is a fully qualified domain name on the Internet. -->
<!ELEMENT site (#PCDATA)*>
<!--***** List elements. *****-->
<!-- An item in a list. -->
<!ELEMENT item (%block;)*>
<!-- An enumerated list. -->
<!ELEMENT enum (item+)>
<!-- A ordinary, unnumbered list. -->
<!ELEMENT list (item+)>
<!-- A term to defined in a definition list. -->
<!ELEMENT term (%text;)*>
<!-- A definition list. -->
<!ELEMENT deflist (term, desc)+>
<!-- A question for a question and answer list. -->
<!ELEMENT question (%text;)*>
<!-- An answer for a question and answer list. -->
<!ELEMENT answer (%block;)*>
<!-- A question and answer list. -->
<!ELEMENT qalist (question, answer)+>
<!--**********-->
<!--***** Cross references. *****-->
<!-- A reference.
ID of the reference.
TYPE of reference, if implied, a reference to a label.
CLASS specific class for a method, may be one of the following formats -
classname, classname(categoryname), (protocolname)
-->
<!ELEMENT ref (%text;)*>
<!ATTLIST ref
id CDATA #REQUIRED
type (class|category|protocol|method|ivariable|function|type|macro|variable|constant|label|EOModel|EOEntity|tool) "label"
class CDATA #IMPLIED
>
<!-- An e-mail address. -->
<!ELEMENT email (%text;)*>
<!ATTLIST email
address CDATA #IMPLIED
>
<!-- A URL. -->
<!ELEMENT url EMPTY>
<!ATTLIST url
url CDATA #IMPLIED
>
<!-- A reference to a URL.
The text contained appears in the output.
-->
<!ELEMENT uref (%text;)*>
<!ATTLIST uref
url CDATA #REQUIRED
>
<!-- A reference to a project.
The text contained appears in the output.
-->
<!ELEMENT prjref (%text;)*>
<!ATTLIST prjref
prjname CDATA #IMPLIED
file CDATA #IMPLIED
>
<!--***** Anchors. *****-->
<!-- An anchor for a general reference.
The text contained appears in the output.
If the id attribute is omitted, the text is used in its place.
-->
<!ELEMENT label (%text;)*>
<!ATTLIST label
id CDATA #IMPLIED
>
<!-- An entry for the general index.
The text that is contained appears in the index, and never in
the text itself.
If the id attribute is omitted, the text is used in its place.
-->
<!ELEMENT entry (%text;)*>
<!ATTLIST entry
id CDATA #IMPLIED
>
<!-- OBSOLETE ... do not use -->
<!ELEMENT GNUstep EMPTY>
<!ELEMENT OpenStep EMPTY>
<!ELEMENT NotOpenStep EMPTY>
<!ELEMENT MacOS-X EMPTY>
<!ELEMENT NotMacOS-X EMPTY>
<!-- OBSOLETE ... do not use -->
<!ENTITY % standard "GNUstep | OpenStep | NotOpenStep | MacOS-X | NotMacOS-X">
<!-- OBSOLETE ... do not use -->
<!ELEMENT standards (%standard;)*>
<!--***** Argument elements. *****-->
<!-- An argument. -->
<!ELEMENT arg (#PCDATA)*>
<!ATTLIST arg
type CDATA #IMPLIED
>
<!-- Denotes that the rest of the arguments is a variable list,
like in printf().
-->
<!ELEMENT vararg EMPTY>
<!--***** Method elements. *****-->
<!-- A component for a method selector. -->
<!ELEMENT sel (#PCDATA)*>
<!-- A method. If there is no DESC, it is understood that the element
is used to override some information from the same method in the
superclass.
If factory not set, instance method
gvadd is the gnustep version at which this was introduced
gvrem is the gnustep version at which this was removed
ovadd is the OpenStep/OPENSTEP/MacOS-X version at which this was introduced
ovrem is the OpenStep/OPENSTEP/MacOS-X version at which this was removed
-->
<!ELEMENT method (((sel, arg?), (sel, arg)*, vararg?), desc?, standards?)>
<!ATTLIST method
type CDATA #IMPLIED
factory %boolean; "no"
init %boolean; "no"
override (subclass|never) #IMPLIED
gvadd CDATA #IMPLIED
gvrem CDATA #IMPLIED
ovadd CDATA #IMPLIED
ovrem CDATA #IMPLIED
>
<!--***** Elements for definitions of classes, functions, etc. *****-->
<!-- Show what header file something lives in. -->
<!ELEMENT declared (#PCDATA)*>
<!-- A macro definition.
gvadd is the gnustep version at which this was introduced
gvrem is the gnustep version at which this was removed
ovadd is the OpenStep/OPENSTEP/MacOS-X version at which this was introduced
ovrem is the OpenStep/OPENSTEP/MacOS-X version at which this was removed
-->
<!ELEMENT macro ((arg*, vararg?), declared?, desc?, standards?)>
<!ATTLIST macro
name CDATA #REQUIRED
gvadd CDATA #IMPLIED
gvrem CDATA #IMPLIED
ovadd CDATA #IMPLIED
ovrem CDATA #IMPLIED
>
<!-- A type definition.
gvadd is the gnustep version at which this was introduced
gvrem is the gnustep version at which this was removed
ovadd is the OpenStep/OPENSTEP/MacOS-X version at which this was introduced
ovrem is the OpenStep/OPENSTEP/MacOS-X version at which this was removed
-->
<!ELEMENT type (declared?, desc?, standards?)>
<!ATTLIST type
name CDATA #REQUIRED
type CDATA #REQUIRED
gvadd CDATA #IMPLIED
gvrem CDATA #IMPLIED
ovadd CDATA #IMPLIED
ovrem CDATA #IMPLIED
>
<!-- Variable definition.
VALUE may be set for a constant or a default value
gvadd is the gnustep version at which this was introduced
gvrem is the gnustep version at which this was removed
ovadd is the OpenStep/OPENSTEP/MacOS-X version at which this was introduced
ovrem is the OpenStep/OPENSTEP/MacOS-X version at which this was removed
-->
<!ELEMENT variable (declared?, desc?, standards?)>
<!ATTLIST variable
name CDATA #REQUIRED
type CDATA #REQUIRED
value CDATA #IMPLIED
gvadd CDATA #IMPLIED
gvrem CDATA #IMPLIED
ovadd CDATA #IMPLIED
ovrem CDATA #IMPLIED
>
<!-- Ivariable definition.
gvadd is the gnustep version at which this was introduced
gvrem is the gnustep version at which this was removed
ovadd is the OpenStep/OPENSTEP/MacOS-X version at which this was introduced
ovrem is the OpenStep/OPENSTEP/MacOS-X version at which this was removed
-->
<!ELEMENT ivariable (desc?, standards?)>
<!ATTLIST ivariable
name CDATA #REQUIRED
type CDATA #REQUIRED
validity (public|protected|private) "public"
gvadd CDATA #IMPLIED
gvrem CDATA #IMPLIED
ovadd CDATA #IMPLIED
ovrem CDATA #IMPLIED
>
<!-- Constant definition.
VALUE may be set for a constant or a default value
gvadd is the gnustep version at which this was introduced
gvrem is the gnustep version at which this was removed
ovadd is the OpenStep/OPENSTEP/MacOS-X version at which this was introduced
ovrem is the OpenStep/OPENSTEP/MacOS-X version at which this was removed
-->
<!ELEMENT constant (declared?, desc?, standards?)>
<!ATTLIST constant
name CDATA #REQUIRED
type CDATA #REQUIRED
value CDATA #IMPLIED
role (except|defaults|notify|key) #IMPLIED
gvadd CDATA #IMPLIED
gvrem CDATA #IMPLIED
ovadd CDATA #IMPLIED
ovrem CDATA #IMPLIED
>
<!-- A function definition.
gvadd is the gnustep version at which this was introduced
gvrem is the gnustep version at which this was removed
ovadd is the OpenStep/OPENSTEP/MacOS-X version at which this was introduced
ovrem is the OpenStep/OPENSTEP/MacOS-X version at which this was removed
-->
<!ELEMENT function ((arg*, vararg?), declared?, desc?, standards?)>
<!ATTLIST function
name CDATA #REQUIRED
type CDATA #REQUIRED
gvadd CDATA #IMPLIED
gvrem CDATA #IMPLIED
ovadd CDATA #IMPLIED
ovrem CDATA #IMPLIED
>
<!-- Protocol definition.
gvadd is the gnustep version at which this was introduced
gvrem is the gnustep version at which this was removed
ovadd is the OpenStep/OPENSTEP/MacOS-X version at which this was introduced
ovrem is the OpenStep/OPENSTEP/MacOS-X version at which this was removed
-->
<!ELEMENT protocol (declared?, conform*, desc?, method*, standards?)>
<!ATTLIST protocol
name CDATA #REQUIRED
gvadd CDATA #IMPLIED
gvrem CDATA #IMPLIED
ovadd CDATA #IMPLIED
ovrem CDATA #IMPLIED
>
<!-- Category definition.
gvadd is the gnustep version at which this was introduced
gvrem is the gnustep version at which this was removed
ovadd is the OpenStep/OPENSTEP/MacOS-X version at which this was introduced
ovrem is the OpenStep/OPENSTEP/MacOS-X version at which this was removed
-->
<!ELEMENT category (declared?, conform*, desc?, method*, standards?)>
<!ATTLIST category
name CDATA #REQUIRED
class CDATA #REQUIRED
gvadd CDATA #IMPLIED
gvrem CDATA #IMPLIED
ovadd CDATA #IMPLIED
ovrem CDATA #IMPLIED
>
<!-- Show a protocol a class conforms to.
gvadd is the gnustep version at which this was introduced
gvrem is the gnustep version at which this was removed
ovadd is the OpenStep/OPENSTEP/MacOS-X version at which this was introduced
ovrem is the OpenStep/OPENSTEP/MacOS-X version at which this was removed
-->
<!ELEMENT conform (#PCDATA)*>
<!ELEMENT class (declared?, conform*, desc?, ivariable*, method*, standards?)>
<!ATTLIST class
name CDATA #REQUIRED
super CDATA #IMPLIED
gvadd CDATA #IMPLIED
gvrem CDATA #IMPLIED
ovadd CDATA #IMPLIED
ovrem CDATA #IMPLIED
>
<!--***** Elements for definitions of EOModels, etc. *****-->
<!-- a dictionary Item. -->
<!ELEMENT dictionaryItem (%block;)*>
<!ATTLIST dictionaryItem
key CDATA #REQUIRED
value CDATA #IMPLIED
>
<!-- a dictionary -->
<!ELEMENT dictionary (dictionaryItem+)>
<!ELEMENT EOConnectionDictionary (dictionaryItem+)>
<!ELEMENT EOUserDictionary (dictionaryItem+)>
<!--***** Elements for definitions of EOModels, etc. *****-->
<!-- EORelationshipComponent -->
<!ELEMENT EORelationshipComponent (EORelationshipComponent*)>
<!ATTLIST EORelationshipComponent
definition CDATA #REQUIRED
>
<!-- EOJoin -->
<!ELEMENT EOJoin (desc?)>
<!ATTLIST EOJoin
relationshipName CDATA #IMPLIED
joinOperator CDATA #REQUIRED
joinSemantic CDATA #REQUIRED
sourceAttribute CDATA #REQUIRED
destinationAttribute CDATA #REQUIRED
>
<!-- EORelationship -->
<!ELEMENT EORelationship ((EORelationshipComponent | (EOJoin*)), EOUserDictionary?, desc?)>
<!ATTLIST EORelationship
entityName CDATA #REQUIRED
destinationEntityName CDATA #REQUIRED
name CDATA #REQUIRED
isToMany CDATA #IMPLIED
>
<!-- EOAttributeRef -->
<!ELEMENT EOAttributeRef EMPTY>
<!ATTLIST EOAttributeRef
name CDATA #REQUIRED
>
<!-- EOPrimaryKeyAttributes -->
<!ELEMENT EOPrimaryKeyAttributes (EOAttributeRef+)>
<!-- EOClassProperties -->
<!ELEMENT EOClassProperties ((EOAttributeRef)+)>
<!-- EOAttributesUsedForLocking -->
<!ELEMENT EOAttributesUsedForLocking (EOAttributeRef+)>
<!-- EOAttribute -->
<!ELEMENT EOAttribute (EOUserDictionary?, desc?)>
<!ATTLIST EOAttribute
columnName CDATA #IMPLIED
definition CDATA #IMPLIED
externalType CDATA #IMPLIED
name CDATA #REQUIRED
valueClassName CDATA #IMPLIED
valueType CDATA #IMPLIED
entityName CDATA #IMPLIED
isReadOnly CDATA #IMPLIED
isDerived CDATA #IMPLIED
isFlattened CDATA #IMPLIED
>
<!-- EOEntity -->
<!ELEMENT EOEntity (EOAttribute*, EOAttributesUsedForLocking?, EOClassProperties?, EOPrimaryKeyAttributes?, EORelationship*, EOUserDictionary?, desc?)>
<!ATTLIST EOEntity
name CDATA #REQUIRED
externalName CDATA #IMPLIED
className CDATA #IMPLIED
modelName CDATA #IMPLIED
isReadOnly CDATA #IMPLIED
>
<!-- EOModel -->
<!ELEMENT EOModel (EOConnectionDictionary?, (EOEntity+ | list), EOUserDictionary?, desc?)>
<!ATTLIST EOModel
name CDATA #REQUIRED
version CDATA #IMPLIED
adaptorName CDATA #REQUIRED
adaptorClassName CDATA #REQUIRED
>
<!--***** Elements for ordinary block level elements. *****-->
<!-- A line break. -->
<!ELEMENT br EMPTY>
<!-- A paragraph. -->
<!ELEMENT p (%text;)*>
<!-- An example. -->
<!ELEMENT example (#PCDATA)*>
<!ATTLIST example
caption CDATA #IMPLIED
>
<!-- An embedded object. If it is of a type that the SGML processor
cannot handle, then use the content, which is ignored otherwise.
refer - method of referring to object (default is file)
src - the reference to the object
type - Internet media type of the objec
title - optional title describing object
-->
<!ELEMENT embed (%block;)*>
<!ATTLIST embed
refer (file|url) #IMPLIED
src CDATA #REQUIRED
type CDATA #IMPLIED
title CDATA #IMPLIED
>
<!--***** Elements for document structure such as chapters. *****-->
<!-- A heading for chapters, sections, ... -->
<!ELEMENT heading (%text;)*>
<!-- A subsubsection. -->
<!ELEMENT subsubsect (%defblock;)*>
<!ATTLIST subsubsect
id CDATA #IMPLIED
>
<!-- A subsection. -->
<!ELEMENT subsect (%defblock; | subsubsect)*>
<!ATTLIST subsect
id CDATA #IMPLIED
>
<!-- A section. -->
<!ELEMENT section (%defblock; | subsect)*>
<!ATTLIST section
id CDATA #IMPLIED
>
<!-- A chapter. -->
<!ELEMENT chapter (%defblock; | section)*>
<!ATTLIST chapter
id CDATA #IMPLIED
>
<!--***** Elements that make searching for things easier. *****-->
<!-- Table of contents. -->
<!ELEMENT contents EMPTY>
<!-- Index ... generates an index of the specified type of elements.
'scope' determines whether the index is generated for the current file
or for the whole of the current project, or for everything the software
can find (global) ... if the document is processed in a standalone manner,
the scope if always file. For method or ivariable indexing, if the index
is inside a class, protocol, or category, only indexes for that unit
should be generated.
'type' determines the type of entry listed in the index. The 'title'
type really only makes sense for a project scope index as it produces
a list of the files in the project (by title).
-->
<!ELEMENT index EMPTY>
<!ATTLIST index
type (class | category | protocol | method | ivariable | function | type | macro | variable | constant | EOModel | EOEntity | label | title | tool) "label"
scope (file | project | global) "file"
style ( normal | bare ) "normal"
target CDATA #IMPLIED
>
<!--***** Elements that describe the document itself. *****-->
<!-- Copyright of the document. -->
<!ELEMENT copy (%text;)*>
<!-- An abstract. -->
<!ELEMENT abstract (%text;)*>
<!-- The version of the document. -->
<!ELEMENT version (%text;)*>
<!-- The date the document was written. -->
<!ELEMENT date (%text;)*>
<!-- An author. -->
<!ELEMENT author (email?, url?, desc?)>
<!ATTLIST author
name CDATA #REQUIRED
>
<!-- The title of the document. -->
<!ELEMENT title (%text;)*>
<!--***** The topmost structures for the document body. *****-->
<!-- Unnumbered parts appearing in the front, such as a preface. -->
<!ELEMENT front (contents?, chapter*)>
<!-- Unnumbered parts appearing in the back, such as an afterword and/or
indices.
-->
<!ELEMENT back (chapter*, index*)>
<!--***** The topmost structures for the document. *****-->
<!-- The head containing general information about the document. -->
<!ELEMENT head (title, author*, version?, date?, abstract?, copy?)>
<!-- The main part of the document. -->
<!ELEMENT body (front?, chapter+, back?)>
<!--**********-->
<!-- The entire document. -->
<!ELEMENT gsdoc (head, body)>
<!ATTLIST gsdoc
base CDATA #IMPLIED
next CDATA #IMPLIED
prev CDATA #IMPLIED
up CDATA #IMPLIED
stylesheeturl CDATA #IMPLIED
>

View file

@ -121,7 +121,7 @@
</p>
<example>
&lt;?xml version="1.0"?&gt;
&lt;!DOCTYPE gsdoc PUBLIC "-//GNUstep//DTD gsdoc 0.6.6//EN" "http://www.gnustep.org/gsdoc-0_6_6.xml"&gt;
&lt;!DOCTYPE gsdoc PUBLIC "-//GNUstep//DTD gsdoc 1.0.2//EN" "http://www.gnustep.org/gsdoc-1_0_2.xml"&gt;
&lt;gsdoc base="MyDoc" prev="First" next="Last" up="Overview"&gt;
&lt;head&gt;
... your document head here
@ -609,7 +609,13 @@
formatted specially in output. In the majority of cases, you will
not need to write GSDoc using these elements, since they can be
autogenerated from Objective-C source files and special comments
within them. The definition elements are -
within them. Most of the elements representing parts of the API
have optional attributes ovadd and ovrem which may be used to
specify the OpenStep/OPENSTEP/MacOS-X versions at which the
documented element was added to or removed from the API, and
gvadd and gvrem which may be used to specify when an elment was
added to or removed from the GNUstep API.<br />
The definition elements are -
</p>
<deflist>
@ -626,8 +632,7 @@
zero or more <ref id="conform">conform</ref> elements,
an optional <ref id="desc">desc</ref>,
zero or more <ref id="ivariable">ivariable</ref> elements,
zero or more <ref id="method">method</ref> elements,
and an optional <ref id="standards">standards</ref> element.
zero or more <ref id="method">method</ref> elements.
</p>
</desc>
@ -643,8 +648,7 @@
<ref id="declared">declared</ref> element,
zero or more <ref id="conform">conform</ref> elements,
an optional <ref id="desc">desc</ref>,
zero or more <ref id="method">method</ref> elements,
and an optional <ref id="standards">standards</ref> element.
zero or more <ref id="method">method</ref> elements.
</p>
</desc>
@ -658,8 +662,7 @@
<ref id="declared">declared</ref> element,
zero or more <ref id="conform">conform</ref> elements,
an optional <ref id="desc">desc</ref>,
zero or more <ref id="method">method</ref> elements,
and an optional <ref id="standards">standards</ref> element.
zero or more <ref id="method">method</ref> elements.
</p>
</desc>
@ -674,8 +677,7 @@
a series of zero or more <ref id="arg">arg</ref> elements,
followed by an optional <ref id="vararg">arg</ref> element,
then an optional <ref id="declared">declared</ref> element,
an optional <ref id="desc">desc</ref>,
and an optional <ref id="standards">standards</ref> element.
an optional <ref id="desc">desc</ref>.
</p>
</desc>
@ -688,8 +690,7 @@
a series of zero or more <ref id="arg">arg</ref> elements,
followed by an optional <ref id="vararg">arg</ref> element,
then an optional <ref id="declared">declared</ref> element,
an optional <ref id="desc">desc</ref>,
and an optional <ref id="standards">standards</ref> element.
an optional <ref id="desc">desc</ref>.
</p>
</desc>
@ -700,8 +701,7 @@
<p>
The elements in a <code>&lt;macro&gt;</code> are -
an optional <ref id="declared">declared</ref> element,
an optional <ref id="desc">desc</ref>,
and an optional <ref id="standards">standards</ref> element.
an optional <ref id="desc">desc</ref>.
</p>
</desc>
@ -718,8 +718,7 @@
<p>
The elements in a <code>&lt;constant&gt;</code> are -
an optional <ref id="declared">declared</ref> element,
an optional <ref id="desc">desc</ref>,
and an optional <ref id="standards">standards</ref> element.
an optional <ref id="desc">desc</ref>.
</p>
</desc>
@ -732,8 +731,7 @@
<p>
The elements in a <code>&lt;variable&gt;</code> are -
an optional <ref id="declared">declared</ref> element,
an optional <ref id="desc">desc</ref>,
and an optional <ref id="standards">standards</ref> element.
an optional <ref id="desc">desc</ref>.
</p>
</desc>
@ -748,8 +746,7 @@
is "<code>public</code>").
<p>
The elements in a <code>&lt;variable&gt;</code> are -
an optional <ref id="desc">desc</ref>,
and an optional <ref id="standards">standards</ref> element.
an optional <ref id="desc">desc</ref>.
</p>
</desc>
@ -760,24 +757,6 @@
<ref id="definitionElements">definition elements</ref>.<br/><br/>
</desc>
<term><code><label id="standards">&lt;standards&gt;</label></code>
</term>
<desc>
This element contains any number of standard elements which
specify what standards a particular piece of code does or does
not conform to.
<br/>
The defined values are -
<list>
<item><code>&lt;GNUstep/&gt;</code></item>
<item><code>&lt;OpenStep/&gt;</code></item>
<item><code>&lt;NotOpenStep/&gt;</code></item>
<item><code>&lt;MacOS-X/&gt;</code></item>
<item><code>&lt;NotMacOS-X/&gt;</code></item>
</list>
<br/>
</desc>
<term><code><label id="conform">&lt;conform&gt;</label></code></term>
<desc>
This element contains simple text giving the name of a protocol
@ -816,8 +795,7 @@
optional <ref id="vararg">vararg</ref> element),
followed by an optional <ref id="desc">desc</ref>,
zero or more <ref id="ivariable">ivariable</ref> elements,
zero or more <ref id="method">method</ref> elements,
and an optional <ref id="standards">standards</ref> element.
zero or more <ref id="method">method</ref> elements.
</p>
</desc>

File diff suppressed because it is too large Load diff