Update structure member descriptions.
authorBen Pfaff <blp@cs.stanford.edu>
Sun, 16 Jul 2017 18:20:00 +0000 (11:20 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Sun, 16 Jul 2017 18:20:00 +0000 (11:20 -0700)
parse-all-xml
spv-file-format.texi

index c1282e03ff3bf6476afb81d3824526303762f18c..c7b7f93a532a78a9ce2058f3cd05e1032b93431c 100755 (executable)
@@ -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
index d245f7203931d6e701f2b9fb3c805c80c3ba855f..38059ba889c5878c7a39af61f9e935ce87c0cb0e 100644 (file)
@@ -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 <text> and <cdata>
+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
 <?xml version="1.0" encoding="utf-8"?>
@@ -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.