Document (dev.stxt.namespace):xxx Metadata: Author: ChatGPT 5.2 Last modif: 2026-01-11 Header: Use cases — Wikipedia (an alternative approach) Content >> This section does not propose replacing Wikipedia or its ecosystem. It is a design exercise: how encyclopedic content could be represented with a **Human-First** format and, at the same time, structured and validatable. The idea is to show an alternative approach for: * collaborative editorial content, * with sections and references, * and with fragments that are “data” (fact boxes, links, categories). Subheader: What a Wikipedia-type page needs Content >> An encyclopedic page usually has: * Title and metadata. * Opening summary (lead). * Hierarchical sections. * Internal and external links. * References (citations). * Categories. * Sometimes an “infobox” with structured data. @STXT@ allows modeling all of that as: * free text in `>>` blocks where reading matters, * explicit structure where the tree matters, * and optional validation if consistency is desired. Subheader: Example 1 — Minimal page Content >> A very small page, with a summary and one section. Code >> Page (@com.example.wiki): Title: STXT Lead >> STXT (Semantic Text) is a hierarchical textual format designed to be human-readable and reliable for machines. Sections: Section: Heading: Description Content >> STXT uses indentation to define hierarchy and offers literal `>>` blocks for multiline text. Categories: Category: Data formats Category: Markup languages Subheader: Example 2 — Nested sections Content >> In Wikipedia it is very common to have sections and subsections. In STXT that is a natural tree. Code >> Page (@com.example.wiki): Title: Markup languages Lead >> A markup language is a system for annotating a document so that its structure is distinguishable from the content. Sections: Section: Heading: History Content >> Markup languages have evolved from systems for printing to structured formats for the web. Subsections: Section: Heading: SGML Content >> SGML was an important standard for describing structured documents. Section: Heading: HTML Content >> HTML became popular with the World Wide Web as a format for hypertext. Section: Heading: Uses Content >> They are used for technical documentation, publications, and web content. Subheader: Example 3 — Internal and external links Content >> In Wikipedia there are “internal” links (to other pages) and external links. In STXT they can be expressed as explicit nodes, without “inventing” syntax inside the text. Code >> Page (@com.example.wiki): Title: STXT Lead >> STXT can be compared with other formats such as JSON and YAML. Links: Internal: Link: Title: JSON Page: JSON Link: Title: YAML Page: YAML External: Link: Title: Example repository Url: https://example.com/stxt Sections: Section: Heading: Comparison Content >> See also the related formats listed in the links section. Subheader: Example 4 — References and citations Content >> A typical pattern in encyclopedias is: * the text mentions something, * a reference supports it, * the reference appears in a list. A clear way in STXT is to separate: * references as a processable block, * and citation “markers” within the text as something optional (for example `[ref: ...]`). Code >> Page (@com.example.wiki): Title: Indentation Lead >> Indentation is used in different languages to express structure. [ref: r1] Sections: Section: Heading: Use in textual formats Content >> Some formats rely on indentation to represent hierarchy. [ref: r1] Others use it only as a visual style. References: Reference: Id: r1 Title: Indentation style guide (example) Author: Example Org Year: 2024 Url: https://example.com/indentation Subheader: Example 5 — References with an editorial “note” Content >> Sometimes a reference needs context: why it is used or what it limits. Since it is human text, it fits well in a `>>` block. Code >> Page (@com.example.wiki): Title: Structured data Lead >> Infoboxes help summarize key information. [ref: r2] References: Reference: Id: r2 Title: Structured data overview (example) Url: https://example.com/structured-data Note >> Reference used only as an example of how to attach editorial notes to a source. In a real system, this would come from a references catalog. Subheader: Example 6 — Categories and maintenance Content >> Wikipedia handles categories, maintenance templates, and “community metadata”. In STXT they can be represented as metadata sections, separated from the main content. Code >> Page (@com.example.wiki): Title: Free software Lead >> Free software is software that respects users' freedom. Sections: Section: Heading: Definition Content >> It is often associated with licenses that allow use, study, modification, and distribution. Categories: Category: Software Category: Licenses Maintenance: Needs citations: true Last reviewed: 2025-11-01 Notes >> Marked for review because references are missing in the history section. Subheader: Example 7 — “Infobox” as real data Content >> An infobox is basically an object with fields. In STXT it is represented as a subtree with clear names. Code >> Page (@com.example.wiki): Title: Tomcat Infobox: Type: Software Name: Apache Tomcat Initial release: 1999 License: Apache License 2.0 Website: https://tomcat.apache.org Written in: Java Lead >> Apache Tomcat is a web container and HTTP server for Java applications. Sections: Section: Heading: Description Content >> It implements specifications such as Servlet and JavaServer Pages (JSP). Subheader: Example 8 — Infobox with lists and repeated values Content >> Real infoboxes often have lists (for example, “authors” or “languages”). With STXT, repetitions are natural. Code >> Page (@com.example.wiki): Title: Python Infobox: Type: Programming language Name: Python Designed by: Person: Guido van Rossum First appeared: 1991 Paradigms: Paradigm: Object-oriented Paradigm: Imperative Paradigm: Functional Typing discipline: Item: Dynamic Item: Strong Lead >> Python is an interpreted, high-level, general-purpose programming language. Subheader: Example 9 — Templates as reusable “blocks” Content >> Wikipedia uses templates to reuse fragments (notices, boxes, etc.). In STXT, a “template” could be a structured node that the renderer interprets. Code >> Page (@com.example.wiki): Title: Solar energy Lead >> Solar energy is the energy obtained from the Sun's radiation. Boxes: Box: Type: notice Title: Article in development Content >> This article is an example. The history section is incomplete. Box: Type: see-also Title: See also Items: Item: Title: Wind energy Page: Wind energy Item: Title: Hydroelectric energy Page: Hydroelectric energy Subheader: Example 10 — Content variants without breaking the tree Content >> A typical challenge in a wiki is mixing: * a table, * a code block, * and normal text, without the format “fighting” with the structure. In STXT, the direct way is to use `>>` blocks for literal content. Code >> Page (@com.example.wiki): Title: TCP ports Lead >> TCP ports are used to identify services on a machine. Sections: Section: Heading: Well-known ports Content >> Simple table (literal text): Port | Service 80 | HTTP 443 | HTTPS 22 | SSH Section: Heading: Configuration example Content >> Example (literal text): Server: Port: 8080 Host: 0.0.0.0 Subheader: Example 11 — Article with editorial “versioning” Content >> Without assuming a specific system, editorial metadata can be included for auditing or change control. Code >> Page (@com.example.wiki): Title: STXT Editorial: Status: Draft Last updated: 2026-01-11 Reviewed by: Person: Mery Adams Change log: Entry: Date: 2026-01-10 Summary: Added example of links and references Entry: Date: 2026-01-11 Summary: Reorganization of sections and infobox Subheader: Example 12 — Minimal template for wiki pages Content >> If consistency is desired, it can be validated with a simple template. It does not force the “Wikipedia form”, it only defines a basic skeleton. Code >> Template (@stxt.template): com.example.wiki Description: Minimal structure for wiki-type pages Structure >> Page: Title: (1) Infobox: (?) Lead: (1) TEXT Sections: (?) Section: (*) Heading: (1) Content: (1) TEXT Subsections: (?) Section: (*) Heading: (1) Content: (1) TEXT Links: (?) References: (?) Reference: (*) Id: (1) Title: (1) Url: (?) Note: (?) TEXT Categories: (?) Category: (*) Maintenance: (?) Editorial: (?)