ScholarQuill logoScholarQuillUniversity Notes
  • Notes
  • Past Papers
  • Blogs
  • Todo
Login
ScholarQuill logoScholarQuillUniversity Notes
Login
NotesPast PapersBlogsTodo
More
SubjectsDiscussionCGPA CalculatorGPA CalculatorStudent PortalCourse Outline
About
About usPrivacy PolicyReportContact
Notes
Past Papers
Blogs
Todo
Analytics
    Current Subject
    🧩
    Web Technologies
    COMP3144
    Progress0 / 38 topics
    Topics
    1. Introduction to Web Applications2. TCP/IP Application Services3. Web Servers: Basic Operation4. Web Servers: Virtual Hosting5. Web Servers: Chunked Transfers6. Web Servers: Caching Support7. Web Servers: Extensibility8. SGML9. HTML510. CSS311. XML Languages and Applications: Core XML12. XML Languages and Applications: XHTML13. XML Languages and Applications: XHTML MP14. Web Service: SOAP15. Web Service: REST16. Web Service: WML17. Web Service: XSL18. Web Services: Operations19. Web Services: Processing HTTP Requests20. Web Services: Processing HTTP Responses21. Web Services: Cookie Coordination22. Web Services: Privacy and P3P23. Web Services: Complex HTTP Interactions24. Web Services: Dynamic Content Delivery25. Server Configuration26. Server Security27. Web Browsers Architecture and Processes28. Active Browser Pages: JavaScript29. Active Browser Pages: DHTML30. Active Browser Pages: AJAX31. JSON32. Approaches to Web Application Development33. Programming in Any Scripting Language34. Search Technologies35. Search Engine Optimization36. XML Query Language37. Semantic Web38. Future Web Application Framework
    COMP3144›SGML
    Web TechnologiesTopic 8 of 38

    SGML

    7 minread
    1,148words
    Intermediatelevel

    SGML (Standard Generalized Markup Language)

    SGML stands for Standard Generalized Markup Language and is a standard for defining the structure of documents. It is a metalanguage that provides rules for creating markup languages, which are used to define the structure of text and data within documents. SGML was designed to be a comprehensive and flexible framework for creating a wide variety of document types, and it is the basis for other popular document markup languages like HTML and XML.

    Key Characteristics of SGML

    1. Generalized Markup:

      • SGML is called generalized because it allows the creation of different types of markup languages tailored for specific types of documents. Unlike specialized markup languages, SGML is flexible and can be adapted to many different uses. It does not dictate a specific set of tags or document structures, but rather defines how to create those structures.
    2. Document Structure Definition:

      • SGML provides a set of rules for structuring documents using tags (markup). These tags define the document’s elements (such as headings, paragraphs, tables, etc.) and how they relate to each other. It also allows for defining attributes, links, and other complex structures.
    3. Separation of Content and Formatting:

      • SGML allows for the separation of content from its presentation (formatting). This means that the content of the document can be structured and defined independently of how it will be displayed, which is a principle also followed in modern web technologies like HTML and XML.
    4. Tag Customization:

      • In SGML, you can create your own tags to suit the content and structure of the document you are working with. For example, you could define custom tags for specific types of metadata, or for specialized scientific or technical content.
    5. Interchangeability:

      • SGML was designed to be portable, allowing documents created in one system to be transferred to another. This was a major advantage when dealing with large documents or systems in which data needed to be shared across different platforms.

    SGML Syntax

    SGML uses a tag-based syntax similar to that of HTML and XML. A typical SGML document is composed of:

    1. Elements: The building blocks of the document, which are defined by tags. Elements can contain text, attributes, or other elements.

      • Example:
        <title>Introduction to SGML</title>
        
        Here, <title> is an element, and "Introduction to SGML" is the content of the element.
    2. Attributes: Additional information about an element, defined within the opening tag. Attributes are often used to define properties like alignment, font size, or links.

      • Example:
        <book title="SGML for Beginners">
        
    3. Nested Elements: Elements can be nested inside other elements to create a hierarchical structure.

      • Example:
        <article>
            <title>SGML Overview</title>
            <section>
                <paragraph>SGML is a flexible markup language...</paragraph>
            </section>
        </article>
        
    4. Document Type Definition (DTD): A DTD is used in SGML to define the structure and rules for elements, attributes, and the relationships between them in a document. It specifies what tags are allowed, how they should be nested, and what attributes they can have.

      • Example:
        <!DOCTYPE article PUBLIC "-//SGML//EN">
        

    SGML vs. Other Markup Languages

    1. SGML vs. HTML:

      • HTML (HyperText Markup Language) is a markup language based on SGML. However, HTML is specialized for web page creation, focusing on the presentation of documents in browsers. SGML, on the other hand, is more general-purpose and is not focused solely on web display. While HTML follows a predefined set of tags, SGML allows for the creation of custom tags and is more flexible.
    2. SGML vs. XML:

      • XML (Extensible Markup Language) is another markup language that evolved from SGML. While SGML allows for complex document structures and customization, XML simplifies the syntax and makes it easier to process and exchange data between different systems. XML is less rigid and more standardized than SGML, and it has become more widely adopted because of its simplicity and ease of use. XML can be seen as a simplified subset of SGML, focusing primarily on data storage and exchange.
    3. SGML vs. Markdown:

      • Markdown is a lightweight markup language designed for easy writing and formatting of text. Unlike SGML, which allows for complex and flexible document definitions, Markdown is much simpler and is primarily used for content like documentation or web articles, where structure and presentation are less complex.

    Advantages of SGML

    1. Flexibility: SGML allows for the definition of custom markup languages tailored to specific needs, making it highly adaptable for different industries (publishing, scientific documents, technical manuals, etc.).

    2. Structured Content: SGML helps to structure documents in a way that makes them easier to process, manage, and share. This is especially useful for large-scale, complex documents.

    3. Interoperability: SGML documents are portable across different systems, ensuring compatibility and ease of data sharing.

    4. Richness of Features: SGML supports complex features like nested elements, attributes, and advanced document structures. This allows it to represent a wide variety of content types and relationships between data elements.

    Disadvantages of SGML

    1. Complexity: SGML is more complex than other markup languages like HTML or XML. It requires a clear understanding of DTDs (Document Type Definitions) and other structural rules, making it harder to learn and use effectively.

    2. Lack of Adoption in Web Development: SGML was primarily used in publishing and document management systems before the rise of the web. With the advent of HTML and XML, SGML became less widely used, especially for web-related applications.

    3. Overhead in Implementation: SGML's flexibility comes at a cost: it can be difficult to implement and maintain, especially for simple use cases where HTML or XML might suffice.

    Use Cases of SGML

    1. Publishing Industry:

      • SGML was widely used in the publishing industry for defining document structures, especially for complex documents such as books, technical manuals, and journals. SGML's ability to separate content from presentation was advantageous in large-scale publication projects.
    2. Technical Documentation:

      • Many technical documentation systems used SGML because of its ability to handle structured content and provide fine-grained control over document structure and layout.
    3. Government and Legal Documents:

      • SGML's flexibility was useful in industries that needed to define precise document structures, such as legal documents or government publications.

    Legacy and Impact

    While SGML is no longer as widely used today, its influence is still felt in modern web technologies. XML, HTML, and other markup languages owe much of their design to SGML. XML, in particular, is considered the successor to SGML, as it provides many of the same features but with a simplified and more user-friendly syntax.

    Conclusion

    SGML (Standard Generalized Markup Language) was a groundbreaking development in document markup, offering flexibility, extensibility, and structured content handling for a wide variety of applications. Despite its complexity, SGML played an important role in industries such as publishing, technical documentation, and legal fields. Today, its legacy lives on in technologies like XML, which simplified many of SGML’s concepts for modern use. While SGML is no longer in widespread use, understanding its principles is useful for understanding the evolution of markup languages.

    Previous topic 7
    Web Servers: Extensibility
    Next topic 9
    HTML5

    Past Papers

    Open this section to load past papers

    Click on Show Past Papers to see past papers.
    On This Page
      Reading Stats
      Est. reading time7 min
      Word count1,148
      Code examples0
      DifficultyIntermediate