Catalog of HyTime Architectural Forms and HyTime SGML Specification Version 2.0, June 28, 1993 By Charles F. Goldfarb This document contains an unofficial compilation of the formal SGML specifications from the HyTime Standard (ISO/IEC 10744:1992), cross-referenced to the text that describes them, and with known errors corrected. The current version expands on the original by including the formal specifications of useful element types, notations, and instances from Annex A. of the standard. The material in this document is excerpted from the pre-publication review edition of "The HyTime Handbook", which I hope will be available for limited distribution in the fall of 1993. 1. COPYRIGHT AND LICENSES This document is distributed in both printed and machine-readable form. It contains formal SGML specifications derived from ISO/IEC 10744, and additional text and cross-references from The HyTime Handbook. The document as a whole is subject to the following copyright notice and license: (C) Charles F. Goldfarb 1993. Permission to copy in any form is granted for use with conforming HyTime systems and applications as defined in ISO/IEC 10744, provided that all copies are accurate and complete in every respect, including this notice. The above license is intended to encourage the dissemination of the formal SGML specifications, while assuring that essential information about variations from the text of the standard (see below) is disseminated with them. The formal SGML specifications are individually subject to the following copyright notice and license: (C) International Organization for Standardization 1992. Permission to copy in any form is granted for use with conforming HyTime systems and applications as defined in ISO/IEC 10744, provided this notice is included in all copies. The above license is intended to facilitate the use of the formal SGML specifications as a base for developing HyTime applications (particularly when distributed in machine-readable form). 2. INTRODUCTION TO THE CATALOG The formal SGML specifications that define the architectural forms appear in the same order as in ISO/IEC 10744. At the right margins of the headings that identify the forms are supplementary comments that identify the clause number and page number of ISO/IEC 10744 where the forms are defined. For example, the line: introduces the "property name" element type form, which is described in clause 6.7.2, which begins on page 36. Consult the standard for the notation and conventions used, which indicate the interrelationships of the forms and their mandatory or non-mandatory status. An uppercase heading identifies the HyTime module in which the following architectural forms occur. For example, the forms of the measurement module are introduced by the heading: The specifications from Annex A are presented similarly, except that the first-level headings are treated as the equivalent of module names. 3. CORRECTIONS IN THIS VERSION Although International Standards are subjected to extensive review and proofreading, early users frequently discover errors. These are reported to the Project Editor for eventual consideration by the responsible standards committee, after which "corrigenda" may be published to correct the errors officially. Several errors and ambiguities have already been reported; the proposed corrections and clarifications (hereinafter simply "corrections") for some of them are reflected in this document. While it must be stressed that the corrections are not official (and theoretically might never be), they are of such a nature that they are highly likely to be accepted. Corrections affecting only the text of the standard (that is, not the formal SGML specifications included in parts 4 and 5 of this document) are preceded with a currency sign ($). Corrections added in this version of this Catalog are: 00.1 $In "Measurement module" list item: Change "finite coordinate space" to "scheduling". 06.3.1 $Last paragraph: change "HyTime" to 'the second "HyTime"'. 06.4 $After Note 79 add new para: An element of a type for which the "HyTime" attribute is not defined is a "non-HyTime element:"; it has no HyTime architectural form and therefore cannot affect conformance to the meta-DTD. Both HyTime and non-HyTime elements can occur in its content. 06.4 %resorce: delete from %HyBrid and add to HyDoc inclusions. (Note: inclusion group is now too large for reference concrete syntax, but DTDs can use other means to specify where resources occur.) 06.4.1 HyBrid: delete inclusion group. 06.4.2 nHyTime: change to "sHyTime" ("suppress HyTime element"); only attributes of nested sHyTime elements are processed. 06.4.2 $sHyTime: delete 2nd paragraph and Note 86. 06.5.2 $lexmodel: attribute should be "lexical model element type GIs (lextypgi). 06.5.2.1 $lexmodel: requires support of "lextype" option. 06.5.5.2 dvlist: change "attlist" to "attspecs". 06.6.2 $Second para: change "HyTime NAME nHyTime" to "HyTime architectural form (HyTime)"; move existing last sentence of 2nd para to become last sentence of 1st para; add new last sentence of 2nd para: The value of the "HyTime" attribute indicates whether the entity is to be treated as data or parsed as an SGML document, subdocument, or text entity. 06.6.2 "HyTime" attribute was omitted from formal SGML specification. 06.6.2 $altreps: need not use different data content notations. 06.6.2 insbento: offset changed to "origin 1" like (dimspec). 07.1.1 $Note 142: change "qcnt" to "quantum count". 07.4.1.2 elemref: add "calspec" to reftype group. 08.2.1 locsrc: default value changed to "#CURRENT". 08.3.2.2 nametype: default value changed to "entity". 08.3.2.2 obnames: default value changed to "nobnames". 08.4.1 $Add to 4th para: During concatenation, data content of elements that occur in element content is separated from the data content of siblings by a SPACE character. 08.4.1 catsrce and catres: add additional keywords (catsrcsp and catressp) to indicate when a SPACE character is inserted at each concatenation point. 08.4.2.2 $dataobj: in definition, change "an entity" to "a data entity". 08.4.2.7 $document position: There are two document position properties, for pathloc and treeloc. The marker list contains positive markers only. 08.5.2 notloc: in comment, change "address" to "HyTime address". 09.2.1 linkends: clarifies that one can be omitted, in which case the ilink is the first anchor (for clink compatibility). 09.2.1 ilink: Clarify reftype constraint comment. 09.2.2 clink: Clarify reftype constraint comment. 10.2 fcs: multiple FCS elements of same element type describe different spaces unless they have the same "fcsname" attribute (which requires the "splitfcs" option). 10.3 axisord: omitted axis name means all events occupy full dimension. 10.7 impfcs: type of imposed FCS; change "IDREF" to "NAME". 10.8.1 calspec: respecify content model to remove ambiguity. A.1.3 arg: balance parentheses. A.1.3 ATTORCON: balance parentheses. A.1.3 qpn: balance parentheses. A.2 HyPD qltnlmgi: "gil" changed to "GIL". A.2.1.2.2 docpos: clarify as "pathloc document position" and add docpostl: treeloc document position A.2.1.2.3 KEYWORD: psn=HTsem3; add definition. A.2.1.2.3 tag: psn=HTsem3. A.3.1 $HyQ: Add after 4th para: Query args, operands, and other nl nodes are evaluated as they are ordered (left to right), and before the query (or operator or other nl) is evaluated. A.3.2 $HyQ: Formal definition should be in HyLex (contributions welcomed). A.3.2 @lc: definition changed to "Value of attribute defined elsewhere" A.3.2 Delete informal heading "-- HyQ --" and number others A.3.2.1-9. A.3.2.1 dquery, iquery: allow qdomain without args. A.3.2.1 qdomain: correct second comment. A.3.2.1 args: should allow nl as well as nodes. A.3.2.4 union: clarify description of result nl. A.3.2.4 inter: clarify description of result nl. A.3.2.4 diff: eliminate ambiguity between diff and symmetric diff. A.3.2.6 hylex: balance single quotes. A.3.2.7 Forall: clarify argument query applies to each nl node in order. A.3.2.8 Compare: delete comma after "@quantum?". A.3.2.8 ordered: clarify that overlap refers to position. A.3.3 HyQ qltnlmgi: "gil" changed to "GIL". A.5.2.5 Chain: change "feet" to "foot". Corrections added in Version 1.0 are: 06.5.7 Actypes: changed "S+" to "s+". 08.4.2.3 Erroneous title "Tree Locations" changed to "Node Locations". 09.2.1 Anchrole: NAMES changed to CDATA because of RNI. 09.2.2 Clink: Deleted erroneous constraint comment for element. 10.2 Module heading "Scheduling" added. 10.2 Axisdefs: "gil" changed to "GIL". 10.3 Axisord: "gil" changed to "GIL". General Left-aligned heading/title comments were centered. 4. ARCHITECTURAL FORMS 5. USEFUL ELEMENT TYPES, NOTATIONS, AND INSTANCES Role String Description ==== ====== =========== XESC \ Escape XGRPO ( Group open XGRPC ) Group close XLIT " Literal start or end XLITA ' Literal start or end (alternative) XSEQ , Sequence connector XOR | Or connector XDTGO [ Alternative single-character pattern open XDTGC ] Alternative single-character pattern close XOPT ? Optional occurrence indicator XREP + Required and repeatable XOREP * Optional and repeatable XMINUS - Negation and range XRNI # Reserved name indicator Public identifier: "ISO/IEC 10744:1992//TEXT Useful HyLex Lexical Types//EN" (IDREF | "#NULL") (NAME, (s+, NAME)*) (GI, (s+, GI)*) (IDREF, s+, IDREF) (IDR2, (s+, IDR2)*) (ATTNAME|"#CONTENT") (number, (s+, number)*) (number, s+, number) (frac, (s+, frac)*) ([+-]?,number) ([1-9]) (nzdigit,digit*) ([+-]?,unzi) (nmchar+) (word, (s+, word)*) ((LIT,#*,LIT) | (LITA,#*,LITA)) ((LMGI,PLUS)?,LTN) (((PSN,PLUS)?,(PN,(DSO,(QPN|QLTN|word|literal),DSC)?)), (NET,((PSN,PLUS)?,(PN,(DSO,(QPN|QLTN|word|literal),DSC)?)))*) (PERO,nzdigit,(digit, digit?)?) character data general entity name general entity name list id value id reference value id reference list name list name token name token list notation name number list number token number token list entity name attribute name generic identifier ID of current element document type definition link process definition associated element type associated notation name entity type attribute definition list attribute definition declared value name token in ATTDV name token group entity etype[ENAME]/notation data attribute specification element current element attribute specification list link attribute specification result element specification attribute value lexical type name lexmodel element type property name property set name specifier of property function name object class identifier PTR to current object HyQ node list name reference type lexical type object current object location source of object HyQ selector candidate dataloc data quantum pseudo-element data entity data object element or pseudo-element node type: (element|pelement|dataent|dataobj) document root pathloc document position treeloc document position data position additional property source ilink or clink element objects linked by a hylink anchor roles of anchors of hylink hylinks that link an anchor other anchors of linkedby role of anchor in hylink unparsed element (includes tags) unparsed content (excludes tags) unpelem[ID]/unpcontx start-tag attribute value specification keyword parameter -- Conventions -- -- 'UC' Reserved name 'Ulc(' Reserved operator name !lc Useful LTN or PN of user-specified text @lc Value of attribute defined elsewhere lc Grammar non-terminal symbol ()?*+| Meta-ops: grouping, opt, orep, rrep, or '' Delimit meta-ops when used in real syntax two hyphens Begin and end comments (as in SGML) -- -- Delimiters -- -- Role String Description ==== ====== =========== QESC \ Escape QGRPO ( Group open QGRPC ) Group close QLIT " Literal start or end QLITA ' Literal start or end (alternative) -- HyQ -- The content of an element that uses the HyQ notation is a node list that comprises the body of a query. A qdomain and args can be specified as attributes of the query element. -- qbody -- Query -- query -- A query can be either a direct query or an indirect query -- (dquery|iquery) dquery -- Direct query: the query body is specified as a direct argument of the query -- 'Query('qbody qdomain? args?')' iquery -- Indirect query: the query body is specified indirectly by reference to the fn attribute of another query element -- 'UseQ('@fn qdomain? args?')' qbody -- Query body -- nl qdomain -- Query domain: node list whose objects are tested for inclusion in query result; defaults to DOMTREE if not specified. -- -- Qdomain must be specified if the first arg is nl or oo. -- nl args -- Query arguments -- (node|nl)* -- Nodes -- node -- Node -- -- !literal Delimited data @arg Argument (conforms to HyFunk ltn=arg) CAND The candidate currently under test in a select function. CAND has no meaning elsewhere, but survives in nested queries until stacked when a nested select function is invoked -- (!literal|'CAND'|@arg|oo|count) oo -- Object of: resolves IDREF to its object -- -- Object must be valid in context in which oo occurs -- 8 count -- Returns the number of quanta in an addressable range. The range is determined from a node list, all of whose nodes are data objects that have a common apropsrc (that is, all of the objects occur within the data of one other object). The range extends from the first bit combination of the node that is first in the common containing object, to the last bit combination of the last node, inclusive. -- 'Count('nl @quantum?')' -- Node List -- nl -- Node list -- ('DOMTREE'|'DOMROOT'|assign|nlref|nlops|nldefs|oo|query) assign -- Assign name to a node list to allow reuse by nl reference Name is constant for scope of query body and its nested queries -- 'Assign('!name nl')' nlref -- Node list reference: resolves !name to its node list -- -- !name Name assigned to a node list definition to allow reuse by reference; must be unique within query element. A node list cannot be referenced within its own body -- 'Nlref('!name')' -- Node List Operations -- nlops -- Node list operations (like set operations) -- (select|create|union|inter|diff) select -- Selects resulting nodes by testing specified properties of members of a given node list. The member under test is the "candidate" (CAND); it is included in resulting node list if the assertion returns "TRUE". -- 'Select('nl assert')' create -- Create node list: duplicates are not removed -- -- Create() is the empty node list -- -- Keyword 'Create' can be omitted -- 'Create'?'('(node|nl)*')' union -- Union (sum) of node lists: duplicates are removed -- -- Result nl contains nodes that occur in at least one operand nl. -- 'Union('nl+')' inter -- Intersection (product) of node lists (common membership) -- -- Result nl contains nodes that occur in every operand nl. -- 'Inter('nl+')' diff -- Difference between two node lists -- -- Result nl contains nodes that occur in only the 1st operand nl. -- 'Diff('nl nl')' sdiff -- Symmetric difference of node lists (non-common membership) -- -- Result nl contains nodes that occur in only one operand nl. -- 'Diff('nl+')' -- Node List Definitions -- nldefs -- Node list definitions -- (proploc|treeloc|pathloc|listloc|dataloc|hitloc|relloc) proploc -- Returns nl of data objects containing property of source nodes -- -- Based on proploc element type form: (node|nl) Locsrc !qpn Content @joint Attribute @apropsrc Attribute @notprop Attribute -- 'Proploc('(node|nl) !qpn @joint? @apropsrc? @notprop?')' listloc -- Pick nodes from list by position -- -- Based on listloc element type form: nl Locsrc mkpair* Content @overrun Attribute @set Attribute -- 'Listloc('nl mkpair* @overrun? @set?')' treeloc -- Pick node from tree by position -- -- Based on treeloc element type form: nl Locsrc !snzi* Content @overrun Attribute @set Attribute @treecom Attribute -- 'Treeloc('nl !snzi* @overrun? @set? @treecom?')' pathloc -- Pick nodes from tree by paths -- -- Based on pathloc element type form: nl Locsrc mkpair* Content @overrun Attribute @set Attribute @treecom Attribute -- 'Pathloc('nl mkpair* @overrun? @set? @treecom?')' relloc -- Locates relatives by selection from addressable ranges -- -- Based on relloc element type form: nl Locsrc (node|nl) Root attribute @relation Attribute mkpair* Content @overrun Attribute @set Attribute -- 'Relloc('nl (node|nl) @relation? mkpair* @overrun? @set?')' dataloc -- Selects portions of each node in the node list -- -- Based on dataloc element type form: nl Locsrc @quantum Attribute @catsrc Attribute @catres Attribute mkpair* Content @overrun Attribute -- 'Dataloc('nl @quantum? @catsrc? @catres? mkpair* @overrun? ')' mkpair -- Pair of axis markers, interpreted as dimspec -- (!snzi !snzi) hitloc -- Returns node list of data objects like that addressed by a dataloc whose content is a mrkquery whose qdomain is the dataloc locsrc -- -- Each resulting node contains information about the location of the match (the "hit"), in marker pairs (like mrkquery). -- match -- Pattern Match -- match -- Pattern match: Returns a node list where each node contains one occurrence of the matching text (a "hit"). That is, one node is returned for each non-overlapping match in the text in each match domain node. The number of matches per node has to be within hitrange. -- -- Hit must be word quantum unless "bigmatch" option is supported. -- -- !qltn Qualified lexical type name (need not be HyLex) @lexord Attribute (overrides @lexord on model element) Defaults to character set order if "mixcase" option is supported, otherwise to #SGMLCASE Lexicographic reordering takes place prior to quantization or other normalization. @boundary Attribute (defaults to "ISCIEC") -- 'Match('(node|nl) (hylex|!qltn|!literal) 'Oo('@lexord')'? @boundary? hitrange?')' hylex -- Local HyLex model -- -- Based on HyLex element type: @HyLex Content (lexical model in HyLex notation) @norm Attribute @lexord Attribute -- 'HyLex(('@hylex')' @norm? 'Oo('@lexord')'?')' hitrange -- Hit range: 1 <= MINHITS <= hits <= MAXHITS -- -- Omitted MAXHITS means no upper limit -- -- 1st unzi is MINHITS and 2nd is MAXHITS -- (%unzi %unzi?) -- Assertion -- assert -- Assertion: evaluates to "TRUE" or "FALSE" -- ('TRUE'|'FALSE'|ah|compare|ordered|and|or|not|forall|exists) ah -- Assertion handler for user-defined assertion: The IDREF addresses an object that implements the assertion. The node list contains the operands. -- -- Requires "uassert" option of location address module. -- 'Ah('!idref nl')' forall -- Evaluates to TRUE if the query returns nodes for every node in nl-- -- The argument query is applied to each node, in its order in nl, by treating the node as the default qdomain of the argument query. -- 'Forall('nl query')' exists -- When a node list or match occurs where an assertion is expected, it evaluates to TRUE if non-empty, FALSE if empty. -- (nl|match) -- Comparison -- compare -- Comparison: tests ordering of operands -- -- Operands in nl are data objects or literals -- -- Comparisons are done in a way appropriate for the quantum. -- -- Relations tested are TRUE if: EQ: all operands are equal NE: at least two operands are not equal LT: each operand is less than its successor LE: each operand is less or equal to its successor GT: each operand is greater than its successor GE: each operand is greater or equal to its successor SS: all operands are same size (same number of quanta) NS: at least two operands are not same size ST: each operand is smaller (shorter) than its successor SE: each operand is smaller (shorter) or equal to its successor BT: each operand is bigger (longer) than its successor BE: each operand is bigger (longer) or equal to its successor HO: each operand holds its successor (proper superstring) HE: each operand holds or equals its successor (superstring) IH: each operand is held in its successor (proper substring) IE: each operand is held in or equals its successor (substring) -- -- Use CAND to operate on the candidate node of the active select. -- ('EQ'|'NE'|'LT'|'LE'|'GT'|'GE'|'SS'|'NS'|'ST'|'SE'|'BT'|'BE' |'HO'|'HE'|'IH'|'IE')'('@quantum? 'Oo('@lexord')'? (node|nl)+')' ordered -- TRUE if all nodes are data objects that have a common apropsrc and are ordered within it -- -- OVERLAP TRUE if position of first bit combination of first node is before next node's first. NOVERLAP TRUE if each node ends before next begins. -- 'Ordered('nl ('OVERLAP'|'NOVERLAP')?')' -- Boolean Expressions -- and -- True if all its assertions are true -- 'And('assert+')' or -- True if any of its assertions are true -- 'Or('assert+')' not -- True if its assertion is false -- 'Not('assert')' Select(DOMTREE EQ(Proploc(CAND GI) "equation")) Select(DOMTREE EQ(Proploc(CAND GI) %1)) Listloc( Select( Pathloc(Select(DOMTREE EQ(Proploc(CAND GI) "body")) 1 -1 2 -1) EQ(Proploc(CAND GI) "para") ) 2 1 ) Listloc( UseQ(hasgi Pathloc(UseQ(hasgi DOMTREE "body") 1 -1 2 -1) "para" ) 2 1 ) Delimiter roles: Role String Description ==== ====== =========== FESC \ Escape FGRPO ( Group open FGRPC ) Group close FRNI # Reserved name indicator FOP @ Operator name indicator (fun) (startfun, s*, funbody?, s*, endfun) ((mfn|("@",operator)), s*, ")") ((operand, (s+, operand)*)) (")") (fun|dimref|pdimref|snzi|arg) ("@",dimop,s*,"(",s*, refbody, s*,")") ((IDREF|("#SCOPE")), axisnext?) ((s+, GI)?, (s+, NUMBER)?) ("@",pdimop,s*,"(",s*, prefbody, s*,")") (IDREF, s+, IDREF, axisnext?) (NAME) (NAME) (NAME) (NAME) @div(@mult(%1 @qcnt(#SCOPE %3))%2) SGML formal public identifier: "ISO/IEC 10744:1992//TEXT Useful Measurement Domain Definitions//EN" .