diff --git a/shared/tools/xldf b/shared/tools/xldf
index cbbd05d9..4677a355 100755
--- a/shared/tools/xldf
+++ b/shared/tools/xldf
@@ -5,6 +5,7 @@ LOCAL1=${PWD}
cd `dirname $0`
cd ../..
SLPS=${PWD}
+export PYTHONPATH=${SLPS}/shared/python
cd ${LOCAL1}
if [ $# -ne 3 ]; then
@@ -18,5 +19,5 @@ elif [ ! -r $2 ]; then
exit 1
else
rm -f $3
- python ${SLPS}/shared/python/xldf.py $1 $2 $3
+ python ${SLPS}/topics/transformation/xldf/xldf.py $1 $2 $3
fi
diff --git a/shared/xsd/ldf.xsd b/shared/xsd/ldf.xsd
index 48dcf4b6..e1bf7e87 100644
--- a/shared/xsd/ldf.xsd
+++ b/shared/xsd/ldf.xsd
@@ -132,7 +132,7 @@
-
+
Previous version(s) of the same standard.
@@ -145,7 +145,7 @@
-
+
@@ -230,11 +230,11 @@
-
+
@@ -322,7 +322,7 @@
-
+
@@ -342,7 +342,7 @@
-
+
diff --git a/topics/grammars/ldf/Makefile b/topics/grammars/ldf/Makefile
new file mode 100644
index 00000000..0f256d32
--- /dev/null
+++ b/topics/grammars/ldf/Makefile
@@ -0,0 +1,11 @@
+test:
+ ../../../shared/tools/xsd2bgf ../../../shared/xsd/ldf.xsd ldf.raw.bgf
+ ../../../shared/tools/xbgf fold-roles.xbgf ldf.raw.bgf ldf.1.bgf
+ ../../../shared/tools/xbgf fold-names.xbgf ldf.1.bgf ldf.2.bgf
+ ../../../shared/tools/xbgf fold-meta.xbgf ldf.2.bgf ldf.3.bgf
+ ../../../shared/tools/xbgf rename-types.xbgf ldf.3.bgf ldf.4.bgf
+ ../../../shared/tools/xbgf beautify.xbgf ldf.4.bgf ldf.final.bgf
+ ../../../shared/tools/bgf2bnf ldf.final.bgf ldf.final.bnf
+
+clean:
+ rm -f *~ ldf.*
diff --git a/topics/grammars/ldf/beautify.xbgf b/topics/grammars/ldf/beautify.xbgf
new file mode 100644
index 00000000..ac522169
--- /dev/null
+++ b/topics/grammars/ldf/beautify.xbgf
@@ -0,0 +1,447 @@
+
+
+
+
+ document
+
+
+
+
+
+
+ metadata
+
+ document-metadata
+
+
+
+
+
+
+
+
+
+
+
+ part
+
+ part
+
+
+
+
+
+
+
+
+
+
+
+
+
+ document-metadata
+
+
+
+
+
+
+
+
+ body
+
+ body
+
+
+
+
+
+
+
+
+
+
+
+ number
+
+ string
+
+
+
+
+
+
+
+
+
+ author
+
+ person
+
+
+
+
+
+
+
+ topic
+
+ string
+
+
+
+
+
+
+
+ status
+
+ status
+
+
+
+
+
+
+ version-or-edition
+
+
+
+
+
+ previous
+
+ named-link
+
+
+
+
+
+
+
+ date
+
+ timestamp
+
+
+
+
+
+
+
+
+
+ part
+
+
+
+
+
+
+ metadata
+
+ part-metadata
+
+
+
+
+
+
+
+
+
+
+
+ section
+
+ section
+
+
+
+
+
+
+
+
+
+
+
+
+
+ section
+
+
+
+
+
+
+ metadata
+
+ section-metadata
+
+
+
+
+
+
+ section-structure
+
+
+
+
+
+
+
+ subsection
+
+
+
+
+
+
+ metadata
+
+ subsection-metadata
+
+
+
+
+
+
+ section-structure
+
+
+
+
+
+
+
+ part-metadata
+
+
+
+
+
+
+ id
+
+ ID
+
+
+
+
+
+
+
+
+
+ role
+
+ part-role
+
+
+
+
+
+
+
+
+
+ title
+
+ string
+
+
+
+
+
+
+
+
+
+ author
+
+ person
+
+
+
+
+
+
+
+
+
+
+
+ section-metadata
+
+
+
+
+
+
+ id
+
+ ID
+
+
+
+
+
+
+
+
+
+ role
+
+ section-role
+
+
+
+
+
+
+
+
+
+
+
+ type
+
+ type
+
+
+
+
+
+
+
+
+
+
+
+ title
+
+ string
+
+
+
+
+
+
+
+
+
+ author
+
+ person
+
+
+
+
+
+
+
+
+
+
+
+ subsection-metadata
+
+
+
+
+
+
+ id
+
+ ID
+
+
+
+
+
+
+
+
+
+ role
+
+ subsection-role
+
+
+
+
+
+
+
+
+
+
+
+ type
+
+ type
+
+
+
+
+
+
+
+
+
+
+
+ title
+
+ string
+
+
+
+
+
+
+
+
+
+ author
+
+ person
+
+
+
+
+
+
+
+
+
+
+ section-structure
+
+
+
+ section-structure
+
+
+
+
+
+
+ subsection
+
+ subsection
+
+
+
+
+
+
+
+
+
+
+ section-structure
+
+
diff --git a/topics/grammars/ldf/fold-meta.xbgf b/topics/grammars/ldf/fold-meta.xbgf
new file mode 100644
index 00000000..18e3a6a8
--- /dev/null
+++ b/topics/grammars/ldf/fold-meta.xbgf
@@ -0,0 +1,270 @@
+
+
+
+
+ document-metadata
+
+
+
+
+
+
+ body
+
+ body
+
+
+
+
+
+
+
+
+
+ number
+
+ string
+
+
+
+
+
+
+
+
+
+ author
+
+ person
+
+
+
+
+
+
+
+ topic
+
+ string
+
+
+
+
+
+ status
+
+ status
+
+
+
+
+ version-or-edition
+
+
+
+
+
+ previous
+
+ named-link
+
+
+
+
+
+
+
+ date
+
+ timestamp
+
+
+
+
+
+
+
+
+
+ part-metadata
+
+
+
+
+
+
+ id
+
+ ID
+
+
+
+
+
+
+
+ role
+
+ part-role
+
+
+
+
+
+
+
+ title
+
+ string
+
+
+
+
+
+
+
+
+
+ author
+
+ person
+
+
+
+
+
+
+
+
+
+
+
+ section-metadata
+
+
+
+
+
+
+ id
+
+ ID
+
+
+
+
+
+
+
+ role
+
+ section-role
+
+
+
+
+
+
+
+ type
+
+ type
+
+
+
+
+
+
+
+
+
+ title
+
+ string
+
+
+
+
+
+
+
+
+
+ author
+
+ person
+
+
+
+
+
+
+
+
+
+
+
+ subsection-metadata
+
+
+
+
+
+
+ id
+
+ ID
+
+
+
+
+
+
+
+ role
+
+ subsection-role
+
+
+
+
+
+
+
+ type
+
+ type
+
+
+
+
+
+
+
+
+
+ title
+
+ string
+
+
+
+
+
+
+
+
+
+ author
+
+ person
+
+
+
+
+
+
+
+
+
+
diff --git a/topics/grammars/ldf/fold-names.xbgf b/topics/grammars/ldf/fold-names.xbgf
new file mode 100644
index 00000000..31765e61
--- /dev/null
+++ b/topics/grammars/ldf/fold-names.xbgf
@@ -0,0 +1,359 @@
+
+
+
+
+ body
+
+
+
+
+ ansi
+
+
+
+
+
+
+
+ ecma
+
+
+
+
+
+
+
+ ieee
+
+
+
+
+
+
+
+ iso
+
+
+
+
+
+
+
+ iso/iet
+
+
+
+
+
+
+
+ itu
+
+
+
+
+
+
+
+ iec
+
+
+
+
+
+
+
+ ietf
+
+
+
+
+
+
+
+ oasis
+
+
+
+
+
+
+
+ omg
+
+
+
+
+
+
+
+ wsa
+
+
+
+
+
+
+
+ w3c
+
+
+
+
+
+
+
+
+
+
+
+ status
+
+
+
+
+ unknown
+
+
+
+
+
+
+
+ draft
+
+
+
+
+
+
+
+ candidate
+
+
+
+
+
+
+
+ proposed
+
+
+
+
+
+
+
+ approved
+
+
+
+
+
+
+
+ revised
+
+
+
+
+
+
+
+ obsolete
+
+
+
+
+
+
+
+ withdrawn
+
+
+
+
+
+
+
+ collection
+
+
+
+
+
+
+
+ trial
+
+
+
+
+
+
+
+ errata
+
+
+
+
+
+
+
+ report
+
+
+
+
+
+
+
+
+
+
+
+ version-or-edition
+
+
+
+
+ version
+
+ string
+
+
+
+
+
+ edition
+
+ string
+
+
+
+
+
+
+
+
+
+ section-structure
+
+
+
+
+ content
+
+
+
+ content-content
+
+
+
+
+
+
+
+ placeholder
+
+
+
+
+
+
+
+
+
+ subsection
+
+ subsection-type
+
+
+
+
+
+
+
+
+
+
+
+ type
+
+
+
+
+ normative
+
+
+
+
+
+
+
+ informative
+
+
+
+
+
+
+
+
+
+
+
+
+
+ date
+
+ string
+
+
+
+
+
+ date
+
+ timestamp
+
+
+
+
+
+
+
+ uri
+
+ string
+
+
+
+
+
+ uri
+
+ anyURI
+
+
+
+
+
+
+
+ id
+
+ string
+
+
+
+
+
+ id
+
+ ID
+
+
+
+
+
diff --git a/topics/grammars/ldf/fold-roles.xbgf b/topics/grammars/ldf/fold-roles.xbgf
new file mode 100644
index 00000000..dbec2eff
--- /dev/null
+++ b/topics/grammars/ldf/fold-roles.xbgf
@@ -0,0 +1,302 @@
+
+
+
+
+ part-role
+
+
+
+
+ front-matter
+
+
+
+
+
+
+
+ core-part
+
+
+
+
+
+
+
+ back-matter
+
+
+
+
+
+
+
+ annex
+
+
+
+
+
+
+
+
+
+
+
+ section-role
+
+
+
+
+ abstract
+
+
+
+
+
+
+
+ conformance
+
+
+
+
+
+
+
+ compatibility
+
+
+
+
+
+
+
+ design-goals
+
+
+
+
+
+
+
+ document-structure
+
+
+
+
+
+
+
+ foreword
+
+
+
+
+
+
+
+ references
+
+
+
+
+
+
+
+ notation
+
+
+
+
+
+
+
+ scope
+
+
+
+
+
+
+
+ what-is-new
+
+
+
+
+
+
+
+ index
+
+
+
+
+
+
+
+ full-grammar
+
+
+
+
+
+
+
+ list-of-tables
+
+
+
+
+
+
+
+ list-of-authors
+
+
+
+
+
+
+
+ list-of-contents
+
+
+
+
+
+
+
+ list-of-references
+
+
+
+
+
+
+
+ top-section
+
+
+
+
+
+
+
+ lexical-section
+
+
+
+
+
+
+
+
+
+
+
+ subsection-role
+
+
+
+
+ synopsis
+
+
+
+
+
+
+
+ description
+
+
+
+
+
+
+
+ syntax
+
+
+
+
+
+
+
+ constraints
+
+
+
+
+
+
+
+ relationship
+
+
+
+
+
+
+
+ semantics
+
+
+
+
+
+
+
+ default
+
+
+
+
+
+
+
+ rationale
+
+
+
+
+
+
+
+ example
+
+
+
+
+
+
+
+ update
+
+
+
+
+
+
+
+ subtopic
+
+
+
+
+
+
+
+ section
+
+
+
+
+
+
+
+
+
+
diff --git a/topics/grammars/ldf/rename-types.xbgf b/topics/grammars/ldf/rename-types.xbgf
new file mode 100644
index 00000000..c2314c56
--- /dev/null
+++ b/topics/grammars/ldf/rename-types.xbgf
@@ -0,0 +1,33 @@
+
+
+
+
+ part-type
+ part
+
+
+
+
+ section-type
+ section
+
+
+
+
+ subsection-type
+ subsection
+
+
+
+
+ list-type
+ list
+
+
+
+
+ mixed-type
+ mixed
+
+
+