/usr/share/GNUstep/Documentation/Developer/Tools/Reference/gsdoc.html is in gnustep-base-doc 1.24.7-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>GNUstep Documentation XML markup language (GSDoc)</title>
</head>
<body>
<font face="serif">
<h1><a name="title$gsdoc">GNUstep Documentation XML markup language (GSDoc)</a></h1>
<h3>Authors</h3>
<dl>
<dt><a href="http://www.gnustep.org/developers/whoiswho.html">Richard Frith-Macdonald</a> (<a href="mailto:rfm@gnu.org"><code>rfm@gnu.org</code></a>)</dt>
<dd>
<div class="desc">
A person who devotes far too much time to GNUstep development.
</div>
</dd>
</dl>
<p><b>Version:</b> 1.0.3</p>
<p><b>Date:</b> 6 Nov, 2006</p>
<blockquote>
This documents the GNUstep Documentation markup language.
</blockquote>
<p><b>Copyright:</b> (C) Free Software Foundation, Inc.</p>
<div>
<hr width="50%" align="left" />
<h3>Contents -</h3>
<ol>
<li>
<a href="#001000000000">Introduction</a>
</li>
<li>
<a href="#001001000000">Why another documentation language?</a>
</li>
<li>
<a href="#002000000000">The gsdoc DTD and what it means</a>
</li>
<li>
<a href="#002001000000">Overall document structure</a>
</li>
<li>
<a href="#002002000000">The document head</a>
</li>
<li>
<a href="#002003000000">The document body</a>
</li>
<li>
<a href="#003000000000">Element reference</a>
</li>
<li>
<a href="#003001000000">Sectioning Elements</a>
</li>
<li>
<a href="#003002000000">Block Elements</a>
</li>
<li>
<a href="#003003000000">Text Elements</a>
</li>
<li>
<a href="#003004000000">List Elements</a>
</li>
<li>
<a href="#003005000000">Cross-Reference Elements</a>
</li>
<li>
<a href="#003006000000">Definition Elements</a>
</li>
</ol>
<hr width="50%" align="left" />
<h1><a name="001000000000">Introduction</a></h1>
<p>
The GNUstep documentation markup language (GSDoc) is an XML language
designed specifically for writing documentation for the
<a href="http://www.gnustep.org">GNUstep project</a>.
In practice, that means that it is designed for writing about
software, and in particular, for writing about Objective-C classes.
</p>
<p>
This document itself is an example, as well as a test case, of GSDoc
itself.
</p>
<h2><a name="001001000000">Why another documentation language?</a></h2>
<p>
There are several reasons for producing the new markup
language -
</p>
<ul>
<li>
There were no existing markup languages that dealt well with
documenting software written in the Objective-C language,
except the GDML language - which has no easy to use support
software.
</li>
<li>
While the DocBook system works nicely for general software
documentation, it requires a relatively large amount of
support software and comes with a lot of baggage that's
not directly useful for GNUstep.
</li>
<li>
The GNU info system comes with easy to use, lightweight
conversion tools, but is particularly ill suited to
Objective-C documentation because the colon character
using in Objective-C method names is used in info markup.
</li>
<li>
LinuxDoc, while being a nice basic system, seems to be
in the process of being replaced by DocBook.
</li>
</ul>
<p>
So, with only one markup language available that supported
Objective-C, and with XML software becoming available, the
decision was to take GDML and update it to be an XML
language, in the hope that this would -
</p>
<ul>
<li>
Provide optimal support for GNUstep documentation.
</li>
<li>
Minimize the amount of work needed for development of
software tools.
</li>
<li>
Provide future-proofing in that documentation written in one
XML language should be quite easy to convert to another if
necessary.
</li>
</ul>
</div>
<h1><a name="002000000000">The gsdoc DTD and what it means</a></h1>
<p>
The GSDoc markup language is defined by an SGML DTD, that specifies
the tags that may be used in marking up a GSDoc document, and how
and where those tags may be placed. The reader is encouraged to
consult the DTD directly on any points that the present document leaves
unclear. The DTD is stored under
<code>GNUSTEP_SYSTEM_LIBRARY/DTDs</code> in a standard
GNUstep installation. .. where GNUSTEP_SYSTEM_LIBRARY is defined in
the GNUstep configuration file (GNUstep.conf).
</p>
<p>
The gsdoc DTD defines an XML language - that is, a markup language
that conforms to a specific subset of SGML features defined as XML.
The advantage of XML is that it provides most of the useful features
of SGML while being much more light-weight (easy to use) because
you can forget about the rest of SGML.
As XML looks set to become increasingly popular, we can hope that
documentation written with an XML language will be easily imported
into XML software tools as they become available, so we will not
(in the GNUstep project) need to devote a lot of time and effort
to maintaining documentation tools.
</p>
<a name="label$gsdoc"></a>
<h2><a name="002001000000">Overall document structure</a></h2>
<p>
A GSDoc document consists of a <a rel="gsdoc" href="#label$head">head</a>
and a
<a rel="gsdoc" href="#label$body">body</a>
wrapped inside the overall document
framework that looks like this -
</p>
<pre>
<?xml version="1.0"?>
<!DOCTYPE gsdoc PUBLIC "-//GNUstep//DTD gsdoc 1.0.2//EN" "http://www.gnustep.org/gsdoc-1_0_2.xml">
<gsdoc base="MyDoc" prev="First" next="Last" up="Overview">
<head>
... your document head here
</head>
<body>
... your document body here
</body>
</gsdoc>
</pre>
<p>
The above example shows a GSDoc document framework.
The first line specifies the XML version that the document
conforms to.
The second line specifies the version of GSDoc that the
document conforms to.
The third and final lines frame the main part of the document
and supply all the (optional) attributes of the <em>gsdoc</em>
element -
</p>
<dl>
<dt><code>base</code></dt>
<dd>
This is optional, but recommended - it specifies the base name
for the document. When the document is translated to another
format, the output 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>.
</dd>
<dt><code>prev</code></dt>
<dd>
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
link between documents, the converter software may insert
a link between the two documents.
</dd>
<dt><code>next</code></dt>
<dd>
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
link between documents, the converter software may insert
a link between the two documents.
</dd>
<dt><code>up</code></dt>
<dd>
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).
If the converted output format of the document supports some sort
of link between documents, the converter software may insert
a link between the two documents.
</dd>
</dl>
<a name="label$head"></a>
<h2><a name="002002000000">The document head</a></h2>
<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 is the only part of the document head that must be present,
although at least one author is strongly encouraged.
</p>
<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 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 example shows all the elements possible in a document head. Only title is required (author is strongly encouraged), but if present they must occur in the order shown -
</p>
<dl>
<dt><code><a name="label$title"><title></a></code></dt>
<dd>
The title of the document. Required.
</dd>
<dt><code><a name="label$author"><author></a></code></dt>
<dd>
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. (Of course, a document may have more than one
author, in which case you simply write multiple author elements.)
Not required, but strongly encouraged.
</dd>
<dt><code><a name="label$version"><version></a></code></dt>
<dd>
The version number of the document.
</dd>
<dt><code><a name="label$date"><date></a></code></dt>
<dd>
The date at which the document was last modified.
</dd>
<dt><code><a name="label$abstract"><abstract></a></code></dt>
<dd>
A <em>short</em> description of the document contents.
</dd>
<dt><code><a name="label$copy"><copy></a></code></dt>
<dd>
The copyright owner of the document.
</dd>
</dl>
<a name="label$body"></a>
<h2><a name="002003000000">The document body</a></h2>
<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 would be expected to have their own separate
page numbering schemes.
</p>
<pre>
<body>
<front>
<contents/>
<chapter>
<heading>Preface</heading>
<p>
Here is an introductory chapter for a dummy document.
</p>
</chapter>
</front>
<chapter>
<heading>Main text</heading>
<p>
Here is the main text of a chapter in the document.
</p>
</chapter>
<back>
<chapter>
<heading>Afterword</heading>
<p>
And after the main part of the doucment we can have some other stuff.
</p>
</chapter>
<index type="class"/>
</back>
</body>
</pre>
<p>
The above example shows all the elements possible at the top level in a document body -
</p>
<dl>
<dt><code><front></code></dt>
<dd>
This is an optional part of the document that can come before the
main text. Typically, this could be used to contain an automatically
generated contents page and possibly an introduction.
When output is generated in book form, this part of the document
would probably have a different page numbering scheme from the
main part.
<p>
The <code><contents></code> subelement is used as a marker
to specify that an automatically generated contents page (listing
the chapters in the document) is to be inserted.
</p>
</dd>
<dt><code><chapter></code></dt>
<dd>
After the <em>front</em> part of the document body comes a
mandatory sequence of one or more chapters. This is where
the main part of the document resides.
Each <a rel="gsdoc" href="#label$chapter">chapter</a>
consists of a
<a rel="gsdoc" href="#label$heading">heading</a>
, any number
of blocks of information, and any number of sections.
</dd>
<dt><br /><code><back></code></dt>
<dd>
After the chapters making up the main part of the body of the
document is an optional <em>back</em> part which may contain
chapters (such as appendices) possibly followed by an automatically
generated index.
<p>
The <code><index></code> element is used as a marker to
specify that an automatically generated index is to be inserted.
See <a rel="gsdoc" href="#label$index">below</a>
for details.
</p>
</dd>
</dl>
<h1><a name="003000000000">Element reference</a></h1>
<p>
The allowable elements in GSDoc documents are described below, broken
into sections by usage context.
</p>
<a name="label$sectioningElements"></a>
<h2><a name="003001000000">Sectioning Elements</a></h2>
<p>
<em>Sectioning elements</em> define hierarchical document structure.
</p>
<dl>
<dt><code><a name="label$chapter"><chapter></a></code></dt>
<dd>
This is the basic, top-level element of the document body.
Each chapter consists of a <a rel="gsdoc" href="#label$heading">heading</a>
,
zero or more <a rel="gsdoc" href="#label$blockElements">blocks</a>
, and zero or more
<a rel="gsdoc" href="#label$section">sections</a>
. Each chapter in the document is
automatically listed in the documents contents page (if it has one).
</dd>
<dt><code><a name="label$section"><section></a></code></dt>
<dd>
First level below <code>chapter</code>. It contains
<a rel="gsdoc" href="#label$subsection">sub-sections</a>
where a chapter would
contain sections.
</dd>
<dt><code><a name="label$subsection"><subsection></a></code>
</dt>
<dd>
Level below <code>section</code>.
</dd>
<dt><code><a name="label$subsubsection"><subsubsection></a></code></dt>
<dd>
Level below <code>subsection</code>.
</dd>
<dt><code><a name="label$heading"><heading></a></code></dt>
<dd>
Each <a rel="gsdoc" href="#label$chapter">chapter</a>
,
<a rel="gsdoc" href="#label$section">section</a>
<a rel="gsdoc" href="#label$subsection">sub-section</a>
,
or <a rel="gsdoc" href="#label$subsubsection">sub-sub-section</a>
has a heading as the first thing in it.
These headings introduce the sections and are listed in the
contents page.
</dd>
</dl>
<a name="label$blockElements"></a>
<h2><a name="003002000000">Block Elements</a></h2>
<p>
<em>Block elements</em> can occur at the top level of sections,
as well is in certain other contexts. The block elements are -
</p>
<dl>
<dt><code><a name="label$embed"><embed></a></code></dt>
<dd>
marks embedded information from elsewhere
</dd>
<dt><br /><code><a name="label$example"><example></a></code></dt>
<dd>
marks an example
</dd>
<dt><br /><code><a name="label$index"><index></a></code></dt>
<dd>
The <code><index></code> tag is special in that it is
dynamically expanded during output based on information that has
been collated from reading in various documentation and source
files. The <code>type</code> attribute of the index specifies
what sort of item is to be in the index - the default type of
<code>label</code> causes an index of all <em>label</em> and
<em>entry</em> elements to be generated. Currently the allowable
types are: <code>class</code>, <code>category</code>,
<code>protocol</code>, <code>method</code>,
<code>ivariable</code>, <code>function</code>, <code>type</code>,
<code>macro</code>, <code>variable</code>, <code>constant</code>,
<code>label</code>, <code>title</code>, <code>EOModel</code>
(associated with the Enterprise Objects Framework, for interacting
with databases), <code>EOEntity</code>. The default is
"<code>label</code>".
<p>
The <code><index></code> element also takes three optional
attributes -
</p>
<dl>
<dt><code>scope</code></dt>
<dd>
Determines whether the index is generated for the current file
("<code>file</code>" scope), or for the whole of the current
project ("<code>project</code>" scope), or for everything the
software can find ("<code>global</code>" scope). In certain
contexts the specified scope is automatically overridden ... if
the document is processed in a standalone manner, the scope is
always "<code>file</code>". For method or ivariable indexing,
if the index is inside a class, protocol, or category, only
indexes for that unit are generated.
</dd>
<dt><code>style</code></dt>
<dd>
Determines whether the index is presented with standard
embellishments such as bulleted entries and a header
("<code>normal</code>" style) or in a minimalist style suitable
for, e.g., a navigation bar ("<code>bare</code>" style).
</dd>
<dt><code>target</code></dt>
<dd>
Provides additional information to accompany links formed from
the index. For HTML output, this is translated into a
"<code>target</code>" attribute to the <code><a>
href="..."</code> element generated for a link. In most cases
this can safely be left out.
</dd>
</dl>
</dd>
<dt><br /><em>text elements</em></dt>
<dd>
A variety of elements for text formatting, many based on HTML tags.
See <a rel="gsdoc" href="#label$textElements">below</a>
for details.
</dd>
<dt><br /><em>list elements</em></dt>
<dd>
A variety of lists. See <a rel="gsdoc" href="#label$listElements">below</a>
for
details.
</dd>
<dt><br /><em>cross reference elements</em></dt>
<dd>
A variety of elements for representing external references and
internal references to other parts of a document.
See <a rel="gsdoc" href="#label$crossrefElements">below</a>
for details.
</dd>
<dt><br /><em>definition elements</em></dt>
<dd>
A variety of specialised elements for software documentation.
See <a rel="gsdoc" href="#label$definitionElements">below</a>
for details.
</dd>
</dl>
<a name="label$textElements"></a>
<h2><a name="003003000000">Text Elements</a></h2>
<p>
<em>Text elements</em> can occur within blocks and typically within
other block elements such as
<code><a rel="gsdoc" href="#label$example">example</a>
</code> as well. They carry
out various presentation-related purposed.
The text elements are -
</p>
<dl>
<dt><code><a name="label$p"><p></a></code></dt>
<dd>
The paragraph, as in HTML. The paragraph element simply
contains <a rel="gsdoc" href="#label$textElements">text</a>
. Most descriptive
writing is inside paragraphs.
</dd>
<dt><code><a name="label$br"><br></a></code></dt>
<dd>
The line-break, as in HTML.
</dd>
<dt><code><a name="label$example"><example></a></code>
</dt>
<dd>
Marks an example.
</dd>
<dt><code><a name="label$footnote"><footnote></a></code>
</dt>
<dd>
A reference to a footnote that appears in full elsewhere.
</dd>
<dt><code><a name="label$code"><code></a></code></dt>
<dd>
The content is either a name for code (e.g. class names), or a
relatively short code fragment.
</dd>
<dt><code><a name="label$em"><em></a></code></dt>
<dd>
Emphasized text.
</dd>
<dt><code><a name="label$strong"><strong></a></code></dt>
<dd>
More strongly emphasized text.
</dd>
<dt><code><a name="label$file"><file></a></code></dt>
<dd>
The content is a filename.
</dd>
<dt><code><a name="label$ivar"><ivar></a></code></dt>
<dd>
The content is a metasyntactic ivariable name.
</dd>
<dt><code><a name="label$var"><var></a></code></dt>
<dd>
The content is a metasyntactic variable or argument name.
</dd>
<dt><code><a name="label$site"><site></a></code></dt>
<dd>
The content is a fully qualified domain name on the Internet.
</dd>
<dt><code><a name="label$cdata">(text)</a></code></dt>
<dd>
Unstructured text content is also allowed.
</dd>
</dl>
<a name="label$listElements"></a>
<h2><a name="003004000000">List Elements</a></h2>
<p>
<em>List elements</em> can occur within blocks and typically within
other block elements such as
<code><a rel="gsdoc" href="#label$example">example</a>
</code> as well. They support
presentation of various types of lists.
The list elements are -
</p>
<dl>
<dt><code><a name="label$list"><list></a></code></dt>
<dd>
A simple, unnumbered list of items, each contained within an
<code><item></code> tag.
</dd>
<dt><code><a name="label$enum"><enum></a></code></dt>
<dd>
A numbered list (<code><item></code> tags).
</dd>
<dt><code><a name="label$deflist"><deflist></a></code></dt>
<dd>
A list of terms with definitions, marked as alternating
<code><term></code> and <code><desc></code> tags.
</dd>
<dt><code><a name="label$dictionary"><dictionary></a></code>
</dt>
<dd>
An attribute-value list similar to an NSDictionary. Consists
of a sequence of <code><dictionaryItem></code> tags each with
a required <code>key</code> attribute and an optional
<code>value</code> attribute. If this is excluded, the element
content, which may be any
<a rel="gsdoc" href="#label$blockElements"><em>block</em> element</a>
(including
another <code><dictionary></code> tag) is the value.
</dd>
<dt><code><a name="label$qalist"><qalist></a></code></dt>
<dd>
A list of <code><question></code>s and
<code><answer></code>s.
</dd>
</dl>
<a name="label$crossrefElements"></a>
<h2><a name="003005000000">Cross-Reference Elements</a></h2>
<p>
<em>Cross-reference elements</em> can occur within blocks and
typically anywhere text elements can occur. They represent
references to other entities inside or outside the project being
documented. In output formats that support it, they are generally
transformed into hyperlinks. The cross-reference elements are -
</p>
<dl>
<dt><code><a name="label$ref"><ref></a></code></dt>
<dd>
A reference to another entity within collection of documents
describing the current project. In practice this means a reference
to an element in a GSDoc document. Standard conventions for document
naming and structure are used to generate a hyperlink in output.
To support this resolution, two attributes must be specified.
<dl>
<dt><code>type</code></dt>
<dd>
This is the type of entity being referenced. It may take
one of the following values: <code>class</code>,
<code>category</code>, <code>protocol</code>, <code>method</code>,
<code>ivariable</code>, <code>function</code>, <code>type</code>,
<code>macro</code>, <code>variable</code>, <code>constant</code>,
<code>label</code>, <code>EOModel</code>, <code>EOEntity</code>.
If <code>type</code> is not specified, "<code>label</code>" is
assumed.
</dd>
<dt><code>id</code></dt>
<dd>
Specifies the identifier of the reference. In most cases
this will be the name of the class, method, or other specific
entity being referenced. In the case of <code>label</code>
references, this is the <code>id</code> attribute of the label
being referenced.
</dd>
<dt><code>class</code></dt>
<dd>
In the case where a <code>method</code> is being referenced,
the <code>class</code> attribute should be specified as well, and
should contain the name of the class the method occurs in, in one
of the following formats: "classname", "classname(categoryname)",
or "(protocolname)".
</dd>
</dl>
</dd>
<dt><code><a name="label$prjref"><prjref></a></code></dt>
<dd>
A reference to another project, which assumedly has also had
GSDoc generated for it. A link in the output will be generated to
???. The <code><prjref></code> tag may contain text content,
which appears in the output.
</dd>
<dt><code><a name="label$uref"><uref></a></code></dt>
<dd>
A reference to a URL. Usage is similar to the
<code><A></code> tag in HTML, except that the attribute
'<code>url</code>' is used for the URL rather than
'<code>href</code>'. Text contents are shown in the output to label
the hyperlink.
</dd>
<dt><code><a name="label$url"><url></a></code></dt>
<dd>
Similar to <code><uref></code> except the URL itself is
automatically used as the hyperlink label (and so the tag itself does
not have text content).
</dd>
<dt><code><a name="label$email"><email></a></code></dt>
<dd>
An email address. Translates in HTML output to a
<code>mailto:</code> link.
</dd>
<dt><code><a name="label$entry"><entry></a></code></dt>
<dd>
An entry for the general index. Contains text elements but
this text appears only in the index, and never in the text itself.
It takes a single attribute, <code>id</code>, which may be used to
refer to the entry. (If it is absent any text content is taken to
be the id.)
</dd>
<dt><code><a name="label$label"><label></a></code></dt>
<dd>
A general purpose marker that can contain text elements,
which will appear in the output where the label occurs.
It takes a single attribute, <code>id</code>, which may be used to
refer to the label. (If it is absent any text content is taken to
be the id.)
</dd>
</dl>
<a name="label$definitionElements"></a>
<h2><a name="003006000000">Definition Elements</a></h2>
<p>
<em>Definition elements</em> are specialized elements for software
documentation. They can occur in most places that block elements
can occur. They represent specific Objective-C elements, and are
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. Most of the elements representing parts of the API
have optional attributes ovadd, ovdep and ovrem which may be used to
specify the OpenStep/OPENSTEP/MacOS-X versions at which the
documented element was added to, deprecated in, or removed from
the API, Similarly they have gvadd, gvdep and gvrem which may be
used to specify when an elment was added to or removed from
the API of the source code being documented
(eg a gnustep library).<br />
The definition elements are -
</p>
<dl>
<dt><code><a name="label$class"><class></a></code></dt>
<dd>
An Objective-C <em>class</em> definition. This is the main element
for Objective-C code documentation. The <code>name</code> attribute
is required for this element - it is the name of the class. The
<code>super</code> attribute is normally necessary to provide the
name of the superclass.
<p>
The elements in a <code><class></code> are - an optional
<a rel="gsdoc" href="#label$declared">declared</a>
element,
zero or more <a rel="gsdoc" href="#label$conform">conform</a>
elements,
an optional <a rel="gsdoc" href="#label$desc">desc</a>
,
zero or more <a rel="gsdoc" href="#label$ivariable">ivariable</a>
elements,
zero or more <a rel="gsdoc" href="#label$method">method</a>
elements.
</p>
</dd>
<dt><code><a name="label$category"><category></a></code>
</dt>
<dd>
An Objective-C <em>category</em> definition. It requires both a
<code>name</code> attribute providing the name of the category,
and a <code>class</code> attribute naming the class the category
is associated with.
<p>
The elements in a <code><category></code> are - an optional
<a rel="gsdoc" href="#label$declared">declared</a>
element,
zero or more <a rel="gsdoc" href="#label$conform">conform</a>
elements,
an optional <a rel="gsdoc" href="#label$desc">desc</a>
,
zero or more <a rel="gsdoc" href="#label$method">method</a>
elements.
</p>
</dd>
<dt><code><a name="label$protocol"><protocol></a></code>
</dt>
<dd>
An Objective-C <em>protocol</em> definition. It requires a
<code>name</code> attribute providing the name of the protocol.
<p>
The elements in a <code><protocol></code> are - an optional
<a rel="gsdoc" href="#label$declared">declared</a>
element,
zero or more <a rel="gsdoc" href="#label$conform">conform</a>
elements,
an optional <a rel="gsdoc" href="#label$desc">desc</a>
,
zero or more <a rel="gsdoc" href="#label$method">method</a>
elements.
</p>
</dd>
<dt><code><a name="label$function"><function></a></code>
</dt>
<dd>
A C <em>function</em> definition. It requires a
<code>name</code> attribute providing the function's name and a
<code>type</code> attribute providing the return type.
<p>
The elements in a <code><function></code> are -
a series of zero or more <a rel="gsdoc" href="#label$arg">arg</a>
elements,
followed by an optional <a rel="gsdoc" href="#label$vararg">arg</a>
element,
then an optional <a rel="gsdoc" href="#label$declared">declared</a>
element,
an optional <a rel="gsdoc" href="#label$desc">desc</a>
.
</p>
</dd>
<dt><code><a name="label$macro"><macro></a></code></dt>
<dd>
A C <em>macro</em> definition. It requires a
<code>name</code> attribute providing the macro's name.
<p>
The elements in a <code><macro></code> are -
a series of zero or more <a rel="gsdoc" href="#label$arg">arg</a>
elements,
followed by an optional <a rel="gsdoc" href="#label$vararg">arg</a>
element,
then an optional <a rel="gsdoc" href="#label$declared">declared</a>
element,
an optional <a rel="gsdoc" href="#label$desc">desc</a>
.
</p>
</dd>
<dt><code><a name="label$type"><type></a></code></dt>
<dd>
A C <em>type</em> definition. It requires a
<code>name</code> attribute providing the macro's name.
<p>
The elements in a <code><macro></code> are -
an optional <a rel="gsdoc" href="#label$declared">declared</a>
element,
an optional <a rel="gsdoc" href="#label$desc">desc</a>
.
</p>
</dd>
<dt><code><a name="label$constant"><constant></a></code>
</dt>
<dd>
A C <em>constant</em> definition. It requires
<code>name</code> and <code>type</code> attributes and a
<code>value</code> attribute is optional. In addition, an
Objective-C role for the constant may be specified using the
<code>role</code> attribute. Acceptable values for this attribute
are: "<code>except</code>", "<code>defaults</code>",
"<code>notify</code>", or "<code>key</code>".
<p>
The elements in a <code><constant></code> are -
an optional <a rel="gsdoc" href="#label$declared">declared</a>
element,
an optional <a rel="gsdoc" href="#label$desc">desc</a>
.
</p>
</dd>
<dt><code><a name="label$variable"><variable></a></code>
</dt>
<dd>
A C <em>variable</em> definition. It requires
<code>name</code> and <code>type</code> attributes and a
<code>value</code> attribute is optional.
<p>
The elements in a <code><variable></code> are -
an optional <a rel="gsdoc" href="#label$declared">declared</a>
element,
an optional <a rel="gsdoc" href="#label$desc">desc</a>
.
</p>
</dd>
<dt><code><a name="label$ivariable"><ivariable></a></code>
</dt>
<dd>
An objective C <em>instance variable</em> definition. It requires
<code>name</code> and <code>type</code> attributes and a
<code>validity</code> attribute optionally specifies the access
level for the variable (may be "<code>public</code>",
"<code>protected</code>", or "<code>private</code>", the default
is "<code>public</code>").
<p>
The elements in a <code><variable></code> are -
an optional <a rel="gsdoc" href="#label$desc">desc</a>
.
</p>
</dd>
<dt><code><a name="label$desc"><desc></a></code></dt>
<dd>
An element for general descriptive text. Contains a block and
occurs in various contexts including <a rel="gsdoc" href="#label$deflist">deflists</a>
as well as most
<a rel="gsdoc" href="#label$definitionElements">definition elements</a>
.<br /><br />
</dd>
<dt><code><a name="label$conform"><conform></a></code></dt>
<dd>
This element contains simple text giving the name of a protocol
or interface to which a class conforms.<br /><br />
</dd>
<dt><code><a name="label$declared"><declared></a></code>
</dt>
<dd>
This element contains simple text giving the name of the header
file in which something is declared.<br /><br />
</dd>
<dt><code><a name="label$method"><method></a></code>
</dt>
<dd>
Describes an Objective-C method. Only valid within a
<a rel="gsdoc" href="#label$class">class</a>
, <a rel="gsdoc" href="#label$protocol">protocol</a>
,
or <a rel="gsdoc" href="#label$category">category</a>
. An optional
<code>type</code> attribute describes the return type; an optional
<code>factory</code> attribute ("<code>yes</code>" or
"<code>no</code>", defaults to "<code>no</code>") specifies whether
this is a class or instance method. (Class methods are typically
only used for construction purposes in Objective-C.) An optional
<code>init</code> attribute (also taking
"<code>yes</code>" / "<code>no</code>") specifies whether this is
the designated constructor. An optional <code>override</code>
attribute specifies whether this method should be overridden.
If it <em>must</em> be overridden enter "<code>subclass</code>",
if it must <em>not</em> be overridden enter <code>never</code>",
if it is an empty/dummy implementation which is intended to be
overridden enter <code>dummy</code>, otherwise (for most methods
which may be but are not particularly designed to be overridden)
leave this attribute unset.
<p>
The elements in a <code><method></code> are -
the method's name (in a <a rel="gsdoc" href="#label$sel">sel</a>
element), the
method's arguments (a sequence of <a rel="gsdoc" href="#label$arg">arg</a>
then
<a rel="gsdoc" href="#label$sel">sel</a>
,<a rel="gsdoc" href="#label$arg">arg</a>
pairs, then an
optional <a rel="gsdoc" href="#label$vararg">vararg</a>
element),
followed by an optional <a rel="gsdoc" href="#label$desc">desc</a>
,
zero or more <a rel="gsdoc" href="#label$ivariable">ivariable</a>
elements,
zero or more <a rel="gsdoc" href="#label$method">method</a>
elements.
</p>
</dd>
<dt><code><a name="label$sel"><sel></a></code></dt>
<dd>
Content is a method name or argument name (referred to as a
"selector" in some cases, but different from an Objective-C
method selector (runtime pointer to a method implementation).
<br /><br />
</dd>
<dt><code><a name="label$arg"><arg></a></code></dt>
<dd>
Content is a an argument name. Takes a mandatory <code>type</code>
attribute giving the argument's type.
<br /><br />
</dd>
<dt><code><a name="label$vararg"><vararg></a></code></dt>
<dd>
An empty element indicating that a variable argument list may be
used (in a <a rel="gsdoc" href="#label$method">method</a>
or
<a rel="gsdoc" href="#label$function">function</a>
definition).
<br /><br />
</dd>
</dl>
<div>
</div>
<br />
</font>
</body>
</html>
|