[Skip Navigation] [CSUSB] / [CNS] / [Comp Sci Dept] / [R J Botting] / [Samples] / comp.text.SGML
[Index] [Contents] [Source Text] [About] [Notation] [Copyright] [Comment/Contact] [Search ]
Tue Sep 18 15:25:25 PDT 2007

Contents


    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:

       		<name attributes>
      		</name>
      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:

       		<A> <B> content of B </B>  <C> content of C </C> </A>

      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

    1. O(_)::=Optional (_)
    2. #::=any number including none.
    3. non::=anyhing but one of the following.

      Syntax

    4. SGML::=following
      Net
      1. special_chars::= nl | np | lt,
      2. nl::="<nl>".
      3. np::= "<np>".
      4. lt::="<lt>".
      5. encoding::= whitspace+>ignored | nl+>eoln | np+>new_paragraph | lt +> less_than |+> Id.

      6. text::= #( comment | tag | |[ c:commands ] ( attributed(c) text negative(c) )|normal_stuff).

      7. normal_stuff::=#(non(commands|tags) | special_chars).

      8. tag::@commands, -- some commands have an optional terminator
      9. comment::="<--" #non(">") "-->".
      10. attributed_commands::= "<" basic_commands #attribute ">",
      11. basic_commands::=(style | character_set | format ), negative_commands="</" basic_commands ">",
      12. negative::basic_commands->negative_commands= "</" ! (rest).
      13. |-negative in basic_commands---negative_commands. Example. if "<alpha>" is a basic_command then "</alpha>" is the associated negative tag.

      14. attributed::basic_commands->@attribute_commands= "<" ! (front(rest)) ! #attributes ">".

      15. attribute::=identifier O("=" value).

      (End of Net)

      SGML and HTML

      [ 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
    5. 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:

    6. element_description::= "<!ELEMENT" command_optional negative_optional structure O(element_comment) ">".

    7. element_comment::= "--" ... "--".

    8. command_optional::= mandatory | optional.
    9. negative_optional::= mandatory | optional.
    10. mandatory::="-",
    11. optional::="o".

    12. structure::= "EMPTY" | O(sign) "(" alternative #( "|" alternative ")" | element_name | symbolic_element. alternative ::= part | alternative "," part.
    13. part::= one_or_more | zero_or_more | one_part.
    14. one_or_more::= one_part "+".
    15. zero_or_more::= one_part "*".
    16. sign::= "+" | "-".
    17. one_part::= structure
    18. symbolic_element::= "%" name ";".
    19. element_name::=tag.

      Attribute lists

      Each elemnt has a list of possible attribute forms:
    20. attribute_list_description::= "<!ATTLIST" attribute_name attribute_list ">".
    21. attribute_list::=variable_name type O("#IMPLIED")

      More TBA ...

      Glossary

    22. TBA::="To Be Announced".
    23. Id::=Identity FUNCTIONS, functions that returns a copy of its argument, Id= fun[x]x.
    24. FUNCTIONS::= See 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 [WalshMuelner99] but some links to WWW sources are needed here: [click here [socket symbol] if you can fill this 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 [ xml.html ] and [ http://www.w3.org/XML/ ]
    25. MathML::=Math Markup Lanuage. Defined using XML. [ http://www.w3.org/Math/ ]
    26. OTP::="Open Trading Protocol", defined in XML [ http://www.otp.org ] XML/EDI::=http://www.xmledi.com ANSI X.12 group working on expressing Electronic Data Interchange standards using XML tags.
    27. Rosettanet::= See http://www.rosettanet.org, --PC Industry products in XML.
    28. OBI::=Open Buying through the Internet, [ http://www.openbuy.org ] -- for large scale corporate procurement
    29. ICE::=Information and Content Interchange, [ NOTE-ice-19981026 ]
    30. OFX::=Open Financial eXchange, for bill paying and things like that -- [ http://www.ofx.net ]

    . . . . . . . . . ( end of section Standardized Generalized Mark Up Language - SGML) <<Contents | End>>

End