Work on structure XML description.
[pspp] / parse-all-xml
index 98a4258ddbd50c36bbc47fbca083df5491837844..8b1fc366f692275c045a6bd1a943f144ef0876af 100755 (executable)
@@ -1,5 +1,17 @@
 #! /bin/sh
-for d in `ls -1 unzipped/*/*.xml |grep -vE 'notes|table|warning|chart|model'`
-do
-    ./parse-xml $d
-done | sort -u
+
+# Parse the structure members that do not represent models or graphs
+# and that are not page setups (which are always the first structure member).
+# Also skip those with borderProperties, which indicate the non-"light"
+# format.
+lightTables=`ls -1 unzipped/*/*.xml |grep -vE 'notes|table|warning|chart|model' \
+          | xargs grep -EL '<([a-z]*:)?(model|graph|pageSetup|borderProperties)'`
+printf 'Structure:\n'
+for d in $lightTables; do
+    ./parse-xml $d containment
+done | sort | uniq | sort
+
+printf '\nAttributes:\n'
+for d in $lightTables; do
+    ./parse-xml $d attributes
+done | sort | uniq | sort