Lably
Skip to content

Structured document

  • 6 min read
  • 3 chapters

Related on Lably

Through HTML

Overview

Structured documents generally focus on labeling things that can be used for a variety of processing purposes, not merely formatting. For example, explicit labeling of "chapter title" or "emphasis" is far more useful to systems for the visually impaired, than merely "Helvetica bold 24" or "italic". In the same way, meaningful labeling of the many items on a technical information sheet enables far better integration with databases, search systems, online catalogs, and so on.

Structured documents generally support at least hierarchical structures, for example lists, not merely list items; sections, not merely section headings; and so on. This is in stark contrast to formatting-oriented systems. High-end systems also support multiple independent and/or overlapping sets of components.

Structured document systems allow defining component types and their combinations through a "schema," similar to database schemas. Formal languages for specifying schemas include XSD, Relax NG, and Schematron. A document that follows these rules is considered "valid." Some systems support flexible component types while maintaining syntactic rules.

Lie and Saarela noted the "Standard Generalized Markup Language (SGML) has pioneered the concept of structured documents", although earlier systems such as Scribe, Augment, and FRESS provided many structured-document features and capabilities, and SGML's offspring XML is now favored.

One very widely used representation for structured documents is HTML, a schema defined and described by the W3C. However, HTML has not only tags for meaning-oriented components such as paragraph, title, and code; but also format-oriented ones such as italic, bold, and most table. In practice, HTML is sometimes used as a structured document system, but often used as a formatting language.

Many domains use structured documents via domain-specific schemas they have co-operatively developed, such as JATS for journal publishing, TEI for literary documents, UBL and EDI for business interchange, XTCE for spacecraft telemetry, REST for Web interfaces, and countless more. All these cases use specific schemas based on XML.

XML is the universal format for structured documents and data on the Web

— XHTML2 Working Group, W3C

Sign in to keep reading

2 more chapters are free with a Lably account.

More in Computing and communication