ScholarQuill logoScholarQuillUniversity Notes
My Semester
Explore Notes
Past Papers12 New
Video CoursesNew
Search
Settings
Study Tools
GPA/CGPA Calculator
Schedule & To-Do
Student Portal
Contact
Contact
ScholarQuill logo
My Semester
Explore Notes
Past Papers12 New
Video CoursesNew
Search
Settings
GPA/CGPA Calculator
Schedule & To-Do
Student Portal
Contact
ScholarQuill logoScholarQuillUniversity Notes
Study PortalEC-331Sgml
Ctrl + K
Login
Explore
Search
Semester
Papers
CGPA
    EC-331

    Web Technologies

    Progress0 / 38 done
    Topics38
    1Introduction to Web Applications2TCP/IP Application Services
    3Basic Operation4Virtual Hosting5Chunked Transfers6Caching Support7Extensibility8SGML9HTML510CSS3
    11Core XML12XHTML13XHTML MP
    14SOAP15REST16WML17XSL
    18Operations19Processing HTTP Requests20Processing HTTP Responses21Cookie Coordination22Privacy and P3P23Complex HTTP Interactions24Dynamic Content Delivery25Server Configuration26Server Security27Web Browsers Architecture and Processes
    28JavaScript29DHTML30AJAX31JSON32Approaches to Web Application Development33Programming in Any Scripting Language34Search Technologies35Search Engine Optimization36XML Query Language37Semantic Web38Future Web Application Framework
    7 min read
    Topic 8 of 38
    Topic Study Note Illustration
    08

    SGML

    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...

    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 view and download past papers

    Click on Show Past Papers to load available exam papers.

    Reading Progress
    0%
    7mremaining
    1.1kwords
    Intermediatelevel
    On This Page

    No headings found

    Study Toolkit

    Subject Portal

    Web Technologies