Invisible Markup

Steven Pemberton, CWI, Amsterdam

Contents

What it does

Plain text has an implicit structure that is usually easy to see. Markup languages exist to make that structure explicit.

Invisible Markup takes a textual document, plus a description of its format, and produces a document with explicit structure

The description is a context-free grammar, decorated with optional details about serialisation

The system uses the description to parse the textual document, and then serialises the resulting parse-tree.

(Simple) Example: Dates

17 April 2025

Describe the format:

date: day, " ", month, " ", year.
day: digit, digit?.
month: "January"; "February"; ...; "December".
year: digit, digit, digit, digit.
digit: ["0"-"9"].

(Simple) Example: Dates

17 April 2025

Describe the format:

date: day, " ", month, " ", year.
day: digit, digit?.
month: "January"; "February"; ...; "December".
year: digit, digit, digit, digit.
digit: ["0"-"9"].

Process the input with this description, and get:

<date>
   <day>
      <digit>1</digit>
      <digit>7</digit>
   </day> 
   <month>April</month> 
   <year>
      <digit>2</digit>
      <digit>0</digit>
      <digit>2</digit>
      <digit>5</digit>
   </year>
</date>

(Simple) Example: Dates

17 April 2025

Describe the format:

date: day, " ", month, " ", year.
day: digit, digit?.
month: "January"; "February"; ...; "December".
year: digit, digit, digit, digit.
-digit: ["0"-"9"].

Process the input with this description, and get:

<date>
   <day>17</day> 
   <month>April</month> 
   <year>2025</year>
</date>

Serialisation

- only serialise children

+ insert into output

@ serialise as attribute

Processing

The basis of processing

Processing

Processing the description

Processing

Bootstrapping

Status

Stable specification

Six implementations, more in development

Working group

Tutorials

invisiblexml.org