DTD Generator
Class to transform an LDD (as represented by LDD_rows) into an XML DTD.
This application was created to fill a need in the
MISMO Servicing Workgroup.
10/18/2001 changes to handle EXTENSION/EXTENSION_SECTION
01/24/2002 changes to better handle the IDREF attribute name generation
10/02/2002 changes to use the enhanced LDD in generation and general cleanup
Methods
|
|
__init__
cleanup
containers_attr_style
header
include_file_contents
run
write_container_attr
write_element
|
|
__init__
|
__init__ (
self,
genny_version='',
debug=0,
headerfilename='./input/bpheader.txt',
logfh='',
dtd_ext_filename='./output/MISMO-servicingtransfer-extensions.dtd',
LDD_rows='',
includecomments='NO',
input_name='default_input_name',
project_name='default_proj_name',
)
Initialize the DTD generator class.
|
|
cleanup
|
cleanup ( self )
Any closing housekeeping that is necessary.
|
|
containers_attr_style
|
containers_attr_style (
self,
LDD_rows,
commentflag,
)
Output the each of the parsed container info to the DTD file
|
|
header
|
header ( self )
Allows for the inclusion of a DTD header file in the output DTD.
|
|
include_file_contents
|
include_file_contents ( self, filename )
Allows addition of the contents of an arbritrary file in the the output DTD.
|
|
run
|
run ( self )
Perform all the steps necessary to generate the DTD. If the class has
been initialized properly a DTD will be created when this method is executed.
|
|
write_container_attr
|
write_container_attr (
self,
dtdfh,
container_rows,
commentflag,
)
Output a container to the DTD in the empty element style to the DTD file
|
|
write_element
|
write_element (
self,
dtdfh,
row,
)
Output a DTD element for the given container using the enhanced LDD meta data
|
|