[Date Prev][Date Next] [Thread Prev][Thread Next]
[Date Index] [Thread Index] [New search]

Creating an SGML document instance from a database extract



Suppose you want to convert data records (output as character-delimited or
fixed column fields), extracted from a conventional database, into tagged
SGML, XML. or HTML  document instance.
================================================
WHY WOULD YOU WANT TO DO IT?

1. SGML, HTML, and XML  are platform- and software-independent.

2. A typical SGML, HTML, or XML file is about 1/10 the size of the
corresponding formatted DTP or Word processing file, thus it takes up less
storage space, and takes less time to transmit electronically.

3. A record's field values, and/or its relative position in the data stream,
may dictate how the output must be structured and/or formatted. If there are
formatting variations, element attributes can specify the formatting of
individual fields and/or the formatting of the entire record. Such
attributes can also be used to specify prefixes and/or suffixes that must be
added to field values in the formatted output.

4. Some record fields may need to be converted to attributes of SGML/XML
elements.

5. Marker elements (e.g., index markers, header/footer markers) may have to
be added to each record..
=====================================================
UNIMERGE CAN CREATE SGML, XML, OR HTML DOCUMENT INSTANCES FROM DATABASE EXTRACTS
In the FrameMaker report template for a UniMerge application, you simply
bracket each field (or fields) with SGML-type tags,  and insert attribute
values (if any). For the first record only, you insert the DOCTYPE
declaration and any internal entity declarations. When the report template
is merged by UniMerge with a database extract, a MIF file output is
produced, which can be opened and saveds at text only to produce an SGML
document instance.

To test this approach, I first created an FM+SGML EDD, and produced a DTD
from the EDD. The EDD was then imported into a template, which I used to
create aj SGML document instance containing instantiations of all the
different record formatting and structure variations, and exported it to
SGML. This produced an SGML document instance which I could then clone to
insert the tagged SGML into the report template for an existing Unimerge
application so that it would produce SGML. The report template was then
merged with an existing database extract, and the resulting MIF output was
opened in FrameMaker and saved as an SGML document instance. This SGML
documentinstance was then successfully imported into FM+SGML, which produced
the correct formatting of each record.
     ____________________
     | Nullius in Verba |
     ********************
Dan Emory, Dan Emory & Associates
FrameMaker/FrameMaker+SGML Document Design & Database Publishing
Voice/Fax: 949-722-8971 E-Mail: danemory@primenet.com
10044 Adams Ave. #208, Huntington Beach, CA 92646
---Subscribe to the "Free Framers" list by sending a message to
   majordomo@omsys.com with "subscribe framers" (no quotes) in the body.


** To unsubscribe, send a message to majordomo@omsys.com **
** with "unsubscribe framers" (no quotes) in the body.   **