![]() | ![]() | Copyright © 1992, 1997 International Organization for Standardization. All rights reserved. This electronic document is for use during development and review of International Standards. Official printed copies of International Standards can be purchased from the ISO and the national standards organization of your country. | ||
| Next Clause | Previous Clause | |||
A.4 Property Set Definition Requirements (PSDR)
Groves are an abstract data representation. Processing systems need not reflect a literal grove in their internal data structures. However, a literal representation of groves is useful for validation, debugging, and, potentially, interchange among different applications. The canonical grove representation (CGR) document type is used to create character representations of groves such that there can be exactly one canonical grove representation for a given grove or hypergrove.
The CGR document type is defined as an SGML document type derived from the HyTime architecture augmented by a set of constraints on how source documents are formed. These constraints ensure that the only differences between CGR documents are differences resulting from differences in node property values. When the constraints are adhered to, CGR documents can be meaningfully compared as character strings.
NOTE 467 The constraints on CGR document sources have also been designed to enable parsing of CGR documents using the standard string parsing features of common programming languages. While CGR documents are SGML documents and can be parsed as such, they can also be parsed as a sequence of delimited records.
The CGR document type consists of the following element types:
Represents a single grove. Contains a single node element followed by zero or more urefloc elements.
Represents a single node. Contains as subelements the properties of a node (nodeprop). Each node has an ID value assigned to it according to the algorithm defined under A.4.5.3 Algorithm for assigning IDs to nodes. The class attribute of the node element names the RCS class name for the node.
Represents a single property value. The content of the nodeprop element is the property value. Node lists are represented by a blank-delimited list of the IDs of the node elements representing the nodes in the node list. Primitive (non-nodal) data types are represented by strings according to the rules in section A.4.5.2 Constraints on CGR source construction.
The nodeprop element type has the following attributes:
The RCS name of the property's datatype .
The RCS name of the property.
The node relationship type for the property. One of subnode, irefnode, urefnode, or primitive.
Indicates that the property value is null when specified.
Represents the address of a node in another grove. The urefloc element type is derived from the property location address element form (proploc). When the CGR document is generated independently of the hypergrove in which it occurs, the content of each urefloc element is the string "UNKNOWN", indicating that the name of the node addressed is not known. When the CGR document is generated as part of the process of generating all the CGR documents for an entire hypergrove, the content of the urefloc is the ID of the node in the CGR document that contains the referenced node.
Separates strings in string lists.
CGR documents conform to the reference concrete syntax except that they use a name length of 32.
<!--=================================================================
Canonical Grove Representation Document Type
ISO/IEC 10744:1997//DTD Canonical Grove Representation//EN
=================================================================-->
<?IS10744 ArcBase HyTime>
<!NOTATION HyTime
PUBLIC "ISO/IEC 10744:1997//NOTATION AFDR ARCBASE
Hypermedia/Time-based Structuring Language (HyTime)//EN"
>
<!ATTLIST #NOTATION HyTime
ArcFormA NAME #FIXED HyTime
ArcNamrA NAME #FIXED HyNames
ArcDocF NAME #FIXED HyDoc
ArcDTD CDATA #FIXED "HyTime"
ArcBridF NAME #FIXED HyBrid
ArcAuto NAME #FIXED ArcAuto
ArcOptSA CDATA #FIXED "locs"
locs CDATA #FIXED "nmsploc"
>
<!NOTATION AFDRMeta
PUBLIC "ISO/IEC 10744//NOTATION AFDR Meta-DTD Notation//EN"
>
<!ENTITY HyTime
PUBLIC "ISO/IEC 10744//DTD AFDR Meta-DTD
Hypermedia/Time-based Structuring Language (HyTime)//EN"
CDATA AFDRMeta
>
<!ELEMENT
grove -- Grove document element --
(node,urefloc*)
>
<!ELEMENT
urefloc -- Unrestricted reference node location address --
(#PCDATA) -- Constraint: content of urefloc is "UNKNOWN"
when CGR document not generated as part of
hypergrove CGR generation process. --
>
<!ATTLIST urefloc
id ID #REQUIRED
HyTime NAME #FIXED nmsploc
namespc NAME #FIXED elements
locsrc ENTITY #REQUIRED
notname NAME #FIXED ignore
>
<!ELEMENT
node -- Node in the grove --
(nodeprop*)
>
<!ATTLIST node
id -- Unique ID of node --
ID #REQUIRED
class -- RCSNM name of the class for this node --
NAME
#REQUIRED
>
<!ELEMENT
nodeprop -- Node property --
(#PCDATA|slsep|node)*
-- Constraint: Nodes allowed in content only when
noderel is "subnode". --
>
<!ATTLIST nodeprop
rcsnm -- RCS name of property --
NAME
#REQUIRED
datatype -- The RCSNM of the datatype --
NAME #REQUIRED
noderel -- Relationship of nodes in property to node
exhibiting property --
(subnode|urefnode|irefnode|primitive)
#REQUIRED
isnull -- Property is null --
(isnull)
#IMPLIED -- Default: Property is not null --
>
<!ELEMENT
slsep -- String list separator --
- O
EMPTY
>
<!-- Entities for escaping markup delimiters in data content -->
<!ENTITY lt "<" -- Left angle bracket -->
<!ENTITY gt "<" -- Right angle bracket -->
<!ENTITY apos "'" -- Apostrophe (LITA) -->
<!ENTITY amp "&" -- Ampersand -->CGR documents must conform to the following constraints on their source:
No white space is allowed except as expressly defined in these rules or required by SGML.
Exactly one SPACE character is used to separate parameters that require separation.
All keywords are specified in upper case (only element content and CDATA attribute values may be in mixed case).
The DOCTYPE declaration up to, but not including, the declaration subset open (if any) is specified on a single line as follows:
<!DOCTYPE GROVE PUBLIC "ISO/IEC 10744:1997//DTD Canonical Grove Representation//EN"
The markup declaration close is specified on a line by itself.
If there is a declaration subset (containing entity declarations for other CGR documents), the declaration subset open and declaration subset close delimiters are each specified on lines by themselves. Each entity declaration is specified on a line by itself (see A.4.5.3 Algorithm for assigning IDs to nodes).
Start tags are specified on multiple lines as follows:
The STAGO and GI are specified on a single line.
Each attribute is specified on a single line by itself. Attributes are specified in the order they occur in the CGR document type attribute list declarations. Fixed attributes are never specified.
The TAGC is specified on a line by itself.
For end-tags, the ETAGO and GI are specified on a single line. The TAGC is specified on a line by itself.
Each grove document must consist of exactly one entity (the document entity), except for the external declaration subset, which is always referred to by public identifier as described above.
Primitive property values are represented as character data content of nodeprop elements. The primitive data types are represented by strings as follows:
The RCS name of the enumeration value, in upper case.
Character data content exactly as in the property value, with the exception that the characters "<" (left angle bracket), ">" (right angle bracket), "'" (appostrophe), and "&" (ampersand) are replaced by references to the general entities "lt", "gt", "apos", and "amp", respectively. These entities are declared in the CGR docment type.
A list of string values, each value except the last followed by an slsep start-tag.
The string representation of the integer value, base 10.
The RCS name of the component, in upper case.
Blank-delimited list of integers.
Blank-delimited lists of component names.
Properties that have no value (because the when clause for the property was not satisfied) exhibit the value "ISNULL" for the isnull attribute.
The IDs for nodes are generated according to the algorithm defined in the next subclause.
The iref and uref relationship types are represented as SGML ID references in CGR documents. The IDs for nodes must be generated as follows:
Initialize a counter to zero.
For each node element, generate its ID by prepending the string "X" to the string value (base 10) of the counter. Increment the counter by one.
For each urefnode arc to a node, generate that node's ID as for internal nodes. In addition, generate a corresponding urefloc element with that ID. Urefloc elements are listed following the root node in the order they were generated (thus, in the order of first reference to the nodes they represent).
When a CGR document is generated in isolation, it is impossible to acquire the IDs of nodes in other CGR documents for use in the content of urefloc elements. It is also impossible to generate entity names for the CGR documents that would contain those nodes. However, when a CGR document is generated as part of the generation of the canonical grove representation for a complete hypergrove, then the content of urefloc elements must be the IDs assigned to those nodes. In addition, an entity must be declared for each different grove to which unrestricted references are made.
These entities are declared as follows:
Initialize a counter to zero
For each different grove to which an unrestricted reference is made, in the order of first reference, generate an entity name by prepending the string "CGR" to the string value (base 10) of the counter. Increment the counter by one.
For each entity name generated, in the order of generation, create an entity declaration with the following form:
<!ENTITY name PUBLIC "-//HYPERCGR//DOCUMENT name//EN" CDATA HyTime >Where both occurrences of "name" are replaced by the generated entity name.
NOTE 468 There is no requirement, and no effort should be made, to coordinate the public identifiers generated in different grove documents. Thus the same grove document may be referred to by different public identifiers in the different groves that refer to it.
Each entity declaration is included in the internal DOCTYPE declaration subset on a single line, with the declaration close on a line by itself, as shown above.
NOTE 469 It is up to the system that generates a canonical hypergrove to create the mapping catalog that associates the public identifiers generated for grove documents with those documents.
| Next Clause | Previous Clause |
HTML generated from the original SGML source using a DSSSL style specification and the SGML output back-end of the JADE DSSSL engine.