[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Where to start? (Newbie Q's)



On Sat, 7 Jul 2001, Russell Hires wrote:

Russell,

	While it is possible to do what you want to do in SGML, I would
recommend XML for a beginner. Both SGML and XML have the same intentions,
but differ in implementation, and I think XML is easier to work with. To
answer your questions :

1.  SGML is not a tag language. SGML is a language which allows you to
define a tag language. Thus, you can use SGML to define HTML, or many
other tag languages. The same holds true for XML - you can use it to
define tag languages. The actual definition of the tag language in XML or
SGML is called a DTD (Document Type Definition). Once a DTD is defined,
a document can be written using this DTD. 

Consider the HTML source of the Debian homepage. Here are the first few
lines :

<!-- X-URL: http://www.debian.org/ -->
<!-- Date: Sat, 07 Jul 2001 19:45:02 GMT -->
<!-- Last-Modified: Wed, 04 Jul 2001 17:28:29 GMT -->
<BASE HREF="http://www.debian.org/";>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML lang="en">
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<TITLE>Debian GNU/Linux -- The Universal Operating System</TITLE>
<LINK REV="made" HREF="mailto:webmaster@debian.org";>

See the line which says : <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN"> ? The "-//W3C//...." string specifies the DTD for HTML
4.01 . This means that the rest of that document should be interpreted as
being written using the language defined by that DTD (HTML 4.01).

2.  DocBook and Debiandoc are two DTD's. DTD's exist for both in SGML and
XML. I would recommend using DocBook as that is the trend for Debian
documentation.

3.  Dont understand the question.

4.  SGML and XML (via the DTD's) define the meaning of an element in a
document. For example, if I write " <p>This is a title</p>" in HTML, as
far as an HTML interpreter is concerned, that string is mere data.
However, the string : "<title>This is not a title</title>" will be
interpreted as a title.

The important thing to realize here is that this does not imply anything
about how to display the title. An HTML interpreter could choose to
display the title in bold, or a larger font, or in a different color - it
doesnt matter. None of those decisions are specified by SGML or XML DTD's.
The DTD only defines the meaning of the element - the presentation is not
dealt with at all. The issue of presentation is dealt with by stylesheets.
The analogue for CSS in SGML is DSSSL and XML has XSL. If you want
to specify details about the presentation of your document, you will need
both the stylesheet as well as the DTD.

5. I think I have already dealt with this.

	Please note that this list is NOT the place to learn the
fundamentals of working with SGML / XML. The debian-user or debian-sgml
lists perhaps would be more suited to that.

Regards,
Jor-el
 
> 1. I see that sgml is the way to go. But in my research of sgml, I don't get 
> it: I know that it is a tag language like html, (okay, I actually know that 
> html is a sub-set of sgml), but I don't know what the tags are. 
> 
> 2. I don't know what the difference is between DocBook and Debiandoc-sgml...
> 
> 3. When downloading stuff via cvs, will that answer some of my questions? 
> 
> 4. I  looked at my /usr/share/doc/sgml-stuff, but it isn't making too much 
> sense to me. I'm getting the feeling that DSSSL is really how the markups are 
> defined (?) But where would I find out what they are?
> 
> 5. There must be 10 different environments for editing sgml. I realize that 
> it's more a personal choice and so forth, but I'm wondering about all the 
> formats and such... 
> 

To get something clean, one has to get something dirty.
To get something dirty, one does not have to get anything clean.



Reply to: