STXT - Semantic Text
Built for humans. Reliable for machines.

Use cases — Wikipedia (an alternative approach)

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:

What a Wikipedia-type page needs

An encyclopedic page usually has:

STXT allows modeling all of that as:

Example 1 — Minimal page

A very small page, with a summary and one section.

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

Example 2 — Nested sections

In Wikipedia it is very common to have sections and subsections. In STXT that is a natural tree.

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.

Example 3 — Internal and external links

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.

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.

Example 4 — References and citations

A typical pattern in encyclopedias is:

A clear way in STXT is to separate:

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

Example 5 — References with an editorial “note”

Sometimes a reference needs context: why it is used or what it limits. Since it is human text, it fits well in a >> block.

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.

Example 6 — Categories and maintenance

Wikipedia handles categories, maintenance templates, and “community metadata”. In STXT they can be represented as metadata sections, separated from the main content.

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.

Example 7 — “Infobox” as real data

An infobox is basically an object with fields. In STXT it is represented as a subtree with clear names.

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

Example 8 — Infobox with lists and repeated values

Real infoboxes often have lists (for example, “authors” or “languages”). With STXT, repetitions are natural.

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.

Example 9 — Templates as reusable “blocks”

Wikipedia uses templates to reuse fragments (notices, boxes, etc.). In STXT, a “template” could be a structured node that the renderer interprets.

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

Example 10 — Content variants without breaking the tree

A typical challenge in a wiki is mixing:

without the format “fighting” with the structure. In STXT, the direct way is to use >> blocks for literal content.

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

Example 11 — Article with editorial “versioning”

Without assuming a specific system, editorial metadata can be included for auditing or change control.

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

Example 12 — Minimal template for wiki pages

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.

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: (?)