SGML
SGML
Background
Web Crossing and SGML
Creating
a SGML Import File
Resources
SGML
Background
SGML
stands for "Standardized General Markup Language," and
is used by government, industry and cross-platform developers
as a widely-applicable text markup language. SGML is a method
of tagging structural units within documents, similar to HTML.
In fact, HTML is an SGML application. A SGML application consists
of a DTD (Document Type Definition) and a set of processing conventions.
For example, an anthology of quotes might be tagged in this way:
<anthology>
<quote>
<author>Groucho Marx</author>
<body>I find television very educating. Every
time somebody turns on the set, I go into the other room and
read a book.</body>
</quote>
<quote>
<author>Jo Godwin</author>
<body>A truly great library contains something
in it to offend everyone.</Body>
</quote>
<quote>
<author>Mark Twain</author>
<body>The man who does not read good books has
no advantage over the man who cannot read them.</Body>
</quote>
</anthology>
How
the quotes were actually displayed would depend on how the tags
were defined. The author might be a certain font face and size
text; the body might be another.
Web
Crossing and SGML
Web Crossing
uses SGML as a format for import and
export of messages, discussions, and
folders. It's much easier to see and follow the SGML format
if you turn off word wrap in your text editor while viewing these
files.
The
Web Crossing <folder> tag includes
a number of attributes including the name, the author, the unique
ID, the creation date, the sort sequence, the heading (description),
and more. The <folder>
tag is closed with a corresponding </folder>
tag which encloses any discussions (and thus messages) within
it.
A <discussion>
tag includes attributes similar to the folder tag: Title, creation
date, author, unique ID, heading, sort sequence, etc. It is bounded
by a </discussion> tag
and encloses any messages within that discussion.
A <message>
tag includes the uniqueID of the author, date, body, etc. There
is no corresponding </message>
tag - the contents of the message are included as attributes within
the single <message... >
tag.
Here
is a colorized example of an SGML export of a simple Web Crossing
folder containing two discussions, each with a message or two,
so you can see the format in action.
<folder name="This is a demo folder,
to show SGML format."
date=11/21/1999.13:48:06 created=11/21/1999.13:46:36 author=000102FB
unique=0EE6B2AC flags=001B0001 inherits=FE1FF800 sortSeq=100000
archiveDays=-1
archiveTo=""
heading="This is the heading, or description,
of the demo folder."
background=""
banner=""
footer=""
template=""
folderemail=""
folderemailPW=""
folderemailReply=""
folderemailPostThru="0"
folderemailReplyTo=""
folderemailFrom=""
folderemailStripSig=""
newsMode="site"
>
<discussion title="This
is demo discussion #1" date=11/21/1999.13:47:33
created=11/21/1999.13:47:03 flags=001B0401 inherits=FE1FF800
author=000102FB unique=0EE6B2AE sortSeq=0 from="" to=""
itemSource="http" template="" heading="This is the description
of demo discussion #1.">
<message
author=000102FB date=11/21/1999.13:47:16 content-type=
from="" to="" itemSource="http" body="This is a test message
in demo discussion #1.">
<message
author=000102FB date=11/21/1999.13:47:33 content-type=
from="" to="" itemSource="http" body="This is a second message
in demo discussion #1.">
</discussion>
<discussion title="This
is demo discussion #2." date=11/21/1999.13:48:06
created=11/21/1999.13:47:54 flags=001B0401 inherits=FE1FF800
author=000102FB unique=0EE6B2B0 sortSeq=0 from="" to="" itemSource="http"
template="" heading="This is the description, or heading, to demo
discussion #2.">
<message
author=000102FB date=11/21/1999.13:48:06 content-type= from=""
to="" itemSource="http" body="This is the only message inside
demo discussion #2.">
</discussion>
</folder>
Creating
an SGML Import File
Creating
an SGML import file for Web Crossing isn't necessarily all that
complicated, however. Try putting the following code into a text
file and importing it:
<folder name="New Area" heading="A brand new start!">
<discussion title="The Weather" heading="Everybody's
talking about it">
</discussion>
<discussion title="Current Events" heading="What's in the news?">
</discussion>
<folder name="More Stuff" heading="Misc Discussions">
</folder>
</folder>
This
results in a folder with this hierarchy:
Folder:
New Area
-- Discussion: The Weather
-- Discussion: Current Events
-- Folder: More Stuff
Nearly
all of the properties default to reasonable values if they're
not included, so it's not absolutely necessary to include them
in your import file.
Resources
Sysop
Documentation
Recommended
Books/Websites
|