alt.hn

1/18/2026 at 10:37:59 AM

Overlapping Markup

https://en.wikipedia.org/wiki/Overlapping_markup

by ripe

1/18/2026 at 11:37:17 AM

FIY the Wikipedia article rightfully says SGML CONCUR usage is uncommon, but compared to the stated alternatives for overlapping markup, it's basically the only one that is tolerable to use as actual markup language for use with a text editor. This is what it looks like:

    <!doctype d -- element decls for a, b ... -->
    <!doctype e -- element decls for a, x ... -->
    <(d|e)a>
      <(d)b>bla bla <(e)x>bla </(d)b> bla</(e)x>
    </(d|e)a>
where the third "bla" span is marked up with overlap.

Basically, in case you've ever wondered, SGML CONCUR is the only reason that the element name in end-element tags needs to be specified. In strictly nested markup (XML) it always must refer to the most recently opened start-element tag hence it's redundant. SGML actually has "</>" but it didn't make it into XML.

by tannhaeuser

1/18/2026 at 7:21:09 PM

Music has a lot of these. A fugue subject may traverse the boundaries between two metric groupings, and between two clear sections of the form.

There are also non-contiguous examples. Smack in the middle of Wagner's Tristan und Isolde you hear the final theme that signals they are about to win the main boss battle. Then one of the NPCs screams right before the final chord. The audience instead hears the danger signal and realizes it was a fake boss and there's another two hours of game play. Only when Isolde beats the final boss at the end do we get the final chord.

by jancsika

1/18/2026 at 7:59:25 PM

It also affects the digital markup of music. Music can't be expressed with a tree structure as there is lots of overlap.

A simple example is a slur. It crosses bar lines. <bar1> ... <slur> ... </bar1> ... </slur> <bar2> uhoh!

In fact there are many mutually incompatible hierarchies in music engraving.

It's funny though MusicXML is a popular interchange format, but internally looks nothing like what one would naively expect.

by ramblurr

1/18/2026 at 8:04:11 PM

Ditto control flow. It’s tempting to think of repeat bars, DC al fines, codas etc hierarchical structures when in fact they are imperative GOTOs and always have been.

by afandian

1/18/2026 at 10:31:00 PM

Wow I did not know this thing that was a bit hard to implement in my project[0] had a name!

Basically you can, with my lib, define the tokens `*` and `_` (or anything else) to resp. make text go bold and italic, and use it as such:

    This text is *bold _and* italic_!
[0] https://github.com/Frizlab/XibLoc (Readme is lacking…)

by frizlab

1/18/2026 at 7:55:00 PM

HTML parsing supports some of this, e.g:

  text <b>bold <i>bold-italic</b> italic</i>

by bfgeek

1/18/2026 at 8:16:38 PM

that becomes:

    text <b>bold <i>bold-italic</i></b><i> italic</i>

by dorianmariecom

1/18/2026 at 9:00:23 PM

Yeah. After parsing.

by moralestapia

1/18/2026 at 11:48:32 PM

Multi-paragraph quotation repeats the opening quote in every paragraph, but closes the quote only once.[0]

Traffic signs repeat after every intersection, similarly.

It's a great help in recovering the "parser state" in my mind.

[0]: https://en.wikipedia.org/wiki/Quotation_marks_in_English#Quo...

by dejj

1/20/2026 at 8:09:56 PM

The issue imho is mixing data and metadata into the same soup.

Have a plain text document, and then an arbitrary graph of metadada pointing into subranges and the problem disappears.

by j-pb