SGML Name
   HOME

TheInfoList



OR:

The Standard Generalized Markup Language (SGML;
ISO The International Organization for Standardization (ISO ; ; ) is an independent, non-governmental, international standard development organization composed of representatives from the national standards organizations of member countries. Me ...
8879:1986) is a standard for defining generalized
markup language A markup language is a Encoding, text-encoding system which specifies the structure and formatting of a document and potentially the relationships among its parts. Markup can control the display of a document or enrich its content to facilitate au ...
s for documents. ISO 8879 Annex A.1 states that generalized markup is "based on two
postulate An axiom, postulate, or assumption is a statement that is taken to be true, to serve as a premise or starting point for further reasoning and arguments. The word comes from the Ancient Greek word (), meaning 'that which is thought worthy or f ...
s": * Declarative: Markup should describe a document's structure and other attributes rather than specify the processing that needs to be performed, because it is less likely to conflict with future developments. * Rigorous: In order to allow markup to take advantage of the techniques available for processing, markup should rigorously define objects like programs and
database In computing, a database is an organized collection of data or a type of data store based on the use of a database management system (DBMS), the software that interacts with end users, applications, and the database itself to capture and a ...
s.
DocBook DocBook is a Semantics (computer science), semantic markup language for technical documentation. It was originally intended for writing technical documents related to computer hardware and software, but it can be used for any other sort of docume ...
SGML and
LinuxDoc LinuxDoc is an SGML DTD which is similar to DocBook. Matt Welsh created it, and version 1.1 was announced in 1994. It is primarily used by the Linux Documentation Project. The DocBook SGML tags are often longer than the equivalent LinuxDoc tags. ...
are examples which used SGML tools.


Standard versions

SGML is an
ISO The International Organization for Standardization (ISO ; ; ) is an independent, non-governmental, international standard development organization composed of representatives from the national standards organizations of member countries. Me ...
standard: "ISO 8879:1986 Information processing – Text and office systems – Standard Generalized Markup Language (SGML)", of which there are three versions: * Original ''SGML'', which was accepted in October 1986, followed by a minor Technical Corrigendum. * ''SGML (ENR)'', in 1996, resulted from a Technical Corrigendum to add ''extended naming rules'' allowing arbitrary-language and -script markup. * ''SGML (ENR+WWW or WebSGML)'', in 1998, resulted from
Technical Corrigendum
to better support XML and WWW requirements. SGML is part of a trio of enabling ISO standards for
electronic document An electronic document is a document that can be sent in non-physical means, such as telex, email, and the internet. Originally, any computer data were considered as something internal—the final data output was always on paper. However, the ...
s developed by
ISO/IEC JTC 1/SC 34 ISO/IEC JTC 1/SC 34, Document description and processing languages is a subcommittee of the ISO/IEC JTC 1 joint technical committee, which is a collaborative effort of both the International Organization for Standardization and the International El ...
(ISO/IEC Joint Technical Committee 1, Subcommittee 34 – Document description and processing languages) : * SGML (ISO 8879) – Generalized markup language ** SGML was reworked in 1998 into
XML Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing data. It defines a set of rules for encoding electronic document, documents in a format that is both human-readable and Machine-r ...
, a successful profile of SGML. Full SGML is rarely found or used in new projects. *
DSSSL The Document Style Semantics and Specification Language (DSSSL) is an international standard developed to provide stylesheets for SGML documents. DSSSL consists of two parts: a tree transformation process that can be used to manipulate the tree ...
(ISO/IEC 10179) – Document processing and styling language based on Scheme. ** DSSSL was reworked into W3C
XSLT XSLT (Extensible Stylesheet Language Transformations) is a language originally designed for transforming XML documents into other XML documents, or other formats such as HTML for web pages, plain text, or XSL Formatting Objects. These formats c ...
and
XSL-FO XSL-FO (XSL Formatting Objects) is a markup language for XML document formatting that is most often used to generate PDF files. XSL-FO is part of XSL (Extensible Stylesheet Language), a set of W3C technologies designed for the transformation and f ...
which use an XML syntax. Nowadays, DSSSL is rarely used in new projects apart from
Linux Linux ( ) is a family of open source Unix-like operating systems based on the Linux kernel, an kernel (operating system), operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically package manager, pac ...
documentation. *
HyTime HyTime (''Hypermedia/Time-based Structuring Language'') is a markup language that is an application of SGML. HyTime defines a set of hypertext-oriented element types that, in effect, supplement SGML and allow SGML document authors to build hypert ...
– Generalized
hypertext Hypertext is E-text, text displayed on a computer display or other electronic devices with references (hyperlinks) to other text that the reader can immediately access. Hypertext documents are interconnected by hyperlinks, which are typic ...
and scheduling. ** HyTime was partially reworked into W3C
XLink XML Linking Language, or XLink, is an XML markup language and W3C specification that provides methods for creating internal and external links within XML documents, and associating metadata with those links. The XLink specification XLink 1.1 is ...
. HyTime is rarely used in new projects. SGML is supported by various technical reports, in particular * ISO/IEC TR 9573 – Information processing – SGML support facilities – Techniques for using SGML ** Part 13: Public entity sets for mathematics and science *** In 2007, the W3C MathML working group agreed to assume the maintenance of these entity sets.


History

SGML descended from
IBM International Business Machines Corporation (using the trademark IBM), nicknamed Big Blue, is an American Multinational corporation, multinational technology company headquartered in Armonk, New York, and present in over 175 countries. It is ...
's
Generalized Markup Language Generalized Markup Language (GML) is a set of macros that implement intent-based (procedural) markup tags for the IBM text formatter, SCRIPT. SCRIPT/VS is the main component of IBM's Document Composition Facility (DCF). A ''starter set'' of t ...
(GML), which
Charles Goldfarb Charles F. Goldfarb, (born November 26, 1939) is known as the father of Standard Generalized Markup Language (SGML) and grandfather of HTML and the World Wide Web. He co-invented the concept of markup languages. In 1969 Charles Goldfarb, leading ...
, Edward Mosher, and Raymond Lorie developed in the 1960s. Goldfarb, editor of the international standard, coined the "GML" term using their surname initials. Goldfarb also wrote the definitive work on SGML syntax in "The SGML Handbook". The syntax of SGML is closer to the COCOA format. As a document markup language, SGML was originally designed to enable the sharing of
machine-readable In communications and computing, a machine-readable medium (or computer-readable medium) is a medium capable of storing data in a format easily readable by a digital computer or a sensor. It contrasts with ''human-readable'' medium and data. T ...
large-project documents in government, law, and industry. Many such documents must remain readable for several decades—a long time in the
information technology Information technology (IT) is a set of related fields within information and communications technology (ICT), that encompass computer systems, software, programming languages, data processing, data and information processing, and storage. Inf ...
field. SGML also was extensively applied by the military, and the aerospace, technical reference, and industrial publishing industries. The advent of the
XML Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing data. It defines a set of rules for encoding electronic document, documents in a format that is both human-readable and Machine-r ...
profile has made SGML suitable for widespread application for small-scale, general-purpose use.


Document validity

SGML (ENR+WWW) defines two kinds of validity. According to the revised Terms and Definitions of ISO 8879 (from the public draft):
A conforming SGML document must be either a type-valid SGML document, a tag-valid SGML document, or both. Note: A user may wish to enforce additional constraints on a document, such as whether a document instance is integrally-stored or free of entity references.
A type-valid SGML document is defined by the standard as
An SGML document in which, for each document instance, there is an associated
document type declaration A document type declaration, or DOCTYPE, is an instruction that associates a particular XML or SGML document (for example, a web page) with a document type definition (DTD) (for example, the formal definition of a particular version of HTML 2.0 - ...
(DTD) to whose DTD that instance conforms.
A tag-valid SGML document is defined by the standard as
An SGML document, all of whose document instances are fully tagged. There need not be a
document type declaration A document type declaration, or DOCTYPE, is an instruction that associates a particular XML or SGML document (for example, a web page) with a document type definition (DTD) (for example, the formal definition of a particular version of HTML 2.0 - ...
associated with any of the instances. Note: If there is a
document type declaration A document type declaration, or DOCTYPE, is an instruction that associates a particular XML or SGML document (for example, a web page) with a document type definition (DTD) (for example, the formal definition of a particular version of HTML 2.0 - ...
, the instance can be parsed with or without reference to it.


Terminology

''Tag-validity'' was introduced in SGML (ENR+WWW) to support
XML Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing data. It defines a set of rules for encoding electronic document, documents in a format that is both human-readable and Machine-r ...
which allows documents with no DOCTYPE declaration but which can be parsed without a grammar, or documents which have a DOCTYPE declaration that makes no XML Infoset contributions to the document. The standard calls this ''fully tagged''. ''Integrally stored'' reflects the
XML Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing data. It defines a set of rules for encoding electronic document, documents in a format that is both human-readable and Machine-r ...
requirement that elements end in the same entity in which they started. ''Reference-free'' reflects the
HTML Hypertext Markup Language (HTML) is the standard markup language for documents designed to be displayed in a web browser. It defines the content and structure of web content. It is often assisted by technologies such as Cascading Style Sheets ( ...
requirement that entity references are for special characters and do not contain markup. SGML validity commentary, especially commentary that was made before 1997 or that is unaware of SGML (ENR+WWW), covers ''type-validity'' only. The SGML emphasis on validity supports the requirement for generalized markup that ''markup should be rigorous.'' (ISO 8879 A.1)


Syntax

An SGML document may have three parts: # the SGML Declaration, # the Prologue, containing a DOCTYPE declaration with the various ''markup declarations'' that together make a Document Type Definition (DTD), and # the instance itself, containing one top-most element and its contents. An SGML document may be composed from many entities (discrete pieces of text). In SGML, the entities and element types used in the document may be specified with a DTD, the different character sets, features, delimiter sets, and keywords are specified in the SGML Declaration to create the ''concrete syntax'' of the document. Although full SGML allows implicit markup and some other kinds of tags, the
XML Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing data. It defines a set of rules for encoding electronic document, documents in a format that is both human-readable and Machine-r ...
specification (s4.3.1) states: For introductory information on a basic, modern SGML syntax, see
XML Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing data. It defines a set of rules for encoding electronic document, documents in a format that is both human-readable and Machine-r ...
. The following material concentrates on features not in XML and is not a comprehensive summary of SGML syntax.


Optional features

SGML generalizes and supports a wide range of markup languages as found in the mid 1980s. These ranged from terse
Wiki A wiki ( ) is a form of hypertext publication on the internet which is collaboratively edited and managed by its audience directly through a web browser. A typical wiki contains multiple pages that can either be edited by the public or l ...
-like syntaxes to RTF-like bracketed languages to
HTML Hypertext Markup Language (HTML) is the standard markup language for documents designed to be displayed in a web browser. It defines the content and structure of web content. It is often assisted by technologies such as Cascading Style Sheets ( ...
-like matching-tag languages. SGML did this by a relatively simple default ''reference concrete syntax'' augmented with a large number of optional features that could be enabled in the SGML Declaration. Not every SGML parser can necessarily process every SGML document. Because each processor's ''System Declaration'' can be compared to the document's ''SGML Declaration'' it is always possible to know whether a document is supported by a particular processor. Many SGML features relate to markup minimization. Other features relate to concurrent (parallel) markup (CONCUR), to linking processing attributes (LINK), and to embedding SGML documents within SGML documents (SUBDOC). The notion of customizable features was not appropriate for Web use, so one goal of
XML Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing data. It defines a set of rules for encoding electronic document, documents in a format that is both human-readable and Machine-r ...
was to minimize optional features. However, XML's well-formedness rules cannot support Wiki-like languages, leaving them unstandardized and difficult to integrate with non-text information systems.


Concrete and abstract syntaxes

The usual (default) SGML ''concrete syntax'' resembles this example, which is the default
HTML Hypertext Markup Language (HTML) is the standard markup language for documents designed to be displayed in a web browser. It defines the content and structure of web content. It is often assisted by technologies such as Cascading Style Sheets ( ...
concrete syntax: typically something like this SGML provides an ''abstract syntax'' that can be implemented in many different types of ''concrete syntax''. Although the markup norm is using
angle brackets A bracket is either of two tall fore- or back-facing punctuation marks commonly used to isolate a segment of text or data from its surroundings. They come in four main pairs of shapes, as given in the box to the right, which also gives their n ...
as start- and end-tag
delimiter A delimiter is a sequence of one or more Character (computing), characters for specifying the boundary between separate, independent regions in plain text, Expression (mathematics), mathematical expressions or other Data stream, data streams. An ...
s in an SGML document (per the standard-defined ''reference concrete syntax''), it is possible to use other characters—provided a suitable concrete syntax is defined in the document's SGML declaration. For example, an SGML interpreter might be programmed to parse GML, wherein the tags are delimited with a left colon and a right
full stop The full stop ( Commonwealth English), period (North American English), or full point is a punctuation mark used for several purposes, most often to mark the end of a declarative sentence (as distinguished from a question or exclamation). A ...
, and an :e prefix denotes an end tag: :xmp.Hello, world:exmp.. According to the reference syntax, letter case (upper- or lower-case) is not distinguished in tag names, so the three tags <quote>, <QUOTE>, and <quOtE> are equivalent. (A concrete syntax might change this rule via the NAMECASE NAMING declarations.)


Markup minimization

SGML has features for reducing the number of characters required to mark up a document, which must be enabled in the SGML Declaration. SGML processors need not support every available feature, thus allowing applications to tolerate many types of inadvertent markup omissions; however, SGML systems usually are intolerant of invalid structures. XML is intolerant of syntax omissions, and does not require a DTD for checking well-formedness.


OMITTAG

Both start tags and end tags may be omitted from a document instance, provided: # the OMITTAG feature is enabled in the SGML Declaration, # the DTD indicates that the tags are permitted to be omitted, # (for start tags) the element has no associated required (#REQUIRED) attributes, and # the tag can be unambiguously inferred by context. For example, if OMITTAG YES is specified in the SGML Declaration (enabling the OMITTAG feature), and the DTD includes the following declarations: then this excerpt: Introduction to SGML
The SGML Declaration ... which omits two tags and two tags, would represent valid markup. Omitting tags is optional – the same excerpt could be tagged like this: Introduction to SGML
The SGML Declaration ... and would still represent valid markup. Note: The OMITTAG feature is unrelated to the tagging of elements whose declared content is EMPTY as defined in the DTD: Elements defined like this have no end tag, and specifying one in the document instance would result in invalid markup. This is syntactically different from
XML Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing data. It defines a set of rules for encoding electronic document, documents in a format that is both human-readable and Machine-r ...
empty elements in this regard.


SHORTREF

Tags can be replaced with delimiter strings, for a terser markup, via the SHORTREF feature. This markup style is now associated with
wiki markup A wiki ( ) is a form of hypertext publication on the internet which is Collaborative editing, collaboratively edited and managed by its audience directly through a web browser. A typical wiki contains multiple pages that can either be edit ...
, e.g. wherein two equals-signs (

), at the start of a line, are the "heading start-tag", and two equals signs (

) after that are the "heading end-tag".


SHORTTAG

SGML markup languages whose concrete syntax enables the SHORTTAG VALUE feature, do not require attribute values containing only alphanumeric characters to be enclosed within quotation marks—either double " " (LIT) or single ' ' (LITA)—so that the previous markup example could be written: typically something like this One feature of SGML markup languages is the "presumptuous empty tagging", such that the empty end tag </> in <ITALICS>this</> "inherits" its value from the nearest previous full start tag, which, in this example, is <ITALICS> (in other words, it closes the most recently opened item). The expression is thus equivalent to <ITALICS>this</ITALICS>.


NET

Another feature is the ''NET'' (Null End Tag) construction: <ITALICS/this/, which is structurally equivalent to <ITALICS>this</ITALICS>.


Other features

Additionally, the SHORTTAG NETENABL IMMEDNET feature allows shortening tags surrounding an empty text value, but forbids shortening full tags: can be written as slash Slash may refer to: * Slash (punctuation), the "/" character Arts and entertainment Fictional characters * Slash (Marvel Comics) * Slash (''Teenage Mutant Ninja Turtles'') Music * Harry Slash & The Slashtones, an American rock band * Nash th ...
( / ) stands for the NET-enabling "start-tag close" (NESTC), and the second slash stands for the NET. NOTE: XML defines NESTC with a /, and NET with an > (angled bracket)—hence the corresponding construct in XML appears as . The third feature is 'text on the same line', allowing a markup item to be ended with a line-end; especially useful for headings and such, requiring using either SHORTREF or DATATAG minimization. For example, if the DTD includes the following declarations: "> (and "&#RE;&#RS;" is a short-reference delimiter in the concrete syntax), then: first line second line is equivalent to: first line second line


Formal characterization

SGML has many features that defied convenient description with the popular formal
automata theory Automata theory is the study of abstract machines and automata, as well as the computational problems that can be solved using them. It is a theory in theoretical computer science with close connections to cognitive science and mathematical l ...
and the contemporary
parser Parsing, syntax analysis, or syntactic analysis is a process of analyzing a string of symbols, either in natural language, computer languages or data structures, conforming to the rules of a formal grammar by breaking it into parts. The term '' ...
technology of the 1980s and the 1990s. The standard warns in Annex H: A report on an early implementation of a parser for basic SGML, the Amsterdam SGML Parser, notes and specifies various differences. There appears to be no definitive classification of full SGML against a known class of
formal grammar A formal grammar is a set of Terminal and nonterminal symbols, symbols and the Production (computer science), production rules for rewriting some of them into every possible string of a formal language over an Alphabet (formal languages), alphabe ...
. Plausible classes may include
tree-adjoining grammar Tree-adjoining grammar (TAG) is a grammar formalism defined by Aravind Joshi. Tree-adjoining grammars are somewhat similar to context-free grammars, but the elementary unit of rewriting is the tree rather than the symbol. Whereas context-free gr ...
s and
adaptive grammar An adaptive grammar is a formal grammar that explicitly provides mechanisms within the Formal system, formalism to allow its own Production rule (formal languages), production rules to be manipulated. Overview John N. Shutt defines adaptive gramm ...
s. XML is described as being generally parsable like a
two-level grammar In computer science, a Van Wijngaarden grammar (also vW-grammar or W-grammar) is a formalism for defining formal languages. The name derives from the formalism invented by Adriaan van Wijngaarden for the purpose of defining the ALGOL 68 programmi ...
for non-validated XML and a
Conway Conway may refer to: Places United States * Conway, Arkansas * Conway County, Arkansas * Lake Conway, Arkansas * Conway, Florida * Conway, Iowa * Conway, Kansas * Conway, Louisiana * Conway, Massachusetts * Conway, Michigan * Conway Townshi ...
-style pipeline of
coroutines Coroutines are computer program components that allow execution to be suspended and resumed, generalizing subroutines for cooperative multitasking. Coroutines are well-suited for implementing familiar program components such as cooperative tasks, ...
( lexer,
parser Parsing, syntax analysis, or syntactic analysis is a process of analyzing a string of symbols, either in natural language, computer languages or data structures, conforming to the rules of a formal grammar by breaking it into parts. The term '' ...
, validator) for valid XML. The SGML productions in the ISO standard are reported to be LL(3) or LL(4). XML-class subsets are reported to be expressible using a
W-grammar In computer science, a Van Wijngaarden grammar (also vW-grammar or W-grammar) is a formalism for defining formal languages. The name derives from the formalism invented by Adriaan van Wijngaarden for the purpose of defining the ALGOL 68 programmi ...
. According to one paper, probably considered at an '' information set'' or
parse tree A parse tree or parsing tree (also known as a derivation tree or concrete syntax tree) is an ordered, rooted tree that represents the syntactic structure of a string according to some context-free grammar. The term ''parse tree'' itself is use ...
level rather than a character or delimiter level: The SGML standard does not define SGML with formal data structures, such as
parse tree A parse tree or parsing tree (also known as a derivation tree or concrete syntax tree) is an ordered, rooted tree that represents the syntactic structure of a string according to some context-free grammar. The term ''parse tree'' itself is use ...
s; however, an SGML document is constructed of a rooted directed acyclic graph (RDAG) of physical storage units known as " entities", which is parsed into a RDAG of structural units known as "elements". The physical graph is loosely characterized as an ''entity tree'', but entities might appear multiple times. Moreover, the structure graph is also loosely characterized as an ''element tree'', but the ID/IDREF markup allows arbitrary arcs. The results of parsing can also be understood as a data tree in different notations; where the document is the root node, and entities in other notations (text, graphics) are child nodes. SGML provides apparatus for linking to and annotating external non-SGML entities. The SGML standard describes it in terms of ''maps'' and ''recognition modes'' (s9.6.1). Each entity, and each element, can have an associated ''notation'' or ''declared content type'', which determines the kinds of references and tags which will be recognized in that entity and element. Also, each element can have an associated ''delimiter map'' (and ''short reference map''), which determines which characters are treated as delimiters in context. The SGML standard characterizes parsing as a
state machine A finite-state machine (FSM) or finite-state automaton (FSA, plural: ''automata''), finite automaton, or simply a state machine, is a mathematical model of computation. It is an abstract machine that can be in exactly one of a finite number o ...
switching between recognition modes. During parsing, there is a stack of maps that configure the scanner, while the
tokenizer Lexical tokenization is conversion of a text into (semantically or syntactically) meaningful ''lexical tokens'' belonging to categories defined by a "lexer" program. In case of a natural language, those categories include nouns, verbs, adjectives ...
relates to the recognition modes. Parsing involves traversing the dynamically-retrieved entity graph, finding/implying tags and the element structure, and validating those tags against the grammar. An unusual aspect of SGML is that the grammar (DTD) is used both passively — to ''recognize'' lexical structures, and actively — to ''generate'' missing structures and tags that the DTD has declared optional. End- and start- tags can be omitted, because they can be inferred. Loosely, a series of tags can be omitted only if there is a single, possible path in the grammar to imply them. It was this active use of grammars that made concrete SGML parsing difficult to formally characterize. SGML uses the term ''validation'' for both recognition and generation. XML does not use the grammar (DTD) to change delimiter maps or to inform the parse modes, and does not allow
tag omission Tag omission is an optional feature to minimize an SGML document. Whenever a tag can be implicitly anticipated by the parser from the structure of the document, the tag can be omitted. The tag omission feature can be generally enabled or disabled i ...
; consequently, XML validation of elements is not active in the sense that SGML validation is active. SGML ''without'' a DTD (e.g. simple XML), is a grammar or a language; SGML ''with'' a DTD is a
metalanguage In logic and linguistics, a metalanguage is a language used to describe another language, often called the ''object language''. Expressions in a metalanguage are often distinguished from those in the object language by the use of italics, quota ...
. SGML with an SGML declaration is, perhaps, a meta-metalanguage, since it is a metalanguage whose declaration mechanism ''is'' a metalanguage. SGML has an abstract syntax implemented by many possible concrete syntaxes; however, this is not the same usage as in an
abstract syntax tree An abstract syntax tree (AST) is a data structure used in computer science to represent the structure of a program or code snippet. It is a tree representation of the abstract syntactic structure of text (often source code) written in a formal ...
and as in a
concrete syntax tree A parse tree or parsing tree (also known as a derivation tree or concrete syntax tree) is an ordered, rooted tree that represents the syntactic structure of a string according to some context-free grammar. The term ''parse tree'' itself is used p ...
. In the SGML usage, a concrete syntax is a set of specific delimiters, while the abstract syntax is the set of names for the delimiters. The XML Infoset corresponds more to the programming language notion of abstract syntax introduced by John McCarthy.


Derivatives


XML

The
W3C The World Wide Web Consortium (W3C) is the main international standards organization for the World Wide Web. Founded in 1994 by Tim Berners-Lee, the consortium is made up of member organizations that maintain full-time staff working together in ...
XML (Extensible Markup Language) is a profile (subset) of SGML designed to ease the implementation of the parser compared to a full SGML parser, primarily for use on the World Wide Web. In addition to disabling many SGML options present in the reference syntax (such as omitting tags and nested subdocuments) XML adds a number of additional restrictions on the kinds of SGML syntax. For example, despite enabling SGML shortened tag forms, XML does not allow unclosed start or end tags. It also relied on many of the additions made by the WebSGML Annex. XML currently is more widely used than full SGML. XML has lightweight
internationalization Internationalization or Internationalisation is the process of increasing involvement of enterprises in international markets, although there is no agreed definition of internationalization. Internationalization is a crucial strategy not only for ...
based on
Unicode Unicode or ''The Unicode Standard'' or TUS is a character encoding standard maintained by the Unicode Consortium designed to support the use of text in all of the world's writing systems that can be digitized. Version 16.0 defines 154,998 Char ...
. Applications of XML include
XHTML Extensible HyperText Markup Language (XHTML) is part of the family of XML markup languages which mirrors or extends versions of the widely used HyperText Markup Language (HTML), the language in which Web pages are formulated. While HTML, pr ...
,
XQuery XQuery (XML Query) is a query language and functional programming language designed to query and transform collections of structured and unstructured data, primarily in the form of XML. It also supports text data and, through implementation-sp ...
,
XSLT XSLT (Extensible Stylesheet Language Transformations) is a language originally designed for transforming XML documents into other XML documents, or other formats such as HTML for web pages, plain text, or XSL Formatting Objects. These formats c ...
,
XForms XForms is an XML format used for collecting inputs from web forms. XForms was designed to be the next generation of HTML / XHTML forms, but is generic enough that it can also be used in a standalone manner or with presentation languages other tha ...
,
XPointer XPointer is a system for addressing components of XML-based Internet media. It is divided among four specifications: a " framework" that forms the basis for identifying XML fragments, a positional element addressing scheme, a scheme for namespace ...
, JSP, SVG,
RSS RSS ( RDF Site Summary or Really Simple Syndication) is a web feed that allows users and applications to access updates to websites in a standardized, computer-readable format. Subscribing to RSS feeds can allow a user to keep track of many ...
,
Atom Atoms are the basic particles of the chemical elements. An atom consists of a atomic nucleus, nucleus of protons and generally neutrons, surrounded by an electromagnetically bound swarm of electrons. The chemical elements are distinguished fr ...
,
XML-RPC XML-RPC is a remote procedure call (RPC) protocol which uses XML to encode its calls and HTTP as a transport mechanism.Simon St. Laurent, Joe Johnston, Edd Dumbill. (June 2001) ''Programming Web Services with XML-RPC.'' O'Reilly. First Edition. ...
,
RDF/XML RDF/XML is a syntax,RDF/XML Syntax Specification
SOAP Soap is a salt (chemistry), salt of a fatty acid (sometimes other carboxylic acids) used for cleaning and lubricating products as well as other applications. In a domestic setting, soaps, specifically "toilet soaps", are surfactants usually u ...
.


HTML

While HTML (Hyper Text Markup Language) was developed partially independently and in parallel with SGML, its creator,
Tim Berners-Lee Sir Timothy John Berners-Lee (born 8 June 1955), also known as TimBL, is an English computer scientist best known as the inventor of the World Wide Web, the HTML markup language, the URL system, and HTTP. He is a professorial research fellow a ...
, intended it to be an application of SGML. The design of HTML was therefore inspired by SGML tagging, but, since no clear expansion and parsing guidelines were established, most actual HTML documents are not valid SGML documents. Later, HTML was reformulated (version 2.0) to be more of an SGML application; however, the HTML markup language has many legacy- and exception-handling features that differ from SGML's requirements. HTML 4 is an SGML application that fully conforms to ISO 8879 – SGML. The charter for the 2006 revival of the
World Wide Web Consortium The World Wide Web Consortium (W3C) is the main international standards organization for the World Wide Web. Founded in 1994 by Tim Berners-Lee, the consortium is made up of member organizations that maintain full-time staff working together in ...
HTML Working Group says, "the Group will not assume that an SGML parser is used for 'classic HTML. Although HTML syntax closely resembles SGML syntax with the default ''reference concrete syntax'',
HTML5 HTML5 (Hypertext Markup Language 5) is a markup language used for structuring and presenting hypertext documents on the World Wide Web. It was the fifth and final major HTML version that is now a retired World Wide Web Consortium (W3C) recommend ...
abandons any attempt to define HTML as an SGML application, explicitly defining its own parsing rules, which more closely match existing implementations and documents. It does, however, define an alternative
XHTML Extensible HyperText Markup Language (XHTML) is part of the family of XML markup languages which mirrors or extends versions of the widely used HyperText Markup Language (HTML), the language in which Web pages are formulated. While HTML, pr ...
serialization, which conforms to XML and therefore to SGML as well.


OED

The second edition of the ''
Oxford English Dictionary The ''Oxford English Dictionary'' (''OED'') is the principal historical dictionary of the English language, published by Oxford University Press (OUP), a University of Oxford publishing house. The dictionary, which published its first editio ...
'' (OED) is entirely marked up with an SGML-based markup language using the
LEXX ''Lexx'' (also known as ''LEXX: The Dark Zone Stories'' and ''Tales from a Parallel Universe'') is a science fiction television series created by Lex Gigeroff and brothers Paul Donovan (writer), Paul and Michael Donovan (producer), Michael Dono ...
text editor. The third edition is marked up as XML.


Others

Other document markup languages are partly related to SGML and XML, but—because they cannot be parsed or validated or otherwise processed using standard SGML and XML tools—they are not considered either SGML or XML languages; the
Z Format Z, or z, is the twenty-sixth and last letter of the Latin alphabet. It is used in the modern English alphabet, in the alphabets of other Western European languages, and in others worldwide. Its usual names in English are ''zed'' (), which i ...
markup language for typesetting and documentation is an example. Several modern programming languages support tags as primitive token types, or now support Unicode and
regular expression A regular expression (shortened as regex or regexp), sometimes referred to as rational expression, is a sequence of characters that specifies a match pattern in text. Usually such patterns are used by string-searching algorithms for "find" ...
pattern-matching. An example is the Scala programming language.


Applications

Document markup languages defined using SGML are called "applications" by the standard; many pre-XML SGML applications were proprietary property of the organizations which developed them, and thus unavailable in the World Wide Web. The following list is of pre-XML SGML applications. *
Text Encoding Initiative The Text Encoding Initiative (TEI) is a text-centric community of practice in the academic field of digital humanities, operating continuously since the 1980s. The community currently runs a mailing list, meetings and conference series, and ma ...
(TEI) is an academic consortium that designs, maintains, and develops technical standards for digital-format textual representation applications. *
DocBook DocBook is a Semantics (computer science), semantic markup language for technical documentation. It was originally intended for writing technical documents related to computer hardware and software, but it can be used for any other sort of docume ...
is a markup language originally created as an SGML application, designed for authoring technical documentation; DocBook currently is an XML application. * CALS (Continuous Acquisition and Life-cycle Support) is a US Department of Defense (DoD) initiative for electronically capturing military documents and for linking related data and information. *
HyTime HyTime (''Hypermedia/Time-based Structuring Language'') is a markup language that is an application of SGML. HyTime defines a set of hypertext-oriented element types that, in effect, supplement SGML and allow SGML document authors to build hypert ...
defines a set of hypertext-oriented element types that allow SGML document authors to build hypertext and multimedia presentations. *
EDGAR Edgar is a commonly used masculine English given name, from an Anglo-Saxon name ''Edgar'' (composed of ''wikt:en:ead, ead'' "rich, prosperous" and ''Gar (spear), gar'' "spear"). Like most Anglo-Saxon names, it fell out of use by the Late Midd ...
(Electronic Data-Gathering, Analysis, and Retrieval) system effects automated collection, validation, indexing, acceptance, and forwarding of submissions, by companies and others, who are legally required to file data and information forms with the US Securities and Exchange Commission (SEC). *
LinuxDoc LinuxDoc is an SGML DTD which is similar to DocBook. Matt Welsh created it, and version 1.1 was announced in 1994. It is primarily used by the Linux Documentation Project. The DocBook SGML tags are often longer than the equivalent LinuxDoc tags. ...
. Documentation for Linux packages has used the LinuxDoc SGML DTD and Docbook XML DTD. *
AAP DTD In computing, AAP DTD (variously known as AAP Electronic Manuscript Standard, AAP standard, AAP/EPSIG standard, and ANSI/NISO Z39.59) is a set of three SGML Document Type Definitions (book, journal, and article) for scientific documents, defined by ...
is a document type definition for
scientific Science is a systematic discipline that builds and organises knowledge in the form of testable hypotheses and predictions about the universe. Modern science is typically divided into twoor threemajor branches: the natural sciences, which stu ...
documents, defined by the
Association of American Publishers The Association of American Publishers (AAP) is the national trade association of the American book publishing industry. AAP lobbies for book, journal and education publishers in the United States. AAP members include most of the major commercial ...
. * ISO 12083, a successor to AAP DTD, is an international SGML standard for document interchange between authors and publishers. *
SGMLguid CERN SGML, also known as "Waterloo based SGML", "Waterloo SGML", and "SGMLguid", was an early Standard Generalized Markup Language, SGML application developed and used at CERN between 1986 and 1990. It served as a model of the earliest HTML specifi ...
was an early SGML document type definition created, developed and used at
CERN The European Organization for Nuclear Research, known as CERN (; ; ), is an intergovernmental organization that operates the largest particle physics laboratory in the world. Established in 1954, it is based in Meyrin, western suburb of Gene ...
.


Open-source implementations

Significant
open-source Open source is source code that is made freely available for possible modification and redistribution. Products include permission to use and view the source code, design documents, or content of the product. The open source model is a decentrali ...
implementations of SGML have included:
ASP-SGML

ARC-SGML
by Standard Generalized Markup Language Users', 1991, C language
SGMLS
by James Clark, 1993, C language
Project YAO
by Yuan-ze Institute of Technology, Taiwan, with Charles Goldfarb, 1994.
SP and Jade
by James Clark, C++ language SP and Jade, the associated DSSSL processors, are maintained by th
OpenJade
project, and are common parts of Linux distributions. A general archive of SGML software and materials resides a
SUNET
The original HTML parser class, in Sun System's implementation of Java, is a limited-features SGML parser, using SGML terminology and concepts.


See also

* Organization for the Advancement of Structured Information Standards (OASIS) *
S-expression In computer programming, an S-expression (or symbolic expression, abbreviated as sexpr or sexp) is an expression in a like-named notation for nested List (computing), list (Tree (data structure), tree-structured) data. S-expressions were invented ...
*
DSSSL The Document Style Semantics and Specification Language (DSSSL) is an international standard developed to provide stylesheets for SGML documents. DSSSL consists of two parts: a tree transformation process that can be used to manipulate the tree ...
 – a Scheme-based processing language similar to
XSL In computing, the term Extensible Stylesheet Language (XSL) is used to refer to a family of languages used to transform and render XML documents (e.g., XSL is used to determine how to display a XML document as a webpage). Historically, the W3C XS ...
*
LaTeX Latex is an emulsion (stable dispersion) of polymer microparticles in water. Latices are found in nature, but synthetic latices are common as well. In nature, latex is found as a wikt:milky, milky fluid, which is present in 10% of all floweri ...
* List of general purpose markup languages *
SGML entity In the Standard Generalized Markup Language (SGML), an entity is a primitive data type, which associates a string with either a unique alias (such as a user-specified name) or an SGML reserved word (such as #DEFAULT). Entities are foundational to t ...
*
Tag omission Tag omission is an optional feature to minimize an SGML document. Whenever a tag can be implicitly anticipated by the parser from the structure of the document, the tag can be omitted. The tag omission feature can be generally enabled or disabled i ...


References


External links


Overview of SGML Resources
at W3C's website.
SC34 Committee Records
Charles Babbage Institute The IT History Society (ITHS) is an organization that supports the history and scholarship of information technology by encouraging, fostering, and facilitating archival and historical research. Formerly known as the Charles Babbage Foundation, ...
 – Collection on the development of SGML and other standards influential in the development of current XML tools; documents include early drafts of SGML administrative materials, documentation, working group papers, and standards for computer languages.
SGML Syntax Summary by Charles Goldfarb
in SGML and HTML Explained, Martin Bryan (1997) (the original URL is broken at http://www.is-thought.co.uk/book/sgml-4.htm#Fig4-2)

Wayne Wohler, IBM Corporation, 1994.

*[http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=16645 ISO/IEC 9070:1991 – Information technology – SGML support facilities – Registration procedures for public text owner identifiers] {{Authority control Data modeling languages ISO standards Markup languages Technical communication SGML,