Document (dev.stxt.namespace):Use cases — Publications and editorial content Metadata: Author: ChatGPT 5.2 Last modif: 2026-01-11 Header: Use cases — Publications and editorial content Content >> Editorial systems live in a constant tension between: * **rich, narrative content** (long text, sections, context), * **structure** (chapters, metadata, relationships), * **and data** (status, dates, authors, tags). Assert >> @STXT@ makes it possible to treat a publication as **a human document first**, without losing the ability to validate, transform, and automate. Subheader: What we mean by “publications” Content >> In this context, “publication” includes: * Articles and long posts. * Books and chapters. * Technical documentation. * Public reports. * Whitepapers. * Corporate or technical blogs. Subheader: Common problems in editorial workflows Content >> In practice, repeated patterns appear: * Markdown: * Flexible, but poor in semantics. * Ad-hoc metadata (YAML front-matter). * Hard to validate structure. * Traditional CMS: * Rigid models. * Editing coupled to a specific tool. * Difficult to version in Git. * Editorial XML: * Very powerful. * Too verbose for manual editing. @STXT@ proposes another path: * A single format for text, structure, and data. * Clear separation between **content** and **rules**. * Editing with any text editor. Subheader: Example 1 — Technical article Content >> Article with metadata, sections, and long text. Code >> Article (@com.acme.editorial.article): Title: Introduction to STXT Slug: introduction-to-stxt Authors: Author: Name: Joan Costa Role: Editor Published date: 2026-01-10 Status: Draft Tags: Tag: stxt Tag: formats Tag: documentation Abstract >> STXT is a textual language designed to balance human readability and reliability for machines. Content >> ## Why another format? Most existing formats force a choice: either they are comfortable for humans or they are reliable for machines. STXT tries to eliminate this dichotomy. ## Principles - Human First - Minimal syntax - Optional validation - Security by design Subheader: Observations from the example Content >> * Long text lives in `>>` blocks. * The editorial structure (title, authors, status) is explicit. * The content can contain Markdown without interfering with STXT. Subheader: Example 2 — Multi-section publication Content >> Book or long document divided into sections. Code >> Publication (@com.acme.editorial.publication): Title: STXT — The book ISBN: 978-1-23456-789-0 Language: es Status: In Progress Chapters: Chapter: Number: 1 Title: Introduction Content >> This chapter introduces the basic concepts of STXT. Chapter: Number: 2 Title: Syntax Content >> This chapter describes the language syntax with practical examples. Chapter: Number: 3 Title: Validation Content >> Templates and Schemas make it possible to add semantic rules. Subheader: Typical editorial workflow with @STXT@ Content >> A common workflow can be: 1. The author writes the STXT document. 2. It is versioned in Git. 3. A template validates minimal structure. 4. It is transformed to HTML, PDF, or other formats. 5. It is published. Each step is independent and replaceable. Subheader: Validation with @stxt.template Content >> An editorial template ensures consistency without imposing rigidity. Code >> Template (@stxt.template): com.acme.editorial.article Description: Standard editorial article Structure >> Article: Title: (1) Slug: (1) Authors: (1) Author: (+) Name: (1) Role: (?) Published date: (?) DATE Status: (1) ENUM [Draft, Review, Published] Tags: (?) Tag: (+) Abstract: (?) TEXT Content: (1) TEXT Content >> This template: * Guarantees minimal metadata. * Controls editorial status. * Allows free text without artificial restrictions. Subheader: Content / presentation separation Content >> With STXT: * The document **does not know** HTML, CSS, or layout. * Presentation is decided in a later phase. * The same content can be rendered in multiple ways. Examples: * Web * PDF * EPUB * Internal documentation Subheader: Practical advantages Content >> * **Comfortable authorship**: write without fighting tags. * **Clean diffs**: clear textual changes in version control. * **Lightweight validation**: prevents incomplete articles. * **Automation**: indexes, tables of contents, feeds. * **Longevity**: content survives specific tools. Subheader: Editorial recommendations Content >> * Use `TEXT` for body and long sections. * Keep metadata concise and stable. * Avoid coupling content to output formats. * Use templates to guide, not to limit. Subheader: Summary Content >> @STXT@ is especially suitable for editorial publishing: * Text remains text. * Structure is explicit. * Validation is optional. * Content can evolve without changing format.