# - - - w r i t e P r o d u c t F i l e s
def writeProductFiles ( txny ):
'''Write all the various outputs.
[ txny is a Txny instance ->
if output-files(Args()) can be opened new for writing ->
output-files(Args()) := representations of hier and txny
else ->
sys.stderr +:= error messages
output-files(Args()) := (anything) ]
'''
There are four product files.
Section 10, “writeTreeFile(): Write the flat tree
file” writes the
flat taxonomic tree file.
Section 12, “writeAbbrFiles(): Write the flat
abbreviation and collision files” writes the
flat abbreviation and collision files.
Section 13, “writeXMLFile(): Write the XML file” writes the XML file.
#-- 1 --
# [ if file tree-file(Args()) can be opened new for writing ->
# that file := flat tree file representing txny
# else ->
# Log() +:= error message(s)
# stop execution ]
writeTreeFile ( txny )
#-- 2 --
# [ if files abbr-file(Args()) and coll-file(Args()) can be
# opened new for writing ->
# file abbr-file(Args()) := flat abbreviation file
# representing txny
# file coll-file(Args()) := flat collisions file
# representing txny
# else ->
# Log() +:= error message(s)
# stop execution ]
writeAbbrFiles ( txny )
#-- 3 --
# [ if file xml-file(Args()) can be opened new for writing ->
# file xml-file(Args)) := an XML representation of txny
# else ->
# Log() +:= error message(s)
# stop execution ]
writeXMLFile ( txny )