DTHELPTAGDTD(4)

πŸ“¦
version 2.5.3 Β· 2 versions
, in nixos 26.05

πŸ’… dthelptagdtd β€” special file πŸ’…

okay so this page is dthelptagdtd, filed under special file, and it's literally the markup syntax specification for authored XCDE help information. No cap, it's giving extremely specific system-doc energy. 🫢


🌸 NAME 🌸

  • dthelptagdtd β€” markup syntax specification for authored XCDE help information.

✨ SYNOPSIS ✨

bestie, the whole synopsis is this two-liner, exactly:

The
HelpTag markup syntax (ISO 8879: 1986) SGML.

πŸŽ€ DESCRIPTION πŸŽ€

HelpTag is a markup language used for authoring XCDE help volumes. It is based on the ISO 8879:1986 Standard Generalized Markup Language (SGML) standard and is defined with the following Document Type Description (DTD). πŸ’–

The HelpTag marked-up help information is part of the source code for a conforming XCDE application. The compilation process that is required to install this information into help volumes for the XCDE help services is implementation dependent. πŸ’…

✨ SGML DECLARATION ✨

okay bestie, hydrate, sit up straight, because this part is the declaration itself β€” the big "here's what characters are, here's how much memory we're claiming, here's the syntax rules" block that has to live at the very top of the help-volume source before literally anything else can happen πŸ’…

no summaries, no skipping, here it is in full, character for character:

&<!SGML "ISO 8879:1986"
CHARSET
BASESET "ISO 646-1983//CHARSET International Reference Version
          (IRV)//ESC 2/5 4/0"
DESCSET      0        9      UNUSED
             9        2      9
            11        2      UNUSED
            13        1      13
            14       18      UNUSED
            32       95      32
           127        1      UNUSED
BASESET "ISO Registration Number 100//CHARSET ECMA-94
          Right Part of Latin Alphabet  Nr. 1//ESC  2/13  4/1"
DESCSET    128       32      UNUSED
           160        5      32
           165        1      UNUSED
           166       88      38
           254        1      127
           255        1      UNUSED
CAPACITY SGMLREF
    TOTALCAP 350000
    ENTCAP   100000
    ENTCHCAP  50000
    ELEMCAP   50000
    GRPCAP   210000
    EXGRPCAP  50000
    EXNMCAP   50000
    ATTCAP    50000
    ATTCHCAP  50000
    AVGRPCAP  50000
    NOTCAP    50000
    NOTCHCAP  50000
    IDCAP     50000
    IDREFCAP  50000
    MAPCAP   210000
    LKSETCAP  50000
    LKNMCAP   50000
SCOPE DOCUMENT
SYNTAX -- The Core Reference Syntax except with ATTCNT, LITLEN, NAMELEN,
          GRPCNT, and GRPGTCNT changed --
SHUNCHAR CONTROLS   0   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 127 255
BASESET "ISO 646-1983//CHARSET International Reference Version
          (IRV)//ESC 2/5 4/0"
DESCSET      0      128      0
FUNCTION     RE      13
             RS      10
             SPACE   32
             TAB     SEPCHAR    9
NAMING
   LCNMSTRT ""
   UCNMSTRT ""
   LCNMCHAR "-."
   UCNMCHAR "-."
   NAMECASE
      GENERAL YES
      ENTITY  YES
DELIM
   GENERAL  SGMLREF
   SHORTREF SGMLREF -- Removed short references --
   NAMES    SGMLREF
   QUANTITY SGMLREF
       ATTCNT    140
       LITLEN   4096
       NAMELEN    64
       GRPCNT    100
       GRPGTCNT  253
       TAGLVL     48
FEATURES
    MINIMIZE
        DATATAG    NO
        OMITTAG    NO
        RANK       NO
        SHORTTAG   YES
    LINK
        SIMPLE     NO
        IMPLICIT   NO
        EXPLICIT   NO
    OTHER
        CONCUR     NO
        SUBDOC     NO
        FORMAL     NO
        APPINFO  NONE
>

the CHARSET bit πŸŽ€ β€” there are two BASESET lines, each one a full character-set name string, and each followed by its own DESCSET table. The numbers run in columns; the word UNUSED shows up a bunch. That's it, that's the vibe β€” you don't have to memorise it, you just have to not touch it. πŸ’–

the CAPACITY SGMLREF squad πŸ”₯ β€” seventeen numbers, all declared under one SGMLREF heading:

  • TOTALCAP 350000 β€” the big one
  • ENTCAP 100000, ENTCHCAP 50000
  • ELEMCAP 50000
  • GRPCAP 210000, EXGRPCAP 50000, EXNMCAP 50000
  • ATTCAP 50000, ATTCHCAP 50000, AVGRPCAP 50000
  • NOTCAP 50000, NOTCHCAP 50000
  • IDCAP 50000, IDREFCAP 50000
  • MAPCAP 210000
  • LKSETCAP 50000, LKNMCAP 50000

like, the 50000s are literally everywhere, it's giving coordinated group chat πŸ’€

SCOPE DOCUMENT β€” one line, does what it says on the tin.

SYNTAX β€” and the comment riding along with it is, verbatim: "The Core Reference Syntax except with ATTCNT, LITLEN, NAMELEN, GRPCNT, and GRPGTCNT changed". so yeah, the core reference syntax, but five things got changed. noted. 🫢

SHUNCHAR CONTROLS β€” the numbers get shunned, and they're listed out in full: 0 through 31 across three rows, plus 127 and 255. shunned is such a strong word and honestly? iconic.

then the second BASESET/DESCSET pair β€” same ISO 646-1983 string as before, and a single DESCSET 0 128 0 line.

FUNCTION β€” four of them, and the numbers are literal:

  • RE 13
  • RS 10
  • SPACE 32
  • TAB SEPCHAR 9

NAMING β€” LCNMSTRT "" and UCNMSTRT "" are both empty strings (yes, deliberately empty, don't have a crisis 😭), LCNMCHAR "-.", UCNMCHAR "-.", and then NAMECASE with GENERAL YES and ENTITY YES. yes ma'am ✨

DELIM β€” GENERAL, SHORTREF, and NAMES are all just SGMLREF, with the note "Removed short references" sitting next to SHORTREF. Then QUANTITY SGMLREF brings the actual numbers: ATTCNT 140, LITLEN 4096, NAMELEN 64, GRPCNT 100, GRPGTCNT 253, TAGLVL 48.

FEATURES β€” three little groups and their answers:

  • MINIMIZE: DATATAG NO, OMITTAG NO, RANK NO, SHORTTAG YES
  • LINK: SIMPLE NO, IMPLICIT NO, EXPLICIT NO
  • OTHER: CONCUR NO, SUBDOC NO, FORMAL NO, APPINFO NONE

and then one lonely > closes the whole declaration. bow down πŸ‘‘


πŸ¦‹ THE DOCTYPE + ELEMENT DECLARATIONS πŸ¦‹

next up, the document type declaration for helpvolume, and it opens like this β€” note the [ because there's a whole internal subset coming:

&<!DOCTYPE helpvolume [
&<!ELEMENT helpvolume   - - (metainfo?,
                            hometopic?,
                            (chapter* | (s1*, rsect*)),
                            message?,
                            glossary?)
                           +(memo | idx) >
&<!ELEMENT metainfo     - - (idsection, abstract?, otherfront*)
                           -(footnote) >
&<!ELEMENT idsection    - - (title, copyright?) >
&<!ELEMENT title        - - (partext)
                           -(memo | location | idx) >
&<!ELEMENT partext      - - ((#PCDATA | acro   | emph     | computer |
                             user    | term   | var      | circle   |
                             quote   | keycap | graphic  | super    |
                             sub     | book   | xref     | footnote |
                             esc     | link   | location | newline  )*) >
&<!ELEMENT acro         - - ((#PCDATA | esc | super | sub)*) >
&<!ELEMENT emph         - - (partext) -(emph) >
&<!ELEMENT computer     - - ((#PCDATA | quote | var | user | esc)*) >
&<!ELEMENT user         - - ((#PCDATA | var | esc)*) >
&<!ELEMENT term         - - (partext)
                           -(emph  | computer | term | var     |
                             quote | user     | book | footnote) >
&<!ATTLIST term             base         CDATA             #IMPLIED
                           gloss        (gloss | nogloss) gloss >
&<!ELEMENT var          - - ((#PCDATA | esc)*) >

the tea β˜• β€” helpvolume is the main character and its content model is (metainfo?, hometopic?, (chapter* | (s1*, rsect*)), message?, glossary?) with that extra +(memo | idx) hanging off the end. metainfo holds (idsection, abstract?, otherfront*) and explicitly minus-(footnote). idsection is (title, copyright?). title is (partext) minus (memo | location | idx).

and then partext… bestie. partext is the icon of this entire DTD. its content model is a giant list of alternatives and it includes #PCDATA plus acro, emph, computer, user, term, var, circle, quote, keycap, graphic, super, sub, book, xref, footnote, esc, link, location, and newline, all repeated. it's giving "everyone is invited to the party" 🌈

after that: acro is ((#PCDATA | esc | super | sub)*), emph is (partext) minus (emph), computer is ((#PCDATA | quote | var | user | esc)*), user is ((#PCDATA | var | esc)*), and term is (partext) minus a whole excluded list: (emph | computer | term | var | quote | user | book | footnote).

and term gets an ATTLIST πŸ’… β€” two attributes:

  • base β€” CDATA, #IMPLIED
  • gloss β€” (gloss | nogloss), and the default is gloss

then var is ((#PCDATA | esc)*) and that's where we pause this chunk.


&<!ELEMENT circle       - - CDATA >
&<!ELEMENT quote        - - (partext) -(quote) >
&<!ELEMENT keycap       - - ((#PCDATA | super | sub | esc)+) >
&<!ELEMENT graphic      - O EMPTY >
&<!ATTLIST graphic          id           ID                #IMPLIED
                           entity       ENTITY            #REQUIRED >
&<!ELEMENT super        - - (#PCDATA) >
&<!ELEMENT sub          - - (#PCDATA) >
&<!ELEMENT book         - - (partext) -(book) >
&<!ELEMENT xref         - O EMPTY >
&<!ATTLIST xref             id           IDREF             #REQUIRED >
&<!ELEMENT footnote     - - (p+) -(footnote) >
&<!ELEMENT esc          - - CDATA >
&<!ELEMENT link         - - (partext) -(link | xref) >
&<!ATTLIST link             hyperlink    CDATA             #REQUIRED
                           type         (jump        |
                                         jumpnewview |
                                         definition  |
                                         execute     |
                                         appdefined  |
                                         man)    jump
                            description CDATA             #IMPLIED >
&<!ELEMENT location     - - (partext) -(location) >
&<!ATTLIST location         id           ID                #REQUIRED >

okay so this chunk is lowkey stacked πŸ“ β€” circle is just CDATA, quote is (partext) minus (quote), keycap is ((#PCDATA | super | sub | esc)+) β€” note that +, one or more, no zero-or-more energy here β€” and graphic is - O EMPTY with two attributes: id (ID, #IMPLIED) and entity (ENTITY, #REQUIRED).

‼️ yes, it's a letter O in - O EMPTY, and yes, xref and later newline and lineno do the same thing. copy it exactly, don't go "fixing" it, i'm begging 🫢

super and sub are both plain (#PCDATA). book is (partext) minus (book). xref is - O EMPTY with one attribute, id, which is IDREF and #REQUIRED. footnote is (p+) minus (footnote). esc is CDATA.

and link has range πŸ’– β€” it's (partext) minus (link | xref), and its ATTLIST is three attributes deep:

  • hyperlink β€” CDATA, #REQUIRED
  • type β€” (jump | jumpnewview | definition | execute | appdefined | man), defaulting to jump
  • description β€” CDATA, #IMPLIED

location closes this chunk: (partext) minus (location), with an ATTLIST of id β€” ID, #REQUIRED. no notes. ✨


&<!ELEMENT copyright    - - (text)
                            -(memo | location | idx) >
&<!ELEMENT text         - - ((p       | note      | caution   | warning |
                             lablist | list      | ex        | vex     |
                             esc     | otherhead | procedure | syntax  |
                             figure  | image     )*) >
&<!ELEMENT p            - - (head?, partext)
                           +(newline) >
&<!ATTLIST (p | image)      indent       (indent)          #IMPLIED
                           id           ID                #IMPLIED
                           gentity      ENTITY            #IMPLIED
                           gposition    (left | right)    left
                           ghyperlink   CDATA             #IMPLIED
                           glinktype    (jump        |
                                         jumpnewview |
                                         definition  |
                                         execute     |
                                         appdefined  |
                                         man)    jump
                           gdescription CDATA             #IMPLIED >
&<!ELEMENT head         - - (partext)
                           -(memo | location | idx) >
&<!ELEMENT newline      - O EMPTY >
&<!ELEMENT (note    |
           caution |
           warning)   - - (head?, text)
                            -(note | caution | warning | footnote) >

this is the "content lives here" chunk 🌸 β€” copyright is (text) minus (memo | location | idx). then text, which is a whole menu of alternatives, all zero-or-more: p, note, caution, warning, lablist, list, ex, vex, esc, otherhead, procedure, syntax, figure, image. that's the entire buffet 🍽️

p is (head?, partext) plus +(newline). and here's the slay detail: the ATTLIST is declared for (p | image) together, so both elements share all seven attributes:

  • indent β€” (indent), #IMPLIED
  • id β€” ID, #IMPLIED
  • gentity β€” ENTITY, #IMPLIED
  • gposition β€” (left | right), defaulting to left
  • ghyperlink β€” CDATA, #IMPLIED
  • glinktype β€” (jump | jumpnewview | definition | execute | appdefined | man), defaulting to jump
  • gdescription β€” CDATA, #IMPLIED

head is (partext) minus (memo | location | idx). newline is - O EMPTY, still with that letter O. and then note, caution, and warning are all declared in one combined declaration: (head?, text), minus (note | caution | warning | footnote). efficient. we love a group project that actually works πŸ’œ


&<!ELEMENT lablist      - - (head?, labheads?, lablistitem+) >
&<!ATTLIST lablist          spacing      (loose | tight)   loose
                           longlabel    (wrap  | nowrap)  wrap >
&<!ELEMENT labheads     - - (labh, labhtext)
                           -(memo | location | idx) >
&<!ELEMENT labh         - - (partext) >
&<!ELEMENT labhtext     - - (partext) >
&<!ELEMENT lablistitem  - - (label, text) >
&<!ELEMENT label        - - (partext) >
&<!ELEMENT list         - - (head?, item+) >
&<!ATTLIST list             type         (order   |
                                         bullet  |
                                         plain   |
                                         check)        bullet
                           ordertype    (ualpha  |
                                         lalpha  |
                                         arabic  |
                                         uroman  |
                                         lroman)        arabic
                           spacing      (tight   |
                                         loose)        tight
                           continue     (continue)        #IMPLIED >
&<!ELEMENT item         - - (text) >
&<!ATTLIST item             id           ID                #IMPLIED >

lists on lists on lists 😭 β€” lablist is (head?, labheads?, lablistitem+) (yes, one or more items, mandatory) and its two attributes are spacing β€” (loose | tight), default loose β€” and longlabel β€” (wrap | nowrap), default wrap.

labheads is (labh, labhtext) minus (memo | location | idx). labh is (partext), labhtext is (partext), lablistitem is (label, text), and label is (partext). tidy. πŸŽ€

then list, which is (head?, item+) with four attributes:

  • type β€” (order | bullet | plain | check), default bullet
  • ordertype β€” (ualpha | lalpha | arabic | uroman | lroman), default arabic
  • spacing β€” (tight | loose), default tight
  • continue β€” (continue), #IMPLIED

item is (text) with an id attribute, ID, #IMPLIED. periodt πŸ’…


&<!ELEMENT ex           - - (head?, (exampleseg, annotation?)+)
                           -(ex      |
                             vex     |
                             note    |
                             caution |
                             warning |
                             syntax  |
                             footnote) >
&<!ATTLIST ex               notes        (side | stack)    side
                           lines        (number   |
                                         nonumber)       nonumber
                           textsize     (normal   |
                                         smaller  |
                                         smallest)       normal >
&<!ELEMENT exampleseg   - - (partext) +(lineno) >
&<!ELEMENT annotation   - - (partext) +(newline) >
&<!ELEMENT lineno       - O EMPTY >
&<!ATTLIST lineno           id           ID                #IMPLIED >
&<!ELEMENT vex          - - CDATA >
&<!ATTLIST vex              lines        (number   |
                                         nonumber)       nonumber
                           textsize     (normal   |
                                         smaller  |
                                         smallest)       normal >

example blocks, my beloved πŸ”₯ β€” ex is (head?, (exampleseg, annotation?)+) and it's got a big exclusion list: minus (ex | vex | note | caution | warning | syntax | footnote). no nesting examples inside examples, bestie, we're not doing recursion today.

its ATTLIST is three:

  • notes β€” (side | stack), default side
  • lines β€” (number | nonumber), default nonumber
  • textsize β€” (normal | smaller | smallest), default normal

exampleseg is (partext) +(lineno), annotation is (partext) +(newline), lineno is - O EMPTY (there's that O again) with id β€” ID, #IMPLIED.

vex is CDATA and shares two of ex's attributes with the same defaults: lines β€” (number | nonumber), nonumber β€” and textsize β€” (normal | smaller | smallest), normal. it does not get notes. rude but okay πŸ™ˆ


&<!ELEMENT otherhead    - - (head, text?) >
&<!ELEMENT procedure    - - (chaphead, text?)
                           -(procedure) >
&<!ELEMENT chaphead     - - (head, abbrev?)
                           -(memo | location | idx | footnote) >
&<!ELEMENT abbrev       - - (partext) -(footnote) >
&<!ELEMENT syntax       - - (head?, synel) >
&<!ELEMENT synel        - - ((#PCDATA | esc | var |
                             optblock | reqblock  )+) >
&<!ELEMENT (optblock |
           reqblock)  - - (synel+) >

structure girlies πŸ¦‹ β€” otherhead is (head, text?). procedure is (chaphead, text?) minus (procedure) (no procedures inside procedures, we said what we said). chaphead is (head, abbrev?) minus (memo | location | idx | footnote), and abbrev is (partext) minus (footnote).

then the syntax crew: syntax is (head?, synel), synel is ((#PCDATA | esc | var | optblock | reqblock)+) β€” one or more, mandatory β€” and optblock and reqblock are declared together in one combined declaration, both as (synel+). matching little icons, we stan 🫢


&<!ELEMENT figure       - - (caption?)
                           -(figure | graphic) >
&<!ATTLIST figure           number       NUMBER            #IMPLIED
                           tonumber     (number  |
                                         nonumber)        number
                           id           ID                #IMPLIED
                           entity       ENTITY            #REQUIRED
                           figpos       (left   |
                                         center |
                                         right)         #IMPLIED
                           cappos       (capleft   |
                                         capcenter |
                                         capright)      #IMPLIED
                           ghyperlink   CDATA             #IMPLIED

and we land on figure πŸ‘‘ β€” the element itself is (caption?) minus (figure | graphic), so no figure-in-figure, no graphic-in-figure, thank you very much. its ATTLIST so far: number β€” NUMBER, #IMPLIED β€” tonumber β€” (number | nonumber), default number β€” id β€” ID, #IMPLIED β€” entity β€” ENTITY, #REQUIRED β€” figpos β€” (left | center | right), #IMPLIED β€” cappos β€” (capleft | capcenter | capright), #IMPLIED β€” and ghyperlink β€” CDATA, #IMPLIED.

and we're literally mid-ATTLIST right there β€” that attribute list keeps going, so hold that thought πŸ’…

                                  glinktype    (jump        |
                                                jumpnewview |
                                                definition  |
                                                execute     |
                                                appdefined  |
                                                man)    jump
                                  gdescription CDATA             #IMPLIED >
       &<!ELEMENT caption      - - (partext, abbrev?)
                                  -(memo | location | idx) >
       &<!ELEMENT image        - - (head?, partext) -(footnote) >
       &<!ELEMENT abstract     - - (head?, text?, frontsub*) >
       &<!ELEMENT frontsub     - - (head?, text) >
       &<!ELEMENT otherfront   - - (head?, text?, frontsub*) >
       &<!ATTLIST otherfront       id           ID                #IMPLIED >
       &<!ELEMENT hometopic    - - (chaphead, text?) >
       &<!ELEMENT chapter      - - (chaphead, text?, (s1*, rsect*)) >
       &<!ATTLIST (chapter |
                  s1      |
                  s2      |
                  s3      |
                  s4      |
                  s5      |
                  s6      |
                  s7      |
                  s8      |
                  s9)       id           ID                #IMPLIED >
       &<!ELEMENT s1           - - (chaphead, text?, s2*, rsect*) >
       &<!ELEMENT s2           - - (chaphead, text?, s3*, rsect*) >
       &<!ELEMENT s3           - - (chaphead, text?, s4*, rsect*) >
       &<!ELEMENT s4           - - (chaphead, text?, s5*, rsect*) >
       &<!ELEMENT s5           - - (chaphead, text?, s6*, rsect*) >
       &<!ELEMENT s6           - - (chaphead, text?, s7*, rsect*) >
       &<!ELEMENT s7           - - (chaphead, text?, s8*, rsect*) >
       &<!ELEMENT s8           - - (chaphead, text?, s9*, rsect*) >
       &<!ELEMENT s9           - - (chaphead, text?) >
       &<!ELEMENT rsect        - - (chaphead, text?, rsub*) >
       &<!ATTLIST rsect            id           ID                #IMPLIED >
       &<!ELEMENT rsub         - - (chaphead, text?) >
       &<!ELEMENT message      - - (chaphead?, text?, (msg+ | msgsub+)) >
       &<!ELEMENT msg          - - (msgnum?, msgtext, explain?) +(newline) >
       &<!ELEMENT msgnum       - - ((#PCDATA | esc)+) >
       &<!ELEMENT msgtext      - - (partext) >
       &<!ELEMENT explain      - - (text) >
       &<!ELEMENT msgsub       - - (chaphead, text?, msg+) >
       &<!ELEMENT glossary     - - (text?, glossent+) >
       &<!ELEMENT glossent     - - (dterm, definition) >
       &<!ELEMENT dterm        - - (partext) -(term) >
       &<!ELEMENT definition   - - (text) >
       &<!ELEMENT idx          - - (indexprimary, indexsub?)
                                  -(term | footnote | location | idx) >
       &<!ELEMENT indexprimary - - (partext, sort?) >
       &<!ELEMENT indexsub     - - (partext, sort?) >
       &<!ELEMENT sort         - - ((#PCDATA | esc)+) >
       &<!ELEMENT memo         - - CDATA >
       &<!ENTITY MINUS     SDATA "-">
       &<!ENTITY PM        SDATA '[plusmn]'>    &<!-- ISOnum  -->
       &<!ENTITY DIV       SDATA '[divide]'>    &<!-- ISOnum  -->
       &<!ENTITY TIMES     SDATA '[times ]'>    &<!-- ISOnum  -->
       &<!ENTITY LEQ       SDATA '[le    ]'>    &<!-- ISOtech -->
       &<!ENTITY GEQ       SDATA '[ge    ]'>    &<!-- ISOtech -->
       &<!ENTITY NEQ       SDATA '[ne    ]'>    &<!-- ISOtech -->
       &<!ENTITY COPY      SDATA '[copy  ]'>    &<!-- ISOnum  -->
       &<!ENTITY REG       SDATA '[reg   ]'>    &<!-- ISOnum  -->
       &<!ENTITY TM        SDATA '[trade ]'>    &<!-- ISOnum  -->
       &<!ENTITY ELLIPSIS  SDATA '[hellip]'>    &<!-- ISOpub  -->
       &<!ENTITY VELLIPSIS SDATA '[vellip]'>    &<!-- ISOpub  -->
       &<!ENTITY PELLIPSIS SDATA "....">  &<!-- ellipsis followed by a period -->
       &<!ENTITY A.M.      SDATA "a.m.">
       &<!ENTITY P.M.      SDATA "p.m.">
       &<!ENTITY MINUTES   SDATA '[prime ]'>    &<!-- ISOtech -->
       &<!ENTITY SECONDS   SDATA '[Prime ]'>    &<!-- ISOtech -->
       &<!ENTITY DEG       SDATA '[deg   ]'>    &<!-- ISOnum  -->
       &<!ENTITY SQUOTE    SDATA "`">
       &<!ENTITY DQUOTE    SDATA '"'>
       &<!ENTITY ENDASH    SDATA "-">
       &<!ENTITY EMDASH    SDATA '[mdash ]'>    &<!-- ISOpub  -->
       &<!ENTITY VBLANK    SDATA "_">
       &<!ENTITY CENTS     SDATA '[cent  ]'>    &<!-- ISOnum  -->
       &<!ENTITY STERLING  SDATA '[pound ]'>    &<!-- ISOnum  -->
       &<!ENTITY SPACE     SDATA " ">
       &<!ENTITY SIGSPACE  SDATA "&& ">
       &<!ENTITY SIGDASH   SDATA "&&-">
       &<!ENTITY MICRO     SDATA '[micro ]'>    &<!-- ISOnum  -->
       &<!ENTITY OHM       SDATA '[ohm   ]'>    &<!-- ISOnum  -->
       &<!ENTITY UP        SDATA '[uarr  ]'>    &<!-- ISOnum  -->
       &<!ENTITY DOWN      SDATA '[darr  ]'>    &<!-- ISOnum  -->
       &<!ENTITY LEFT      SDATA '[larr  ]'>    &<!-- ISOnum  -->
       &<!ENTITY RIGHT     SDATA '[rarr  ]'>    &<!-- ISOnum  -->
       &<!ENTITY HOME      SDATA "home key">
       &<!ENTITY BACK      SDATA "&<--">
       &<!ENTITY HALFSPACE SDATA " ">
       &<!ENTITY % user-defined-entities SYSTEM "helptag.ent">
       %user-defined-entities;
       ] >

Okay bestie, that's the tail end of the declaration and honestly? It ate. πŸ’… Let me walk you through the vibes so nothing gets lost:

  • caption is giving "photo caption but make it SGML" β€” it takes a partext plus an optional abbrev, and it is expressly not allowed to contain memo, location or idx. Boundaries, queen.
  • image takes an optional head and a partext, but no footnote. abstract is head?, text?, then frontsub* for days. frontsub is just (head?, text). otherfront matches abstract's shape and gets its own id attribute (ID, #IMPLIED).
  • hometopic is (chaphead, text?) β€” short and iconic.
  • chapter is (chaphead, text?, (s1*, rsect*)), and the big ATTLIST up there gives an id (ID, #IMPLIED) to chapter, s1, s2, s3, s4, s5, s6, s7, s8 and s9 all at once. Group project but somehow it's functioning ✨
  • The s1 through s9 cascade is the nesting chain: each one holds a chaphead, optional text, the next level down (*), then rsect*. s9 is the bottom of the staircase β€” just (chaphead, text?), no further levels. She's done.
  • rsect is (chaphead, text?, rsub*) with its own id attribute, and rsub is (chaphead, text?).
  • message = (chaphead?, text?, (msg+ | msgsub+)). msg = (msgnum?, msgtext, explain?) with +(newline) on the end β€” so every msg needs a newline after it, no cap. msgnum is ((#PCDATA | esc)+), msgtext is (partext), explain is (text), msgsub is (chaphead, text?, msg+).
  • glossary takes optional text then glossent+. Each glossent is (dterm, definition). dterm is (partext) and can't contain term; definition is (text).
  • idx is (indexprimary, indexsub?) and excludes term, footnote, location and idx (no recursive index inception, we're not doing that today 🫢). indexprimary and indexsub are both (partext, sort?), and sort is ((#PCDATA | esc)+).
  • memo is CDATA, full stop.

πŸŽ€ the entity era πŸŽ€

Then comes the entity glow-up β€” a whole wardrobe of named entities, each SDATA-declared, many with a little comment tagging where it came from: ISOnum, ISOtech, ISOpub. Literally the vintage tags of the SGML world, iykyk.

Highlights for the girlies:

  • Math crew: &PM; ([plusmn]), &DIV; ([divide]), &TIMES; ([times ]), &LEQ; ([le ]), &GEQ; ([ge ]), &NEQ; ([ne ]) β€” all ISOnum/ISOtech.
  • Legal-but-cute crew: &COPY; ([copy ]), &REG; ([reg ]), &TM; ([trade ]).
  • Dot dot dot trio: &ELLIPSIS; ([hellip]), &VELLIPSIS; ([vellip]), and the deeply specific &PELLIPSIS; ("....", commented as ellipsis followed by a period) β€” she's an overachiever, we respect it.
  • Time crew: &A.M.; ("a.m.") and &P.M.; ("p.m.") β€” note the literal dots in the entity name itself, main character energy.
  • Angle crew: &MINUTES; ([prime ]), &SECONDS; ([Prime ]), &DEG; ([deg ]).
  • Punctuation besties: &ENDASH; ("-"), &EMDASH; ([mdash ]), &VBLANK; ("_"), plus &SQUOTE; and &DQUOTE; for your quote needs.
  • Money moves: &CENTS; ([cent ]), &STERLING; ([pound ]).
  • Spacing divas: &SPACE; (" "), &HALFSPACE; (also a " " β€” yes, same value, she contains multitudes), and the signature ones &SIGSPACE; ("&& ") and &SIGDASH; ("&&-").
  • Science/units: &MICRO; ([micro ]), &OHM; ([ohm ]).
  • Arrows, aka the scroll-babes: &UP; ([uarr ]), &DOWN; ([darr ]), &LEFT; ([larr ]), &RIGHT; ([rarr ]).
  • Key behavior: &HOME; ("home key") and &BACK; ("&<--") β€” yes, &BACK; literally renders as that left arrow, slay.
  • And the actual finale before the close: &MINUS; is SDATA "-", and the whole thing goes out through the plug-in point β€” the parameter entity % user-defined-entities;, declared as SYSTEM "helptag.ent" and then referenced with %user-defined-entities;. Custom content? We love an expansion pack. πŸ¦‹
πŸ’€ Do not sleep on the ordering here β€” the declarations and the ] > close are exactly as written, and the helptag.ent reference is a system entity, i.e. it pulls from that file. Copy it verbatim or your parse is gonna have a bad time.

🌈 SEE ALSO 🌈

Go touch grass in these other pages, they're all linked and all important:

(Yes, DtHelpDialog(3) shows up twice β€” once up front, once in the lineup. That's not a typo on my end, that's just how the page does it. Respect the duplication. πŸ’–)


And that's the whole page, bestie, we made it to the end πŸŽ€βœ¨ The footer tags this one as dthelptagdtd(special file) β€” that's your source/version stamp for this section of the manual β€” so if anyone asks where you learned all this, you point at that and then point at me. Periodt. πŸ’…πŸ‘‘

πŸ“¦ where this page comes from