Lynne,

on Tuesday, January 10, 2006 at 04:19 wsg@webstandardsgroup.org wrote:

> On 1/10/06, Martin Heiden <[EMAIL PROTECTED]> wrote:
>> Document Type Definitions were AFAIK first used by SGML and later
>> for defining XML and XHTML. Because of the limitations of the DTD
>> Language XML Schema has been developed. XML Schema is kind of
>> heavyweight so that many people use the simpler RELAX NG instead.

> XML is a subset of SGML - right?

MMMmmmmmhhh.... I'm not sure about that one. But I hope this may
clarify it:

"So XML Is Just Like SGML?

No. Well, yes, sort of. XML is defined as an application profile of
SGML. SGML is the Standard Generalized Markup Language defined by ISO
8879. SGML has been the standard, vendor-independent way to maintain
repositories of structured documentation for more than a decade, but
it is not well suited to serving documents over the web (for a number
of technical reasons beyond the scope of this article). Defining XML
as an application profile of SGML means that any fully conformant SGML
system will be able to read XML documents. However, using and
understanding XML documents does not require a system that is capable
of understanding the full generality of SGML. XML is, roughly
speaking, a restricted form of SGML.

For technical purists, it's important to note that there may also be
subtle differences between documents as understood by XML systems and
those same documents as understood by SGML systems. In particular,
treatment of white space immediately adjacent to tags may be
different." [1]

I'm not sure if the term "subset" is specific enough. I'd say that
XML is a SGML application profile. But probably you're right 'cause
even the XML specification states that in the non normative part.[2]


> But DTD's define the elements. attributes and entities of the document
> type, and their order, and just happen to use SGML to do so.  SGML not
> XML - or am I missing something?

AFAIK DTDs are neither specified in XML nor SGML but in a grammar
which has been defined in the SGML and in a more restrictive way in
the XML specification. The grammar defined in the XML specification is
compatible with the SGML one. I didn't find a reference on what
language is used for that grammar, but it goes back to the research of
Noam Chomsky about formal languages and formal grammar.[3]

With this DTD language/grammar you can only specify a XML document to
the point of well-formedness. You can't say if an attributes value is
valid or not. At this stage XML Schema comes in: XML Schema provides
"a means for defining the structure, content and semantics of XML
documents"[4]

I hope this is understandable.

regards

  Martin

[1]http://www.xml.com/pub/a/98/10/guide0.html?page=2#AEN72
[2]http://www.w3.org/TR/2004/REC-xml-20040204/#sec-xml-and-sgml
[3]http://en.wikipedia.org/wiki/Formal_grammar
[4]http://www.w3.org/XML/Schema

 



******************************************************
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list & getting help
******************************************************

Reply via email to