From d19037e528f40400799790646e8cfafc027da304 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Sun, 16 Jul 2017 11:20:00 -0700 Subject: [PATCH] Update structure member descriptions. --- parse-all-xml | 4 ++-- spv-file-format.texi | 47 +++++++++++++++++++++++++------------------- 2 files changed, 29 insertions(+), 22 deletions(-) diff --git a/parse-all-xml b/parse-all-xml index c1282e03ff..c7b7f93a53 100755 --- a/parse-all-xml +++ b/parse-all-xml @@ -3,11 +3,11 @@ # Parse the structure members that do not represent models or graphs. # Also skip those with borderProperties, which indicate the non-"light" # format. -lightTables=`ls -1 unzipped/*/*.xml |grep -vE 'notes|table|warning|chart|model' \ +lightTables=`find unzipped* -name '*.xml' | grep -vE 'notes|table|warning|chart|model' \ | xargs grep -EL '<([a-z]*:)?(model|graph|borderProperties)'` if test -n "$1"; then for d in $lightTables; do ./parse-xml $d $1 - done | sort | uniq -c | sort -rn + done | sort | uniq -c fi diff --git a/spv-file-format.texi b/spv-file-format.texi index d245f72039..38059ba889 100644 --- a/spv-file-format.texi +++ b/spv-file-format.texi @@ -103,7 +103,26 @@ not resolvable to obtain the schemas themselves. One may ignore all of the above in interpreting a structure member. The actual XML has a simple and straightforward form that does not -require a reader to take schemas or namespaces into account. +require a reader to take schemas or namespaces into account. A +structure member's root is @code{heading} element, which contains +@code{heading} or @code{container} elements (or a mix), forming a +tree. In turn, @code{container} holds a single @code{text} or +@code{table} element. + +@ifnottex +For a diagram illustrating the hierarchy of elements within an SPV +structure member, please refer to a PDF version of the manual. +@end ifnottex + +@iftex +The following diagram shows the hierarchy within an SPV structure +member more precisely. Oval nodes are elements and and +are plain text and CDATA within elements. Edges point from parent to +child. Unlabeled edges indicate that the child appears exactly once; +edges labeled with *, zero or more times; edges labeled with ?, zero +or one times. +@center @image{dev/spv-structure, 5in} +@end iftex The elements found in structure members are documented below. For each element, we note the possible parent elements and the element's @@ -133,24 +152,10 @@ A choice between @var{a} and @var{b}. Zero or more @var{x}. @end table -@ifnottex -For a diagram illustrating the hierarchy of elements within an SPV -structure member, please refer to a PDF version of the manual. -@end ifnottex - -@iftex -The following diagram shows the hierarchy of elements within an SPV -structure member. Edges point from parent to child elements. -Unlabeled edges indicate that the child appears exactly once; edges -labeled with *, zero or more times; edges labeled with ?, zero or one -times. -@center @image{dev/spv-structure, 5in} -@end iftex - The following example shows the contents of a typical structure member -for a @cmd{DESCRIPTIVES} procedure. A real structure member would not -have indentation. This example all omits most attributes, all XML -namespace information, and the CSS from the embedded HTML: +for a @cmd{DESCRIPTIVES} procedure. A real structure member is not +indented. This example also omits most attributes, all XML namespace +information, and the CSS from the embedded HTML: @example @@ -211,7 +216,9 @@ Contents: @code{pageSetup}? @code{label} (@code{container} @math{|} @code{headin The root of a structure member is a @code{heading}, which represents a section of output beginning with a title (the @code{label}) and ordinarily followed by content containers or further nested -(sub)-sections of output. +(sub)-sections of output. Unlike heading elements in HTML and other +common document formats, which precede the content that they head, +@code{heading} contains the elements that appear below the heading. The document root heading, only, may also contain a @code{pageSetup} element. @@ -295,7 +302,7 @@ often very generic, especially within a @code{container}, e.g.@: according to the output language, e.g.@: in Italian a frequency table procedure is labeled ``Frequenze''. -The corpus contains one example of an empty label, one that contains +The corpus contains a few examples of empty labels, ones that contain no text. This element has no attributes. -- 2.30.2