Sunday, 4 August 2013

SGML and SGML DTD

  SGML an older technology ,when i heard the name of this older technology I thought who are the persons still using this older technologies, Even we have more advance format than that Like XML, FO:XML etc. 

Who are using this older technology still? When i heard the answer I wondered, a modern and high tech industries still using this. 




The Industry using the SGML technology still is Aviation,Technical Reference, Publishing industries and Military.




Where there are using this Technology?

Aviation :  
   An original equipment manufacturer, or OEM, manufactures products or components give there Manual’s in SGML format which consists Task Cards. Data in SGML are in complex format but more sensitive. Small changes in data make drastically output.

           Task Cards are documents containing detailed instructions that guide aviation technicians as they perform maintenance on airframes, engines and components. Task cards may be physical (paper) or virtual (electronic) documents, depending on the business process of the airline  Each task card contains the information (parts, procedures, tools, skills, etc.) necessary to work on a specific piece of equipment (by tail-number/serial-number) and must be signed-off when the job is complete.

Military : Military Standard Handbook 

Let we see now about SGML 
        SGML is the abbreviation of Standard Generalized Markup Language. SGML is Meta language. HTML is written by SGML .XML and HTML is derived from SGML. SGML uses markers called tags to specify the formatting within the document and to separate the specific parts of the document in to block.

Sample SGML 
<technology> 
<language>
<title>C# <stanza> 
<line>Threading 
<line>forloop code <line>That flies in the Project  <line>  
Linq code is preent in all files  <stanza>
<line>Find the all lines  <line>Of Linq :
<line>Which is same <line>Exist in file.
<language > <!-- more language goes here-->
</technology >


Let we see the DTD for Above SGML 

        SGML specifies what the tags look like and what they are do. The specification for specific markup language is mentioned in specific DTD (Data Type Definition).This document consists of Title, Header, Body, Paragraph etc and there Formatting.

<!ELEMENT technology   - -  (language+)> 
<!ELEMENT language     - -  (title?, stanza+)> 
<!ELEMENT title        - O  (#PCDATA)> 
<!ELEMENT stanza       - O  (line+)>
<!ELEMENT line         O O  (#PCDATA)>


SGML DTD contains 
1.. Minimization Rules 
2. Content Model 
3. Occurrence Indicators 
4. Group Connectors

  • An element, is delimited by angle brackets; the first character following the opening bracket must be an exclamation mark
  • An ELEMENT keyword, indicating that it declares an element
  •  Two characters specifying minimization rules (_ O), which specifies the start- and end-tags must be present in every occurrence of the element, a letter O (for "omissible" or "optional")
  •  #PCDATA, as in this example. This is an abbreviation for "parsed character data," and it means that the element being defined may contain any valid character data.
  •  symbols +,*,? indicates the number of times occurance of elements in structure.
  • The content model (TITLE?, STANZA+) contains more than one component, and thus needs additionally to specify the order in which these elements (<title> and <stanza>) may appear. This ordering is determined by the group connector (the comma) used between its components. There are three possible group connectors, conventionally represented by comma, vertical bar, and ampersand.


From This article I Hope we will learn some of the SGML and SGML DTD concepts and where this technology still uses .