.Open Standardized Generalized Mark Up Language - SGML SGML stands for the Standardized General Markup Language. It is the result of generalizing and then standardizing a number of Rich Text Formats(RTF) developed for word processing software on personal computers. SGML is actually a metalanguage used to define mark up languages. The definitions are called Document Type Definitions or DTDs. The key notation is that of a structural tag. Each part of a document (an $element) has its purpose, its place in the whole, and possibly its format, indicated by certain tags. Tags have two forms: .As_is .As_is The first is used to start an $element of type `name` The second form terminates the element. Either of these may be optional, or both may be required. SGML DTDs define the tags and whether the initial and final formas are required or optional. Further SGML DTDs define what elements can appear inside each type of element. These DTDs also define the various abbreviations that are permitted. These tend to make the document easier to write and harder to read. The key idea is that a document has a tree structure and the tags define the nodes in the tree. For example a Tree with a node type A with two parts of type B and C respectively might be encoded as: .As_is content of B content of C The $attributes in the first tag of an element can be used to further describe the meaning of the element. For example a tag with name IMAGE might mean that a grphic is to be included in the text and an attribute can supply the name of the file that holds the code forthe graphic. SGML also defines certain elements - symbolic forms for particluar characters in the defined type of document. . Note O(_)::=`Optional (_)` # ::=`any number including none`. non::=`anyhing but one of the following`. . Syntax SGML::=following .Net special_chars::= $nl | $np | $lt, nl::="". np::= "". lt::="". encoding::= $whitspace+>$ignored | $nl+>$eoln | $np+>$new_paragraph | $lt +> less_than |+> $Id. text::= #( $comment | $tag | |[ c:$commands ] ( $attributed(c) $text $negative(c) )|$normal_stuff). normal_stuff::=#($non($commands|$tags) | $special_chars). tag::@$commands, -- some commands have an optional terminator comment::="<--" #$non(">") "-->". attributed_commands::= "<" $basic_commands #$attribute ">", basic_commands::=($style | $character_set | $format ), negative_commands="", negative::$basic_commands->$negative_commands= "" is a basic_command then "" is the associated negative tag. attributed::$basic_commands->@$attribute_commands= "<" ! (front(rest)) ! #$attributes ">". attribute::=$identifier $O("=" $value). .Close.Net . SGML and HTML .See http://www/dick/samples/comp.html.syntax.html . Document Type Descriptions SGML defines a special metalanguage for describing elements and attributes. A document that follows these rules is said to be a DTD::=`Document Type Description". DTDs can be quite complex. One solution to this is the eXtendable mark up Language [$XML below]. The syntax for defining an element is as follows: element_description::= "". element_comment::= "--" ... "--". command_optional::= $mandatory | $optional. negative_optional::= $mandatory | $optional. mandatory::="-", optional::="o". structure::= "EMPTY" | O($sign) "(" $alternative #( "|" $alternative ")" | $element_name | $symbolic_element. $alternative ::= $part | $alternative "," $part. part::= $one_or_more | $zero_or_more | $one_part. one_or_more::= $one_part "+". zero_or_more::= $one_part "*". sign::= "+" | "-". one_part::= $structure symbolic_element::= "%" $name ";". element_name::=$tag. . Attribute lists Each elemnt has a list of possible attribute forms: attribute_list_description::= "". attribute_list::=$variable_name $type $O("#IMPLIED") More $TBA ... . Glossary TBA::="To Be Announced". Id::=`Identity $FUNCTIONS, functions that returns a copy of its argument`, Id= fun[x]x. FUNCTIONS::=http://www.csci.csusb.edu/dick/samples/math.syntax.html#Functions and maps. . DocBook DocBook is an SGML standard developed for documenting software. See the definitive guide on paper is .See [WalshMuelner99] but some links to WWW sources are needed here: .Hole . XML XML is the Extendable Markup Language. It is a simplified subset of SGML. In particular XML documents have case sensitive tags, attributes must be in quotes, and there are none of the abbreviations that make SGML difficult to parse and worse to read. See .See http://www/dick/samples/xml.html and .See http://www.w3.org/XML/ MathML::=Math Markup Lanuage. Defined using $XML. .See http://www.w3.org/Math/ OTP::="Open Trading Protocol", defined in $XML .See http://www.otp.org XML/EDI::=http://www.xmledi.com ANSI X.12 group working on expressing Electronic Data Interchange standards using $XML tags. Rosettanet::=http://www.rosettanet.org, --PC Industry products in $XML. OBI::=Open Buying through the Internet, .See http://www.openbuy.org -- for large scale corporate procurement ICE::=Information and Content Interchange, .See http://www.w3.org/TR/1998/NOTE-ice-19981026 OFX::=Open Financial eXchange, for bill paying and things like that -- .See http://www.ofx.net .Close Standardized Generalized Mark Up Language - SGML