From c90d00ad70b44c617fc182fbb2abe50e54832f9f Mon Sep 17 00:00:00 2001
From: Julien Moutinho <julm+hdoc@autogeree.net>
Date: Sat, 24 Feb 2018 05:58:45 +0100
Subject: [PATCH] Add better support for HeaderDotSlash including.

---
 Language/DTC/Read/TCT.hs                      |  54 +++----
 Language/TCT/Cell.hs                          |  47 ++++--
 Language/TCT/Debug.hs                         |   4 +-
 Language/TCT/Read.hs                          | 147 ++++++++++--------
 Language/TCT/Read/Cell.hs                     |  48 +++---
 Language/TCT/Read/Token.hs                    |  57 ++++---
 Language/TCT/Read/Tree.hs                     |  97 ++++++------
 Language/TCT/Tree.hs                          |  48 +++---
 Language/TCT/Write/HTML5.hs                   |   3 +-
 Language/TCT/Write/Plain.hs                   |  10 +-
 Language/TCT/Write/XML.hs                     |  65 ++++----
 Language/XML.hs                               |   2 +-
 exe/cli/Main.hs                               |  86 +++++-----
 hdoc.cabal                                    |   5 +-
 test/Golden.hs                                |  11 +-
 test/Golden/TCT/HeaderColon/0001.tct          |   2 +-
 test/Golden/TCT/HeaderColon/0001.tct.ast      |   2 +-
 .../TCT/HeaderColon/0001.tct.dtc.en_US.html5  |  39 ++++-
 .../TCT/HeaderColon/0001.tct.dtc.en_US.xml    |  21 ++-
 test/Golden/TCT/HeaderColon/0001.tct.html5    |   2 +-
 test/Golden/TCT/HeaderColon/0001.tct.plain    |   1 +
 test/Golden/TCT/HeaderColon/0001.tct.xml      |   2 +-
 test/Golden/TCT/HeaderColon/0002.tct          |   2 +-
 test/Golden/TCT/HeaderColon/0002.tct.ast      |   4 +-
 .../TCT/HeaderColon/0002.tct.dtc.en_US.html5  |  39 ++++-
 .../TCT/HeaderColon/0002.tct.dtc.en_US.xml    |  21 ++-
 test/Golden/TCT/HeaderColon/0002.tct.html5    |   2 +-
 test/Golden/TCT/HeaderColon/0002.tct.plain    |   1 +
 test/Golden/TCT/HeaderColon/0002.tct.xml      |   4 +-
 test/Golden/TCT/HeaderColon/0003.tct          |   2 +-
 test/Golden/TCT/HeaderColon/0003.tct.ast      |   2 +-
 .../TCT/HeaderColon/0003.tct.dtc.en_US.html5  |  39 ++++-
 .../TCT/HeaderColon/0003.tct.dtc.en_US.xml    |  21 ++-
 test/Golden/TCT/HeaderColon/0003.tct.html5    |   2 +-
 test/Golden/TCT/HeaderColon/0003.tct.plain    |   1 +
 test/Golden/TCT/HeaderColon/0003.tct.xml      |   2 +-
 test/Golden/TCT/HeaderColon/0004.tct          |   2 +-
 test/Golden/TCT/HeaderColon/0004.tct.ast      |  10 +-
 .../TCT/HeaderColon/0004.tct.dtc.en_US.html5  |  43 ++++-
 .../TCT/HeaderColon/0004.tct.dtc.en_US.xml    |  24 ++-
 test/Golden/TCT/HeaderColon/0004.tct.html5    |   2 +-
 test/Golden/TCT/HeaderColon/0004.tct.plain    |   2 +
 test/Golden/TCT/HeaderColon/0004.tct.xml      |   8 +-
 test/Golden/TCT/HeaderColon/0005.tct          |   2 +-
 test/Golden/TCT/HeaderColon/0005.tct.ast      |  10 +-
 .../TCT/HeaderColon/0005.tct.dtc.en_US.html5  |  41 ++++-
 .../TCT/HeaderColon/0005.tct.dtc.en_US.xml    |  25 ++-
 test/Golden/TCT/HeaderColon/0005.tct.html5    |   2 +-
 test/Golden/TCT/HeaderColon/0005.tct.plain    |   2 +
 test/Golden/TCT/HeaderColon/0005.tct.xml      |  10 +-
 test/Golden/TCT/HeaderColon/0006.tct          |   4 +-
 test/Golden/TCT/HeaderColon/0006.tct.ast      |   9 +-
 .../TCT/HeaderColon/0006.tct.dtc.en_US.html5  |  40 ++++-
 .../TCT/HeaderColon/0006.tct.dtc.en_US.xml    |  22 ++-
 test/Golden/TCT/HeaderColon/0006.tct.html5    |   4 +-
 test/Golden/TCT/HeaderColon/0006.tct.plain    |   2 +
 test/Golden/TCT/HeaderColon/0006.tct.xml      |   6 +-
 test/Golden/TCT/HeaderColon/0007.tct          |   4 +-
 test/Golden/TCT/HeaderColon/0007.tct.ast      |   6 +-
 .../TCT/HeaderColon/0007.tct.dtc.en_US.html5  |  41 ++++-
 .../TCT/HeaderColon/0007.tct.dtc.en_US.xml    |  24 ++-
 test/Golden/TCT/HeaderColon/0007.tct.html5    |   4 +-
 test/Golden/TCT/HeaderColon/0007.tct.plain    |   2 +
 test/Golden/TCT/HeaderColon/0007.tct.xml      |   6 +-
 test/Golden/TCT/HeaderColon/0008.tct          |   4 +-
 test/Golden/TCT/HeaderColon/0008.tct.ast      |   6 +-
 .../TCT/HeaderColon/0008.tct.dtc.en_US.html5  |  40 ++++-
 .../TCT/HeaderColon/0008.tct.dtc.en_US.xml    |  22 ++-
 test/Golden/TCT/HeaderColon/0008.tct.html5    |   4 +-
 test/Golden/TCT/HeaderColon/0008.tct.plain    |   2 +
 test/Golden/TCT/HeaderColon/0008.tct.xml      |   4 +-
 test/Golden/TCT/HeaderColon/0009.tct          |   2 +-
 test/Golden/TCT/HeaderColon/0009.tct.ast      |  10 +-
 .../TCT/HeaderColon/0009.tct.dtc.en_US.html5  |  43 ++++-
 .../TCT/HeaderColon/0009.tct.dtc.en_US.xml    |  24 ++-
 test/Golden/TCT/HeaderColon/0009.tct.html5    |   2 +-
 test/Golden/TCT/HeaderColon/0009.tct.plain    |   3 +
 test/Golden/TCT/HeaderColon/0009.tct.xml      |   8 +-
 test/Golden/TCT/HeaderColon/0010.tct          |   2 +-
 test/Golden/TCT/HeaderColon/0010.tct.ast      |  10 +-
 .../TCT/HeaderColon/0010.tct.dtc.en_US.html5  |  39 ++++-
 .../TCT/HeaderColon/0010.tct.dtc.en_US.xml    |  21 ++-
 test/Golden/TCT/HeaderColon/0010.tct.html5    |   2 +-
 test/Golden/TCT/HeaderColon/0010.tct.plain    |   3 +
 test/Golden/TCT/HeaderColon/0010.tct.xml      |   6 +-
 test/Golden/TCT/HeaderColon/0011.tct          |   4 +-
 test/Golden/TCT/HeaderColon/0011.tct.ast      |  10 +-
 .../TCT/HeaderColon/0011.tct.dtc.en_US.html5  |  39 ++++-
 .../TCT/HeaderColon/0011.tct.dtc.en_US.xml    |  21 ++-
 test/Golden/TCT/HeaderColon/0011.tct.html5    |   4 +-
 test/Golden/TCT/HeaderColon/0011.tct.plain    |   3 +
 test/Golden/TCT/HeaderColon/0011.tct.xml      |   6 +-
 test/Golden/TCT/HeaderColon/0012.tct          |   4 +-
 test/Golden/TCT/HeaderColon/0012.tct.ast      |  10 +-
 .../TCT/HeaderColon/0012.tct.dtc.en_US.html5  |  39 ++++-
 .../TCT/HeaderColon/0012.tct.dtc.en_US.xml    |  21 ++-
 test/Golden/TCT/HeaderColon/0012.tct.html5    |   4 +-
 test/Golden/TCT/HeaderColon/0012.tct.plain    |   3 +
 test/Golden/TCT/HeaderColon/0012.tct.xml      |   6 +-
 test/Golden/TCT/HeaderColon/0013.tct          |   4 +-
 test/Golden/TCT/HeaderColon/0013.tct.ast      |  10 +-
 .../TCT/HeaderColon/0013.tct.dtc.en_US.html5  |  39 ++++-
 .../TCT/HeaderColon/0013.tct.dtc.en_US.xml    |  21 ++-
 test/Golden/TCT/HeaderColon/0013.tct.html5    |   4 +-
 test/Golden/TCT/HeaderColon/0013.tct.plain    |   3 +
 test/Golden/TCT/HeaderColon/0013.tct.xml      |   6 +-
 test/Golden/TCT/HeaderColon/0014.tct          |   4 +-
 test/Golden/TCT/HeaderColon/0014.tct.ast      |   4 +-
 .../TCT/HeaderColon/0014.tct.dtc.en_US.html5  |  39 ++++-
 .../TCT/HeaderColon/0014.tct.dtc.en_US.xml    |  21 ++-
 test/Golden/TCT/HeaderColon/0014.tct.html5    |   4 +-
 test/Golden/TCT/HeaderColon/0014.tct.plain    |   2 +
 test/Golden/TCT/HeaderColon/0014.tct.xml      |   4 +-
 test/Golden/TCT/HeaderColon/0015.tct          |   4 +-
 test/Golden/TCT/HeaderColon/0015.tct.ast      |   4 +-
 .../TCT/HeaderColon/0015.tct.dtc.en_US.html5  |  39 ++++-
 .../TCT/HeaderColon/0015.tct.dtc.en_US.xml    |  21 ++-
 test/Golden/TCT/HeaderColon/0015.tct.html5    |   4 +-
 test/Golden/TCT/HeaderColon/0015.tct.plain    |   2 +
 test/Golden/TCT/HeaderColon/0015.tct.xml      |   4 +-
 test/Golden/TCT/HeaderColon/0016.tct          |   4 +-
 test/Golden/TCT/HeaderColon/0016.tct.ast      |   4 +-
 .../TCT/HeaderColon/0016.tct.dtc.en_US.html5  |  39 ++++-
 .../TCT/HeaderColon/0016.tct.dtc.en_US.xml    |  21 ++-
 test/Golden/TCT/HeaderColon/0016.tct.html5    |   4 +-
 test/Golden/TCT/HeaderColon/0016.tct.plain    |   2 +
 test/Golden/TCT/HeaderColon/0016.tct.xml      |   4 +-
 test/Golden/TCT/HeaderColon/0017.tct          |   4 +-
 test/Golden/TCT/HeaderColon/0017.tct.ast      |   4 +-
 .../TCT/HeaderColon/0017.tct.dtc.en_US.html5  |  39 ++++-
 .../TCT/HeaderColon/0017.tct.dtc.en_US.xml    |  21 ++-
 test/Golden/TCT/HeaderColon/0017.tct.html5    |   4 +-
 test/Golden/TCT/HeaderColon/0017.tct.plain    |   2 +
 test/Golden/TCT/HeaderColon/0017.tct.xml      |   4 +-
 test/Golden/TCT/HeaderColon/0018.tct          |   4 +-
 test/Golden/TCT/HeaderColon/0018.tct.ast      |   4 +-
 .../TCT/HeaderColon/0018.tct.dtc.en_US.html5  |  39 ++++-
 .../TCT/HeaderColon/0018.tct.dtc.en_US.xml    |  21 ++-
 test/Golden/TCT/HeaderColon/0018.tct.html5    |   4 +-
 test/Golden/TCT/HeaderColon/0018.tct.plain    |   2 +
 test/Golden/TCT/HeaderColon/0018.tct.xml      |   4 +-
 test/Golden/TCT/HeaderColon/0019.tct          |   2 +-
 test/Golden/TCT/HeaderColon/0019.tct.ast      |   4 +-
 .../TCT/HeaderColon/0019.tct.dtc.en_US.html5  |   2 +-
 .../TCT/HeaderColon/0019.tct.dtc.en_US.xml    |   2 +-
 test/Golden/TCT/HeaderColon/0019.tct.html5    |   2 +-
 test/Golden/TCT/HeaderColon/0019.tct.plain    |   1 +
 test/Golden/TCT/HeaderColon/0019.tct.xml      |   4 +-
 test/Golden/TCT/HeaderColon/0020.tct          |   2 +-
 test/Golden/TCT/HeaderColon/0020.tct.ast      |   4 +-
 .../TCT/HeaderColon/0020.tct.dtc.en_US.html5  |  39 ++++-
 .../TCT/HeaderColon/0020.tct.dtc.en_US.xml    |  21 ++-
 test/Golden/TCT/HeaderColon/0020.tct.html5    |   2 +-
 test/Golden/TCT/HeaderColon/0020.tct.plain    |   1 +
 test/Golden/TCT/HeaderColon/0020.tct.xml      |   4 +-
 test/Golden/TCT/HeaderColon/0021.tct.ast      |  10 +-
 test/Golden/TCT/HeaderColon/0021.tct.plain    |   4 +
 test/Golden/TCT/HeaderColon/0021.tct.xml      |  12 +-
 test/Golden/TCT/HeaderColon/0022.tct.ast      |  12 +-
 test/Golden/TCT/HeaderColon/0022.tct.plain    |   3 +
 test/Golden/TCT/HeaderColon/0022.tct.xml      |  16 +-
 test/Golden/TCT/HeaderColon/0023.tct.ast      |  10 +-
 test/Golden/TCT/HeaderColon/0023.tct.plain    |   3 +
 test/Golden/TCT/HeaderColon/0023.tct.xml      |  14 +-
 test/Golden/TCT/HeaderDotHash/0001.tct        |   1 +
 test/Golden/TCT/HeaderDotHash/0001.tct.ast    |  11 ++
 .../HeaderDotHash/0001.tct.dtc.en_US.html5    |  40 +++++
 .../TCT/HeaderDotHash/0001.tct.dtc.en_US.xml  |  21 +++
 test/Golden/TCT/HeaderDotHash/0001.tct.html5  |   2 +
 test/Golden/TCT/HeaderDotHash/0001.tct.plain  |   1 +
 test/Golden/TCT/HeaderDotHash/0001.tct.xml    |   8 +
 test/Golden/TCT/HeaderDotHash/0002.tct        |   1 +
 test/Golden/TCT/HeaderDotHash/0002.tct.ast    |  13 ++
 .../HeaderDotHash/0002.tct.dtc.en_US.html5    |  40 +++++
 .../TCT/HeaderDotHash/0002.tct.dtc.en_US.xml  |  21 +++
 test/Golden/TCT/HeaderDotHash/0002.tct.html5  |   2 +
 test/Golden/TCT/HeaderDotHash/0002.tct.plain  |   1 +
 test/Golden/TCT/HeaderDotHash/0002.tct.xml    |   8 +
 test/Golden/TCT/HeaderDotHash/0003.tct        |   3 +
 test/Golden/TCT/HeaderDotHash/0003.tct.ast    |  34 ++++
 .../HeaderDotHash/0003.tct.dtc.en_US.html5    |  56 +++++++
 .../TCT/HeaderDotHash/0003.tct.dtc.en_US.xml  |  36 +++++
 test/Golden/TCT/HeaderDotHash/0003.tct.html5  |   4 +
 test/Golden/TCT/HeaderDotHash/0003.tct.plain  |   3 +
 test/Golden/TCT/HeaderDotHash/0003.tct.xml    |  30 ++++
 test/Golden/TCT/HeaderDotHash/0004.tct        |   1 +
 test/Golden/TCT/HeaderDotHash/0004.tct.ast    |   2 +
 .../HeaderDotHash/0004.tct.dtc.en_US.html5    |   4 +
 .../TCT/HeaderDotHash/0004.tct.dtc.en_US.xml  |   4 +
 test/Golden/TCT/HeaderDotHash/0004.tct.html5  |   2 +
 test/Golden/TCT/HeaderDotHash/0004.tct.plain  |   1 +
 test/Golden/TCT/HeaderDotHash/0004.tct.xml    |   2 +
 test/Golden/TCT/HeaderDotHash/0005.tct        |   1 +
 test/Golden/TCT/HeaderDotHash/0005.tct.ast    |   4 +
 .../HeaderDotHash/0005.tct.dtc.en_US.html5    |   5 +
 .../TCT/HeaderDotHash/0005.tct.dtc.en_US.xml  |   5 +
 test/Golden/TCT/HeaderDotHash/0005.tct.html5  |   2 +
 test/Golden/TCT/HeaderDotHash/0005.tct.plain  |   1 +
 test/Golden/TCT/HeaderDotHash/0005.tct.xml    |   2 +
 test/Golden/TCT/HeaderDotHash/0006.tct        |   1 +
 test/Golden/TCT/HeaderDotHash/0006.tct.ast    |   3 +
 .../HeaderDotHash/0006.tct.dtc.en_US.html5    |   3 +
 .../TCT/HeaderDotHash/0006.tct.dtc.en_US.xml  |   3 +
 test/Golden/TCT/HeaderDotHash/0006.tct.html5  |   3 +
 test/Golden/TCT/HeaderDotHash/0006.tct.plain  |   3 +
 test/Golden/TCT/HeaderDotHash/0006.tct.xml    |   3 +
 test/Golden/TCT/HeaderDotHash/0007.tct        |   1 +
 test/Golden/TCT/HeaderDotHash/0007.tct.ast    |   4 +
 .../HeaderDotHash/0007.tct.dtc.en_US.html5    |   4 +
 .../TCT/HeaderDotHash/0007.tct.dtc.en_US.xml  |   4 +
 test/Golden/TCT/HeaderDotHash/0007.tct.html5  |   4 +
 test/Golden/TCT/HeaderDotHash/0007.tct.plain  |   4 +
 test/Golden/TCT/HeaderDotHash/0007.tct.xml    |   4 +
 test/Golden/TCT/HeaderDotHash/0008.tct        |   1 +
 test/Golden/TCT/HeaderDotHash/0008.tct.ast    |   4 +
 .../HeaderDotHash/0008.tct.dtc.en_US.html5    |   4 +
 .../TCT/HeaderDotHash/0008.tct.dtc.en_US.xml  |   4 +
 test/Golden/TCT/HeaderDotHash/0008.tct.html5  |   4 +
 test/Golden/TCT/HeaderDotHash/0008.tct.plain  |   4 +
 test/Golden/TCT/HeaderDotHash/0008.tct.xml    |   4 +
 test/Golden/TCT/HeaderDotHash/0009.tct        |   1 +
 test/Golden/TCT/HeaderDotHash/0009.tct.ast    |   5 +
 .../HeaderDotHash/0009.tct.dtc.en_US.html5    |   5 +
 .../TCT/HeaderDotHash/0009.tct.dtc.en_US.xml  |   5 +
 test/Golden/TCT/HeaderDotHash/0009.tct.html5  |   5 +
 test/Golden/TCT/HeaderDotHash/0009.tct.plain  |   5 +
 test/Golden/TCT/HeaderDotHash/0009.tct.xml    |   5 +
 test/Golden/TCT/HeaderGreat/0001.tct.ast      |   6 +-
 test/Golden/TCT/HeaderGreat/0001.tct.plain    |   2 +
 test/Golden/TCT/HeaderGreat/0001.tct.xml      |   8 +-
 test/Golden/TCT/HeaderGreat/0002.tct.ast      |   6 +-
 test/Golden/TCT/HeaderGreat/0002.tct.plain    |   3 +
 test/Golden/TCT/HeaderGreat/0002.tct.xml      |   8 +-
 test/Golden/TCT/HeaderGreat/0003.tct.ast      |   8 +-
 test/Golden/TCT/HeaderGreat/0003.tct.plain    |   3 +
 test/Golden/TCT/HeaderGreat/0003.tct.xml      |  12 +-
 test/Golden/TCT/HeaderGreat/0004.tct.ast      |   8 +-
 test/Golden/TCT/HeaderGreat/0004.tct.plain    |   3 +
 test/Golden/TCT/HeaderGreat/0004.tct.xml      |  12 +-
 test/Golden/TCT/HeaderGreat/0005.tct.ast      |  10 +-
 test/Golden/TCT/HeaderGreat/0005.tct.plain    |   3 +
 test/Golden/TCT/HeaderGreat/0005.tct.xml      |  16 +-
 test/Golden/TCT/HeaderGreat/0006.tct.ast      |  18 +--
 test/Golden/TCT/HeaderGreat/0006.tct.plain    |   3 +
 test/Golden/TCT/HeaderGreat/0006.tct.xml      |  24 +--
 test/Golden/TCT/HeaderGreat/0007.tct.ast      |  18 +--
 test/Golden/TCT/HeaderGreat/0007.tct.plain    |   3 +
 test/Golden/TCT/HeaderGreat/0007.tct.xml      |  24 +--
 test/Golden/TCT/HeaderGreat/0008.tct.ast      |  18 +--
 test/Golden/TCT/HeaderGreat/0008.tct.plain    |   3 +
 test/Golden/TCT/HeaderGreat/0008.tct.xml      |  24 +--
 test/Golden/TCT/HeaderGreat/0009.tct.ast      |  12 +-
 test/Golden/TCT/HeaderGreat/0009.tct.plain    |   4 +
 test/Golden/TCT/HeaderGreat/0009.tct.xml      |  16 +-
 test/Golden/TCT/HeaderGreat/0010.tct.ast      |  12 +-
 test/Golden/TCT/HeaderGreat/0010.tct.plain    |   4 +
 test/Golden/TCT/HeaderGreat/0010.tct.xml      |  16 +-
 test/Golden/TCT/HeaderGreat/0011.tct.ast      |  16 +-
 test/Golden/TCT/HeaderGreat/0011.tct.plain    |   3 +
 test/Golden/TCT/HeaderGreat/0011.tct.xml      |  20 +--
 test/Golden/TCT/HeaderGreat/0012.tct.ast      |  12 +-
 test/Golden/TCT/HeaderGreat/0012.tct.plain    |   3 +
 test/Golden/TCT/HeaderGreat/0012.tct.xml      |  14 +-
 test/Golden/TCT/HeaderGreat/0013.tct.ast      |   6 +-
 test/Golden/TCT/HeaderGreat/0013.tct.plain    |   2 +
 test/Golden/TCT/HeaderGreat/0013.tct.xml      |   8 +-
 test/Golden/TCT/HeaderGreat/0014.tct.ast      |  12 +-
 test/Golden/TCT/HeaderGreat/0014.tct.plain    |   2 +
 test/Golden/TCT/HeaderGreat/0014.tct.xml      |  16 +-
 test/Golden/TCT/HeaderGreat/0015.tct.ast      |  16 +-
 test/Golden/TCT/HeaderGreat/0015.tct.plain    |   2 +
 test/Golden/TCT/HeaderGreat/0015.tct.xml      |  24 +--
 test/Golden/TCT/HeaderSection/0000.tct.ast    |  18 +--
 test/Golden/TCT/HeaderSection/0000.tct.plain  |   3 +
 test/Golden/TCT/HeaderSection/0000.tct.xml    |  22 +--
 test/Golden/TCT/HeaderSection/0001.tct.ast    |  18 +--
 test/Golden/TCT/HeaderSection/0001.tct.plain  |   3 +
 test/Golden/TCT/HeaderSection/0001.tct.xml    |  22 +--
 test/Golden/TCT/HeaderSection/0002.tct.ast    |  18 +--
 test/Golden/TCT/HeaderSection/0002.tct.plain  |   3 +
 test/Golden/TCT/HeaderSection/0002.tct.xml    |  14 +-
 test/Golden/TCT/HeaderSection/0003.tct.ast    |  18 +--
 test/Golden/TCT/HeaderSection/0003.tct.plain  |   3 +
 test/Golden/TCT/HeaderSection/0003.tct.xml    |  14 +-
 test/Golden/TCT/HeaderSection/0004.tct.ast    |  18 +--
 test/Golden/TCT/HeaderSection/0004.tct.plain  |   3 +
 test/Golden/TCT/HeaderSection/0004.tct.xml    |  14 +-
 test/Golden/TCT/HeaderSection/0005.tct.ast    |  18 +--
 test/Golden/TCT/HeaderSection/0005.tct.plain  |   3 +
 test/Golden/TCT/HeaderSection/0005.tct.xml    |  14 +-
 test/Golden/TCT/HeaderSection/0006.tct.ast    |  18 +--
 test/Golden/TCT/HeaderSection/0006.tct.plain  |   3 +
 test/Golden/TCT/HeaderSection/0006.tct.xml    |  22 +--
 test/Golden/TCT/HeaderSection/0007.tct.ast    |  18 +--
 test/Golden/TCT/HeaderSection/0007.tct.plain  |   3 +
 test/Golden/TCT/HeaderSection/0007.tct.xml    |  22 +--
 test/Golden/TCT/HeaderSection/0008.tct.ast    |  18 +--
 test/Golden/TCT/HeaderSection/0008.tct.plain  |   3 +
 test/Golden/TCT/HeaderSection/0008.tct.xml    |  22 +--
 test/Golden/TCT/HeaderSection/0009.tct.ast    |  18 +--
 test/Golden/TCT/HeaderSection/0009.tct.plain  |   3 +
 test/Golden/TCT/HeaderSection/0009.tct.xml    |  22 +--
 test/Golden/TCT/HeaderSection/0010.tct.ast    |  36 ++---
 test/Golden/TCT/HeaderSection/0010.tct.plain  |   6 +
 test/Golden/TCT/HeaderSection/0010.tct.xml    |  46 +++---
 test/Golden/TCT/HeaderSection/0011.tct.ast    |  10 +-
 test/Golden/TCT/HeaderSection/0011.tct.plain  |   2 +
 test/Golden/TCT/HeaderSection/0011.tct.xml    |  12 +-
 test/Golden/TCT/HeaderSection/0012.tct.ast    |  10 +-
 test/Golden/TCT/HeaderSection/0012.tct.plain  |   2 +
 test/Golden/TCT/HeaderSection/0012.tct.xml    |  10 +-
 test/Golden/TCT/HeaderSection/0013.tct.ast    |  16 +-
 test/Golden/TCT/HeaderSection/0013.tct.plain  |   3 +
 test/Golden/TCT/HeaderSection/0013.tct.xml    |  18 +--
 test/Golden/TCT/HeaderSection/0014.tct.ast    |  26 ++--
 test/Golden/TCT/HeaderSection/0014.tct.plain  |   5 +
 test/Golden/TCT/HeaderSection/0014.tct.xml    |  30 ++--
 317 files changed, 2736 insertions(+), 1163 deletions(-)
 create mode 100644 test/Golden/TCT/HeaderColon/0001.tct.plain
 create mode 100644 test/Golden/TCT/HeaderColon/0002.tct.plain
 create mode 100644 test/Golden/TCT/HeaderColon/0003.tct.plain
 create mode 100644 test/Golden/TCT/HeaderColon/0004.tct.plain
 create mode 100644 test/Golden/TCT/HeaderColon/0005.tct.plain
 create mode 100644 test/Golden/TCT/HeaderColon/0006.tct.plain
 create mode 100644 test/Golden/TCT/HeaderColon/0007.tct.plain
 create mode 100644 test/Golden/TCT/HeaderColon/0008.tct.plain
 create mode 100644 test/Golden/TCT/HeaderColon/0009.tct.plain
 create mode 100644 test/Golden/TCT/HeaderColon/0010.tct.plain
 create mode 100644 test/Golden/TCT/HeaderColon/0011.tct.plain
 create mode 100644 test/Golden/TCT/HeaderColon/0012.tct.plain
 create mode 100644 test/Golden/TCT/HeaderColon/0013.tct.plain
 create mode 100644 test/Golden/TCT/HeaderColon/0014.tct.plain
 create mode 100644 test/Golden/TCT/HeaderColon/0015.tct.plain
 create mode 100644 test/Golden/TCT/HeaderColon/0016.tct.plain
 create mode 100644 test/Golden/TCT/HeaderColon/0017.tct.plain
 create mode 100644 test/Golden/TCT/HeaderColon/0018.tct.plain
 create mode 100644 test/Golden/TCT/HeaderColon/0019.tct.plain
 create mode 100644 test/Golden/TCT/HeaderColon/0020.tct.plain
 create mode 100644 test/Golden/TCT/HeaderColon/0021.tct.plain
 create mode 100644 test/Golden/TCT/HeaderColon/0022.tct.plain
 create mode 100644 test/Golden/TCT/HeaderColon/0023.tct.plain
 create mode 100644 test/Golden/TCT/HeaderDotHash/0001.tct
 create mode 100644 test/Golden/TCT/HeaderDotHash/0001.tct.ast
 create mode 100644 test/Golden/TCT/HeaderDotHash/0001.tct.dtc.en_US.html5
 create mode 100644 test/Golden/TCT/HeaderDotHash/0001.tct.dtc.en_US.xml
 create mode 100644 test/Golden/TCT/HeaderDotHash/0001.tct.html5
 create mode 100644 test/Golden/TCT/HeaderDotHash/0001.tct.plain
 create mode 100644 test/Golden/TCT/HeaderDotHash/0001.tct.xml
 create mode 100644 test/Golden/TCT/HeaderDotHash/0002.tct
 create mode 100644 test/Golden/TCT/HeaderDotHash/0002.tct.ast
 create mode 100644 test/Golden/TCT/HeaderDotHash/0002.tct.dtc.en_US.html5
 create mode 100644 test/Golden/TCT/HeaderDotHash/0002.tct.dtc.en_US.xml
 create mode 100644 test/Golden/TCT/HeaderDotHash/0002.tct.html5
 create mode 100644 test/Golden/TCT/HeaderDotHash/0002.tct.plain
 create mode 100644 test/Golden/TCT/HeaderDotHash/0002.tct.xml
 create mode 100644 test/Golden/TCT/HeaderDotHash/0003.tct
 create mode 100644 test/Golden/TCT/HeaderDotHash/0003.tct.ast
 create mode 100644 test/Golden/TCT/HeaderDotHash/0003.tct.dtc.en_US.html5
 create mode 100644 test/Golden/TCT/HeaderDotHash/0003.tct.dtc.en_US.xml
 create mode 100644 test/Golden/TCT/HeaderDotHash/0003.tct.html5
 create mode 100644 test/Golden/TCT/HeaderDotHash/0003.tct.plain
 create mode 100644 test/Golden/TCT/HeaderDotHash/0003.tct.xml
 create mode 100644 test/Golden/TCT/HeaderDotHash/0004.tct
 create mode 100644 test/Golden/TCT/HeaderDotHash/0004.tct.ast
 create mode 100644 test/Golden/TCT/HeaderDotHash/0004.tct.dtc.en_US.html5
 create mode 100644 test/Golden/TCT/HeaderDotHash/0004.tct.dtc.en_US.xml
 create mode 100644 test/Golden/TCT/HeaderDotHash/0004.tct.html5
 create mode 100644 test/Golden/TCT/HeaderDotHash/0004.tct.plain
 create mode 100644 test/Golden/TCT/HeaderDotHash/0004.tct.xml
 create mode 100644 test/Golden/TCT/HeaderDotHash/0005.tct
 create mode 100644 test/Golden/TCT/HeaderDotHash/0005.tct.ast
 create mode 100644 test/Golden/TCT/HeaderDotHash/0005.tct.dtc.en_US.html5
 create mode 100644 test/Golden/TCT/HeaderDotHash/0005.tct.dtc.en_US.xml
 create mode 100644 test/Golden/TCT/HeaderDotHash/0005.tct.html5
 create mode 100644 test/Golden/TCT/HeaderDotHash/0005.tct.plain
 create mode 100644 test/Golden/TCT/HeaderDotHash/0005.tct.xml
 create mode 100644 test/Golden/TCT/HeaderDotHash/0006.tct
 create mode 100644 test/Golden/TCT/HeaderDotHash/0006.tct.ast
 create mode 100644 test/Golden/TCT/HeaderDotHash/0006.tct.dtc.en_US.html5
 create mode 100644 test/Golden/TCT/HeaderDotHash/0006.tct.dtc.en_US.xml
 create mode 100644 test/Golden/TCT/HeaderDotHash/0006.tct.html5
 create mode 100644 test/Golden/TCT/HeaderDotHash/0006.tct.plain
 create mode 100644 test/Golden/TCT/HeaderDotHash/0006.tct.xml
 create mode 100644 test/Golden/TCT/HeaderDotHash/0007.tct
 create mode 100644 test/Golden/TCT/HeaderDotHash/0007.tct.ast
 create mode 100644 test/Golden/TCT/HeaderDotHash/0007.tct.dtc.en_US.html5
 create mode 100644 test/Golden/TCT/HeaderDotHash/0007.tct.dtc.en_US.xml
 create mode 100644 test/Golden/TCT/HeaderDotHash/0007.tct.html5
 create mode 100644 test/Golden/TCT/HeaderDotHash/0007.tct.plain
 create mode 100644 test/Golden/TCT/HeaderDotHash/0007.tct.xml
 create mode 100644 test/Golden/TCT/HeaderDotHash/0008.tct
 create mode 100644 test/Golden/TCT/HeaderDotHash/0008.tct.ast
 create mode 100644 test/Golden/TCT/HeaderDotHash/0008.tct.dtc.en_US.html5
 create mode 100644 test/Golden/TCT/HeaderDotHash/0008.tct.dtc.en_US.xml
 create mode 100644 test/Golden/TCT/HeaderDotHash/0008.tct.html5
 create mode 100644 test/Golden/TCT/HeaderDotHash/0008.tct.plain
 create mode 100644 test/Golden/TCT/HeaderDotHash/0008.tct.xml
 create mode 100644 test/Golden/TCT/HeaderDotHash/0009.tct
 create mode 100644 test/Golden/TCT/HeaderDotHash/0009.tct.ast
 create mode 100644 test/Golden/TCT/HeaderDotHash/0009.tct.dtc.en_US.html5
 create mode 100644 test/Golden/TCT/HeaderDotHash/0009.tct.dtc.en_US.xml
 create mode 100644 test/Golden/TCT/HeaderDotHash/0009.tct.html5
 create mode 100644 test/Golden/TCT/HeaderDotHash/0009.tct.plain
 create mode 100644 test/Golden/TCT/HeaderDotHash/0009.tct.xml
 create mode 100644 test/Golden/TCT/HeaderGreat/0001.tct.plain
 create mode 100644 test/Golden/TCT/HeaderGreat/0002.tct.plain
 create mode 100644 test/Golden/TCT/HeaderGreat/0003.tct.plain
 create mode 100644 test/Golden/TCT/HeaderGreat/0004.tct.plain
 create mode 100644 test/Golden/TCT/HeaderGreat/0005.tct.plain
 create mode 100644 test/Golden/TCT/HeaderGreat/0006.tct.plain
 create mode 100644 test/Golden/TCT/HeaderGreat/0007.tct.plain
 create mode 100644 test/Golden/TCT/HeaderGreat/0008.tct.plain
 create mode 100644 test/Golden/TCT/HeaderGreat/0009.tct.plain
 create mode 100644 test/Golden/TCT/HeaderGreat/0010.tct.plain
 create mode 100644 test/Golden/TCT/HeaderGreat/0011.tct.plain
 create mode 100644 test/Golden/TCT/HeaderGreat/0012.tct.plain
 create mode 100644 test/Golden/TCT/HeaderGreat/0013.tct.plain
 create mode 100644 test/Golden/TCT/HeaderGreat/0014.tct.plain
 create mode 100644 test/Golden/TCT/HeaderGreat/0015.tct.plain
 create mode 100644 test/Golden/TCT/HeaderSection/0000.tct.plain
 create mode 100644 test/Golden/TCT/HeaderSection/0001.tct.plain
 create mode 100644 test/Golden/TCT/HeaderSection/0002.tct.plain
 create mode 100644 test/Golden/TCT/HeaderSection/0003.tct.plain
 create mode 100644 test/Golden/TCT/HeaderSection/0004.tct.plain
 create mode 100644 test/Golden/TCT/HeaderSection/0005.tct.plain
 create mode 100644 test/Golden/TCT/HeaderSection/0006.tct.plain
 create mode 100644 test/Golden/TCT/HeaderSection/0007.tct.plain
 create mode 100644 test/Golden/TCT/HeaderSection/0008.tct.plain
 create mode 100644 test/Golden/TCT/HeaderSection/0009.tct.plain
 create mode 100644 test/Golden/TCT/HeaderSection/0010.tct.plain
 create mode 100644 test/Golden/TCT/HeaderSection/0011.tct.plain
 create mode 100644 test/Golden/TCT/HeaderSection/0012.tct.plain
 create mode 100644 test/Golden/TCT/HeaderSection/0013.tct.plain
 create mode 100644 test/Golden/TCT/HeaderSection/0014.tct.plain

diff --git a/Language/DTC/Read/TCT.hs b/Language/DTC/Read/TCT.hs
index 167d88c..5bfc220 100644
--- a/Language/DTC/Read/TCT.hs
+++ b/Language/DTC/Read/TCT.hs
@@ -19,7 +19,7 @@ import Data.Function (($), (.), const, id)
 import Data.Functor ((<$>), (<$))
 import Data.Int (Int)
 import Data.List.NonEmpty (NonEmpty(..))
-import Data.Maybe (Maybe(..), fromMaybe, maybe)
+import Data.Maybe (Maybe(..), maybe)
 import Data.Monoid (Monoid(..), First(..))
 import Data.Ord (Ord(..))
 import Data.Proxy (Proxy(..))
@@ -95,7 +95,8 @@ instance RNC.Sym_RNC Parser where
 			(nameOrFigureName,anc nameOrFigureName)
 		 , DTC.posPrecedingsSiblings = mempty
 		 }
-		parserXMLs p ts <* S.put pos
+		res <- parserXMLs p ts
+		S.put pos
 		 { DTC.posPrecedingsSiblings=
 			(if n /= nameOrFigureName
 			then Map.insertWith (\_new old -> old + 1) nameOrFigureName 1
@@ -103,6 +104,7 @@ instance RNC.Sym_RNC Parser where
 			Map.insertWith (\_new old -> old + 1) n 1 $
 			DTC.posPrecedingsSiblings pos
 		 }
+		return res
 		where
 		expected = Tree (cell0 $ XmlElem n) mempty
 		check (Tree (unCell -> XmlElem e) ts) | e == n = Right ts
@@ -114,8 +116,8 @@ instance RNC.Sym_RNC Parser where
 		parserXMLs p v
 		where
 		expected = Tree0 (cell0 $ XmlAttr n "")
-		check (Tree0 (Cell bp ep (XmlAttr k v))) | k == n =
-			Right $ Seq.singleton $ Tree0 $ Cell bp ep $ XmlText v
+		check (Tree0 (Cell sp (XmlAttr k v))) | k == n =
+			Right $ Seq.singleton $ Tree0 $ Cell sp $ XmlText v
 		check t = Left
 		 ( Just $ P.Tokens $ pure t
 		 , Set.singleton $ P.Tokens $ pure expected )
@@ -191,8 +193,11 @@ parseXMLs st pos p i =
 		 { P.stateInput = i
 		 , P.statePos = pure $
 			case Seq.viewl i of
-			 Tree c _ :< _ -> sourcePosCell c
-			 _ -> pos
+			 Tree (Cell (Span{span_begin=bp}:|_) _) _ :< _ ->
+				P.SourcePos "" -- FIXME: put a FilePath
+				 (P.mkPos $ pos_line bp)
+				 (P.mkPos $ pos_column bp)
+			 EmptyL -> pos
 		 , P.stateTabWidth = P.pos1
 		 , P.stateTokensProcessed = 0
 		 }
@@ -231,41 +236,28 @@ fixPos = do
 	 t :< _ -> P.setPosition $
 		P.positionAt1 (Proxy::Proxy XMLs) pos t
 
-sourcePosCell :: Cell a -> P.SourcePos
-sourcePosCell (cell_begin -> bp) =
-	P.SourcePos ""
-	 (P.mkPos $ pos_line bp)
-	 (P.mkPos $ pos_column bp)
-
-sourcePos :: Pos -> Maybe P.SourcePos
-sourcePos (Pos l c) | l>0 && c>0 = Just $ P.SourcePos "" (P.mkPos l) (P.mkPos c)
-sourcePos _ = Nothing
-
 instance P.Stream XMLs where
 	type Token  XMLs = XML
 	type Tokens XMLs = XMLs
 	take1_ s =
 		case Seq.viewl s of
-		 Tree0 (unCell -> XmlComment{}) :< ts -> P.take1_ ts
+		 Tree (unCell -> XmlComment{}) _ :< ts -> P.take1_ ts
 		 t:<ts  -> Just (t,ts)
 		 EmptyL -> Nothing
-	positionAt1 _s pos =
-		fromMaybe pos . sourcePos .
-		cell_begin . unTree
+	positionAt1 _s pos (Tree (Cell (Span{span_begin=Pos l c}:|_) _n) _ts) =
+		P.SourcePos (P.sourceName pos) (P.mkPos l) (P.mkPos c)
 	positionAtN s pos ts =
 		case Seq.viewl ts of
 		 t :< _ -> P.positionAt1 s pos t
-		 _ -> pos
-	advance1 _s _indent pos =
+		 EmptyL -> pos
+	advance1 _s _indent pos (Tree (Cell (Span{span_end=Pos l c}:|_) _n) _ts) =
 		-- WARNING: the end of a 'Cell' is not necessarily
 		-- the beginning of the next 'Cell'.
-		fromMaybe pos . sourcePos .
-		cell_end . unTree
+		P.SourcePos (P.sourceName pos) (P.mkPos l) (P.mkPos c)
 	advanceN s = foldl' . P.advance1 s
-	takeN_ n s
-	 | n <= 0    = Just (mempty, s)
-	 | null s    = Nothing
-	 | otherwise = Just (Seq.splitAt n s) -- FIXME: handle XmlComment
+	takeN_ n s | n <= 0    = Just (mempty, s)
+	           | null s    = Nothing
+	           | otherwise = Just (Seq.splitAt n s) -- FIXME: handle XmlComment and XmlInclude
 	tokensToChunk _s = Seq.fromList
 	chunkToTokens _s = toList
 	chunkLength _s   = Seq.length
@@ -281,8 +273,10 @@ instance P.ShowToken XML where
 			 XmlText _t    -> "text"
 			 XmlComment _c -> "comment"
 		
-		showCell (Cell (Pos 0 0) (Pos 0 0) a) f = f a
-		showCell (Cell bp ep a) f = f a<>" at "<>show bp<>"-"<>show ep
+		showCell (Cell path@(Span{span_file} :| _) a) f =
+			if null span_file
+			then f a
+			else f a <> foldMap (\p -> "\n in "<>show p) path
 
 -- ** Type 'ErrorRead'
 data ErrorRead
diff --git a/Language/TCT/Cell.hs b/Language/TCT/Cell.hs
index da445a7..d5a4f5d 100644
--- a/Language/TCT/Cell.hs
+++ b/Language/TCT/Cell.hs
@@ -3,16 +3,17 @@
 {-# LANGUAGE OverloadedStrings #-}
 module Language.TCT.Cell where
 
-import Control.Monad (Monad(..))
 import Data.Eq (Eq(..))
+import Data.Foldable (toList)
 import Data.Function (($), (.))
 import Data.Functor (Functor)
-import Data.Monoid (Monoid(..))
+import Data.List.NonEmpty (NonEmpty(..))
 import Data.Ord (Ord(..))
 import Data.Semigroup (Semigroup(..))
 import Data.Text (Text)
 import Prelude (Int, Num(..), fromIntegral)
-import Text.Show (Show(..), showParen, showString, showChar)
+import System.FilePath (FilePath)
+import Text.Show (Show(..), showChar, showString, showParen)
 import qualified Data.Text as Text
 import qualified Data.Text.Lazy as TL
 
@@ -25,12 +26,14 @@ data Pos
  {   pos_line   :: {-# UNPACK #-} !LineNum
  ,   pos_column :: {-# UNPACK #-} !ColNum
  } deriving (Eq, Ord)
+{-
 instance Semigroup Pos where
 	Pos lx cx <> Pos ly cy =
 		Pos (lx+ly) (cx+cy)
 instance Monoid Pos where
 	mempty  = Pos 0 0
 	mappend = (<>)
+-}
 instance Show Pos where
 	showsPrec _p Pos{..} =
 		showsPrec 11 pos_line .
@@ -47,27 +50,38 @@ type LineNum = Int
 -- ** Type 'ColNum'
 type ColNum = Int
 
+-- * Type 'Span'
+data Span
+ =   Span
+ {   span_file  :: !FilePath
+ ,   span_begin :: !Pos
+ ,   span_end   :: !Pos
+ } deriving (Eq, Ord)
+instance Show Span where
+	showsPrec _p Span{..} =
+		showString span_file .
+		showChar '#' . showsPrec 10 span_begin .
+		showChar '-' . showsPrec 10 span_end
+
+-- * Type 'Spans'
+type Spans = NonEmpty Span
+
 -- * Type 'Cell'
 data Cell a
  =   Cell
- {   cell_begin :: {-# UNPACK #-} !Pos
- ,   cell_end   :: {-# UNPACK #-} !Pos
+ {   cell_spans :: !Spans
  , unCell       :: !a
  } deriving (Eq, Ord, Functor)
 instance Show a => Show (Cell a) where
 	showsPrec p Cell{..} =
-		showParen (p >= 10) $
+		showParen (p > 10) $
 		showString "Cell" .
-		showChar ' ' . showsPrec 10 cell_begin .
-		showChar ' ' . showsPrec 10 cell_end .
-		showChar ' ' . showsPrec 11 unCell
-instance Pretty a => Pretty (Cell a) where
-	pretty (Cell bp ep m) = do
-		s <- pretty m
-		return $ "Cell "<>show bp<>":"<>show ep<>" "<>s
+		showChar ' ' . showsPrec 11 unCell .
+		showChar ' ' . showsPrec 10 (toList cell_spans)
+instance (Pretty a, Show a) => Pretty (Cell a)
 instance (FromPad a, Semigroup a) => Semigroup (Cell a) where
-	Cell bx ex x <> Cell by ey y =
-		Cell bx ey $
+	Cell (Span fx bx ex :| sx) x <> Cell (Span _fy by ey :| _sy) y =
+		Cell (Span fx bx ey :| sx) $
 			x<>fromPad (Pos lines columns)<>y
 		where
 		lines   = pos_line   by - pos_line ex
@@ -79,7 +93,8 @@ instance (FromPad a, Semigroup a, Monoid a) => Monoid (Cell a) where
 -}
 
 cell0 :: a -> Cell a
-cell0 = Cell mempty mempty
+cell0 = Cell (span0 :| [])
+	where span0 = Span "" pos1 pos1
 
 -- * Class 'FromPad'
 class FromPad a where
diff --git a/Language/TCT/Debug.hs b/Language/TCT/Debug.hs
index df0b2fd..b8fc714 100644
--- a/Language/TCT/Debug.hs
+++ b/Language/TCT/Debug.hs
@@ -97,7 +97,7 @@ debugParser ::
  , Ord e
  , Show a
  ) =>
- String -> P.Parsec e s a -> P.Parsec e s a
+ String -> P.ParsecT e s m a -> P.ParsecT e s m a
 debugParser = P.dbg
 #else
 
@@ -140,7 +140,7 @@ debugParser ::
  , Ord e
  , Show a
  ) =>
- String -> P.Parsec e s a -> P.Parsec e s a
+ String -> P.ParsecT e s m a -> P.ParsecT e s m a
 debugParser _m = id
 {-# INLINE debugParser #-}
 #endif
diff --git a/Language/TCT/Read.hs b/Language/TCT/Read.hs
index e3082d4..83b3de9 100644
--- a/Language/TCT/Read.hs
+++ b/Language/TCT/Read.hs
@@ -1,30 +1,33 @@
 module Language.TCT.Read
- ( module Language.TCT.Read.Tree
+ ( module Language.TCT.Read.Cell
+ , module Language.TCT.Read.Elem
  , module Language.TCT.Read.Token
- , module Language.TCT.Read.Cell
+ , module Language.TCT.Read.Tree
  , module Language.TCT.Read
  ) where
 
 import Control.Applicative (Applicative(..))
 import Control.Arrow (left)
-import Control.Monad (Monad(..), join)
+import Control.Monad (Monad(..), join, (=<<))
 import Data.Bool
 import Data.Either (Either(..))
-import Data.Eq (Eq)
+import Data.Eq (Eq(..))
+import Data.Foldable (Foldable(..), any)
 import Data.Function (($), (.))
 import Data.Functor ((<$>))
-import Data.Ord (Ord(..))
-import Data.Set (Set)
+import Data.List.NonEmpty (NonEmpty(..))
+import Data.Semigroup (Semigroup(..))
 import Data.Traversable (Traversable(..))
 import Data.TreeSeq.Strict (Tree(..), Trees)
 import Data.Void (Void)
 import System.FilePath ((</>))
 import System.IO (FilePath, IO)
-import Text.Show (Show(..), showParen, showString, showChar)
+import Text.Show (Show(..), showString)
+import qualified Control.Monad.Trans.Reader as R
 import qualified Data.ByteString.Lazy as BSL
-import qualified Data.Set as Set
 import qualified Data.Text.Lazy as TL
 import qualified Data.Text.Lazy.Encoding as TL
+import qualified System.Directory as Directory
 import qualified System.FilePath as FilePath
 import qualified Text.Megaparsec as P
 
@@ -32,6 +35,7 @@ import Language.TCT.Debug
 import Language.TCT.Tree
 import Language.TCT.Cell
 import Language.TCT.Read.Cell
+import Language.TCT.Read.Elem
 import Language.TCT.Read.Tree
 import Language.TCT.Read.Token
 
@@ -39,16 +43,76 @@ import Language.TCT.Read.Token
 --
 -- 1. indentation-sensitive parsing on 'TL.Text'
 -- 2. Pair-sensitive parsing on some 'NodeText's resulting of 1.
-readTCT ::
+readTCT :: FilePath -> IO (Either ErrorRead (Trees (Cell Node)))
+readTCT inp = do
+	inpFileCanon <-
+		Directory.makeRelativeToCurrentDirectory =<<
+		Directory.canonicalizePath inp
+	goFile (NodeHeader HeaderDash) $
+		Span inpFileCanon pos1 pos1:|[]
+	where
+	goFile :: Node -> NonEmpty Span -> IO (Either ErrorRead (Trees (Cell Node)))
+	goFile parentNode spans@(Span{span_file=inpFile}:|inpPath)
+	 | any (\Span{span_file} -> span_file == inpFile) inpPath =
+		return $ Left $ ErrorReadIncludeLoop spans
+	 | otherwise = do
+		inpText <- readFile inpFile
+		case (`R.runReader` inpPath) $ P.runParserT (p_Trees <* P.eof) inpFile inpText of
+		 Left err -> return $ Left $ ErrorReadParser err
+		 Right trees ->
+			(join <$>) . sequence <$>
+			traverse
+			 (goTree parentNode)
+			 (debug0 "readTCTWithIncludes" trees)
+	goTree :: Node -> Tree (Cell Node) -> IO (Either ErrorRead (Trees (Cell Node)))
+	goTree parNode t@(Tree c@(Cell ss@(Span{span_file}:|_sn) nod) ts) =
+		case nod of
+		 NodeLower{} -> return $ Right $ pure t
+		 -- NOTE: preserve NodeText ""
+		 NodeText n | TL.null n -> return $ Right $ pure t
+		 NodeText n ->
+			case parNode of
+			 NodeHeader HeaderBar{}      -> return $ Right $ pure t
+			 NodeHeader HeaderEqual{}    -> return $ Right $ pure t
+			 NodeHeader HeaderDashDash{} -> return $ Right $ pure t
+			 _ ->
+				return $ left ErrorReadParser $
+				parseTokens <$> parseLexemes (Cell ss n)
+		 NodeHeader (HeaderDotSlash incFile) -> do
+			incFileCanon <-
+				Directory.makeRelativeToCurrentDirectory =<<
+				Directory.canonicalizePath
+				 (FilePath.takeDirectory span_file </> incFile)
+			((pure . Tree c <$>) <$>) $
+			 -- NOTE: preserve HeaderDotSlash to avoid Seq.spanl
+			 --       to merge nodes accross files, when writing XML
+				goFile parNode $ Span incFileCanon pos1 pos1 :| toList ss
+		 _ ->
+			(pure . Tree c . join <$>) .
+			sequence <$> traverse (goTree nod') ts
+			where
+			-- NOTE: skip parent 'Node's whose semantic does not change 'NodeText'
+			nod' = case nod of
+			 NodePara -> parNode
+			 _ -> nod
+
+readFile :: FilePath -> IO TL.Text
+readFile fp = TL.decodeUtf8 <$> BSL.readFile fp
+
+-- | Useful when producing only an exact source file rendition.
+readTCTWithoutIncludes ::
  FilePath -> TL.Text ->
  Either ErrorRead (Trees (Cell Node))
-readTCT inp txt = do
-	trs <- left ErrorReadParser $ P.runParser (p_Trees <* P.eof) inp txt
+readTCTWithoutIncludes inp txt = do
+	trs <-
+		left ErrorReadParser $
+		(`R.runReader` []) $
+		P.runParserT (p_Trees <* P.eof) inp txt
 	join <$> traverse (go $ NodeHeader HeaderDash)
 	 (debug0 "readTCT" trs)
 	where
 	go :: Node -> Tree (Cell Node) -> Either ErrorRead (Trees (Cell Node))
-	go parent t@(Tree c@(Cell bn en nod) ts) =
+	go parent t@(Tree c@(Cell ssn nod) ts) =
 		case nod of
 		 NodeLower{} -> Right $ pure t
 		 -- NOTE: preserve NodeText ""
@@ -58,7 +122,7 @@ readTCT inp txt = do
 			 NodeHeader HeaderBar{}      -> Right $ pure t
 			 NodeHeader HeaderEqual{}    -> Right $ pure t
 			 NodeHeader HeaderDashDash{} -> Right $ pure t
-			 _ -> left ErrorReadParser $ parseTokens <$> parseLexemes inp (Cell bn en n)
+			 _ -> left ErrorReadParser $ parseTokens <$> parseLexemes (Cell ssn n)
 		 _ -> pure . Tree c . join <$> traverse (go nod') ts
 			where
 			-- NOTE: skip parent 'Node's whose semantic does not change 'NodeText'
@@ -66,63 +130,16 @@ readTCT inp txt = do
 			 NodePara -> parent
 			 _ -> nod
 
-readFile :: FilePath -> IO TL.Text
-readFile fp = TL.decodeUtf8 <$> BSL.readFile fp
-
-readTCTrec :: FilePath -> IO (Either ErrorRead (Trees (Cell Node)))
-readTCTrec = goFile Set.empty (NodeHeader HeaderDash)
-	where
-	goFile :: Set FilePath -> Node -> FilePath -> IO (Either ErrorRead (Trees (Cell Node)))
-	goFile inputFiles parentNode inpFile
-	 | Set.member inpFileNorm inputFiles =
-		return $ Left $ ErrorReadIncludeLoop inpFileNorm
-	 | otherwise = do
-		inpText <- readFile inpFileNorm
-		case P.runParser (p_Trees <* P.eof) inpFileNorm inpText of
-		 Left err -> return $ Left $ ErrorReadParser err
-		 Right trees ->
-			(join <$>) . sequence <$>
-			traverse
-			 (goTree (Set.insert inpFileNorm inputFiles) parentNode)
-			 (debug0 "readTCTrec" trees)
-		where
-		inpFileNorm = FilePath.normalise inpFile
-		goTree :: Set FilePath -> Node -> Tree (Cell Node) -> IO (Either ErrorRead (Trees (Cell Node)))
-		goTree inpFiles parNode t@(Tree c@(Cell bn en nod) ts) =
-			case nod of
-			 NodeLower{} -> return $ Right $ pure t
-			 -- NOTE: preserve NodeText ""
-			 NodeText n | TL.null n -> return $ Right $ pure t
-			 NodeText n ->
-				case parNode of
-				 NodeHeader HeaderBar{}      -> return $ Right $ pure t
-				 NodeHeader HeaderEqual{}    -> return $ Right $ pure t
-				 NodeHeader HeaderDashDash{} -> return $ Right $ pure t
-				 _ ->
-					return $ left ErrorReadParser $
-					parseTokens <$> parseLexemes inpFileNorm (Cell bn en n)
-			 NodeHeader (HeaderDotSlash incFile) ->
-				goFile inpFiles parNode $
-				FilePath.takeDirectory inpFileNorm </> incFile
-			 _ ->
-				(pure . Tree c . join <$>) .
-				sequence <$> traverse (goTree inpFiles nod') ts
-				where
-				-- NOTE: skip parent 'Node's whose semantic does not change 'NodeText'
-				nod' = case nod of
-				 NodePara -> parNode
-				 _ -> nod
-
 -- * Type 'ErrorRead'
 data ErrorRead
  =   ErrorReadParser (P.ParseError (P.Token TL.Text) (P.ErrorFancy Void))
- |   ErrorReadIncludeLoop FilePath
+ |   ErrorReadIncludeLoop Spans
  deriving (Eq)
 instance Show ErrorRead where
-	showsPrec p = \case
+	showsPrec _p = \case
 	 ErrorReadParser e ->
-		showParen (p >= 10) $
 		showString (P.parseErrorPretty e)
-	 ErrorReadIncludeLoop file ->
+	 ErrorReadIncludeLoop (Span{..}:|spans) ->
 		showString "ErrorReadIncludeLoop" .
-		showChar ' ' . showsPrec 10 file
+		showString "\n             " . showString span_file .
+		showString (foldMap (\s -> "\n included by "<>show s) spans)
diff --git a/Language/TCT/Read/Cell.hs b/Language/TCT/Read/Cell.hs
index 46f83fb..f85dc84 100644
--- a/Language/TCT/Read/Cell.hs
+++ b/Language/TCT/Read/Cell.hs
@@ -6,10 +6,12 @@
 module Language.TCT.Read.Cell where
 
 import Control.Applicative (Applicative(..))
+import Control.Monad (Monad(..))
+import Control.Monad.Trans.Class (MonadTrans(..))
 import Data.Char (Char)
 import Data.Either (Either(..))
 import Data.Eq (Eq)
-import Data.Function (($), (.))
+import Data.Function (($))
 import Data.Functor ((<$>))
 import Data.List.NonEmpty (NonEmpty(..))
 import Data.Maybe (Maybe(..))
@@ -18,19 +20,18 @@ import Data.Proxy (Proxy(..))
 import Data.Semigroup (Semigroup(..))
 import Data.String (IsString)
 import Data.Tuple (snd)
-import System.FilePath (FilePath)
+import qualified Control.Monad.Trans.Reader as R
 import qualified Data.Set as Set
 import qualified Data.Text.Lazy as TL
 import qualified Text.Megaparsec as P
 
 import Language.TCT.Cell
-import Language.TCT.Debug
 
 -- * Type 'Parser'
 -- | Convenient alias.
 type Parser   e s a =
      Parsable e s a =>
-     P.Parsec e s a
+     P.ParsecT e s (R.Reader [Span]) a
 
 -- ** Type 'Parsable'
 type Parsable e s a =
@@ -50,46 +51,39 @@ p_satisfyMaybe f = check `P.token` Nothing
 		 Just a  -> Right a
 		 Nothing -> Left (Just $ P.Tokens $ c:|[], Set.empty)
 
-p_SourceFile :: Parser e s FilePath
-p_SourceFile = P.sourceName <$> P.getPosition
-
 p_Position :: Parser e s Pos
-p_Position = (<$> P.getPosition) $ \p ->
-	Pos
-	 { pos_line   = P.unPos $ P.sourceLine p
-	 , pos_column = P.unPos $ P.sourceColumn p
-	 }
+p_Position = do
+	pos :| _  <- P.statePos <$> P.getParserState
+	return $ Pos (P.unPos $ P.sourceLine pos) (P.unPos $ P.sourceColumn pos)
 
 p_Cell :: Parser e s a -> Parser e s (Cell a)
-p_Cell pa =
-	(\b a e -> Cell b e a)
-	 <$> p_Position
-	 <*> pa
-	 <*> p_Position
-
-p_LineNum :: Parser e s LineNum
-p_LineNum = P.unPos . P.sourceLine <$> P.getPosition
-
-p_ColNum :: Parser e s ColNum
-p_ColNum = P.unPos . P.sourceColumn <$> P.getPosition
+p_Cell pa = do
+	path <- lift R.ask
+	b :| _ <- P.statePos <$> P.getParserState
+	a <- pa
+	span_end <- p_Position
+	let span_begin = Pos (P.unPos $ P.sourceLine b) (P.unPos $ P.sourceColumn b)
+	let span = Span {span_file=P.sourceName b, span_begin, span_end}
+	return $ Cell (span:|path) a
 
 -- | Wrapper around |P.runParser'|
 -- to use given 'Cell' as starting position.
 runParserOnCell ::
  Parsable e StreamCell a =>
- FilePath ->
  Parser e StreamCell a ->
  Cell TL.Text ->
  Either (P.ParseError (P.Token StreamCell) e) a
-runParserOnCell inp p (Cell bp _ep s) =
-	snd $ P.runParser' (p <* P.eof)
+runParserOnCell p (Cell (Span inp bp _ep :| path) s) =
+	snd $
+	(`R.runReader` path) $
+	P.runParserT' (p <* P.eof)
 	 P.State
 	 { P.stateInput    = StreamCell s
 	 , P.statePos      = pure $ P.SourcePos inp (P.mkPos $ pos_line bp) indent
 	 , P.stateTabWidth = indent
 	 , P.stateTokensProcessed = 0
 	 }
-	where indent = debug0 "runParserOnCell: indent" $ P.mkPos $ pos_column bp
+	where indent = P.mkPos $ pos_column bp
 
 -- * Type 'StreamCell'
 -- | Wrap 'TL.Text' to have a 'P.Stream' instance
diff --git a/Language/TCT/Read/Token.hs b/Language/TCT/Read/Token.hs
index bca94f9..00e7170 100644
--- a/Language/TCT/Read/Token.hs
+++ b/Language/TCT/Read/Token.hs
@@ -21,7 +21,6 @@ import Data.Maybe (Maybe(..))
 import Data.Monoid (Monoid(..))
 import Data.Semigroup (Semigroup(..))
 import Data.Sequence (ViewL(..), ViewR(..), (<|))
-import Data.String (String)
 import Data.TreeSeq.Strict (Tree(..), Trees)
 import Data.Tuple (fst,snd)
 import Data.Void (Void)
@@ -56,9 +55,9 @@ appendPairsToken :: Pairs -> Tree (Cell Node) -> Pairs
 appendPairsToken ps t = appendPairsTokens ps (pure t)
 
 appendPairsText :: Pairs -> Cell TL.Text -> Pairs
-appendPairsText ps (Cell bp ep t) =
+appendPairsText ps (Cell sp t) =
 	appendPairsToken ps $
-		Tree0 $ Cell bp ep $
+		Tree0 $ Cell sp $
 			NodeToken $ TokenText t
 
 appendPairsTokens :: Pairs -> Tokens -> Pairs
@@ -71,10 +70,10 @@ unionTokens x y =
 	case (Seq.viewr x, Seq.viewl y) of
 	 (xs :> x0, y0 :< ys) ->
 		case (x0,y0) of
-		 (  Tree (Cell bx _ex (NodeToken (TokenText tx))) sx
-		  , Tree (Cell _by ey (NodeToken (TokenText ty))) sy ) ->
+		 (  Tree (Cell (Span  fx  bx _ex:| sx) (NodeToken (TokenText tx))) tsx
+		  , Tree (Cell (Span _fy _by  ey:|_sy) (NodeToken (TokenText ty))) tsy ) ->
 			xs `unionTokens`
-			pure (Tree (Cell bx ey $ NodeToken $ TokenText $ tx <> ty) (sx<>sy)) `unionTokens`
+			pure (Tree (Cell (Span fx bx ey:|sx) $ NodeToken $ TokenText $ tx <> ty) (tsx<>tsy)) `unionTokens`
 			ys
 		 _ -> x <> y
 	 (EmptyR, _) -> y
@@ -88,37 +87,38 @@ openPair (t,ps) p = (t,(p,mempty):ps)
 
 -- | Close a 'Pair' when there is a matching 'LexemePairClose'.
 closePair :: Pairs -> Cell Pair -> Pairs
-closePair ps@(_,[]) (Cell bp ep p) = -- debug0 "closePair" $
-	appendPairsText ps $ Cell bp ep $
+closePair ps@(_,[]) (Cell ssp p) = -- debug0 "closePair" $
+	appendPairsText ps $ Cell ssp $
 		snd $ pairBordersDouble p
-closePair (t,(p1,t1):ts) p = -- debug0 "closePair" $
-	case (p1,p) of
-	 (Cell bx _ex (PairElem nx ax), Cell _by ey (PairElem ny ay)) | nx == ny ->
+closePair (t,(cx@(Cell (Span  fx  bx _ex:| sx) px),t1):ts)
+              cy@(Cell (Span _fy _by  ey:|_sy) py) = -- debug0 "closePair" $
+	case (px,py) of
+	 (PairElem nx ax, PairElem ny ay) | nx == ny ->
 		appendPairsToken (t,ts) $
-		Tree (Cell bx ey $ NodePair $ PairElem nx as) t1
+		Tree (Cell (Span fx bx ey:|sx) $ NodePair $ PairElem nx as) t1
 		where as | null ay   = ax
 		         | otherwise = ax<>ay
-	 (Cell bx _ex x, Cell _by ey y) | x == y ->
+	 _ | px == py ->
 		appendPairsToken (t,ts) $
-		Tree (Cell bx ey $ NodePair x) t1
+		Tree (Cell (Span fx bx ey:|sx) $ NodePair px) t1
 	 _ ->
-		(`closePair` p) $
+		(`closePair` cy) $
 		appendPairsTokens
 		 (t,ts)
-		 (closeImpaired mempty (p1,t1))
+		 (closeImpaired mempty (cx,t1))
 
 -- | Close a 'Pair' when there is no matching 'LexemePairClose'.
 closeImpaired :: Tokens -> (Cell Pair, Tokens) -> Tokens
-closeImpaired acc (Cell bp ep pair, toks) = -- debug0 "closeImpaired" $
+closeImpaired acc (Cell ssp@(s0:|sp) pair, toks) = -- debug0 "closeImpaired" $
 	case pair of
 	 -- NOTE: try to close 'PairHash' as 'TokenTag' instead of 'TokenPlain'.
-	 PairHash | Just (Cell _bt et tag, rest) <- tagFrom body ->
-		Tree0 (Cell bp et $ NodeToken $ TokenTag tag) <| rest
+	 PairHash | Just (Cell (Span{span_end}:|_st) tag, rest) <- tagFrom body ->
+		Tree0 (Cell (s0{span_end}:|sp) $ NodeToken $ TokenTag tag) <| rest
 		-- NOTE: use bp (not bt) to include the '#'
 	 _ -> pure open `unionTokens` body
 	where
 	body = toks `unionTokens` acc
-	open = Tree0 $ Cell bp ep $ NodeToken $ TokenText $ fst $ pairBordersDouble pair
+	open = Tree0 $ Cell ssp $ NodeToken $ TokenText $ fst $ pairBordersDouble pair
 
 -- | Close remaining 'Pair's at end of parsing.
 closePairs :: Pairs -> Tokens
@@ -131,7 +131,7 @@ appendLexeme lex acc = -- debug2 "appendLexeme" "lex" "acc" $ \lex acc ->
 	 LexemePairOpen ps -> foldl' open acc ps
 		where
 		-- NOTE: insert an empty node to encode <elem></elem>, not <elem/>
-		open a p@(Cell _bp ep PairElem{}) = openPair a p `appendPairsText` Cell ep ep ""
+		open a p@(Cell (Span{span_end, ..}:|sp) PairElem{}) = openPair a p `appendPairsText` Cell (Span{span_begin=span_end, ..}:|sp) ""
 		open a p = openPair a p
 	 LexemePairClose ps -> foldl' closePair acc ps
 	 LexemePairAny   ps -> foldl' openPair  acc ps
@@ -183,10 +183,9 @@ parseTokens ps =
 	ps
 
 parseLexemes ::
- String ->
  Cell TL.Text ->
  Either (P.ParseError (P.Token TL.Text) (P.ErrorFancy Void)) [Lexeme]
-parseLexemes inp = runParserOnCell inp (p_Lexemes <* P.eof)
+parseLexemes = runParserOnCell (p_Lexemes <* P.eof)
 
 -- | Parse 'Lexeme's, returning them in reverse order
 -- to apply 'orientLexemePairAny'.
@@ -366,16 +365,16 @@ instance TagFrom Tokens where
 	tagFrom ts =
 		case Seq.viewl ts of
 		 EmptyL -> Nothing
-		 Tree0 (Cell b0 e0 n) :< ns ->
+		 Tree0 (Cell ss0@(Span _f0 _b0 e0:|_s0) n) :< ns ->
 			case n of
 			 NodeToken (TokenText t) ->
-				case tagFrom $ Cell b0 e0 t of
+				case tagFrom $ Cell ss0 t of
 				 Nothing -> Nothing
 				 Just (t0,r0) ->
 					if TL.null $ unCell r0
 					then
 						case tagFrom ns of
-						 Just (t1@(Cell b1 _e1 _), r1) | e0 == b1 ->
+						 Just (t1@(Cell (Span _f1 b1 _e1:|_s1) _), r1) | e0 == b1 ->
 							Just (t0<>t1, r1)
 						 _ -> Just (t0, ns)
 					else Just (t0, pure n0 `unionTokens` ns)
@@ -383,13 +382,13 @@ instance TagFrom Tokens where
 			 _ -> Nothing
 		 _ -> Nothing
 instance TagFrom (Cell TL.Text) where
-	tagFrom (Cell bp ep t)
+	tagFrom (Cell (Span fp bp ep:|sp) t)
 	 | (w,r) <- TL.span isTagChar t
 	 , not $ TL.null w
 	 , ew <- pos_column bp + sum (Text.length <$> TL.toChunks w) =
 		Just
-		 ( Cell bp bp{pos_column=ew} w
-		 , Cell bp{pos_column=ew} ep r )
+		 ( Cell (Span fp bp bp{pos_column=ew}:|sp) w
+		 , Cell (Span fp bp{pos_column=ew} ep:|sp) r )
 	tagFrom _ = Nothing
 
 isTagChar :: Char -> Bool
diff --git a/Language/TCT/Read/Tree.hs b/Language/TCT/Read/Tree.hs
index af83f33..f6ba041 100644
--- a/Language/TCT/Read/Tree.hs
+++ b/Language/TCT/Read/Tree.hs
@@ -11,10 +11,11 @@ import Data.Bool
 import Data.Eq (Eq(..))
 import Data.Function (($), (.))
 import Data.Functor ((<$>), ($>), (<$))
+import Data.List.NonEmpty (NonEmpty(..))
 import Data.Maybe (Maybe(..))
 import Data.Monoid (Monoid(..))
 import Data.Semigroup (Semigroup(..))
-import Data.TreeSeq.Strict (Tree(..), Trees)
+import Data.TreeSeq.Strict (Tree(..), Trees, tree0)
 import qualified Data.List as List
 import qualified Data.Sequence as Seq
 import qualified Data.Text.Lazy as TL
@@ -31,41 +32,40 @@ import Language.TCT.Read.Token
 p_CellHeader :: P.Tokens s ~ TL.Text => Row -> Parser e s Row
 p_CellHeader row = debugParser "CellHeader" $ do
 	P.skipMany $ P.char ' '
-	pos <- p_Position
-	header <- debugParser "Header" $
-		P.choice $
-		 [ P.try $ P.char '-' >>
-			P.char ' ' $> HeaderDash <|>
-			P.string "- " $> HeaderDashDash
-		 , P.try $ HeaderDot
-			 <$> p_Digits
-			 <* P.char '.'
-			 <* P.lookAhead (P.try $ P.eof <|> void (P.satisfy $ \c -> c=='\n'||c==' '))
-		 , P.try $ P.some (P.char '#') <* P.lookAhead (P.try $ P.char ' ') >>= \hs ->
-			return $ HeaderSection $ List.length hs
-		 , P.try $
-			HeaderBrackets
-			 <$> P.between (P.string "[") (P.string "]") p_Name
-			 <*  P.lookAhead (P.try $ P.eof <|> void (P.satisfy (=='\n')))
-		 , P.try $
-			(\f -> HeaderDotSlash $ "./"<>f)
-			 <$  P.string "./"
-			 <*> P.many (P.satisfy (/='\n'))
-		 , do
-			name <- p_Name
-			wh <- p_HSpaces
+	Cell sp h <- p_Cell $ do
+		debugParser "Header" $
 			P.choice
-			 [ P.try $ HeaderColon name wh
-				 <$ P.char ':'
+			 [ P.try $ P.char '-' >>
+				P.char ' ' $> HeaderDash <|>
+				P.string "- " $> HeaderDashDash
+			 , P.try $ HeaderDot
+				 <$> p_Digits
+				 <* P.char '.'
 				 <* P.lookAhead (P.try $ P.eof <|> void (P.satisfy $ \c -> c=='\n'||c==' '))
-			 , P.char '>' $> HeaderGreat name wh
-			 , P.char '=' $> HeaderEqual name wh
-			 , P.char '|' $> HeaderBar   name wh
+			 , P.try $ P.some (P.char '#') <* P.lookAhead (P.try $ P.char ' ') >>= \hs ->
+				return $ HeaderSection $ List.length hs
+			 , P.try $
+				HeaderBrackets
+				 <$> P.between (P.string "[") (P.string "]") p_Name
+				 <*  P.lookAhead (P.try $ P.eof <|> void (P.satisfy (=='\n')))
+			 , P.try $
+				(\f -> HeaderDotSlash $ "./"<>f)
+				 <$  P.string "./"
+				 <*> P.many (P.satisfy (/='\n'))
+			 , do
+				name <- p_Name
+				wh <- p_HSpaces
+				P.choice
+				 [ P.try $ HeaderColon name wh
+					 <$ P.char ':'
+					 <* P.lookAhead (P.try $ P.eof <|> void (P.satisfy $ \c -> c=='\n'||c==' '))
+				 , P.char '>' $> HeaderGreat name wh
+				 , P.char '=' $> HeaderEqual name wh
+				 , P.char '|' $> HeaderBar   name wh
+				 ]
 			 ]
-		 ]
-	posEnd <- p_Position
-	let row' = Tree (Cell pos posEnd $ NodeHeader header) mempty : row
-	case header of
+	let row' = Tree (Cell sp $ NodeHeader h) mempty : row
+	case h of
 	 HeaderSection{}  -> p_CellEnd  row'
 	 HeaderDash{}     -> p_Row      row'
 	 HeaderDashDash{} -> p_CellRaw  row'
@@ -93,18 +93,17 @@ p_Line1 = P.takeWhile1P (Just "Line") (/='\n')
 
 p_CellLower :: P.Tokens s ~ TL.Text => Row -> Parser e s Row
 p_CellLower row = debugParser "CellLower" $ do
-	indent   <- p_HSpaces
-	pos      <- p_Position
-	void     $  P.char '<'
-	name     <- p_Name
-	attrs    <- p_ElemAttrs
-	posClose <- p_Position
+	indent <- p_HSpaces
+	Cell ssp@(Span fp bp ep:|sp) (name,attrs) <-
+		p_Cell $ do
+			void $ P.char '<'
+			(,) <$> p_Name <*> p_ElemAttrs
 	let treeHere =
-		Tree (Cell pos posClose $ NodeLower name attrs) .
-		Seq.singleton . Tree0 . (NodeText <$>)
-	let treeElem hasContent nod (Cell _ p t) =
+		Tree (Cell ssp $ NodeLower name attrs) .
+		Seq.singleton . tree0 . (NodeText <$>)
+	let treeElem hasContent nod (Cell (Span _fp _bp ep':|_sp) t) =
 		let (o,_) = bs $ PairElem name attrs in
-		Tree0 $ Cell pos p $ nod $ o<>t
+		tree0 $ Cell (Span fp bp ep':|sp) $ nod $ o<>t
 		where
 		bs | hasContent = pairBordersDouble
 		   | otherwise  = pairBordersSingle
@@ -112,7 +111,7 @@ p_CellLower row = debugParser "CellLower" $ do
 		P.try (P.char '>' >> treeElem True NodeText <$> p_CellLinesUntilElemEnd indent name) <|>
 		P.try (P.char '\n' >> P.tokens (==) indent >> treeHere <$> p_CellLines indent) <|>
 		P.try (P.tokens (==) "/>" >> treeElem False NodeText <$> p_CellLine) <|>
-		(P.eof $> treeHere (Cell posClose posClose ""))
+		(P.eof $> treeHere (Cell (Span fp ep ep:|sp) ""))
 	return $ cel : row
 	where
 	p_CellLine :: P.Tokens s ~ TL.Text => Parser e s (Cell TL.Text)
@@ -145,19 +144,19 @@ p_CellText1 :: P.Tokens s ~ TL.Text => Row -> Parser e s Row
 p_CellText1 row = debugParser "CellText" $ do
 	P.skipMany $ P.char ' '
 	n <- p_Cell $ NodeText <$> p_Line1
-	return $ Tree0 n : row
+	return $ tree0 n : row
 
 p_CellRaw :: P.Tokens s ~ TL.Text => Row -> Parser e s Row
 p_CellRaw row = debugParser "CellRaw" $ do
 	P.skipMany $ P.char ' '
 	n <- p_Cell $ NodeText <$> p_Line
-	return $ Tree0 n : row
+	return $ tree0 n : row
 
-p_CellSpaces1 :: Row -> Parser e s Row
+p_CellSpaces1 :: P.Tokens s ~ TL.Text => Row -> Parser e s Row
 p_CellSpaces1 row = debugParser "CellSpaces" $ do
 	P.skipSome $ P.char ' '
-	pos <- p_Position
-	return $ Tree0 (Cell pos pos $ NodeText "") : row
+	cell <- p_Cell $ NodeText <$> P.string ""
+	return $ tree0 cell : row
 
 p_CellEnd :: P.Tokens s ~ TL.Text => Row -> Parser e s Row
 p_CellEnd row = debugParser "CellEnd" $
diff --git a/Language/TCT/Tree.hs b/Language/TCT/Tree.hs
index 7067444..4091032 100644
--- a/Language/TCT/Tree.hs
+++ b/Language/TCT/Tree.hs
@@ -14,6 +14,7 @@ import Data.Foldable (Foldable(..), any)
 import Data.Function (($))
 import Data.Functor ((<$>))
 import Data.Int (Int)
+import Data.List.NonEmpty (NonEmpty(..))
 import Data.Monoid (Monoid(..))
 import Data.Ord (Ordering(..), Ord(..))
 import Data.Semigroup (Semigroup(..))
@@ -128,8 +129,8 @@ type Rows = [Root]
 -- one can always put the last 'Root' as a child to a previous one.
 -- This 'Root' just has to be discarded by 'collapseRows'.
 initRows :: Rows
-initRows = [Tree0 $ Cell p p $ NodeHeader HeaderDash]
-	where p = pos1{pos_line= -1, pos_column=0}
+initRows = [Tree0 $ Cell (Span "" p p :| []) $ NodeHeader HeaderDash]
+	where p = Pos{pos_line= -1, pos_column=0}
 	 -- NOTE: such that any following 'Root'
 	 -- is 'NodePara' if possible, and always a child.
 
@@ -158,11 +159,11 @@ mergeRowPrefix col rows row =
 	case (row,rows) of
 	 ([], _) -> rows
 	 (_, []) -> undefined -- NOTE: cannot happen with initRows
-	 ( _new@(Tree (Cell bn _en n) _ns):news
-	  , _old@(Tree (Cell _bo eo _o) _os):_olds ) ->
+	 ( _new@(Tree (Cell (Span _fn bn _en:|_sn) n) _ns):news
+	  , _old@(Tree (Cell (Span _fo _bo eo:|_so) _o) _os):_olds ) ->
 		case collapseRowsWhile isCollapsable rows of
 		 [] -> mergeRowIndent rows row
-		 head@(unTree -> ch@(Cell bh _eh h)) : olds' ->
+		 head@(unTree -> ch@(Cell (Span _fh bh _eh:|_sh) h)) : olds' ->
 			case (n,h) of
 			-- NOTE: zipping: when new is HeaderGreat, collapse last line downto col
 			-- then check if there is a matching HeaderGreat,
@@ -185,11 +186,12 @@ mergeRowPrefix col rows row =
 			discard  = debug "mergeRowPrefix/discard"  $ mergeRowPrefix (pos_column bh) rows news
 			collapse = debug "mergeRowPrefix/collapse" $ mergeRowPrefix col (collapseRoot head olds') row
 		where
-		isMatching (Cell bh _eh h) =
+		isMatching (Cell (Span _fh bh _eh:|_sh) h) =
 			pos_column bn == pos_column bh &&
 			n == h
 		isCollapsable = debug2 "mergeRowPrefix/isCollapsable" "new" "old" $
-		 \_t0@(unTree -> c0@(Cell b0 _e0 _n0)) _t1@(unTree -> Cell b1 e1 _n1) ->
+		 \_t0@(unTree -> c0@(Cell (Span _f0 b0 _e0:|_s0) _n0))
+		  _t1@(unTree -> Cell (Span _f1 b1 e1:|_s1) _n1) ->
 			not (isMatching c0) &&
 			(pos_line b0 - pos_line e1 <= 1) && -- adjacent
 			col < pos_column b1                 -- righter than col
@@ -201,8 +203,8 @@ mergeRowIndent rows row =
 	case (row,rows) of
 	 ([], _) -> rows
 	 (_, []) -> undefined -- NOTE: cannot happen with initRows
-	 ( new@(Tree (Cell bn en n) ns):news
-	  ,old@(Tree (Cell bo eo o) os):olds ) ->
+	 ( new@(Tree (Cell ssn@(Span fn bn en:|sn) n) ns):news
+	  ,old@(Tree (Cell sso@(Span fo bo eo:|so) o) os):olds ) ->
 		case debug0 "mergeRowIndent/colNew" (pos_column bn) `compare`
 		     debug0 "mergeRowIndent/colOld" (pos_column bo) of
 		-- NOTE: new is on the left
@@ -216,7 +218,7 @@ mergeRowIndent rows row =
 			  , not isVerbatim -> collapse
 			  | isAdjacent && isIndented -> merge $ Tree t (os<>ns)
 				where
-					t      = NodeText <$> Cell boNew eo (indent<>to) <> Cell bn en tn
+					t      = NodeText <$> Cell (Span fo boNew eo:|so) (indent<>to) <> Cell ssn tn
 					boNew  = bo{pos_column=pos_column bn}
 					indent = TL.replicate (int64 $ pos_column bo - pos_column bn) " "
 					-- | Whether the horizontal delta is made of spaces
@@ -224,7 +226,7 @@ mergeRowIndent rows row =
 						debug0 "mergeRowIndent/isIndented" $
 						case olds of
 						 [] -> True
-						 (unTree -> (cell_end -> ep)) : _ ->
+						 (unTree -> (cell_spans -> (span_end -> ep) :| _)) : _ ->
 							case pos_line ep `compare` pos_line bo of
 							 LT -> True
 							 EQ -> pos_column ep <= pos_column bn
@@ -237,7 +239,7 @@ mergeRowIndent rows row =
 			 (NodeText tn, NodeText to)
 			  | TL.null tn || TL.null to
 			  , not isVerbatim -> collapse
-			  | isAdjacent -> merge $ Tree (NodeText <$> Cell bo eo to <> Cell bn en tn) (os<>ns)
+			  | isAdjacent -> merge $ Tree (NodeText <$> Cell sso to <> Cell ssn tn) (os<>ns)
 			-- NOTE: HeaderSection can parent Nodes at the same level
 			 (NodeHeader (HeaderSection lvlNew), NodeHeader (HeaderSection lvlOld)) ->
 				if debug0 "mergeRowIndent/lvlNew" lvlNew
@@ -255,7 +257,7 @@ mergeRowIndent rows row =
 				 mergeRowIndent rows' row
 				where
 				isCollapsable = debug2 "mergeRowIndent/isCollapsable" "new" "old" $
-				 \_t0@(unTree -> Cell b0 _e0 n0) _t1 ->
+				 \_t0@(unTree -> Cell (Span _f0 b0 _e0:|_ss0) n0) _t1 ->
 					case n0 of
 					 NodeHeader HeaderSection{} -> False
 					 _ -> pos_column bn == pos_column b0
@@ -277,13 +279,13 @@ mergeRowIndent rows row =
 				   , not isVerbatim -> collapse
 				-- old
 				--  new
-				 True -> merge $ Tree (NodeText <$> Cell bo eo to <> Cell bn en tn) (os<>ns)
+				 True -> merge $ Tree (NodeText <$> Cell sso to <> Cell ssn tn) (os<>ns)
 				-- old
 				--
 				--  new
 				 False -> mergeRowIndent (collapseRoot old olds) (shifted:news)
 					where
-					shifted = Tree (Cell bnNew en $ NodeText $ indent<>tn) (os<>ns)
+					shifted = Tree (Cell (Span fn bnNew en:|sn) $ NodeText $ indent<>tn) (os<>ns)
 					bnNew   = bn{pos_column=pos_column bo}
 					indent  = TL.replicate (int64 $ pos_column bn - pos_column bo) " "
 			--
@@ -317,7 +319,7 @@ collapseRows rows =
 collapseSection :: ColNum -> Rows -> Rows
 collapseSection col = debug1 "collapseSection" "rows" go
 	where
-	go rows@(new@(unTree -> Cell bn _en n):olds)
+	go rows@(new@(unTree -> Cell (Span _fn bn _en:|_sn) n):olds)
 	 | col <= pos_column bn =
 		case n of
 		 NodeHeader HeaderSection{} -> rows
@@ -327,10 +329,10 @@ collapseSection col = debug1 "collapseSection" "rows" go
 collapseRowsWhile :: (Root -> Root -> Bool) -> Rows -> Rows
 collapseRowsWhile test = debug1 "collapseRowsWhile" "rows" $ \case
  [] -> mempty
- rows@(new@(Tree (Cell bn _en n) _ns):news) ->
+ rows@(new@(Tree (Cell (Span _fn bn _en:|_sn) n) _ns):news) ->
 	case news of
 	 [] -> rows
-	 old@(Tree (Cell bo eo o) _os):olds
+	 old@(Tree (Cell (Span _fo bo eo:|_so) o) _os):olds
 	  | not $ test new old -> rows
 	  | otherwise ->
 		case debug0 "collapseRowsWhile/colNew" (pos_column bn) `compare`
@@ -357,7 +359,7 @@ collapseRowsWhile test = debug1 "collapseRowsWhile" "rows" $ \case
 				collapseRowsWhile test news'
 				where
 				isCollapsable = debug2 "collapseRowsWhile/isCollapsable" "new" "old" $
-				 \_t0@(unTree -> Cell b0 _e0 n0) _t1 ->
+				 \_t0@(unTree -> Cell (Span _f0 b0 _e0:|_s0) n0) _t1 ->
 					case n0 of
 					 NodeHeader HeaderSection{} -> False
 					 _ -> pos_column bn == pos_column b0
@@ -380,11 +382,11 @@ collapseRowsWhile test = debug1 "collapseRowsWhile" "rows" $ \case
 --
 -- NOTE: any NodeText/NodeText merging must have been done before.
 collapseRoot :: Root -> Rows -> Rows
-collapseRoot new@(Tree (Cell bn en n) _ns) rows =
+collapseRoot new@(Tree (Cell ssn@(Span _fn bn en:|_sn) n) _ns) rows =
 	debug2_ "collapseRoot" ("new",Seq.singleton new) ("rows",rows) $
 	case rows of
 	 [] -> return new
-	 old@(Tree (Cell bo eo o) os) : olds ->
+	 old@(Tree (Cell (Span fo bo eo:|so) o) os) : olds ->
 		case (n,o) of
 		-- NOTE: no child into NodeText
 		 (_, NodeText{}) -> collapse2
@@ -412,6 +414,6 @@ collapseRoot new@(Tree (Cell bn en n) _ns) rows =
 		 _ -> collapse
 		where
 		isAdjacent = pos_line bn - pos_line eo <= 1
-		para       = Tree (Cell bn en NodePara) (return new) : rows
-		collapse   = Tree (Cell bo en o) (os |> new) : olds
+		para       = Tree (Cell ssn NodePara) (return new) : rows
+		collapse   = Tree (Cell (Span fo bo en:|so) o) (os |> new) : olds
 		collapse2  = collapseRoot new $ collapseRoot old olds
diff --git a/Language/TCT/Write/HTML5.hs b/Language/TCT/Write/HTML5.hs
index 8631224..e0ce43d 100644
--- a/Language/TCT/Write/HTML5.hs
+++ b/Language/TCT/Write/HTML5.hs
@@ -11,6 +11,7 @@ import Data.Eq (Eq(..))
 import Data.Foldable (Foldable(..))
 import Data.Function (($), (.))
 import Data.Functor.Compose (Compose(..))
+import Data.List.NonEmpty (NonEmpty(..))
 import Data.Maybe (Maybe(..))
 import Data.Monoid (Monoid(..))
 import Data.Ord (Ord(..), Ordering(..))
@@ -151,7 +152,7 @@ instance Html5ify Pos where
 instance Html5ify Roots where
 	html5ify = mapM_ html5ify
 instance Html5ify Root where
-	html5ify (Tree (Cell bp _ep nod) ts) = do
+	html5ify (Tree (Cell (Span{span_begin=bp}:|_) nod) ts) = do
 		html5ify bp
 		case nod of
 		----------------------
diff --git a/Language/TCT/Write/Plain.hs b/Language/TCT/Write/Plain.hs
index 9747b8d..41ec352 100644
--- a/Language/TCT/Write/Plain.hs
+++ b/Language/TCT/Write/Plain.hs
@@ -13,6 +13,7 @@ import Data.Foldable (Foldable(..))
 import Data.Function (($))
 import Data.Functor ((<$>))
 import Data.Int (Int)
+import Data.List.NonEmpty (NonEmpty(..))
 import Data.Maybe (Maybe(..))
 import Data.Monoid (Monoid(..))
 import Data.Ord (Ord(..), Ordering(..))
@@ -86,7 +87,7 @@ setStart ts st = st
 	where pos =
 		case Seq.viewl ts of
 		 EmptyL -> pos1
-		 Tree Cell{cell_begin} _ :< _ -> cell_begin
+		 Tree (Cell (Span{span_begin}:|_) _) _ :< _ -> span_begin
 
 -- * Class 'Plainify'
 class Plainify a where
@@ -144,7 +145,7 @@ instance Plainify Pos where
 instance Plainify Roots where
 	plainify = foldMap plainify
 instance Plainify Root where
-	plainify (Tree (Cell bp _ep nod) ts) =
+	plainify (Tree (Cell (Span{span_begin=bp}:|_) nod) ts) =
 		plainify bp <>
 		case nod of
 		----------------------
@@ -152,8 +153,9 @@ instance Plainify Root where
 		----------------------
 		 NodeHeader hdr ->
 			case hdr of
-			 HeaderGreat{} -> plainHeaderRepeated
-			 HeaderBar{}   -> plainHeaderRepeated
+			 HeaderGreat{}    -> plainHeaderRepeated
+			 HeaderBar{}      -> plainHeaderRepeated
+			 HeaderDotSlash{} -> plainify hdr
 			 _ -> plainify hdr <> plainify ts
 			where
 			plainHeaderRepeated = do
diff --git a/Language/TCT/Write/XML.hs b/Language/TCT/Write/XML.hs
index a0efe22..cd9e0d8 100644
--- a/Language/TCT/Write/XML.hs
+++ b/Language/TCT/Write/XML.hs
@@ -13,6 +13,7 @@ import Data.Eq (Eq(..))
 import Data.Foldable (Foldable(..))
 import Data.Function (($), (.))
 import Data.Functor ((<$>), (<$), ($>))
+import Data.List.NonEmpty (NonEmpty(..))
 import Data.Maybe (Maybe(..))
 import Data.Monoid (Monoid(..))
 import Data.Ord (Ord(..))
@@ -27,7 +28,6 @@ import qualified Data.List as List
 import qualified Data.Sequence as Seq
 import qualified Data.Text.Lazy as TL
 import qualified Language.TCT.Write.Plain as Plain
-import qualified System.FilePath as FP
 
 -- import Language.TCT.Debug
 import Language.TCT.Utils
@@ -50,7 +50,7 @@ document doc =
 	 sec@(Tree (unCell -> NodeHeader HeaderSection{}) _body) :< foot ->
 		let (titles, content) = partitionSection sec in
 		case Seq.viewl titles of
-		 (unTree -> Cell bt et _) :< _ ->
+		 (unTree -> Cell st _) :< _ ->
 			xmlify def
 			 { inh_titles = titles
 			 , inh_figure = True
@@ -59,7 +59,7 @@ document doc =
 			where
 			contentWithAbout =
 				case Seq.findIndexL isAbout content of
-				 Nothing -> Tree (Cell bt et $ NodeHeader $ HeaderColon "about" "") mempty <| content
+				 Nothing -> Tree (Cell st $ NodeHeader $ HeaderColon "about" "") mempty <| content
 				 Just{} -> content
 			isAbout = \case
 			 (unTree -> (unCell -> NodeHeader (HeaderColon "about" _wh))) -> True
@@ -71,16 +71,16 @@ partitionSection :: Root -> (Roots, Roots)
 partitionSection (Tree (unCell -> NodeHeader (HeaderSection lvlPar)) body) =
 	case Seq.viewl body of
 	 EmptyL -> mempty
-	 title@(unTree -> Cell _bt et NodePara) :< rest ->
+	 title@(unTree -> Cell (Span{span_end=et}:|_) NodePara) :< rest ->
 		let (subtitles, content) = spanlSubtitles et rest in
 		(title <| (subtitles >>= subTrees), content)
 		where
 		spanlSubtitles ep ts =
 			case Seq.viewl ts of
-			 sub@(unTree -> Cell bs es (NodeHeader (HeaderSection lvlSub))) :< rs
+			 sub@(unTree -> Cell (Span{..}:|_) (NodeHeader (HeaderSection lvlSub))) :< rs
 				| lvlSub <= lvlPar
-				, pos_line bs - pos_line ep <= 1 ->
-				let (subs, ts') = spanlSubtitles es rs in
+				, pos_line span_begin - pos_line ep <= 1 ->
+				let (subs, ts') = spanlSubtitles span_end rs in
 				(sub <| subs, ts')
 			 _ -> (mempty, ts)
 	 _ -> (mempty, body)
@@ -120,7 +120,7 @@ instance Xmlify Roots where
 	xmlify inh roots =
 		case Seq.viewl roots of
 		 EmptyL -> mempty
-		 r@(Tree cr@(Cell _br _er nr) ts) :< rs ->
+		 r@(Tree cr@(Cell _sr nr) ts) :< rs ->
 			case nr of
 			----------------------
 			 -- NOTE: HeaderColon becomes parent
@@ -159,16 +159,16 @@ instance Xmlify Roots where
 			----------------------
 			 -- NOTE: detect [some text](http://some.url) or [SomeRef]
 			 NodePair PairParen
-			  | Tree (Cell bb eb (NodePair PairBracket)) bracket :< rs' <- Seq.viewl rs ->
+			  | Tree (Cell sb (NodePair PairBracket)) bracket :< rs' <- Seq.viewl rs ->
 				(<| xmlify inh rs') $
 				case bracket of
-				 (toList -> [unTree -> Cell bl el (NodeToken (TokenLink lnk))]) ->
+				 (toList -> [unTree -> Cell sl (NodeToken (TokenLink lnk))]) ->
 					element "eref" $
-						xmlAttrs [Cell bl el ("to",lnk)] <>
+						xmlAttrs [Cell sl ("to",lnk)] <>
 						xmlify inh ts
 				 _ ->
 					element "rref" $
-						xmlAttrs [Cell bb eb ("to",Plain.document bracket)] <>
+						xmlAttrs [Cell sb ("to",Plain.document bracket)] <>
 						xmlify inh ts
 			----------------------
 			 -- NOTE: gather HeaderDash
@@ -207,7 +207,7 @@ instance Xmlify Roots where
 			element :: XmlName -> XMLs -> XML
 			element n = Tree (XmlElem n <$ cr)
 instance Xmlify Root where
-	xmlify inh tn@(Tree (Cell bn en nod) ts) =
+	xmlify inh tn@(Tree (Cell ss@(sn:|ssn) nod) ts) =
 		case nod of
 		----------------------
 		 NodePara ->
@@ -257,7 +257,7 @@ instance Xmlify Root where
 					Seq.singleton $
 					element "figure" $
 						-- xmlAttrs (setAttr (Cell en en ("type",n)) attrs) <>
-						xmlAttrs (attrs `defaultAttr` Cell bn bn ("type", n)) <>
+						xmlAttrs (attrs `defaultAttr` Cell (sn{span_end=span_begin sn}:|ssn) ("type", n)) <>
 						case toList body of
 						 [Tree0{}] -> xmlify inh'{inh_para = List.repeat elementPara} body
 						 _         -> xmlify inh'{inh_para = elementTitle : List.repeat elementPara} body
@@ -286,17 +286,17 @@ instance Xmlify Root where
 				then
 					Seq.singleton $
 					element "artwork" $
-						xmlAttrs (Seq.singleton $ Cell bn bn ("type", n)) <>
+						xmlAttrs (Seq.singleton $ Cell (sn{span_end=span_end sn}:|ssn) ("type", n)) <>
 						xmlify inh{inh_para=[]} ts
 				else
 					xmlify inh $
-						Tree (Cell bn en $ NodeHeader $ HeaderColon n wh) ts
+						Tree (cell $ NodeHeader $ HeaderColon n wh) ts
 			--
 			 HeaderGreat n _wh ->
 				Seq.singleton $
 				let (attrs,body) = partitionAttrs ts in
 				element "quote" $
-					xmlAttrs (attrs `defaultAttr` Cell bn bn ("type", n)) <>
+					xmlAttrs (attrs `defaultAttr` Cell (sn{span_end=span_end sn}:|ssn) ("type", n)) <>
 					xmlify inh{inh_para=List.repeat elementPara} body
 			--
 			 HeaderEqual n _wh ->
@@ -307,7 +307,8 @@ instance Xmlify Root where
 			 HeaderDot n ->
 				Seq.singleton $
 				element "li" $
-					xmlAttrs (Seq.singleton $ Cell bn bn{pos_column=pos_column bn + int (TL.length n)} ("name", n)) <>
+					let span_end = (span_begin sn){pos_column=pos_column (span_begin sn) + int (TL.length n)} in
+					xmlAttrs (Seq.singleton $ Cell (sn{span_end}:|ssn) ("name", n)) <>
 					xmlify inh ts
 			--
 			 HeaderDash -> Seq.singleton $ element "li" $ xmlify inh ts
@@ -320,16 +321,12 @@ instance Xmlify Root where
 				let (attrs,body) = partitionAttrs ts in
 				Seq.singleton $
 				element "reference" $
-					xmlAttrs (setAttr (Cell en en ("id",ident)) attrs) <>
+					xmlAttrs (setAttr (Cell (sn{span_end=span_end sn}:|ssn) ("id",ident)) attrs) <>
 					xmlify inh'{inh_para = elementTitle : elementTitle : List.repeat elementPara} body
 				where
 				inh' = inh{inh_figure = False}
 			--
-			 HeaderDotSlash p ->
-				Seq.singleton $
-				element "include" $
-					xmlAttrs [cell ("href",TL.pack $ FP.replaceExtension p "dtc")] <>
-					xmlify inh ts
+			 HeaderDotSlash _file -> xmlify inh ts
 		----------------------
 		 NodePair pair ->
 			case pair of
@@ -372,13 +369,13 @@ instance Xmlify Root where
 						cell (xmlLocalName elemAttr_name,elemAttr_value)) <$> attrs) <>
 					xmlify inh ts
 			 _ ->
-				Seq.singleton (Tree0 $ Cell bn bn' $ XmlText open) `unionXml`
+				Seq.singleton (Tree0 $ Cell (sn{span_end=bn'}:|ssn) $ XmlText open) `unionXml`
 				xmlify inh ts `unionXml`
-				Seq.singleton (Tree0 $ Cell en' en $ XmlText close)
+				Seq.singleton (Tree0 $ Cell (sn{span_begin=en'}:|ssn) $ XmlText close)
 				where
 				(open, close) = pairBorders pair ts
-				bn' = bn{pos_column=pos_column bn + int (TL.length open)}
-				en' = en{pos_column=pos_column bn - int (TL.length close)}
+				bn' = (span_begin sn){pos_column=pos_column (span_begin sn) + int (TL.length open)}
+				en' = (span_end   sn){pos_column=pos_column (span_end   sn) - int (TL.length close)}
 		----------------------
 		 NodeText t -> Seq.singleton $ Tree0 $ cell $ XmlText t
 		----------------------
@@ -395,7 +392,7 @@ instance Xmlify Root where
 				xmlify inh ts
 		where
 		cell :: a -> Cell a
-		cell = Cell bn en
+		cell = Cell ss
 		element :: XmlName -> XMLs -> XML
 		element n = Tree (cell $ XmlElem n)
 instance Xmlify (Seq (Cell (XmlName,TL.Text))) where
@@ -512,8 +509,8 @@ partitionAttrs ts = (attrs,cs)
 	 _ -> False
 	attrs = attr <$> as
 	attr = \case
-	 Tree (Cell bp ep (NodeHeader (HeaderEqual n _wh))) a ->
-		Cell bp ep (xmlLocalName n, v)
+	 Tree (Cell ssn (NodeHeader (HeaderEqual n _wh))) a ->
+		Cell ssn (xmlLocalName n, v)
 		where
 		v = Plain.text (Plain.setStart a def{Plain.state_escape = False}) a
 	 _ -> undefined
@@ -547,10 +544,10 @@ unionXml x y =
 	case (Seq.viewr x, Seq.viewl y) of
 	 (xs :> x0, y0 :< ys) ->
 		case (x0,y0) of
-		 (  Tree0 (Cell bx ex (XmlText tx))
-		  , Tree0 (Cell by ey (XmlText ty)) ) ->
+		 (  Tree0 (Cell ssx@(Span {span_file=fx}:|_sx) (XmlText tx))
+		  , Tree0 (Cell ssy@(Span {span_file=fy}:|_sy) (XmlText ty)) ) | fx == fy ->
 			xs `unionXml`
-			Seq.singleton (Tree0 $ (XmlText <$>) $ Cell bx ex tx <> Cell by ey ty) `unionXml`
+			Seq.singleton (Tree0 $ (XmlText <$>) $ Cell ssx tx <> Cell ssy ty) `unionXml`
 			ys
 		 _ -> x <> y
 	 (Seq.EmptyR, _) -> y
diff --git a/Language/XML.hs b/Language/XML.hs
index a702865..98a65ea 100644
--- a/Language/XML.hs
+++ b/Language/XML.hs
@@ -67,8 +67,8 @@ xmlLocalName = XmlName "" ""
 data XmlNode
  =   XmlElem    XmlName
  |   XmlAttr    XmlName TL.Text
- |   XmlComment TL.Text
  |   XmlText    TL.Text
+ |   XmlComment TL.Text
  deriving (Eq,Ord,Show)
 instance Pretty XmlNode
 
diff --git a/exe/cli/Main.hs b/exe/cli/Main.hs
index 81e5a78..7e2ff33 100644
--- a/exe/cli/Main.hs
+++ b/exe/cli/Main.hs
@@ -7,7 +7,7 @@
 {-# OPTIONS_GHC -fno-warn-orphans #-}
 module Main where
 
-import Control.Monad (forM_, when)
+import Control.Monad (Monad(..), forM_, when)
 import Control.Monad.IO.Class (MonadIO(..))
 import Data.Bool
 import Data.Default.Class (Default(..))
@@ -25,6 +25,7 @@ import GHC.Exts (IsList(..))
 import Options.Applicative as Opt
 import Prelude (error)
 import System.IO (IO, FilePath, hPrint, hPutStrLn, stderr, stdout)
+import Text.Show (Show(..))
 import qualified Data.ByteString as BS
 import qualified Data.ByteString.Lazy as BSL
 import qualified Data.Char as Char
@@ -79,50 +80,49 @@ main = do
 		 ]
 
 mainWithCommand :: Command -> IO ()
-mainWithCommand (CommandTCT ArgsTCT{..}) =
-	readFile input $ \_fp txt ->
-		case TCT.readTCT input txt of
-		 Left err -> error $ P.parseErrorPretty err
-		 Right tct -> do
-			when (trace_TCT trace) $ do
-				hPutStrLn stderr "### TCT ###"
-				hPutStrLn stderr $ Tree.prettyTrees tct
-			when (trace_XML trace) $ do
-				hPutStrLn stderr "### XML ###"
-				let xml = TCT.Write.XML.document tct
-				hPutStrLn stderr $ Tree.prettyTrees xml
-			case format of
-			 TctFormatPlain ->
-				TL.putStrLn $
-				TCT.Write.Plain.document tct
-			 TctFormatHTML5 ->
-				Blaze.renderMarkupToByteStringIO BS.putStr $
-				TCT.Write.HTML5.document tct
+mainWithCommand (CommandTCT ArgsTCT{..}) = do
+	txt <- TCT.readFile input
+	case TCT.readTCTWithoutIncludes input txt of
+	 Left err -> error $ show err
+	 Right tct -> do
+		when (trace_TCT trace) $ do
+			hPutStrLn stderr "### TCT ###"
+			hPutStrLn stderr $ Tree.prettyTrees tct
+		when (trace_XML trace) $ do
+			hPutStrLn stderr "### XML ###"
+			let xml = TCT.Write.XML.document tct
+			hPutStrLn stderr $ Tree.prettyTrees xml
+		case format of
+		 TctFormatPlain ->
+			TL.putStrLn $
+			TCT.Write.Plain.document tct
+		 TctFormatHTML5 ->
+			Blaze.renderMarkupToByteStringIO BS.putStr $
+			TCT.Write.HTML5.document tct
 mainWithCommand (CommandDTC ArgsDTC{..}) =
-	readFile input $ \_fp txt ->
-		case TCT.readTCT input txt of
+	TCT.readTCT input >>= \case
+	 Left err -> error $ show err
+	 Right tct -> do
+		when (trace_TCT trace) $ do
+			hPutStrLn stderr "### TCT ###"
+			hPutStrLn stderr $ Tree.prettyTrees tct
+		let xml = TCT.Write.XML.document tct
+		when (trace_XML trace) $ do
+			hPutStrLn stderr "### XML ###"
+			hPutStrLn stderr $ Tree.prettyTrees xml
+		case DTC.Read.TCT.readDTC xml of
 		 Left err -> error $ P.parseErrorPretty err
-		 Right tct -> do
-			when (trace_TCT trace) $ do
-				hPutStrLn stderr "### TCT ###"
-				hPutStrLn stderr $ Tree.prettyTrees tct
-			let xml = TCT.Write.XML.document tct
-			when (trace_XML trace) $ do
-				hPutStrLn stderr "### XML ###"
-				hPutStrLn stderr $ Tree.prettyTrees xml
-			case DTC.Read.TCT.readDTC xml of
-			 Left err -> error $ P.parseErrorPretty err
-			 Right dtc -> do
-				when (trace_DTC trace) $ do
-					hPutStrLn stderr "### DTC ###"
-					hPrint stderr dtc
-				case format of
-				 DtcFormatXML ->
-					Blaze.prettyMarkupIO Blaze.DTC.isInlinedElement BS.putStr $
-					DTC.Write.XML.document locale dtc
-				 DtcFormatHTML5 ->
-					Blaze.prettyMarkupIO Blaze.HTML5.isInlinedElement BS.putStr $
-					DTC.Write.HTML5.document locale dtc
+		 Right dtc -> do
+			when (trace_DTC trace) $ do
+				hPutStrLn stderr "### DTC ###"
+				hPrint stderr dtc
+			case format of
+			 DtcFormatXML ->
+				Blaze.prettyMarkupIO Blaze.DTC.isInlinedElement BS.putStr $
+				DTC.Write.XML.document locale dtc
+			 DtcFormatHTML5 ->
+				Blaze.prettyMarkupIO Blaze.HTML5.isInlinedElement BS.putStr $
+				DTC.Write.HTML5.document locale dtc
 mainWithCommand (CommandRNC ArgsRNC{}) =
 	forM_ DTC.schema $ \rule ->
 		Text.hPutStrLn stdout $ RNC.renderWriter rule
diff --git a/hdoc.cabal b/hdoc.cabal
index 13615f4..8218d57 100644
--- a/hdoc.cabal
+++ b/hdoc.cabal
@@ -98,13 +98,14 @@ Library
     , containers                        >= 0.5
     , data-default-class                >= 0.1
     , data-default-instances-containers >= 0.0
+    , directory                         >= 1.3
     , filepath                          >= 1.4
     , localization                      >= 1.0
     , megaparsec                        >= 6.2
-    , mono-traversable                  >= 1.0
+    -- , mono-traversable                  >= 1.0
     , strict                            >= 0.3
     , text                              >= 1.2
-    , text-format                       >= 0.3
+    -- , text-format                       >= 0.3
     , transformers                      >= 0.5
     , treemap                           >= 2.3
     , treeseq                           >= 1.0
diff --git a/test/Golden.hs b/test/Golden.hs
index aef6595..3af4faf 100644
--- a/test/Golden.hs
+++ b/test/Golden.hs
@@ -69,12 +69,9 @@ goldensIO = do
 
 -- * 'TCT' tests
 readTCT :: FilePath -> IO (Either String TCT.Roots)
-readTCT inputFile = do
-	txt <- BSL.readFile inputFile
-	return $
-		left show $
-		TCT.readTCT inputFile $
-		TL.decodeUtf8 txt
+readTCT inputFile =
+	left show <$>
+	TCT.readTCT inputFile
 
 goldensTCT :: [FilePath] -> TestTree
 goldensTCT inputFiles =
@@ -90,7 +87,7 @@ goldensTCT inputFiles =
 		 | inputFile <- inputFiles
 		 ]
 	 , testGroup "Plain"
-		 [ testGolden inputFile "" $
+		 [ testGolden inputFile ".plain" $
 			readTCT inputFile >>= \ast ->
 				return $
 					TL.encodeUtf8
diff --git a/test/Golden/TCT/HeaderColon/0001.tct b/test/Golden/TCT/HeaderColon/0001.tct
index 0facc06..561741a 100644
--- a/test/Golden/TCT/HeaderColon/0001.tct
+++ b/test/Golden/TCT/HeaderColon/0001.tct
@@ -1 +1 @@
-colon1:
+code:
diff --git a/test/Golden/TCT/HeaderColon/0001.tct.ast b/test/Golden/TCT/HeaderColon/0001.tct.ast
index 7fceb5e..8a6b33e 100644
--- a/test/Golden/TCT/HeaderColon/0001.tct.ast
+++ b/test/Golden/TCT/HeaderColon/0001.tct.ast
@@ -1,2 +1,2 @@
-[ Tree (Cell 1:1 1:8 (NodeHeader (HeaderColon "colon1" ""))) []
+[ Tree (Cell (NodeHeader (HeaderColon "code" "")) [test/Golden/TCT/HeaderColon/0001.tct#1:1-1:6]) []
 ] 
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0001.tct.dtc.en_US.html5 b/test/Golden/TCT/HeaderColon/0001.tct.dtc.en_US.html5
index e291fec..8c8a0c8 100644
--- a/test/Golden/TCT/HeaderColon/0001.tct.dtc.en_US.html5
+++ b/test/Golden/TCT/HeaderColon/0001.tct.dtc.en_US.html5
@@ -1,3 +1,36 @@
-1:1:
-unexpected <colon1> at 1:1-1:8
-expecting <about>, <artwork>, <b>, <br>, <code>, <del>, <eref>, <figure>, <i>, <index>, <iref>, <note>, <ol>, <para>, <q>, <quote>, <ref>, <references>, <rref>, <sc>, <section>, <sub>, <sup>, <toc>, <tof>, <u>, <ul>, comment, none, or text
+<!DOCTYPE HTML>
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type"
+          content="text/html; charset=UTF-8">
+    <meta name="generator"
+          content="https://hackage.haskell.org/package/hdoc">
+    <link rel="stylesheet"
+          type="text/css"
+          href="style/dtc-html5.css">
+  </head>
+  <body>
+    <div class="document-head">
+      <table>
+        <tbody>
+          <tr>
+            <td class="left">
+              <table class="document-headers">
+                <tbody>
+                </tbody>
+              </table>
+            </td>
+            <td class="right">
+              <table class="document-authors">
+                <tbody>
+                </tbody>
+              </table>
+            </td>
+          </tr>
+        </tbody>
+      </table>
+    </div>
+    <p class="para"><code></code></p>
+  </body>
+</html>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0001.tct.dtc.en_US.xml b/test/Golden/TCT/HeaderColon/0001.tct.dtc.en_US.xml
index e291fec..67a9743 100644
--- a/test/Golden/TCT/HeaderColon/0001.tct.dtc.en_US.xml
+++ b/test/Golden/TCT/HeaderColon/0001.tct.dtc.en_US.xml
@@ -1,3 +1,18 @@
-1:1:
-unexpected <colon1> at 1:1-1:8
-expecting <about>, <artwork>, <b>, <br>, <code>, <del>, <eref>, <figure>, <i>, <index>, <iref>, <note>, <ol>, <para>, <q>, <quote>, <ref>, <references>, <rref>, <sc>, <section>, <sub>, <sup>, <toc>, <tof>, <u>, <ul>, comment, none, or text
+
+<?xml-model type="application/relax-ng-compact-syntax"
+           href="./schema/dtc.rnc"?>
+
+<?xml-stylesheet type="text/xsl"
+                href="./xsl/document.html5.en.xsl"?>
+
+<?html5-stylesheet type="text/xsl"
+                  href="./xsl/document.html5.en.xsl"?>
+
+<?atom-stylesheet type="text/xsl"
+                 href="./xsl/document.atom.en.xsl"?>
+
+<document>
+  <about>
+  </about>
+  <p><code></code></p>
+</document>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0001.tct.html5 b/test/Golden/TCT/HeaderColon/0001.tct.html5
index 9d0b361..e334cca 100644
--- a/test/Golden/TCT/HeaderColon/0001.tct.html5
+++ b/test/Golden/TCT/HeaderColon/0001.tct.html5
@@ -1,2 +1,2 @@
 <!DOCTYPE HTML>
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="style/tct-html5.css"></head><body><a id="line-1"></a><span class="header header-colon header-name-colon1"><span class="header-name">colon1</span><span class="header-mark">:</span></span><span class="header-value"></span></body></html>
\ No newline at end of file
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="style/tct-html5.css"></head><body><a id="line-1"></a><span class="header header-colon header-name-code"><span class="header-name">code</span><span class="header-mark">:</span></span><span class="header-value"></span></body></html>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0001.tct.plain b/test/Golden/TCT/HeaderColon/0001.tct.plain
new file mode 100644
index 0000000..561741a
--- /dev/null
+++ b/test/Golden/TCT/HeaderColon/0001.tct.plain
@@ -0,0 +1 @@
+code:
diff --git a/test/Golden/TCT/HeaderColon/0001.tct.xml b/test/Golden/TCT/HeaderColon/0001.tct.xml
index 9c500ca..97fdea5 100644
--- a/test/Golden/TCT/HeaderColon/0001.tct.xml
+++ b/test/Golden/TCT/HeaderColon/0001.tct.xml
@@ -1,2 +1,2 @@
-Cell 1:1 1:8 (XmlElem colon1)
+Cell (XmlElem code) [test/Golden/TCT/HeaderColon/0001.tct#1:1-1:6]
 
diff --git a/test/Golden/TCT/HeaderColon/0002.tct b/test/Golden/TCT/HeaderColon/0002.tct
index 2477f10..2b706de 100644
--- a/test/Golden/TCT/HeaderColon/0002.tct
+++ b/test/Golden/TCT/HeaderColon/0002.tct
@@ -1 +1 @@
-colon1: 
+code: 
diff --git a/test/Golden/TCT/HeaderColon/0002.tct.ast b/test/Golden/TCT/HeaderColon/0002.tct.ast
index 50195a5..ee85a5a 100644
--- a/test/Golden/TCT/HeaderColon/0002.tct.ast
+++ b/test/Golden/TCT/HeaderColon/0002.tct.ast
@@ -1,4 +1,4 @@
-[ Tree (Cell 1:1 1:9 (NodeHeader (HeaderColon "colon1" ""))) 
-    [ Tree (Cell 1:9 1:9 (NodeText "")) []
+[ Tree (Cell (NodeHeader (HeaderColon "code" "")) [test/Golden/TCT/HeaderColon/0002.tct#1:1-1:7]) 
+    [ Tree (Cell (NodeText "") [test/Golden/TCT/HeaderColon/0002.tct#1:7-1:7]) []
     ] 
 ] 
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0002.tct.dtc.en_US.html5 b/test/Golden/TCT/HeaderColon/0002.tct.dtc.en_US.html5
index 4948875..8c8a0c8 100644
--- a/test/Golden/TCT/HeaderColon/0002.tct.dtc.en_US.html5
+++ b/test/Golden/TCT/HeaderColon/0002.tct.dtc.en_US.html5
@@ -1,3 +1,36 @@
-1:1:
-unexpected <colon1> at 1:1-1:9
-expecting <about>, <artwork>, <b>, <br>, <code>, <del>, <eref>, <figure>, <i>, <index>, <iref>, <note>, <ol>, <para>, <q>, <quote>, <ref>, <references>, <rref>, <sc>, <section>, <sub>, <sup>, <toc>, <tof>, <u>, <ul>, comment, none, or text
+<!DOCTYPE HTML>
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type"
+          content="text/html; charset=UTF-8">
+    <meta name="generator"
+          content="https://hackage.haskell.org/package/hdoc">
+    <link rel="stylesheet"
+          type="text/css"
+          href="style/dtc-html5.css">
+  </head>
+  <body>
+    <div class="document-head">
+      <table>
+        <tbody>
+          <tr>
+            <td class="left">
+              <table class="document-headers">
+                <tbody>
+                </tbody>
+              </table>
+            </td>
+            <td class="right">
+              <table class="document-authors">
+                <tbody>
+                </tbody>
+              </table>
+            </td>
+          </tr>
+        </tbody>
+      </table>
+    </div>
+    <p class="para"><code></code></p>
+  </body>
+</html>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0002.tct.dtc.en_US.xml b/test/Golden/TCT/HeaderColon/0002.tct.dtc.en_US.xml
index 4948875..67a9743 100644
--- a/test/Golden/TCT/HeaderColon/0002.tct.dtc.en_US.xml
+++ b/test/Golden/TCT/HeaderColon/0002.tct.dtc.en_US.xml
@@ -1,3 +1,18 @@
-1:1:
-unexpected <colon1> at 1:1-1:9
-expecting <about>, <artwork>, <b>, <br>, <code>, <del>, <eref>, <figure>, <i>, <index>, <iref>, <note>, <ol>, <para>, <q>, <quote>, <ref>, <references>, <rref>, <sc>, <section>, <sub>, <sup>, <toc>, <tof>, <u>, <ul>, comment, none, or text
+
+<?xml-model type="application/relax-ng-compact-syntax"
+           href="./schema/dtc.rnc"?>
+
+<?xml-stylesheet type="text/xsl"
+                href="./xsl/document.html5.en.xsl"?>
+
+<?html5-stylesheet type="text/xsl"
+                  href="./xsl/document.html5.en.xsl"?>
+
+<?atom-stylesheet type="text/xsl"
+                 href="./xsl/document.atom.en.xsl"?>
+
+<document>
+  <about>
+  </about>
+  <p><code></code></p>
+</document>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0002.tct.html5 b/test/Golden/TCT/HeaderColon/0002.tct.html5
index 5b58502..a6eac33 100644
--- a/test/Golden/TCT/HeaderColon/0002.tct.html5
+++ b/test/Golden/TCT/HeaderColon/0002.tct.html5
@@ -1,2 +1,2 @@
 <!DOCTYPE HTML>
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="style/tct-html5.css"></head><body><a id="line-1"></a><span class="header header-colon header-name-colon1"><span class="header-name">colon1</span><span class="header-mark">:</span></span><span class="header-value"> </span></body></html>
\ No newline at end of file
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="style/tct-html5.css"></head><body><a id="line-1"></a><span class="header header-colon header-name-code"><span class="header-name">code</span><span class="header-mark">:</span></span><span class="header-value"> </span></body></html>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0002.tct.plain b/test/Golden/TCT/HeaderColon/0002.tct.plain
new file mode 100644
index 0000000..2b706de
--- /dev/null
+++ b/test/Golden/TCT/HeaderColon/0002.tct.plain
@@ -0,0 +1 @@
+code: 
diff --git a/test/Golden/TCT/HeaderColon/0002.tct.xml b/test/Golden/TCT/HeaderColon/0002.tct.xml
index 6a0b792..0860369 100644
--- a/test/Golden/TCT/HeaderColon/0002.tct.xml
+++ b/test/Golden/TCT/HeaderColon/0002.tct.xml
@@ -1,4 +1,4 @@
-Cell 1:1 1:9 (XmlElem colon1)
+Cell (XmlElem code) [test/Golden/TCT/HeaderColon/0002.tct#1:1-1:7]
 |
-`- Cell 1:9 1:9 (XmlText "")
+`- Cell (XmlText "") [test/Golden/TCT/HeaderColon/0002.tct#1:7-1:7]
 
diff --git a/test/Golden/TCT/HeaderColon/0003.tct b/test/Golden/TCT/HeaderColon/0003.tct
index 2271c76..0e1ff54 100644
--- a/test/Golden/TCT/HeaderColon/0003.tct
+++ b/test/Golden/TCT/HeaderColon/0003.tct
@@ -1 +1 @@
-colon1 :
+code :
diff --git a/test/Golden/TCT/HeaderColon/0003.tct.ast b/test/Golden/TCT/HeaderColon/0003.tct.ast
index f092ff7..de43657 100644
--- a/test/Golden/TCT/HeaderColon/0003.tct.ast
+++ b/test/Golden/TCT/HeaderColon/0003.tct.ast
@@ -1,2 +1,2 @@
-[ Tree (Cell 1:1 1:9 (NodeHeader (HeaderColon "colon1" " "))) []
+[ Tree (Cell (NodeHeader (HeaderColon "code" " ")) [test/Golden/TCT/HeaderColon/0003.tct#1:1-1:7]) []
 ] 
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0003.tct.dtc.en_US.html5 b/test/Golden/TCT/HeaderColon/0003.tct.dtc.en_US.html5
index 4948875..8c8a0c8 100644
--- a/test/Golden/TCT/HeaderColon/0003.tct.dtc.en_US.html5
+++ b/test/Golden/TCT/HeaderColon/0003.tct.dtc.en_US.html5
@@ -1,3 +1,36 @@
-1:1:
-unexpected <colon1> at 1:1-1:9
-expecting <about>, <artwork>, <b>, <br>, <code>, <del>, <eref>, <figure>, <i>, <index>, <iref>, <note>, <ol>, <para>, <q>, <quote>, <ref>, <references>, <rref>, <sc>, <section>, <sub>, <sup>, <toc>, <tof>, <u>, <ul>, comment, none, or text
+<!DOCTYPE HTML>
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type"
+          content="text/html; charset=UTF-8">
+    <meta name="generator"
+          content="https://hackage.haskell.org/package/hdoc">
+    <link rel="stylesheet"
+          type="text/css"
+          href="style/dtc-html5.css">
+  </head>
+  <body>
+    <div class="document-head">
+      <table>
+        <tbody>
+          <tr>
+            <td class="left">
+              <table class="document-headers">
+                <tbody>
+                </tbody>
+              </table>
+            </td>
+            <td class="right">
+              <table class="document-authors">
+                <tbody>
+                </tbody>
+              </table>
+            </td>
+          </tr>
+        </tbody>
+      </table>
+    </div>
+    <p class="para"><code></code></p>
+  </body>
+</html>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0003.tct.dtc.en_US.xml b/test/Golden/TCT/HeaderColon/0003.tct.dtc.en_US.xml
index 4948875..67a9743 100644
--- a/test/Golden/TCT/HeaderColon/0003.tct.dtc.en_US.xml
+++ b/test/Golden/TCT/HeaderColon/0003.tct.dtc.en_US.xml
@@ -1,3 +1,18 @@
-1:1:
-unexpected <colon1> at 1:1-1:9
-expecting <about>, <artwork>, <b>, <br>, <code>, <del>, <eref>, <figure>, <i>, <index>, <iref>, <note>, <ol>, <para>, <q>, <quote>, <ref>, <references>, <rref>, <sc>, <section>, <sub>, <sup>, <toc>, <tof>, <u>, <ul>, comment, none, or text
+
+<?xml-model type="application/relax-ng-compact-syntax"
+           href="./schema/dtc.rnc"?>
+
+<?xml-stylesheet type="text/xsl"
+                href="./xsl/document.html5.en.xsl"?>
+
+<?html5-stylesheet type="text/xsl"
+                  href="./xsl/document.html5.en.xsl"?>
+
+<?atom-stylesheet type="text/xsl"
+                 href="./xsl/document.atom.en.xsl"?>
+
+<document>
+  <about>
+  </about>
+  <p><code></code></p>
+</document>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0003.tct.html5 b/test/Golden/TCT/HeaderColon/0003.tct.html5
index f81e0dc..8f99c7c 100644
--- a/test/Golden/TCT/HeaderColon/0003.tct.html5
+++ b/test/Golden/TCT/HeaderColon/0003.tct.html5
@@ -1,2 +1,2 @@
 <!DOCTYPE HTML>
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="style/tct-html5.css"></head><body><a id="line-1"></a><span class="header header-colon header-name-colon1"><span class="header-name">colon1</span> <span class="header-mark">:</span></span><span class="header-value"></span></body></html>
\ No newline at end of file
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="style/tct-html5.css"></head><body><a id="line-1"></a><span class="header header-colon header-name-code"><span class="header-name">code</span> <span class="header-mark">:</span></span><span class="header-value"></span></body></html>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0003.tct.plain b/test/Golden/TCT/HeaderColon/0003.tct.plain
new file mode 100644
index 0000000..0e1ff54
--- /dev/null
+++ b/test/Golden/TCT/HeaderColon/0003.tct.plain
@@ -0,0 +1 @@
+code :
diff --git a/test/Golden/TCT/HeaderColon/0003.tct.xml b/test/Golden/TCT/HeaderColon/0003.tct.xml
index 6c077a6..fed72c7 100644
--- a/test/Golden/TCT/HeaderColon/0003.tct.xml
+++ b/test/Golden/TCT/HeaderColon/0003.tct.xml
@@ -1,2 +1,2 @@
-Cell 1:1 1:9 (XmlElem colon1)
+Cell (XmlElem code) [test/Golden/TCT/HeaderColon/0003.tct#1:1-1:7]
 
diff --git a/test/Golden/TCT/HeaderColon/0004.tct b/test/Golden/TCT/HeaderColon/0004.tct
index 57370ef..eac658f 100644
--- a/test/Golden/TCT/HeaderColon/0004.tct
+++ b/test/Golden/TCT/HeaderColon/0004.tct
@@ -1,2 +1,2 @@
-colon1: text0
+code: text0
 text1
diff --git a/test/Golden/TCT/HeaderColon/0004.tct.ast b/test/Golden/TCT/HeaderColon/0004.tct.ast
index 94c262c..077e653 100644
--- a/test/Golden/TCT/HeaderColon/0004.tct.ast
+++ b/test/Golden/TCT/HeaderColon/0004.tct.ast
@@ -1,9 +1,9 @@
-[ Tree (Cell 1:1 1:14 (NodeHeader (HeaderColon "colon1" ""))) 
-    [ Tree (Cell 1:9 1:14 NodePara) 
-        [ Tree (Cell 1:9 1:14 (NodeToken (TokenText "text0"))) []
+[ Tree (Cell (NodeHeader (HeaderColon "code" "")) [test/Golden/TCT/HeaderColon/0004.tct#1:1-1:12]) 
+    [ Tree (Cell NodePara [test/Golden/TCT/HeaderColon/0004.tct#1:7-1:12]) 
+        [ Tree (Cell (NodeToken (TokenText "text0")) [test/Golden/TCT/HeaderColon/0004.tct#1:7-1:12]) []
         ] 
     ] 
-, Tree (Cell 2:1 2:6 NodePara) 
-    [ Tree (Cell 2:1 2:6 (NodeToken (TokenText "text1"))) []
+, Tree (Cell NodePara [test/Golden/TCT/HeaderColon/0004.tct#2:1-2:6]) 
+    [ Tree (Cell (NodeToken (TokenText "text1")) [test/Golden/TCT/HeaderColon/0004.tct#2:1-2:6]) []
     ] 
 ] 
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0004.tct.dtc.en_US.html5 b/test/Golden/TCT/HeaderColon/0004.tct.dtc.en_US.html5
index 8bee18a..3e514bb 100644
--- a/test/Golden/TCT/HeaderColon/0004.tct.dtc.en_US.html5
+++ b/test/Golden/TCT/HeaderColon/0004.tct.dtc.en_US.html5
@@ -1,3 +1,40 @@
-1:1:
-unexpected <colon1> at 1:1-1:14
-expecting <about>, <artwork>, <b>, <br>, <code>, <del>, <eref>, <figure>, <i>, <index>, <iref>, <note>, <ol>, <para>, <q>, <quote>, <ref>, <references>, <rref>, <sc>, <section>, <sub>, <sup>, <toc>, <tof>, <u>, <ul>, comment, none, or text
+<!DOCTYPE HTML>
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type"
+          content="text/html; charset=UTF-8">
+    <meta name="generator"
+          content="https://hackage.haskell.org/package/hdoc">
+    <link rel="stylesheet"
+          type="text/css"
+          href="style/dtc-html5.css">
+  </head>
+  <body>
+    <div class="document-head">
+      <table>
+        <tbody>
+          <tr>
+            <td class="left">
+              <table class="document-headers">
+                <tbody>
+                </tbody>
+              </table>
+            </td>
+            <td class="right">
+              <table class="document-authors">
+                <tbody>
+                </tbody>
+              </table>
+            </td>
+          </tr>
+        </tbody>
+      </table>
+    </div>
+    <p class="para"><code>text0</code></p>
+    <div id="para1"
+         class="para">
+      <p>text1</p>
+    </div>
+  </body>
+</html>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0004.tct.dtc.en_US.xml b/test/Golden/TCT/HeaderColon/0004.tct.dtc.en_US.xml
index 8bee18a..2957fd1 100644
--- a/test/Golden/TCT/HeaderColon/0004.tct.dtc.en_US.xml
+++ b/test/Golden/TCT/HeaderColon/0004.tct.dtc.en_US.xml
@@ -1,3 +1,21 @@
-1:1:
-unexpected <colon1> at 1:1-1:14
-expecting <about>, <artwork>, <b>, <br>, <code>, <del>, <eref>, <figure>, <i>, <index>, <iref>, <note>, <ol>, <para>, <q>, <quote>, <ref>, <references>, <rref>, <sc>, <section>, <sub>, <sup>, <toc>, <tof>, <u>, <ul>, comment, none, or text
+
+<?xml-model type="application/relax-ng-compact-syntax"
+           href="./schema/dtc.rnc"?>
+
+<?xml-stylesheet type="text/xsl"
+                href="./xsl/document.html5.en.xsl"?>
+
+<?html5-stylesheet type="text/xsl"
+                  href="./xsl/document.html5.en.xsl"?>
+
+<?atom-stylesheet type="text/xsl"
+                 href="./xsl/document.atom.en.xsl"?>
+
+<document>
+  <about>
+  </about>
+  <p><code>text0</code></p>
+  <para>
+    <p>text1</p>
+  </para>
+</document>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0004.tct.html5 b/test/Golden/TCT/HeaderColon/0004.tct.html5
index d7ff018..327e825 100644
--- a/test/Golden/TCT/HeaderColon/0004.tct.html5
+++ b/test/Golden/TCT/HeaderColon/0004.tct.html5
@@ -1,3 +1,3 @@
 <!DOCTYPE HTML>
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="style/tct-html5.css"></head><body><a id="line-1"></a><span class="header header-colon header-name-colon1"><span class="header-name">colon1</span><span class="header-mark">:</span></span><span class="header-value"> text0</span>
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="style/tct-html5.css"></head><body><a id="line-1"></a><span class="header header-colon header-name-code"><span class="header-name">code</span><span class="header-mark">:</span></span><span class="header-value"> text0</span>
 <a id="line-2"></a>text1</body></html>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0004.tct.plain b/test/Golden/TCT/HeaderColon/0004.tct.plain
new file mode 100644
index 0000000..eac658f
--- /dev/null
+++ b/test/Golden/TCT/HeaderColon/0004.tct.plain
@@ -0,0 +1,2 @@
+code: text0
+text1
diff --git a/test/Golden/TCT/HeaderColon/0004.tct.xml b/test/Golden/TCT/HeaderColon/0004.tct.xml
index 92a4893..d99f7fe 100644
--- a/test/Golden/TCT/HeaderColon/0004.tct.xml
+++ b/test/Golden/TCT/HeaderColon/0004.tct.xml
@@ -1,8 +1,8 @@
-Cell 1:1 1:14 (XmlElem colon1)
+Cell (XmlElem code) [test/Golden/TCT/HeaderColon/0004.tct#1:1-1:12]
 |
-`- Cell 1:9 1:14 (XmlText "text0")
+`- Cell (XmlText "text0") [test/Golden/TCT/HeaderColon/0004.tct#1:7-1:12]
 
-Cell 2:1 2:6 (XmlElem para)
+Cell (XmlElem para) [test/Golden/TCT/HeaderColon/0004.tct#2:1-2:6]
 |
-`- Cell 2:1 2:6 (XmlText "text1")
+`- Cell (XmlText "text1") [test/Golden/TCT/HeaderColon/0004.tct#2:1-2:6]
 
diff --git a/test/Golden/TCT/HeaderColon/0005.tct b/test/Golden/TCT/HeaderColon/0005.tct
index 4c90a18..b11ea5c 100644
--- a/test/Golden/TCT/HeaderColon/0005.tct
+++ b/test/Golden/TCT/HeaderColon/0005.tct
@@ -1,2 +1,2 @@
-colon1: text0
+note: text0
  text1
diff --git a/test/Golden/TCT/HeaderColon/0005.tct.ast b/test/Golden/TCT/HeaderColon/0005.tct.ast
index 116e7e7..5e3b121 100644
--- a/test/Golden/TCT/HeaderColon/0005.tct.ast
+++ b/test/Golden/TCT/HeaderColon/0005.tct.ast
@@ -1,9 +1,9 @@
-[ Tree (Cell 1:1 2:7 (NodeHeader (HeaderColon "colon1" ""))) 
-    [ Tree (Cell 1:9 1:14 NodePara) 
-        [ Tree (Cell 1:9 1:14 (NodeToken (TokenText "text0"))) []
+[ Tree (Cell (NodeHeader (HeaderColon "note" "")) [test/Golden/TCT/HeaderColon/0005.tct#1:1-2:7]) 
+    [ Tree (Cell NodePara [test/Golden/TCT/HeaderColon/0005.tct#1:7-1:12]) 
+        [ Tree (Cell (NodeToken (TokenText "text0")) [test/Golden/TCT/HeaderColon/0005.tct#1:7-1:12]) []
         ] 
-    , Tree (Cell 2:2 2:7 NodePara) 
-        [ Tree (Cell 2:2 2:7 (NodeToken (TokenText "text1"))) []
+    , Tree (Cell NodePara [test/Golden/TCT/HeaderColon/0005.tct#2:2-2:7]) 
+        [ Tree (Cell (NodeToken (TokenText "text1")) [test/Golden/TCT/HeaderColon/0005.tct#2:2-2:7]) []
         ] 
     ] 
 ] 
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0005.tct.dtc.en_US.html5 b/test/Golden/TCT/HeaderColon/0005.tct.dtc.en_US.html5
index bff2b15..05c3244 100644
--- a/test/Golden/TCT/HeaderColon/0005.tct.dtc.en_US.html5
+++ b/test/Golden/TCT/HeaderColon/0005.tct.dtc.en_US.html5
@@ -1,3 +1,38 @@
-1:1:
-unexpected <colon1> at 1:1-2:7
-expecting <about>, <artwork>, <b>, <br>, <code>, <del>, <eref>, <figure>, <i>, <index>, <iref>, <note>, <ol>, <para>, <q>, <quote>, <ref>, <references>, <rref>, <sc>, <section>, <sub>, <sup>, <toc>, <tof>, <u>, <ul>, comment, none, or text
+<!DOCTYPE HTML>
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type"
+          content="text/html; charset=UTF-8">
+    <meta name="generator"
+          content="https://hackage.haskell.org/package/hdoc">
+    <link rel="stylesheet"
+          type="text/css"
+          href="style/dtc-html5.css">
+  </head>
+  <body>
+    <div class="document-head">
+      <table>
+        <tbody>
+          <tr>
+            <td class="left">
+              <table class="document-headers">
+                <tbody>
+                </tbody>
+              </table>
+            </td>
+            <td class="right">
+              <table class="document-authors">
+                <tbody>
+                </tbody>
+              </table>
+            </td>
+          </tr>
+        </tbody>
+      </table>
+    </div>
+    <p class="para">
+      <sup class="note-numbers"><a class="note-ref" id="note-ref.1" href="#note.1">1</a></sup> 
+    </p>
+  </body>
+</html>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0005.tct.dtc.en_US.xml b/test/Golden/TCT/HeaderColon/0005.tct.dtc.en_US.xml
index bff2b15..247a4a2 100644
--- a/test/Golden/TCT/HeaderColon/0005.tct.dtc.en_US.xml
+++ b/test/Golden/TCT/HeaderColon/0005.tct.dtc.en_US.xml
@@ -1,3 +1,22 @@
-1:1:
-unexpected <colon1> at 1:1-2:7
-expecting <about>, <artwork>, <b>, <br>, <code>, <del>, <eref>, <figure>, <i>, <index>, <iref>, <note>, <ol>, <para>, <q>, <quote>, <ref>, <references>, <rref>, <sc>, <section>, <sub>, <sup>, <toc>, <tof>, <u>, <ul>, comment, none, or text
+
+<?xml-model type="application/relax-ng-compact-syntax"
+           href="./schema/dtc.rnc"?>
+
+<?xml-stylesheet type="text/xsl"
+                href="./xsl/document.html5.en.xsl"?>
+
+<?html5-stylesheet type="text/xsl"
+                  href="./xsl/document.html5.en.xsl"?>
+
+<?atom-stylesheet type="text/xsl"
+                 href="./xsl/document.atom.en.xsl"?>
+
+<document>
+  <about>
+  </about>
+  <p><note><para>
+    <p>text0</p>
+    </para><para>
+    <p>text1</p>
+    </para></note></p>
+</document>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0005.tct.html5 b/test/Golden/TCT/HeaderColon/0005.tct.html5
index 6794d60..a51dc0e 100644
--- a/test/Golden/TCT/HeaderColon/0005.tct.html5
+++ b/test/Golden/TCT/HeaderColon/0005.tct.html5
@@ -1,3 +1,3 @@
 <!DOCTYPE HTML>
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="style/tct-html5.css"></head><body><a id="line-1"></a><span class="header header-colon header-name-colon1"><span class="header-name">colon1</span><span class="header-mark">:</span></span><span class="header-value"> text0
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="style/tct-html5.css"></head><body><a id="line-1"></a><span class="header header-colon header-name-note"><span class="header-name">note</span><span class="header-mark">:</span></span><span class="header-value"> text0
 <a id="line-2"></a> text1</span></body></html>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0005.tct.plain b/test/Golden/TCT/HeaderColon/0005.tct.plain
new file mode 100644
index 0000000..b11ea5c
--- /dev/null
+++ b/test/Golden/TCT/HeaderColon/0005.tct.plain
@@ -0,0 +1,2 @@
+note: text0
+ text1
diff --git a/test/Golden/TCT/HeaderColon/0005.tct.xml b/test/Golden/TCT/HeaderColon/0005.tct.xml
index aef12e3..7a08208 100644
--- a/test/Golden/TCT/HeaderColon/0005.tct.xml
+++ b/test/Golden/TCT/HeaderColon/0005.tct.xml
@@ -1,6 +1,10 @@
-Cell 1:1 2:7 (XmlElem colon1)
+Cell (XmlElem note) [test/Golden/TCT/HeaderColon/0005.tct#1:1-2:7]
 |
-+- Cell 1:9 1:14 (XmlText "text0")
++- Cell (XmlElem para) [test/Golden/TCT/HeaderColon/0005.tct#1:7-1:12]
+|  |
+|  `- Cell (XmlText "text0") [test/Golden/TCT/HeaderColon/0005.tct#1:7-1:12]
 |
-`- Cell 2:2 2:7 (XmlText "text1")
+`- Cell (XmlElem para) [test/Golden/TCT/HeaderColon/0005.tct#2:2-2:7]
+   |
+   `- Cell (XmlText "text1") [test/Golden/TCT/HeaderColon/0005.tct#2:2-2:7]
 
diff --git a/test/Golden/TCT/HeaderColon/0006.tct b/test/Golden/TCT/HeaderColon/0006.tct
index 8dd4bc1..65cf0e5 100644
--- a/test/Golden/TCT/HeaderColon/0006.tct
+++ b/test/Golden/TCT/HeaderColon/0006.tct
@@ -1,2 +1,2 @@
-colon1: text0
-      text1
+code: text0
+     text1
diff --git a/test/Golden/TCT/HeaderColon/0006.tct.ast b/test/Golden/TCT/HeaderColon/0006.tct.ast
index 356e083..a219a4b 100644
--- a/test/Golden/TCT/HeaderColon/0006.tct.ast
+++ b/test/Golden/TCT/HeaderColon/0006.tct.ast
@@ -1,9 +1,6 @@
-[ Tree (Cell 1:1 2:12 (NodeHeader (HeaderColon "colon1" ""))) 
-    [ Tree (Cell 1:9 1:14 NodePara) 
-        [ Tree (Cell 1:9 1:14 (NodeToken (TokenText "text0"))) []
-        ] 
-    , Tree (Cell 2:7 2:12 NodePara) 
-        [ Tree (Cell 2:7 2:12 (NodeToken (TokenText "text1"))) []
+[ Tree (Cell (NodeHeader (HeaderColon "code" "")) [test/Golden/TCT/HeaderColon/0006.tct#1:1-2:11]) 
+    [ Tree (Cell NodePara [test/Golden/TCT/HeaderColon/0006.tct#1:6-2:11]) 
+        [ Tree (Cell (NodeToken (TokenText " text0\ntext1")) [test/Golden/TCT/HeaderColon/0006.tct#1:6-2:11]) []
         ] 
     ] 
 ] 
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0006.tct.dtc.en_US.html5 b/test/Golden/TCT/HeaderColon/0006.tct.dtc.en_US.html5
index 07c0a5c..82cecac 100644
--- a/test/Golden/TCT/HeaderColon/0006.tct.dtc.en_US.html5
+++ b/test/Golden/TCT/HeaderColon/0006.tct.dtc.en_US.html5
@@ -1,3 +1,37 @@
-1:1:
-unexpected <colon1> at 1:1-2:12
-expecting <about>, <artwork>, <b>, <br>, <code>, <del>, <eref>, <figure>, <i>, <index>, <iref>, <note>, <ol>, <para>, <q>, <quote>, <ref>, <references>, <rref>, <sc>, <section>, <sub>, <sup>, <toc>, <tof>, <u>, <ul>, comment, none, or text
+<!DOCTYPE HTML>
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type"
+          content="text/html; charset=UTF-8">
+    <meta name="generator"
+          content="https://hackage.haskell.org/package/hdoc">
+    <link rel="stylesheet"
+          type="text/css"
+          href="style/dtc-html5.css">
+  </head>
+  <body>
+    <div class="document-head">
+      <table>
+        <tbody>
+          <tr>
+            <td class="left">
+              <table class="document-headers">
+                <tbody>
+                </tbody>
+              </table>
+            </td>
+            <td class="right">
+              <table class="document-authors">
+                <tbody>
+                </tbody>
+              </table>
+            </td>
+          </tr>
+        </tbody>
+      </table>
+    </div>
+    <p class="para"><code> text0
+text1</code></p>
+  </body>
+</html>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0006.tct.dtc.en_US.xml b/test/Golden/TCT/HeaderColon/0006.tct.dtc.en_US.xml
index 07c0a5c..d8d66a7 100644
--- a/test/Golden/TCT/HeaderColon/0006.tct.dtc.en_US.xml
+++ b/test/Golden/TCT/HeaderColon/0006.tct.dtc.en_US.xml
@@ -1,3 +1,19 @@
-1:1:
-unexpected <colon1> at 1:1-2:12
-expecting <about>, <artwork>, <b>, <br>, <code>, <del>, <eref>, <figure>, <i>, <index>, <iref>, <note>, <ol>, <para>, <q>, <quote>, <ref>, <references>, <rref>, <sc>, <section>, <sub>, <sup>, <toc>, <tof>, <u>, <ul>, comment, none, or text
+
+<?xml-model type="application/relax-ng-compact-syntax"
+           href="./schema/dtc.rnc"?>
+
+<?xml-stylesheet type="text/xsl"
+                href="./xsl/document.html5.en.xsl"?>
+
+<?html5-stylesheet type="text/xsl"
+                  href="./xsl/document.html5.en.xsl"?>
+
+<?atom-stylesheet type="text/xsl"
+                 href="./xsl/document.atom.en.xsl"?>
+
+<document>
+  <about>
+  </about>
+  <p><code> text0
+text1</code></p>
+</document>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0006.tct.html5 b/test/Golden/TCT/HeaderColon/0006.tct.html5
index b9d0037..5be2ce3 100644
--- a/test/Golden/TCT/HeaderColon/0006.tct.html5
+++ b/test/Golden/TCT/HeaderColon/0006.tct.html5
@@ -1,3 +1,3 @@
 <!DOCTYPE HTML>
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="style/tct-html5.css"></head><body><a id="line-1"></a><span class="header header-colon header-name-colon1"><span class="header-name">colon1</span><span class="header-mark">:</span></span><span class="header-value"> text0
-<a id="line-2"></a>      text1</span></body></html>
\ No newline at end of file
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="style/tct-html5.css"></head><body><a id="line-1"></a><span class="header header-colon header-name-code"><span class="header-name">code</span><span class="header-mark">:</span></span><span class="header-value"> text0
+<a id="line-2"></a>     text1</span></body></html>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0006.tct.plain b/test/Golden/TCT/HeaderColon/0006.tct.plain
new file mode 100644
index 0000000..65cf0e5
--- /dev/null
+++ b/test/Golden/TCT/HeaderColon/0006.tct.plain
@@ -0,0 +1,2 @@
+code: text0
+     text1
diff --git a/test/Golden/TCT/HeaderColon/0006.tct.xml b/test/Golden/TCT/HeaderColon/0006.tct.xml
index 838c160..5565921 100644
--- a/test/Golden/TCT/HeaderColon/0006.tct.xml
+++ b/test/Golden/TCT/HeaderColon/0006.tct.xml
@@ -1,6 +1,4 @@
-Cell 1:1 2:12 (XmlElem colon1)
+Cell (XmlElem code) [test/Golden/TCT/HeaderColon/0006.tct#1:1-2:11]
 |
-+- Cell 1:9 1:14 (XmlText "text0")
-|
-`- Cell 2:7 2:12 (XmlText "text1")
+`- Cell (XmlText " text0\ntext1") [test/Golden/TCT/HeaderColon/0006.tct#1:6-2:11]
 
diff --git a/test/Golden/TCT/HeaderColon/0007.tct b/test/Golden/TCT/HeaderColon/0007.tct
index 147a910..963b970 100644
--- a/test/Golden/TCT/HeaderColon/0007.tct
+++ b/test/Golden/TCT/HeaderColon/0007.tct
@@ -1,2 +1,2 @@
-colon1: text0
-       text1
+note: text0
+      text1
diff --git a/test/Golden/TCT/HeaderColon/0007.tct.ast b/test/Golden/TCT/HeaderColon/0007.tct.ast
index 6fad764..2dc7e49 100644
--- a/test/Golden/TCT/HeaderColon/0007.tct.ast
+++ b/test/Golden/TCT/HeaderColon/0007.tct.ast
@@ -1,6 +1,6 @@
-[ Tree (Cell 1:1 2:13 (NodeHeader (HeaderColon "colon1" ""))) 
-    [ Tree (Cell 1:8 2:13 NodePara) 
-        [ Tree (Cell 1:8 2:13 (NodeToken (TokenText " text0\ntext1"))) []
+[ Tree (Cell (NodeHeader (HeaderColon "note" "")) [test/Golden/TCT/HeaderColon/0007.tct#1:1-2:12]) 
+    [ Tree (Cell NodePara [test/Golden/TCT/HeaderColon/0007.tct#1:7-2:12]) 
+        [ Tree (Cell (NodeToken (TokenText "text0\ntext1")) [test/Golden/TCT/HeaderColon/0007.tct#1:7-2:12]) []
         ] 
     ] 
 ] 
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0007.tct.dtc.en_US.html5 b/test/Golden/TCT/HeaderColon/0007.tct.dtc.en_US.html5
index be96d24..05c3244 100644
--- a/test/Golden/TCT/HeaderColon/0007.tct.dtc.en_US.html5
+++ b/test/Golden/TCT/HeaderColon/0007.tct.dtc.en_US.html5
@@ -1,3 +1,38 @@
-1:1:
-unexpected <colon1> at 1:1-2:13
-expecting <about>, <artwork>, <b>, <br>, <code>, <del>, <eref>, <figure>, <i>, <index>, <iref>, <note>, <ol>, <para>, <q>, <quote>, <ref>, <references>, <rref>, <sc>, <section>, <sub>, <sup>, <toc>, <tof>, <u>, <ul>, comment, none, or text
+<!DOCTYPE HTML>
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type"
+          content="text/html; charset=UTF-8">
+    <meta name="generator"
+          content="https://hackage.haskell.org/package/hdoc">
+    <link rel="stylesheet"
+          type="text/css"
+          href="style/dtc-html5.css">
+  </head>
+  <body>
+    <div class="document-head">
+      <table>
+        <tbody>
+          <tr>
+            <td class="left">
+              <table class="document-headers">
+                <tbody>
+                </tbody>
+              </table>
+            </td>
+            <td class="right">
+              <table class="document-authors">
+                <tbody>
+                </tbody>
+              </table>
+            </td>
+          </tr>
+        </tbody>
+      </table>
+    </div>
+    <p class="para">
+      <sup class="note-numbers"><a class="note-ref" id="note-ref.1" href="#note.1">1</a></sup> 
+    </p>
+  </body>
+</html>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0007.tct.dtc.en_US.xml b/test/Golden/TCT/HeaderColon/0007.tct.dtc.en_US.xml
index be96d24..ef9f677 100644
--- a/test/Golden/TCT/HeaderColon/0007.tct.dtc.en_US.xml
+++ b/test/Golden/TCT/HeaderColon/0007.tct.dtc.en_US.xml
@@ -1,3 +1,21 @@
-1:1:
-unexpected <colon1> at 1:1-2:13
-expecting <about>, <artwork>, <b>, <br>, <code>, <del>, <eref>, <figure>, <i>, <index>, <iref>, <note>, <ol>, <para>, <q>, <quote>, <ref>, <references>, <rref>, <sc>, <section>, <sub>, <sup>, <toc>, <tof>, <u>, <ul>, comment, none, or text
+
+<?xml-model type="application/relax-ng-compact-syntax"
+           href="./schema/dtc.rnc"?>
+
+<?xml-stylesheet type="text/xsl"
+                href="./xsl/document.html5.en.xsl"?>
+
+<?html5-stylesheet type="text/xsl"
+                  href="./xsl/document.html5.en.xsl"?>
+
+<?atom-stylesheet type="text/xsl"
+                 href="./xsl/document.atom.en.xsl"?>
+
+<document>
+  <about>
+  </about>
+  <p><note><para>
+    <p>text0
+text1</p>
+    </para></note></p>
+</document>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0007.tct.html5 b/test/Golden/TCT/HeaderColon/0007.tct.html5
index bba5b43..1262518 100644
--- a/test/Golden/TCT/HeaderColon/0007.tct.html5
+++ b/test/Golden/TCT/HeaderColon/0007.tct.html5
@@ -1,3 +1,3 @@
 <!DOCTYPE HTML>
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="style/tct-html5.css"></head><body><a id="line-1"></a><span class="header header-colon header-name-colon1"><span class="header-name">colon1</span><span class="header-mark">:</span></span><span class="header-value"> text0
-<a id="line-2"></a>       text1</span></body></html>
\ No newline at end of file
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="style/tct-html5.css"></head><body><a id="line-1"></a><span class="header header-colon header-name-note"><span class="header-name">note</span><span class="header-mark">:</span></span><span class="header-value"> text0
+<a id="line-2"></a>      text1</span></body></html>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0007.tct.plain b/test/Golden/TCT/HeaderColon/0007.tct.plain
new file mode 100644
index 0000000..963b970
--- /dev/null
+++ b/test/Golden/TCT/HeaderColon/0007.tct.plain
@@ -0,0 +1,2 @@
+note: text0
+      text1
diff --git a/test/Golden/TCT/HeaderColon/0007.tct.xml b/test/Golden/TCT/HeaderColon/0007.tct.xml
index fcd1ba9..89d7e42 100644
--- a/test/Golden/TCT/HeaderColon/0007.tct.xml
+++ b/test/Golden/TCT/HeaderColon/0007.tct.xml
@@ -1,4 +1,6 @@
-Cell 1:1 2:13 (XmlElem colon1)
+Cell (XmlElem note) [test/Golden/TCT/HeaderColon/0007.tct#1:1-2:12]
 |
-`- Cell 1:8 2:13 (XmlText " text0\ntext1")
+`- Cell (XmlElem para) [test/Golden/TCT/HeaderColon/0007.tct#1:7-2:12]
+   |
+   `- Cell (XmlText "text0\ntext1") [test/Golden/TCT/HeaderColon/0007.tct#1:7-2:12]
 
diff --git a/test/Golden/TCT/HeaderColon/0008.tct b/test/Golden/TCT/HeaderColon/0008.tct
index 6587586..841680d 100644
--- a/test/Golden/TCT/HeaderColon/0008.tct
+++ b/test/Golden/TCT/HeaderColon/0008.tct
@@ -1,2 +1,2 @@
-colon1: text0
-        text1
+code: text0
+       text1
diff --git a/test/Golden/TCT/HeaderColon/0008.tct.ast b/test/Golden/TCT/HeaderColon/0008.tct.ast
index 5b81ab5..67dc34e 100644
--- a/test/Golden/TCT/HeaderColon/0008.tct.ast
+++ b/test/Golden/TCT/HeaderColon/0008.tct.ast
@@ -1,6 +1,6 @@
-[ Tree (Cell 1:1 2:14 (NodeHeader (HeaderColon "colon1" ""))) 
-    [ Tree (Cell 1:9 2:14 NodePara) 
-        [ Tree (Cell 1:9 2:14 (NodeToken (TokenText "text0\ntext1"))) []
+[ Tree (Cell (NodeHeader (HeaderColon "code" "")) [test/Golden/TCT/HeaderColon/0008.tct#1:1-2:13]) 
+    [ Tree (Cell NodePara [test/Golden/TCT/HeaderColon/0008.tct#1:7-2:13]) 
+        [ Tree (Cell (NodeToken (TokenText "text0\n text1")) [test/Golden/TCT/HeaderColon/0008.tct#1:7-2:13]) []
         ] 
     ] 
 ] 
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0008.tct.dtc.en_US.html5 b/test/Golden/TCT/HeaderColon/0008.tct.dtc.en_US.html5
index c7889e5..b48bec3 100644
--- a/test/Golden/TCT/HeaderColon/0008.tct.dtc.en_US.html5
+++ b/test/Golden/TCT/HeaderColon/0008.tct.dtc.en_US.html5
@@ -1,3 +1,37 @@
-1:1:
-unexpected <colon1> at 1:1-2:14
-expecting <about>, <artwork>, <b>, <br>, <code>, <del>, <eref>, <figure>, <i>, <index>, <iref>, <note>, <ol>, <para>, <q>, <quote>, <ref>, <references>, <rref>, <sc>, <section>, <sub>, <sup>, <toc>, <tof>, <u>, <ul>, comment, none, or text
+<!DOCTYPE HTML>
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type"
+          content="text/html; charset=UTF-8">
+    <meta name="generator"
+          content="https://hackage.haskell.org/package/hdoc">
+    <link rel="stylesheet"
+          type="text/css"
+          href="style/dtc-html5.css">
+  </head>
+  <body>
+    <div class="document-head">
+      <table>
+        <tbody>
+          <tr>
+            <td class="left">
+              <table class="document-headers">
+                <tbody>
+                </tbody>
+              </table>
+            </td>
+            <td class="right">
+              <table class="document-authors">
+                <tbody>
+                </tbody>
+              </table>
+            </td>
+          </tr>
+        </tbody>
+      </table>
+    </div>
+    <p class="para"><code>text0
+ text1</code></p>
+  </body>
+</html>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0008.tct.dtc.en_US.xml b/test/Golden/TCT/HeaderColon/0008.tct.dtc.en_US.xml
index c7889e5..84dfe83 100644
--- a/test/Golden/TCT/HeaderColon/0008.tct.dtc.en_US.xml
+++ b/test/Golden/TCT/HeaderColon/0008.tct.dtc.en_US.xml
@@ -1,3 +1,19 @@
-1:1:
-unexpected <colon1> at 1:1-2:14
-expecting <about>, <artwork>, <b>, <br>, <code>, <del>, <eref>, <figure>, <i>, <index>, <iref>, <note>, <ol>, <para>, <q>, <quote>, <ref>, <references>, <rref>, <sc>, <section>, <sub>, <sup>, <toc>, <tof>, <u>, <ul>, comment, none, or text
+
+<?xml-model type="application/relax-ng-compact-syntax"
+           href="./schema/dtc.rnc"?>
+
+<?xml-stylesheet type="text/xsl"
+                href="./xsl/document.html5.en.xsl"?>
+
+<?html5-stylesheet type="text/xsl"
+                  href="./xsl/document.html5.en.xsl"?>
+
+<?atom-stylesheet type="text/xsl"
+                 href="./xsl/document.atom.en.xsl"?>
+
+<document>
+  <about>
+  </about>
+  <p><code>text0
+ text1</code></p>
+</document>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0008.tct.html5 b/test/Golden/TCT/HeaderColon/0008.tct.html5
index b5298c5..0da33b7 100644
--- a/test/Golden/TCT/HeaderColon/0008.tct.html5
+++ b/test/Golden/TCT/HeaderColon/0008.tct.html5
@@ -1,3 +1,3 @@
 <!DOCTYPE HTML>
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="style/tct-html5.css"></head><body><a id="line-1"></a><span class="header header-colon header-name-colon1"><span class="header-name">colon1</span><span class="header-mark">:</span></span><span class="header-value"> text0
-<a id="line-2"></a>        text1</span></body></html>
\ No newline at end of file
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="style/tct-html5.css"></head><body><a id="line-1"></a><span class="header header-colon header-name-code"><span class="header-name">code</span><span class="header-mark">:</span></span><span class="header-value"> text0
+<a id="line-2"></a>       text1</span></body></html>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0008.tct.plain b/test/Golden/TCT/HeaderColon/0008.tct.plain
new file mode 100644
index 0000000..841680d
--- /dev/null
+++ b/test/Golden/TCT/HeaderColon/0008.tct.plain
@@ -0,0 +1,2 @@
+code: text0
+       text1
diff --git a/test/Golden/TCT/HeaderColon/0008.tct.xml b/test/Golden/TCT/HeaderColon/0008.tct.xml
index 4e6e441..1396051 100644
--- a/test/Golden/TCT/HeaderColon/0008.tct.xml
+++ b/test/Golden/TCT/HeaderColon/0008.tct.xml
@@ -1,4 +1,4 @@
-Cell 1:1 2:14 (XmlElem colon1)
+Cell (XmlElem code) [test/Golden/TCT/HeaderColon/0008.tct#1:1-2:13]
 |
-`- Cell 1:9 2:14 (XmlText "text0\ntext1")
+`- Cell (XmlText "text0\n text1") [test/Golden/TCT/HeaderColon/0008.tct#1:7-2:13]
 
diff --git a/test/Golden/TCT/HeaderColon/0009.tct b/test/Golden/TCT/HeaderColon/0009.tct
index 25a663c..ca675d8 100644
--- a/test/Golden/TCT/HeaderColon/0009.tct
+++ b/test/Golden/TCT/HeaderColon/0009.tct
@@ -1,3 +1,3 @@
-colon1: text0
+code: text0
 
 text1
diff --git a/test/Golden/TCT/HeaderColon/0009.tct.ast b/test/Golden/TCT/HeaderColon/0009.tct.ast
index 6472a5a..d82bb0f 100644
--- a/test/Golden/TCT/HeaderColon/0009.tct.ast
+++ b/test/Golden/TCT/HeaderColon/0009.tct.ast
@@ -1,9 +1,9 @@
-[ Tree (Cell 1:1 1:14 (NodeHeader (HeaderColon "colon1" ""))) 
-    [ Tree (Cell 1:9 1:14 NodePara) 
-        [ Tree (Cell 1:9 1:14 (NodeToken (TokenText "text0"))) []
+[ Tree (Cell (NodeHeader (HeaderColon "code" "")) [test/Golden/TCT/HeaderColon/0009.tct#1:1-1:12]) 
+    [ Tree (Cell NodePara [test/Golden/TCT/HeaderColon/0009.tct#1:7-1:12]) 
+        [ Tree (Cell (NodeToken (TokenText "text0")) [test/Golden/TCT/HeaderColon/0009.tct#1:7-1:12]) []
         ] 
     ] 
-, Tree (Cell 3:1 3:6 NodePara) 
-    [ Tree (Cell 3:1 3:6 (NodeToken (TokenText "text1"))) []
+, Tree (Cell NodePara [test/Golden/TCT/HeaderColon/0009.tct#3:1-3:6]) 
+    [ Tree (Cell (NodeToken (TokenText "text1")) [test/Golden/TCT/HeaderColon/0009.tct#3:1-3:6]) []
     ] 
 ] 
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0009.tct.dtc.en_US.html5 b/test/Golden/TCT/HeaderColon/0009.tct.dtc.en_US.html5
index 8bee18a..3e514bb 100644
--- a/test/Golden/TCT/HeaderColon/0009.tct.dtc.en_US.html5
+++ b/test/Golden/TCT/HeaderColon/0009.tct.dtc.en_US.html5
@@ -1,3 +1,40 @@
-1:1:
-unexpected <colon1> at 1:1-1:14
-expecting <about>, <artwork>, <b>, <br>, <code>, <del>, <eref>, <figure>, <i>, <index>, <iref>, <note>, <ol>, <para>, <q>, <quote>, <ref>, <references>, <rref>, <sc>, <section>, <sub>, <sup>, <toc>, <tof>, <u>, <ul>, comment, none, or text
+<!DOCTYPE HTML>
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type"
+          content="text/html; charset=UTF-8">
+    <meta name="generator"
+          content="https://hackage.haskell.org/package/hdoc">
+    <link rel="stylesheet"
+          type="text/css"
+          href="style/dtc-html5.css">
+  </head>
+  <body>
+    <div class="document-head">
+      <table>
+        <tbody>
+          <tr>
+            <td class="left">
+              <table class="document-headers">
+                <tbody>
+                </tbody>
+              </table>
+            </td>
+            <td class="right">
+              <table class="document-authors">
+                <tbody>
+                </tbody>
+              </table>
+            </td>
+          </tr>
+        </tbody>
+      </table>
+    </div>
+    <p class="para"><code>text0</code></p>
+    <div id="para1"
+         class="para">
+      <p>text1</p>
+    </div>
+  </body>
+</html>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0009.tct.dtc.en_US.xml b/test/Golden/TCT/HeaderColon/0009.tct.dtc.en_US.xml
index 8bee18a..2957fd1 100644
--- a/test/Golden/TCT/HeaderColon/0009.tct.dtc.en_US.xml
+++ b/test/Golden/TCT/HeaderColon/0009.tct.dtc.en_US.xml
@@ -1,3 +1,21 @@
-1:1:
-unexpected <colon1> at 1:1-1:14
-expecting <about>, <artwork>, <b>, <br>, <code>, <del>, <eref>, <figure>, <i>, <index>, <iref>, <note>, <ol>, <para>, <q>, <quote>, <ref>, <references>, <rref>, <sc>, <section>, <sub>, <sup>, <toc>, <tof>, <u>, <ul>, comment, none, or text
+
+<?xml-model type="application/relax-ng-compact-syntax"
+           href="./schema/dtc.rnc"?>
+
+<?xml-stylesheet type="text/xsl"
+                href="./xsl/document.html5.en.xsl"?>
+
+<?html5-stylesheet type="text/xsl"
+                  href="./xsl/document.html5.en.xsl"?>
+
+<?atom-stylesheet type="text/xsl"
+                 href="./xsl/document.atom.en.xsl"?>
+
+<document>
+  <about>
+  </about>
+  <p><code>text0</code></p>
+  <para>
+    <p>text1</p>
+  </para>
+</document>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0009.tct.html5 b/test/Golden/TCT/HeaderColon/0009.tct.html5
index e98db71..fc49ef2 100644
--- a/test/Golden/TCT/HeaderColon/0009.tct.html5
+++ b/test/Golden/TCT/HeaderColon/0009.tct.html5
@@ -1,4 +1,4 @@
 <!DOCTYPE HTML>
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="style/tct-html5.css"></head><body><a id="line-1"></a><span class="header header-colon header-name-colon1"><span class="header-name">colon1</span><span class="header-mark">:</span></span><span class="header-value"> text0</span>
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="style/tct-html5.css"></head><body><a id="line-1"></a><span class="header header-colon header-name-code"><span class="header-name">code</span><span class="header-mark">:</span></span><span class="header-value"> text0</span>
 <a id="line-2"></a>
 <a id="line-3"></a>text1</body></html>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0009.tct.plain b/test/Golden/TCT/HeaderColon/0009.tct.plain
new file mode 100644
index 0000000..ca675d8
--- /dev/null
+++ b/test/Golden/TCT/HeaderColon/0009.tct.plain
@@ -0,0 +1,3 @@
+code: text0
+
+text1
diff --git a/test/Golden/TCT/HeaderColon/0009.tct.xml b/test/Golden/TCT/HeaderColon/0009.tct.xml
index b6520e0..a65c66f 100644
--- a/test/Golden/TCT/HeaderColon/0009.tct.xml
+++ b/test/Golden/TCT/HeaderColon/0009.tct.xml
@@ -1,8 +1,8 @@
-Cell 1:1 1:14 (XmlElem colon1)
+Cell (XmlElem code) [test/Golden/TCT/HeaderColon/0009.tct#1:1-1:12]
 |
-`- Cell 1:9 1:14 (XmlText "text0")
+`- Cell (XmlText "text0") [test/Golden/TCT/HeaderColon/0009.tct#1:7-1:12]
 
-Cell 3:1 3:6 (XmlElem para)
+Cell (XmlElem para) [test/Golden/TCT/HeaderColon/0009.tct#3:1-3:6]
 |
-`- Cell 3:1 3:6 (XmlText "text1")
+`- Cell (XmlText "text1") [test/Golden/TCT/HeaderColon/0009.tct#3:1-3:6]
 
diff --git a/test/Golden/TCT/HeaderColon/0010.tct b/test/Golden/TCT/HeaderColon/0010.tct
index 154bfe2..1bdfc09 100644
--- a/test/Golden/TCT/HeaderColon/0010.tct
+++ b/test/Golden/TCT/HeaderColon/0010.tct
@@ -1,3 +1,3 @@
-colon1: text0
+code: text0
 
  text1
diff --git a/test/Golden/TCT/HeaderColon/0010.tct.ast b/test/Golden/TCT/HeaderColon/0010.tct.ast
index a6a47e8..af6d3ae 100644
--- a/test/Golden/TCT/HeaderColon/0010.tct.ast
+++ b/test/Golden/TCT/HeaderColon/0010.tct.ast
@@ -1,9 +1,9 @@
-[ Tree (Cell 1:1 3:7 (NodeHeader (HeaderColon "colon1" ""))) 
-    [ Tree (Cell 1:9 1:14 NodePara) 
-        [ Tree (Cell 1:9 1:14 (NodeToken (TokenText "text0"))) []
+[ Tree (Cell (NodeHeader (HeaderColon "code" "")) [test/Golden/TCT/HeaderColon/0010.tct#1:1-3:7]) 
+    [ Tree (Cell NodePara [test/Golden/TCT/HeaderColon/0010.tct#1:7-1:12]) 
+        [ Tree (Cell (NodeToken (TokenText "text0")) [test/Golden/TCT/HeaderColon/0010.tct#1:7-1:12]) []
         ] 
-    , Tree (Cell 3:2 3:7 NodePara) 
-        [ Tree (Cell 3:2 3:7 (NodeToken (TokenText "text1"))) []
+    , Tree (Cell NodePara [test/Golden/TCT/HeaderColon/0010.tct#3:2-3:7]) 
+        [ Tree (Cell (NodeToken (TokenText "text1")) [test/Golden/TCT/HeaderColon/0010.tct#3:2-3:7]) []
         ] 
     ] 
 ] 
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0010.tct.dtc.en_US.html5 b/test/Golden/TCT/HeaderColon/0010.tct.dtc.en_US.html5
index 105863a..8a7c020 100644
--- a/test/Golden/TCT/HeaderColon/0010.tct.dtc.en_US.html5
+++ b/test/Golden/TCT/HeaderColon/0010.tct.dtc.en_US.html5
@@ -1,3 +1,36 @@
-1:1:
-unexpected <colon1> at 1:1-3:7
-expecting <about>, <artwork>, <b>, <br>, <code>, <del>, <eref>, <figure>, <i>, <index>, <iref>, <note>, <ol>, <para>, <q>, <quote>, <ref>, <references>, <rref>, <sc>, <section>, <sub>, <sup>, <toc>, <tof>, <u>, <ul>, comment, none, or text
+<!DOCTYPE HTML>
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type"
+          content="text/html; charset=UTF-8">
+    <meta name="generator"
+          content="https://hackage.haskell.org/package/hdoc">
+    <link rel="stylesheet"
+          type="text/css"
+          href="style/dtc-html5.css">
+  </head>
+  <body>
+    <div class="document-head">
+      <table>
+        <tbody>
+          <tr>
+            <td class="left">
+              <table class="document-headers">
+                <tbody>
+                </tbody>
+              </table>
+            </td>
+            <td class="right">
+              <table class="document-authors">
+                <tbody>
+                </tbody>
+              </table>
+            </td>
+          </tr>
+        </tbody>
+      </table>
+    </div>
+    <p class="para"><code>text0text1</code></p>
+  </body>
+</html>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0010.tct.dtc.en_US.xml b/test/Golden/TCT/HeaderColon/0010.tct.dtc.en_US.xml
index 105863a..873fca4 100644
--- a/test/Golden/TCT/HeaderColon/0010.tct.dtc.en_US.xml
+++ b/test/Golden/TCT/HeaderColon/0010.tct.dtc.en_US.xml
@@ -1,3 +1,18 @@
-1:1:
-unexpected <colon1> at 1:1-3:7
-expecting <about>, <artwork>, <b>, <br>, <code>, <del>, <eref>, <figure>, <i>, <index>, <iref>, <note>, <ol>, <para>, <q>, <quote>, <ref>, <references>, <rref>, <sc>, <section>, <sub>, <sup>, <toc>, <tof>, <u>, <ul>, comment, none, or text
+
+<?xml-model type="application/relax-ng-compact-syntax"
+           href="./schema/dtc.rnc"?>
+
+<?xml-stylesheet type="text/xsl"
+                href="./xsl/document.html5.en.xsl"?>
+
+<?html5-stylesheet type="text/xsl"
+                  href="./xsl/document.html5.en.xsl"?>
+
+<?atom-stylesheet type="text/xsl"
+                 href="./xsl/document.atom.en.xsl"?>
+
+<document>
+  <about>
+  </about>
+  <p><code>text0text1</code></p>
+</document>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0010.tct.html5 b/test/Golden/TCT/HeaderColon/0010.tct.html5
index 89e6a68..ca06854 100644
--- a/test/Golden/TCT/HeaderColon/0010.tct.html5
+++ b/test/Golden/TCT/HeaderColon/0010.tct.html5
@@ -1,4 +1,4 @@
 <!DOCTYPE HTML>
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="style/tct-html5.css"></head><body><a id="line-1"></a><span class="header header-colon header-name-colon1"><span class="header-name">colon1</span><span class="header-mark">:</span></span><span class="header-value"> text0
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="style/tct-html5.css"></head><body><a id="line-1"></a><span class="header header-colon header-name-code"><span class="header-name">code</span><span class="header-mark">:</span></span><span class="header-value"> text0
 <a id="line-2"></a>
 <a id="line-3"></a> text1</span></body></html>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0010.tct.plain b/test/Golden/TCT/HeaderColon/0010.tct.plain
new file mode 100644
index 0000000..1bdfc09
--- /dev/null
+++ b/test/Golden/TCT/HeaderColon/0010.tct.plain
@@ -0,0 +1,3 @@
+code: text0
+
+ text1
diff --git a/test/Golden/TCT/HeaderColon/0010.tct.xml b/test/Golden/TCT/HeaderColon/0010.tct.xml
index 62a4ca3..b0f7dd2 100644
--- a/test/Golden/TCT/HeaderColon/0010.tct.xml
+++ b/test/Golden/TCT/HeaderColon/0010.tct.xml
@@ -1,6 +1,6 @@
-Cell 1:1 3:7 (XmlElem colon1)
+Cell (XmlElem code) [test/Golden/TCT/HeaderColon/0010.tct#1:1-3:7]
 |
-+- Cell 1:9 1:14 (XmlText "text0")
++- Cell (XmlText "text0") [test/Golden/TCT/HeaderColon/0010.tct#1:7-1:12]
 |
-`- Cell 3:2 3:7 (XmlText "text1")
+`- Cell (XmlText "text1") [test/Golden/TCT/HeaderColon/0010.tct#3:2-3:7]
 
diff --git a/test/Golden/TCT/HeaderColon/0011.tct b/test/Golden/TCT/HeaderColon/0011.tct
index a5612de..10b17d3 100644
--- a/test/Golden/TCT/HeaderColon/0011.tct
+++ b/test/Golden/TCT/HeaderColon/0011.tct
@@ -1,3 +1,3 @@
-colon1: text0
+code: text0
 
-      text1
+     text1
diff --git a/test/Golden/TCT/HeaderColon/0011.tct.ast b/test/Golden/TCT/HeaderColon/0011.tct.ast
index 7b6d5ce..74168d8 100644
--- a/test/Golden/TCT/HeaderColon/0011.tct.ast
+++ b/test/Golden/TCT/HeaderColon/0011.tct.ast
@@ -1,9 +1,9 @@
-[ Tree (Cell 1:1 3:12 (NodeHeader (HeaderColon "colon1" ""))) 
-    [ Tree (Cell 1:9 1:14 NodePara) 
-        [ Tree (Cell 1:9 1:14 (NodeToken (TokenText "text0"))) []
+[ Tree (Cell (NodeHeader (HeaderColon "code" "")) [test/Golden/TCT/HeaderColon/0011.tct#1:1-3:11]) 
+    [ Tree (Cell NodePara [test/Golden/TCT/HeaderColon/0011.tct#1:7-1:12]) 
+        [ Tree (Cell (NodeToken (TokenText "text0")) [test/Golden/TCT/HeaderColon/0011.tct#1:7-1:12]) []
         ] 
-    , Tree (Cell 3:7 3:12 NodePara) 
-        [ Tree (Cell 3:7 3:12 (NodeToken (TokenText "text1"))) []
+    , Tree (Cell NodePara [test/Golden/TCT/HeaderColon/0011.tct#3:6-3:11]) 
+        [ Tree (Cell (NodeToken (TokenText "text1")) [test/Golden/TCT/HeaderColon/0011.tct#3:6-3:11]) []
         ] 
     ] 
 ] 
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0011.tct.dtc.en_US.html5 b/test/Golden/TCT/HeaderColon/0011.tct.dtc.en_US.html5
index 43b6555..8a7c020 100644
--- a/test/Golden/TCT/HeaderColon/0011.tct.dtc.en_US.html5
+++ b/test/Golden/TCT/HeaderColon/0011.tct.dtc.en_US.html5
@@ -1,3 +1,36 @@
-1:1:
-unexpected <colon1> at 1:1-3:12
-expecting <about>, <artwork>, <b>, <br>, <code>, <del>, <eref>, <figure>, <i>, <index>, <iref>, <note>, <ol>, <para>, <q>, <quote>, <ref>, <references>, <rref>, <sc>, <section>, <sub>, <sup>, <toc>, <tof>, <u>, <ul>, comment, none, or text
+<!DOCTYPE HTML>
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type"
+          content="text/html; charset=UTF-8">
+    <meta name="generator"
+          content="https://hackage.haskell.org/package/hdoc">
+    <link rel="stylesheet"
+          type="text/css"
+          href="style/dtc-html5.css">
+  </head>
+  <body>
+    <div class="document-head">
+      <table>
+        <tbody>
+          <tr>
+            <td class="left">
+              <table class="document-headers">
+                <tbody>
+                </tbody>
+              </table>
+            </td>
+            <td class="right">
+              <table class="document-authors">
+                <tbody>
+                </tbody>
+              </table>
+            </td>
+          </tr>
+        </tbody>
+      </table>
+    </div>
+    <p class="para"><code>text0text1</code></p>
+  </body>
+</html>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0011.tct.dtc.en_US.xml b/test/Golden/TCT/HeaderColon/0011.tct.dtc.en_US.xml
index 43b6555..873fca4 100644
--- a/test/Golden/TCT/HeaderColon/0011.tct.dtc.en_US.xml
+++ b/test/Golden/TCT/HeaderColon/0011.tct.dtc.en_US.xml
@@ -1,3 +1,18 @@
-1:1:
-unexpected <colon1> at 1:1-3:12
-expecting <about>, <artwork>, <b>, <br>, <code>, <del>, <eref>, <figure>, <i>, <index>, <iref>, <note>, <ol>, <para>, <q>, <quote>, <ref>, <references>, <rref>, <sc>, <section>, <sub>, <sup>, <toc>, <tof>, <u>, <ul>, comment, none, or text
+
+<?xml-model type="application/relax-ng-compact-syntax"
+           href="./schema/dtc.rnc"?>
+
+<?xml-stylesheet type="text/xsl"
+                href="./xsl/document.html5.en.xsl"?>
+
+<?html5-stylesheet type="text/xsl"
+                  href="./xsl/document.html5.en.xsl"?>
+
+<?atom-stylesheet type="text/xsl"
+                 href="./xsl/document.atom.en.xsl"?>
+
+<document>
+  <about>
+  </about>
+  <p><code>text0text1</code></p>
+</document>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0011.tct.html5 b/test/Golden/TCT/HeaderColon/0011.tct.html5
index c925518..87a401e 100644
--- a/test/Golden/TCT/HeaderColon/0011.tct.html5
+++ b/test/Golden/TCT/HeaderColon/0011.tct.html5
@@ -1,4 +1,4 @@
 <!DOCTYPE HTML>
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="style/tct-html5.css"></head><body><a id="line-1"></a><span class="header header-colon header-name-colon1"><span class="header-name">colon1</span><span class="header-mark">:</span></span><span class="header-value"> text0
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="style/tct-html5.css"></head><body><a id="line-1"></a><span class="header header-colon header-name-code"><span class="header-name">code</span><span class="header-mark">:</span></span><span class="header-value"> text0
 <a id="line-2"></a>
-<a id="line-3"></a>      text1</span></body></html>
\ No newline at end of file
+<a id="line-3"></a>     text1</span></body></html>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0011.tct.plain b/test/Golden/TCT/HeaderColon/0011.tct.plain
new file mode 100644
index 0000000..10b17d3
--- /dev/null
+++ b/test/Golden/TCT/HeaderColon/0011.tct.plain
@@ -0,0 +1,3 @@
+code: text0
+
+     text1
diff --git a/test/Golden/TCT/HeaderColon/0011.tct.xml b/test/Golden/TCT/HeaderColon/0011.tct.xml
index 26512c0..23d4f6f 100644
--- a/test/Golden/TCT/HeaderColon/0011.tct.xml
+++ b/test/Golden/TCT/HeaderColon/0011.tct.xml
@@ -1,6 +1,6 @@
-Cell 1:1 3:12 (XmlElem colon1)
+Cell (XmlElem code) [test/Golden/TCT/HeaderColon/0011.tct#1:1-3:11]
 |
-+- Cell 1:9 1:14 (XmlText "text0")
++- Cell (XmlText "text0") [test/Golden/TCT/HeaderColon/0011.tct#1:7-1:12]
 |
-`- Cell 3:7 3:12 (XmlText "text1")
+`- Cell (XmlText "text1") [test/Golden/TCT/HeaderColon/0011.tct#3:6-3:11]
 
diff --git a/test/Golden/TCT/HeaderColon/0012.tct b/test/Golden/TCT/HeaderColon/0012.tct
index b83436a..575e3f7 100644
--- a/test/Golden/TCT/HeaderColon/0012.tct
+++ b/test/Golden/TCT/HeaderColon/0012.tct
@@ -1,3 +1,3 @@
-colon1: text0
+code: text0
 
-       text1
+      text1
diff --git a/test/Golden/TCT/HeaderColon/0012.tct.ast b/test/Golden/TCT/HeaderColon/0012.tct.ast
index d14f2b6..8543050 100644
--- a/test/Golden/TCT/HeaderColon/0012.tct.ast
+++ b/test/Golden/TCT/HeaderColon/0012.tct.ast
@@ -1,9 +1,9 @@
-[ Tree (Cell 1:1 3:13 (NodeHeader (HeaderColon "colon1" ""))) 
-    [ Tree (Cell 1:9 1:14 NodePara) 
-        [ Tree (Cell 1:9 1:14 (NodeToken (TokenText "text0"))) []
+[ Tree (Cell (NodeHeader (HeaderColon "code" "")) [test/Golden/TCT/HeaderColon/0012.tct#1:1-3:12]) 
+    [ Tree (Cell NodePara [test/Golden/TCT/HeaderColon/0012.tct#1:7-1:12]) 
+        [ Tree (Cell (NodeToken (TokenText "text0")) [test/Golden/TCT/HeaderColon/0012.tct#1:7-1:12]) []
         ] 
-    , Tree (Cell 3:8 3:13 NodePara) 
-        [ Tree (Cell 3:8 3:13 (NodeToken (TokenText "text1"))) []
+    , Tree (Cell NodePara [test/Golden/TCT/HeaderColon/0012.tct#3:7-3:12]) 
+        [ Tree (Cell (NodeToken (TokenText "text1")) [test/Golden/TCT/HeaderColon/0012.tct#3:7-3:12]) []
         ] 
     ] 
 ] 
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0012.tct.dtc.en_US.html5 b/test/Golden/TCT/HeaderColon/0012.tct.dtc.en_US.html5
index 628aeeb..8a7c020 100644
--- a/test/Golden/TCT/HeaderColon/0012.tct.dtc.en_US.html5
+++ b/test/Golden/TCT/HeaderColon/0012.tct.dtc.en_US.html5
@@ -1,3 +1,36 @@
-1:1:
-unexpected <colon1> at 1:1-3:13
-expecting <about>, <artwork>, <b>, <br>, <code>, <del>, <eref>, <figure>, <i>, <index>, <iref>, <note>, <ol>, <para>, <q>, <quote>, <ref>, <references>, <rref>, <sc>, <section>, <sub>, <sup>, <toc>, <tof>, <u>, <ul>, comment, none, or text
+<!DOCTYPE HTML>
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type"
+          content="text/html; charset=UTF-8">
+    <meta name="generator"
+          content="https://hackage.haskell.org/package/hdoc">
+    <link rel="stylesheet"
+          type="text/css"
+          href="style/dtc-html5.css">
+  </head>
+  <body>
+    <div class="document-head">
+      <table>
+        <tbody>
+          <tr>
+            <td class="left">
+              <table class="document-headers">
+                <tbody>
+                </tbody>
+              </table>
+            </td>
+            <td class="right">
+              <table class="document-authors">
+                <tbody>
+                </tbody>
+              </table>
+            </td>
+          </tr>
+        </tbody>
+      </table>
+    </div>
+    <p class="para"><code>text0text1</code></p>
+  </body>
+</html>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0012.tct.dtc.en_US.xml b/test/Golden/TCT/HeaderColon/0012.tct.dtc.en_US.xml
index 628aeeb..873fca4 100644
--- a/test/Golden/TCT/HeaderColon/0012.tct.dtc.en_US.xml
+++ b/test/Golden/TCT/HeaderColon/0012.tct.dtc.en_US.xml
@@ -1,3 +1,18 @@
-1:1:
-unexpected <colon1> at 1:1-3:13
-expecting <about>, <artwork>, <b>, <br>, <code>, <del>, <eref>, <figure>, <i>, <index>, <iref>, <note>, <ol>, <para>, <q>, <quote>, <ref>, <references>, <rref>, <sc>, <section>, <sub>, <sup>, <toc>, <tof>, <u>, <ul>, comment, none, or text
+
+<?xml-model type="application/relax-ng-compact-syntax"
+           href="./schema/dtc.rnc"?>
+
+<?xml-stylesheet type="text/xsl"
+                href="./xsl/document.html5.en.xsl"?>
+
+<?html5-stylesheet type="text/xsl"
+                  href="./xsl/document.html5.en.xsl"?>
+
+<?atom-stylesheet type="text/xsl"
+                 href="./xsl/document.atom.en.xsl"?>
+
+<document>
+  <about>
+  </about>
+  <p><code>text0text1</code></p>
+</document>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0012.tct.html5 b/test/Golden/TCT/HeaderColon/0012.tct.html5
index 82e09da..bdf1501 100644
--- a/test/Golden/TCT/HeaderColon/0012.tct.html5
+++ b/test/Golden/TCT/HeaderColon/0012.tct.html5
@@ -1,4 +1,4 @@
 <!DOCTYPE HTML>
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="style/tct-html5.css"></head><body><a id="line-1"></a><span class="header header-colon header-name-colon1"><span class="header-name">colon1</span><span class="header-mark">:</span></span><span class="header-value"> text0
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="style/tct-html5.css"></head><body><a id="line-1"></a><span class="header header-colon header-name-code"><span class="header-name">code</span><span class="header-mark">:</span></span><span class="header-value"> text0
 <a id="line-2"></a>
-<a id="line-3"></a>       text1</span></body></html>
\ No newline at end of file
+<a id="line-3"></a>      text1</span></body></html>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0012.tct.plain b/test/Golden/TCT/HeaderColon/0012.tct.plain
new file mode 100644
index 0000000..575e3f7
--- /dev/null
+++ b/test/Golden/TCT/HeaderColon/0012.tct.plain
@@ -0,0 +1,3 @@
+code: text0
+
+      text1
diff --git a/test/Golden/TCT/HeaderColon/0012.tct.xml b/test/Golden/TCT/HeaderColon/0012.tct.xml
index 8ac02ff..5cba316 100644
--- a/test/Golden/TCT/HeaderColon/0012.tct.xml
+++ b/test/Golden/TCT/HeaderColon/0012.tct.xml
@@ -1,6 +1,6 @@
-Cell 1:1 3:13 (XmlElem colon1)
+Cell (XmlElem code) [test/Golden/TCT/HeaderColon/0012.tct#1:1-3:12]
 |
-+- Cell 1:9 1:14 (XmlText "text0")
++- Cell (XmlText "text0") [test/Golden/TCT/HeaderColon/0012.tct#1:7-1:12]
 |
-`- Cell 3:8 3:13 (XmlText "text1")
+`- Cell (XmlText "text1") [test/Golden/TCT/HeaderColon/0012.tct#3:7-3:12]
 
diff --git a/test/Golden/TCT/HeaderColon/0013.tct b/test/Golden/TCT/HeaderColon/0013.tct
index c4c3e88..dbfa169 100644
--- a/test/Golden/TCT/HeaderColon/0013.tct
+++ b/test/Golden/TCT/HeaderColon/0013.tct
@@ -1,3 +1,3 @@
-colon1: text0
+code: text0
 
-        text1
+       text1
diff --git a/test/Golden/TCT/HeaderColon/0013.tct.ast b/test/Golden/TCT/HeaderColon/0013.tct.ast
index 321c099..601beac 100644
--- a/test/Golden/TCT/HeaderColon/0013.tct.ast
+++ b/test/Golden/TCT/HeaderColon/0013.tct.ast
@@ -1,9 +1,9 @@
-[ Tree (Cell 1:1 3:14 (NodeHeader (HeaderColon "colon1" ""))) 
-    [ Tree (Cell 1:9 1:14 NodePara) 
-        [ Tree (Cell 1:9 1:14 (NodeToken (TokenText "text0"))) []
+[ Tree (Cell (NodeHeader (HeaderColon "code" "")) [test/Golden/TCT/HeaderColon/0013.tct#1:1-3:13]) 
+    [ Tree (Cell NodePara [test/Golden/TCT/HeaderColon/0013.tct#1:7-1:12]) 
+        [ Tree (Cell (NodeToken (TokenText "text0")) [test/Golden/TCT/HeaderColon/0013.tct#1:7-1:12]) []
         ] 
-    , Tree (Cell 3:9 3:14 NodePara) 
-        [ Tree (Cell 3:9 3:14 (NodeToken (TokenText "text1"))) []
+    , Tree (Cell NodePara [test/Golden/TCT/HeaderColon/0013.tct#3:7-3:13]) 
+        [ Tree (Cell (NodeToken (TokenText " text1")) [test/Golden/TCT/HeaderColon/0013.tct#3:7-3:13]) []
         ] 
     ] 
 ] 
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0013.tct.dtc.en_US.html5 b/test/Golden/TCT/HeaderColon/0013.tct.dtc.en_US.html5
index edca82d..6355bb1 100644
--- a/test/Golden/TCT/HeaderColon/0013.tct.dtc.en_US.html5
+++ b/test/Golden/TCT/HeaderColon/0013.tct.dtc.en_US.html5
@@ -1,3 +1,36 @@
-1:1:
-unexpected <colon1> at 1:1-3:14
-expecting <about>, <artwork>, <b>, <br>, <code>, <del>, <eref>, <figure>, <i>, <index>, <iref>, <note>, <ol>, <para>, <q>, <quote>, <ref>, <references>, <rref>, <sc>, <section>, <sub>, <sup>, <toc>, <tof>, <u>, <ul>, comment, none, or text
+<!DOCTYPE HTML>
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type"
+          content="text/html; charset=UTF-8">
+    <meta name="generator"
+          content="https://hackage.haskell.org/package/hdoc">
+    <link rel="stylesheet"
+          type="text/css"
+          href="style/dtc-html5.css">
+  </head>
+  <body>
+    <div class="document-head">
+      <table>
+        <tbody>
+          <tr>
+            <td class="left">
+              <table class="document-headers">
+                <tbody>
+                </tbody>
+              </table>
+            </td>
+            <td class="right">
+              <table class="document-authors">
+                <tbody>
+                </tbody>
+              </table>
+            </td>
+          </tr>
+        </tbody>
+      </table>
+    </div>
+    <p class="para"><code>text0 text1</code></p>
+  </body>
+</html>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0013.tct.dtc.en_US.xml b/test/Golden/TCT/HeaderColon/0013.tct.dtc.en_US.xml
index edca82d..5e2c872 100644
--- a/test/Golden/TCT/HeaderColon/0013.tct.dtc.en_US.xml
+++ b/test/Golden/TCT/HeaderColon/0013.tct.dtc.en_US.xml
@@ -1,3 +1,18 @@
-1:1:
-unexpected <colon1> at 1:1-3:14
-expecting <about>, <artwork>, <b>, <br>, <code>, <del>, <eref>, <figure>, <i>, <index>, <iref>, <note>, <ol>, <para>, <q>, <quote>, <ref>, <references>, <rref>, <sc>, <section>, <sub>, <sup>, <toc>, <tof>, <u>, <ul>, comment, none, or text
+
+<?xml-model type="application/relax-ng-compact-syntax"
+           href="./schema/dtc.rnc"?>
+
+<?xml-stylesheet type="text/xsl"
+                href="./xsl/document.html5.en.xsl"?>
+
+<?html5-stylesheet type="text/xsl"
+                  href="./xsl/document.html5.en.xsl"?>
+
+<?atom-stylesheet type="text/xsl"
+                 href="./xsl/document.atom.en.xsl"?>
+
+<document>
+  <about>
+  </about>
+  <p><code>text0 text1</code></p>
+</document>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0013.tct.html5 b/test/Golden/TCT/HeaderColon/0013.tct.html5
index 82973b1..065ae7a 100644
--- a/test/Golden/TCT/HeaderColon/0013.tct.html5
+++ b/test/Golden/TCT/HeaderColon/0013.tct.html5
@@ -1,4 +1,4 @@
 <!DOCTYPE HTML>
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="style/tct-html5.css"></head><body><a id="line-1"></a><span class="header header-colon header-name-colon1"><span class="header-name">colon1</span><span class="header-mark">:</span></span><span class="header-value"> text0
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="style/tct-html5.css"></head><body><a id="line-1"></a><span class="header header-colon header-name-code"><span class="header-name">code</span><span class="header-mark">:</span></span><span class="header-value"> text0
 <a id="line-2"></a>
-<a id="line-3"></a>        text1</span></body></html>
\ No newline at end of file
+<a id="line-3"></a>       text1</span></body></html>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0013.tct.plain b/test/Golden/TCT/HeaderColon/0013.tct.plain
new file mode 100644
index 0000000..dbfa169
--- /dev/null
+++ b/test/Golden/TCT/HeaderColon/0013.tct.plain
@@ -0,0 +1,3 @@
+code: text0
+
+       text1
diff --git a/test/Golden/TCT/HeaderColon/0013.tct.xml b/test/Golden/TCT/HeaderColon/0013.tct.xml
index 72ee646..7f86f7c 100644
--- a/test/Golden/TCT/HeaderColon/0013.tct.xml
+++ b/test/Golden/TCT/HeaderColon/0013.tct.xml
@@ -1,6 +1,6 @@
-Cell 1:1 3:14 (XmlElem colon1)
+Cell (XmlElem code) [test/Golden/TCT/HeaderColon/0013.tct#1:1-3:13]
 |
-+- Cell 1:9 1:14 (XmlText "text0")
++- Cell (XmlText "text0") [test/Golden/TCT/HeaderColon/0013.tct#1:7-1:12]
 |
-`- Cell 3:9 3:14 (XmlText "text1")
+`- Cell (XmlText " text1") [test/Golden/TCT/HeaderColon/0013.tct#3:7-3:13]
 
diff --git a/test/Golden/TCT/HeaderColon/0014.tct b/test/Golden/TCT/HeaderColon/0014.tct
index 6395c12..f7459b2 100644
--- a/test/Golden/TCT/HeaderColon/0014.tct
+++ b/test/Golden/TCT/HeaderColon/0014.tct
@@ -1,2 +1,2 @@
-colon1:
-colon2:
+code:
+code:
diff --git a/test/Golden/TCT/HeaderColon/0014.tct.ast b/test/Golden/TCT/HeaderColon/0014.tct.ast
index 18047e4..002c6ca 100644
--- a/test/Golden/TCT/HeaderColon/0014.tct.ast
+++ b/test/Golden/TCT/HeaderColon/0014.tct.ast
@@ -1,3 +1,3 @@
-[ Tree (Cell 1:1 1:8 (NodeHeader (HeaderColon "colon1" ""))) []
-, Tree (Cell 2:1 2:8 (NodeHeader (HeaderColon "colon2" ""))) []
+[ Tree (Cell (NodeHeader (HeaderColon "code" "")) [test/Golden/TCT/HeaderColon/0014.tct#1:1-1:6]) []
+, Tree (Cell (NodeHeader (HeaderColon "code" "")) [test/Golden/TCT/HeaderColon/0014.tct#2:1-2:6]) []
 ] 
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0014.tct.dtc.en_US.html5 b/test/Golden/TCT/HeaderColon/0014.tct.dtc.en_US.html5
index e291fec..0ebaf60 100644
--- a/test/Golden/TCT/HeaderColon/0014.tct.dtc.en_US.html5
+++ b/test/Golden/TCT/HeaderColon/0014.tct.dtc.en_US.html5
@@ -1,3 +1,36 @@
-1:1:
-unexpected <colon1> at 1:1-1:8
-expecting <about>, <artwork>, <b>, <br>, <code>, <del>, <eref>, <figure>, <i>, <index>, <iref>, <note>, <ol>, <para>, <q>, <quote>, <ref>, <references>, <rref>, <sc>, <section>, <sub>, <sup>, <toc>, <tof>, <u>, <ul>, comment, none, or text
+<!DOCTYPE HTML>
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type"
+          content="text/html; charset=UTF-8">
+    <meta name="generator"
+          content="https://hackage.haskell.org/package/hdoc">
+    <link rel="stylesheet"
+          type="text/css"
+          href="style/dtc-html5.css">
+  </head>
+  <body>
+    <div class="document-head">
+      <table>
+        <tbody>
+          <tr>
+            <td class="left">
+              <table class="document-headers">
+                <tbody>
+                </tbody>
+              </table>
+            </td>
+            <td class="right">
+              <table class="document-authors">
+                <tbody>
+                </tbody>
+              </table>
+            </td>
+          </tr>
+        </tbody>
+      </table>
+    </div>
+    <p class="para"><code></code><code></code></p>
+  </body>
+</html>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0014.tct.dtc.en_US.xml b/test/Golden/TCT/HeaderColon/0014.tct.dtc.en_US.xml
index e291fec..d061d2b 100644
--- a/test/Golden/TCT/HeaderColon/0014.tct.dtc.en_US.xml
+++ b/test/Golden/TCT/HeaderColon/0014.tct.dtc.en_US.xml
@@ -1,3 +1,18 @@
-1:1:
-unexpected <colon1> at 1:1-1:8
-expecting <about>, <artwork>, <b>, <br>, <code>, <del>, <eref>, <figure>, <i>, <index>, <iref>, <note>, <ol>, <para>, <q>, <quote>, <ref>, <references>, <rref>, <sc>, <section>, <sub>, <sup>, <toc>, <tof>, <u>, <ul>, comment, none, or text
+
+<?xml-model type="application/relax-ng-compact-syntax"
+           href="./schema/dtc.rnc"?>
+
+<?xml-stylesheet type="text/xsl"
+                href="./xsl/document.html5.en.xsl"?>
+
+<?html5-stylesheet type="text/xsl"
+                  href="./xsl/document.html5.en.xsl"?>
+
+<?atom-stylesheet type="text/xsl"
+                 href="./xsl/document.atom.en.xsl"?>
+
+<document>
+  <about>
+  </about>
+  <p><code></code><code></code></p>
+</document>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0014.tct.html5 b/test/Golden/TCT/HeaderColon/0014.tct.html5
index 15def23..33865d8 100644
--- a/test/Golden/TCT/HeaderColon/0014.tct.html5
+++ b/test/Golden/TCT/HeaderColon/0014.tct.html5
@@ -1,3 +1,3 @@
 <!DOCTYPE HTML>
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="style/tct-html5.css"></head><body><a id="line-1"></a><span class="header header-colon header-name-colon1"><span class="header-name">colon1</span><span class="header-mark">:</span></span><span class="header-value"></span>
-<a id="line-2"></a><span class="header header-colon header-name-colon2"><span class="header-name">colon2</span><span class="header-mark">:</span></span><span class="header-value"></span></body></html>
\ No newline at end of file
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="style/tct-html5.css"></head><body><a id="line-1"></a><span class="header header-colon header-name-code"><span class="header-name">code</span><span class="header-mark">:</span></span><span class="header-value"></span>
+<a id="line-2"></a><span class="header header-colon header-name-code"><span class="header-name">code</span><span class="header-mark">:</span></span><span class="header-value"></span></body></html>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0014.tct.plain b/test/Golden/TCT/HeaderColon/0014.tct.plain
new file mode 100644
index 0000000..f7459b2
--- /dev/null
+++ b/test/Golden/TCT/HeaderColon/0014.tct.plain
@@ -0,0 +1,2 @@
+code:
+code:
diff --git a/test/Golden/TCT/HeaderColon/0014.tct.xml b/test/Golden/TCT/HeaderColon/0014.tct.xml
index 2076c5a..632749c 100644
--- a/test/Golden/TCT/HeaderColon/0014.tct.xml
+++ b/test/Golden/TCT/HeaderColon/0014.tct.xml
@@ -1,4 +1,4 @@
-Cell 1:1 1:8 (XmlElem colon1)
+Cell (XmlElem code) [test/Golden/TCT/HeaderColon/0014.tct#1:1-1:6]
 
-Cell 2:1 2:8 (XmlElem colon2)
+Cell (XmlElem code) [test/Golden/TCT/HeaderColon/0014.tct#2:1-2:6]
 
diff --git a/test/Golden/TCT/HeaderColon/0015.tct b/test/Golden/TCT/HeaderColon/0015.tct
index e5365ea..21d4067 100644
--- a/test/Golden/TCT/HeaderColon/0015.tct
+++ b/test/Golden/TCT/HeaderColon/0015.tct
@@ -1,2 +1,2 @@
-colon1:
- colon2:
+code:
+ code:
diff --git a/test/Golden/TCT/HeaderColon/0015.tct.ast b/test/Golden/TCT/HeaderColon/0015.tct.ast
index 2fee897..6e361dd 100644
--- a/test/Golden/TCT/HeaderColon/0015.tct.ast
+++ b/test/Golden/TCT/HeaderColon/0015.tct.ast
@@ -1,4 +1,4 @@
-[ Tree (Cell 1:1 2:9 (NodeHeader (HeaderColon "colon1" ""))) 
-    [ Tree (Cell 2:2 2:9 (NodeHeader (HeaderColon "colon2" ""))) []
+[ Tree (Cell (NodeHeader (HeaderColon "code" "")) [test/Golden/TCT/HeaderColon/0015.tct#1:1-2:7]) 
+    [ Tree (Cell (NodeHeader (HeaderColon "code" "")) [test/Golden/TCT/HeaderColon/0015.tct#2:2-2:7]) []
     ] 
 ] 
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0015.tct.dtc.en_US.html5 b/test/Golden/TCT/HeaderColon/0015.tct.dtc.en_US.html5
index 6a2a97f..341e8aa 100644
--- a/test/Golden/TCT/HeaderColon/0015.tct.dtc.en_US.html5
+++ b/test/Golden/TCT/HeaderColon/0015.tct.dtc.en_US.html5
@@ -1,3 +1,36 @@
-1:1:
-unexpected <colon1> at 1:1-2:9
-expecting <about>, <artwork>, <b>, <br>, <code>, <del>, <eref>, <figure>, <i>, <index>, <iref>, <note>, <ol>, <para>, <q>, <quote>, <ref>, <references>, <rref>, <sc>, <section>, <sub>, <sup>, <toc>, <tof>, <u>, <ul>, comment, none, or text
+<!DOCTYPE HTML>
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type"
+          content="text/html; charset=UTF-8">
+    <meta name="generator"
+          content="https://hackage.haskell.org/package/hdoc">
+    <link rel="stylesheet"
+          type="text/css"
+          href="style/dtc-html5.css">
+  </head>
+  <body>
+    <div class="document-head">
+      <table>
+        <tbody>
+          <tr>
+            <td class="left">
+              <table class="document-headers">
+                <tbody>
+                </tbody>
+              </table>
+            </td>
+            <td class="right">
+              <table class="document-authors">
+                <tbody>
+                </tbody>
+              </table>
+            </td>
+          </tr>
+        </tbody>
+      </table>
+    </div>
+    <p class="para"><code><code></code></code></p>
+  </body>
+</html>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0015.tct.dtc.en_US.xml b/test/Golden/TCT/HeaderColon/0015.tct.dtc.en_US.xml
index 6a2a97f..6082c19 100644
--- a/test/Golden/TCT/HeaderColon/0015.tct.dtc.en_US.xml
+++ b/test/Golden/TCT/HeaderColon/0015.tct.dtc.en_US.xml
@@ -1,3 +1,18 @@
-1:1:
-unexpected <colon1> at 1:1-2:9
-expecting <about>, <artwork>, <b>, <br>, <code>, <del>, <eref>, <figure>, <i>, <index>, <iref>, <note>, <ol>, <para>, <q>, <quote>, <ref>, <references>, <rref>, <sc>, <section>, <sub>, <sup>, <toc>, <tof>, <u>, <ul>, comment, none, or text
+
+<?xml-model type="application/relax-ng-compact-syntax"
+           href="./schema/dtc.rnc"?>
+
+<?xml-stylesheet type="text/xsl"
+                href="./xsl/document.html5.en.xsl"?>
+
+<?html5-stylesheet type="text/xsl"
+                  href="./xsl/document.html5.en.xsl"?>
+
+<?atom-stylesheet type="text/xsl"
+                 href="./xsl/document.atom.en.xsl"?>
+
+<document>
+  <about>
+  </about>
+  <p><code><code></code></code></p>
+</document>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0015.tct.html5 b/test/Golden/TCT/HeaderColon/0015.tct.html5
index 1821f0b..a18af23 100644
--- a/test/Golden/TCT/HeaderColon/0015.tct.html5
+++ b/test/Golden/TCT/HeaderColon/0015.tct.html5
@@ -1,3 +1,3 @@
 <!DOCTYPE HTML>
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="style/tct-html5.css"></head><body><a id="line-1"></a><span class="header header-colon header-name-colon1"><span class="header-name">colon1</span><span class="header-mark">:</span></span><span class="header-value">
-<a id="line-2"></a> <span class="header header-colon header-name-colon2"><span class="header-name">colon2</span><span class="header-mark">:</span></span><span class="header-value"></span></span></body></html>
\ No newline at end of file
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="style/tct-html5.css"></head><body><a id="line-1"></a><span class="header header-colon header-name-code"><span class="header-name">code</span><span class="header-mark">:</span></span><span class="header-value">
+<a id="line-2"></a> <span class="header header-colon header-name-code"><span class="header-name">code</span><span class="header-mark">:</span></span><span class="header-value"></span></span></body></html>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0015.tct.plain b/test/Golden/TCT/HeaderColon/0015.tct.plain
new file mode 100644
index 0000000..21d4067
--- /dev/null
+++ b/test/Golden/TCT/HeaderColon/0015.tct.plain
@@ -0,0 +1,2 @@
+code:
+ code:
diff --git a/test/Golden/TCT/HeaderColon/0015.tct.xml b/test/Golden/TCT/HeaderColon/0015.tct.xml
index 6e8ed24..0b79467 100644
--- a/test/Golden/TCT/HeaderColon/0015.tct.xml
+++ b/test/Golden/TCT/HeaderColon/0015.tct.xml
@@ -1,4 +1,4 @@
-Cell 1:1 2:9 (XmlElem colon1)
+Cell (XmlElem code) [test/Golden/TCT/HeaderColon/0015.tct#1:1-2:7]
 |
-`- Cell 2:2 2:9 (XmlElem colon2)
+`- Cell (XmlElem code) [test/Golden/TCT/HeaderColon/0015.tct#2:2-2:7]
 
diff --git a/test/Golden/TCT/HeaderColon/0016.tct b/test/Golden/TCT/HeaderColon/0016.tct
index fb00d9f..c2b2b17 100644
--- a/test/Golden/TCT/HeaderColon/0016.tct
+++ b/test/Golden/TCT/HeaderColon/0016.tct
@@ -1,2 +1,2 @@
-colon1:
-      colon2:
+code:
+      code:
diff --git a/test/Golden/TCT/HeaderColon/0016.tct.ast b/test/Golden/TCT/HeaderColon/0016.tct.ast
index 2112137..099195b 100644
--- a/test/Golden/TCT/HeaderColon/0016.tct.ast
+++ b/test/Golden/TCT/HeaderColon/0016.tct.ast
@@ -1,4 +1,4 @@
-[ Tree (Cell 1:1 2:14 (NodeHeader (HeaderColon "colon1" ""))) 
-    [ Tree (Cell 2:7 2:14 (NodeHeader (HeaderColon "colon2" ""))) []
+[ Tree (Cell (NodeHeader (HeaderColon "code" "")) [test/Golden/TCT/HeaderColon/0016.tct#1:1-2:12]) 
+    [ Tree (Cell (NodeHeader (HeaderColon "code" "")) [test/Golden/TCT/HeaderColon/0016.tct#2:7-2:12]) []
     ] 
 ] 
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0016.tct.dtc.en_US.html5 b/test/Golden/TCT/HeaderColon/0016.tct.dtc.en_US.html5
index c7889e5..341e8aa 100644
--- a/test/Golden/TCT/HeaderColon/0016.tct.dtc.en_US.html5
+++ b/test/Golden/TCT/HeaderColon/0016.tct.dtc.en_US.html5
@@ -1,3 +1,36 @@
-1:1:
-unexpected <colon1> at 1:1-2:14
-expecting <about>, <artwork>, <b>, <br>, <code>, <del>, <eref>, <figure>, <i>, <index>, <iref>, <note>, <ol>, <para>, <q>, <quote>, <ref>, <references>, <rref>, <sc>, <section>, <sub>, <sup>, <toc>, <tof>, <u>, <ul>, comment, none, or text
+<!DOCTYPE HTML>
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type"
+          content="text/html; charset=UTF-8">
+    <meta name="generator"
+          content="https://hackage.haskell.org/package/hdoc">
+    <link rel="stylesheet"
+          type="text/css"
+          href="style/dtc-html5.css">
+  </head>
+  <body>
+    <div class="document-head">
+      <table>
+        <tbody>
+          <tr>
+            <td class="left">
+              <table class="document-headers">
+                <tbody>
+                </tbody>
+              </table>
+            </td>
+            <td class="right">
+              <table class="document-authors">
+                <tbody>
+                </tbody>
+              </table>
+            </td>
+          </tr>
+        </tbody>
+      </table>
+    </div>
+    <p class="para"><code><code></code></code></p>
+  </body>
+</html>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0016.tct.dtc.en_US.xml b/test/Golden/TCT/HeaderColon/0016.tct.dtc.en_US.xml
index c7889e5..6082c19 100644
--- a/test/Golden/TCT/HeaderColon/0016.tct.dtc.en_US.xml
+++ b/test/Golden/TCT/HeaderColon/0016.tct.dtc.en_US.xml
@@ -1,3 +1,18 @@
-1:1:
-unexpected <colon1> at 1:1-2:14
-expecting <about>, <artwork>, <b>, <br>, <code>, <del>, <eref>, <figure>, <i>, <index>, <iref>, <note>, <ol>, <para>, <q>, <quote>, <ref>, <references>, <rref>, <sc>, <section>, <sub>, <sup>, <toc>, <tof>, <u>, <ul>, comment, none, or text
+
+<?xml-model type="application/relax-ng-compact-syntax"
+           href="./schema/dtc.rnc"?>
+
+<?xml-stylesheet type="text/xsl"
+                href="./xsl/document.html5.en.xsl"?>
+
+<?html5-stylesheet type="text/xsl"
+                  href="./xsl/document.html5.en.xsl"?>
+
+<?atom-stylesheet type="text/xsl"
+                 href="./xsl/document.atom.en.xsl"?>
+
+<document>
+  <about>
+  </about>
+  <p><code><code></code></code></p>
+</document>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0016.tct.html5 b/test/Golden/TCT/HeaderColon/0016.tct.html5
index 5880145..399fd16 100644
--- a/test/Golden/TCT/HeaderColon/0016.tct.html5
+++ b/test/Golden/TCT/HeaderColon/0016.tct.html5
@@ -1,3 +1,3 @@
 <!DOCTYPE HTML>
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="style/tct-html5.css"></head><body><a id="line-1"></a><span class="header header-colon header-name-colon1"><span class="header-name">colon1</span><span class="header-mark">:</span></span><span class="header-value">
-<a id="line-2"></a>      <span class="header header-colon header-name-colon2"><span class="header-name">colon2</span><span class="header-mark">:</span></span><span class="header-value"></span></span></body></html>
\ No newline at end of file
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="style/tct-html5.css"></head><body><a id="line-1"></a><span class="header header-colon header-name-code"><span class="header-name">code</span><span class="header-mark">:</span></span><span class="header-value">
+<a id="line-2"></a>      <span class="header header-colon header-name-code"><span class="header-name">code</span><span class="header-mark">:</span></span><span class="header-value"></span></span></body></html>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0016.tct.plain b/test/Golden/TCT/HeaderColon/0016.tct.plain
new file mode 100644
index 0000000..c2b2b17
--- /dev/null
+++ b/test/Golden/TCT/HeaderColon/0016.tct.plain
@@ -0,0 +1,2 @@
+code:
+      code:
diff --git a/test/Golden/TCT/HeaderColon/0016.tct.xml b/test/Golden/TCT/HeaderColon/0016.tct.xml
index 224da00..ccddb34 100644
--- a/test/Golden/TCT/HeaderColon/0016.tct.xml
+++ b/test/Golden/TCT/HeaderColon/0016.tct.xml
@@ -1,4 +1,4 @@
-Cell 1:1 2:14 (XmlElem colon1)
+Cell (XmlElem code) [test/Golden/TCT/HeaderColon/0016.tct#1:1-2:12]
 |
-`- Cell 2:7 2:14 (XmlElem colon2)
+`- Cell (XmlElem code) [test/Golden/TCT/HeaderColon/0016.tct#2:7-2:12]
 
diff --git a/test/Golden/TCT/HeaderColon/0017.tct b/test/Golden/TCT/HeaderColon/0017.tct
index a87795e..b74e831 100644
--- a/test/Golden/TCT/HeaderColon/0017.tct
+++ b/test/Golden/TCT/HeaderColon/0017.tct
@@ -1,2 +1,2 @@
-colon1:
-       colon2:
+code:
+       code:
diff --git a/test/Golden/TCT/HeaderColon/0017.tct.ast b/test/Golden/TCT/HeaderColon/0017.tct.ast
index a4ee69f..620469d 100644
--- a/test/Golden/TCT/HeaderColon/0017.tct.ast
+++ b/test/Golden/TCT/HeaderColon/0017.tct.ast
@@ -1,4 +1,4 @@
-[ Tree (Cell 1:1 2:15 (NodeHeader (HeaderColon "colon1" ""))) 
-    [ Tree (Cell 2:8 2:15 (NodeHeader (HeaderColon "colon2" ""))) []
+[ Tree (Cell (NodeHeader (HeaderColon "code" "")) [test/Golden/TCT/HeaderColon/0017.tct#1:1-2:13]) 
+    [ Tree (Cell (NodeHeader (HeaderColon "code" "")) [test/Golden/TCT/HeaderColon/0017.tct#2:8-2:13]) []
     ] 
 ] 
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0017.tct.dtc.en_US.html5 b/test/Golden/TCT/HeaderColon/0017.tct.dtc.en_US.html5
index 22c72f6..341e8aa 100644
--- a/test/Golden/TCT/HeaderColon/0017.tct.dtc.en_US.html5
+++ b/test/Golden/TCT/HeaderColon/0017.tct.dtc.en_US.html5
@@ -1,3 +1,36 @@
-1:1:
-unexpected <colon1> at 1:1-2:15
-expecting <about>, <artwork>, <b>, <br>, <code>, <del>, <eref>, <figure>, <i>, <index>, <iref>, <note>, <ol>, <para>, <q>, <quote>, <ref>, <references>, <rref>, <sc>, <section>, <sub>, <sup>, <toc>, <tof>, <u>, <ul>, comment, none, or text
+<!DOCTYPE HTML>
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type"
+          content="text/html; charset=UTF-8">
+    <meta name="generator"
+          content="https://hackage.haskell.org/package/hdoc">
+    <link rel="stylesheet"
+          type="text/css"
+          href="style/dtc-html5.css">
+  </head>
+  <body>
+    <div class="document-head">
+      <table>
+        <tbody>
+          <tr>
+            <td class="left">
+              <table class="document-headers">
+                <tbody>
+                </tbody>
+              </table>
+            </td>
+            <td class="right">
+              <table class="document-authors">
+                <tbody>
+                </tbody>
+              </table>
+            </td>
+          </tr>
+        </tbody>
+      </table>
+    </div>
+    <p class="para"><code><code></code></code></p>
+  </body>
+</html>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0017.tct.dtc.en_US.xml b/test/Golden/TCT/HeaderColon/0017.tct.dtc.en_US.xml
index 22c72f6..6082c19 100644
--- a/test/Golden/TCT/HeaderColon/0017.tct.dtc.en_US.xml
+++ b/test/Golden/TCT/HeaderColon/0017.tct.dtc.en_US.xml
@@ -1,3 +1,18 @@
-1:1:
-unexpected <colon1> at 1:1-2:15
-expecting <about>, <artwork>, <b>, <br>, <code>, <del>, <eref>, <figure>, <i>, <index>, <iref>, <note>, <ol>, <para>, <q>, <quote>, <ref>, <references>, <rref>, <sc>, <section>, <sub>, <sup>, <toc>, <tof>, <u>, <ul>, comment, none, or text
+
+<?xml-model type="application/relax-ng-compact-syntax"
+           href="./schema/dtc.rnc"?>
+
+<?xml-stylesheet type="text/xsl"
+                href="./xsl/document.html5.en.xsl"?>
+
+<?html5-stylesheet type="text/xsl"
+                  href="./xsl/document.html5.en.xsl"?>
+
+<?atom-stylesheet type="text/xsl"
+                 href="./xsl/document.atom.en.xsl"?>
+
+<document>
+  <about>
+  </about>
+  <p><code><code></code></code></p>
+</document>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0017.tct.html5 b/test/Golden/TCT/HeaderColon/0017.tct.html5
index 4aaa082..0048f2d 100644
--- a/test/Golden/TCT/HeaderColon/0017.tct.html5
+++ b/test/Golden/TCT/HeaderColon/0017.tct.html5
@@ -1,3 +1,3 @@
 <!DOCTYPE HTML>
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="style/tct-html5.css"></head><body><a id="line-1"></a><span class="header header-colon header-name-colon1"><span class="header-name">colon1</span><span class="header-mark">:</span></span><span class="header-value">
-<a id="line-2"></a>       <span class="header header-colon header-name-colon2"><span class="header-name">colon2</span><span class="header-mark">:</span></span><span class="header-value"></span></span></body></html>
\ No newline at end of file
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="style/tct-html5.css"></head><body><a id="line-1"></a><span class="header header-colon header-name-code"><span class="header-name">code</span><span class="header-mark">:</span></span><span class="header-value">
+<a id="line-2"></a>       <span class="header header-colon header-name-code"><span class="header-name">code</span><span class="header-mark">:</span></span><span class="header-value"></span></span></body></html>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0017.tct.plain b/test/Golden/TCT/HeaderColon/0017.tct.plain
new file mode 100644
index 0000000..b74e831
--- /dev/null
+++ b/test/Golden/TCT/HeaderColon/0017.tct.plain
@@ -0,0 +1,2 @@
+code:
+       code:
diff --git a/test/Golden/TCT/HeaderColon/0017.tct.xml b/test/Golden/TCT/HeaderColon/0017.tct.xml
index 7e0946e..2acf37a 100644
--- a/test/Golden/TCT/HeaderColon/0017.tct.xml
+++ b/test/Golden/TCT/HeaderColon/0017.tct.xml
@@ -1,4 +1,4 @@
-Cell 1:1 2:15 (XmlElem colon1)
+Cell (XmlElem code) [test/Golden/TCT/HeaderColon/0017.tct#1:1-2:13]
 |
-`- Cell 2:8 2:15 (XmlElem colon2)
+`- Cell (XmlElem code) [test/Golden/TCT/HeaderColon/0017.tct#2:8-2:13]
 
diff --git a/test/Golden/TCT/HeaderColon/0018.tct b/test/Golden/TCT/HeaderColon/0018.tct
index 1307da8..361d691 100644
--- a/test/Golden/TCT/HeaderColon/0018.tct
+++ b/test/Golden/TCT/HeaderColon/0018.tct
@@ -1,2 +1,2 @@
-colon1:
-        colon2:
+code:
+        code:
diff --git a/test/Golden/TCT/HeaderColon/0018.tct.ast b/test/Golden/TCT/HeaderColon/0018.tct.ast
index c2923cd..c9f9512 100644
--- a/test/Golden/TCT/HeaderColon/0018.tct.ast
+++ b/test/Golden/TCT/HeaderColon/0018.tct.ast
@@ -1,4 +1,4 @@
-[ Tree (Cell 1:1 2:16 (NodeHeader (HeaderColon "colon1" ""))) 
-    [ Tree (Cell 2:9 2:16 (NodeHeader (HeaderColon "colon2" ""))) []
+[ Tree (Cell (NodeHeader (HeaderColon "code" "")) [test/Golden/TCT/HeaderColon/0018.tct#1:1-2:14]) 
+    [ Tree (Cell (NodeHeader (HeaderColon "code" "")) [test/Golden/TCT/HeaderColon/0018.tct#2:9-2:14]) []
     ] 
 ] 
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0018.tct.dtc.en_US.html5 b/test/Golden/TCT/HeaderColon/0018.tct.dtc.en_US.html5
index db4892d..341e8aa 100644
--- a/test/Golden/TCT/HeaderColon/0018.tct.dtc.en_US.html5
+++ b/test/Golden/TCT/HeaderColon/0018.tct.dtc.en_US.html5
@@ -1,3 +1,36 @@
-1:1:
-unexpected <colon1> at 1:1-2:16
-expecting <about>, <artwork>, <b>, <br>, <code>, <del>, <eref>, <figure>, <i>, <index>, <iref>, <note>, <ol>, <para>, <q>, <quote>, <ref>, <references>, <rref>, <sc>, <section>, <sub>, <sup>, <toc>, <tof>, <u>, <ul>, comment, none, or text
+<!DOCTYPE HTML>
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type"
+          content="text/html; charset=UTF-8">
+    <meta name="generator"
+          content="https://hackage.haskell.org/package/hdoc">
+    <link rel="stylesheet"
+          type="text/css"
+          href="style/dtc-html5.css">
+  </head>
+  <body>
+    <div class="document-head">
+      <table>
+        <tbody>
+          <tr>
+            <td class="left">
+              <table class="document-headers">
+                <tbody>
+                </tbody>
+              </table>
+            </td>
+            <td class="right">
+              <table class="document-authors">
+                <tbody>
+                </tbody>
+              </table>
+            </td>
+          </tr>
+        </tbody>
+      </table>
+    </div>
+    <p class="para"><code><code></code></code></p>
+  </body>
+</html>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0018.tct.dtc.en_US.xml b/test/Golden/TCT/HeaderColon/0018.tct.dtc.en_US.xml
index db4892d..6082c19 100644
--- a/test/Golden/TCT/HeaderColon/0018.tct.dtc.en_US.xml
+++ b/test/Golden/TCT/HeaderColon/0018.tct.dtc.en_US.xml
@@ -1,3 +1,18 @@
-1:1:
-unexpected <colon1> at 1:1-2:16
-expecting <about>, <artwork>, <b>, <br>, <code>, <del>, <eref>, <figure>, <i>, <index>, <iref>, <note>, <ol>, <para>, <q>, <quote>, <ref>, <references>, <rref>, <sc>, <section>, <sub>, <sup>, <toc>, <tof>, <u>, <ul>, comment, none, or text
+
+<?xml-model type="application/relax-ng-compact-syntax"
+           href="./schema/dtc.rnc"?>
+
+<?xml-stylesheet type="text/xsl"
+                href="./xsl/document.html5.en.xsl"?>
+
+<?html5-stylesheet type="text/xsl"
+                  href="./xsl/document.html5.en.xsl"?>
+
+<?atom-stylesheet type="text/xsl"
+                 href="./xsl/document.atom.en.xsl"?>
+
+<document>
+  <about>
+  </about>
+  <p><code><code></code></code></p>
+</document>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0018.tct.html5 b/test/Golden/TCT/HeaderColon/0018.tct.html5
index 0a04a8a..10969f4 100644
--- a/test/Golden/TCT/HeaderColon/0018.tct.html5
+++ b/test/Golden/TCT/HeaderColon/0018.tct.html5
@@ -1,3 +1,3 @@
 <!DOCTYPE HTML>
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="style/tct-html5.css"></head><body><a id="line-1"></a><span class="header header-colon header-name-colon1"><span class="header-name">colon1</span><span class="header-mark">:</span></span><span class="header-value">
-<a id="line-2"></a>        <span class="header header-colon header-name-colon2"><span class="header-name">colon2</span><span class="header-mark">:</span></span><span class="header-value"></span></span></body></html>
\ No newline at end of file
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="style/tct-html5.css"></head><body><a id="line-1"></a><span class="header header-colon header-name-code"><span class="header-name">code</span><span class="header-mark">:</span></span><span class="header-value">
+<a id="line-2"></a>        <span class="header header-colon header-name-code"><span class="header-name">code</span><span class="header-mark">:</span></span><span class="header-value"></span></span></body></html>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0018.tct.plain b/test/Golden/TCT/HeaderColon/0018.tct.plain
new file mode 100644
index 0000000..361d691
--- /dev/null
+++ b/test/Golden/TCT/HeaderColon/0018.tct.plain
@@ -0,0 +1,2 @@
+code:
+        code:
diff --git a/test/Golden/TCT/HeaderColon/0018.tct.xml b/test/Golden/TCT/HeaderColon/0018.tct.xml
index 08a502d..25617e4 100644
--- a/test/Golden/TCT/HeaderColon/0018.tct.xml
+++ b/test/Golden/TCT/HeaderColon/0018.tct.xml
@@ -1,4 +1,4 @@
-Cell 1:1 2:16 (XmlElem colon1)
+Cell (XmlElem code) [test/Golden/TCT/HeaderColon/0018.tct#1:1-2:14]
 |
-`- Cell 2:9 2:16 (XmlElem colon2)
+`- Cell (XmlElem code) [test/Golden/TCT/HeaderColon/0018.tct#2:9-2:14]
 
diff --git a/test/Golden/TCT/HeaderColon/0019.tct b/test/Golden/TCT/HeaderColon/0019.tct
index 3bb88b4..13f5220 100644
--- a/test/Golden/TCT/HeaderColon/0019.tct
+++ b/test/Golden/TCT/HeaderColon/0019.tct
@@ -1 +1 @@
-colon1:colon2:
+code:code:
diff --git a/test/Golden/TCT/HeaderColon/0019.tct.ast b/test/Golden/TCT/HeaderColon/0019.tct.ast
index ac4d12b..e67f023 100644
--- a/test/Golden/TCT/HeaderColon/0019.tct.ast
+++ b/test/Golden/TCT/HeaderColon/0019.tct.ast
@@ -1,4 +1,4 @@
-[ Tree (Cell 1:1 1:15 NodePara) 
-    [ Tree (Cell 1:1 1:15 (NodeToken (TokenText "colon1:colon2:"))) []
+[ Tree (Cell NodePara [test/Golden/TCT/HeaderColon/0019.tct#1:1-1:11]) 
+    [ Tree (Cell (NodeToken (TokenText "code:code:")) [test/Golden/TCT/HeaderColon/0019.tct#1:1-1:11]) []
     ] 
 ] 
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0019.tct.dtc.en_US.html5 b/test/Golden/TCT/HeaderColon/0019.tct.dtc.en_US.html5
index 055ecc9..515bd3f 100644
--- a/test/Golden/TCT/HeaderColon/0019.tct.dtc.en_US.html5
+++ b/test/Golden/TCT/HeaderColon/0019.tct.dtc.en_US.html5
@@ -33,7 +33,7 @@
     </div>
     <div id="para1"
          class="para">
-      <p>colon1:colon2:</p>
+      <p>code:code:</p>
     </div>
   </body>
 </html>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0019.tct.dtc.en_US.xml b/test/Golden/TCT/HeaderColon/0019.tct.dtc.en_US.xml
index 949ff4f..c94828e 100644
--- a/test/Golden/TCT/HeaderColon/0019.tct.dtc.en_US.xml
+++ b/test/Golden/TCT/HeaderColon/0019.tct.dtc.en_US.xml
@@ -15,6 +15,6 @@
   <about>
   </about>
   <para>
-    <p>colon1:colon2:</p>
+    <p>code:code:</p>
   </para>
 </document>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0019.tct.html5 b/test/Golden/TCT/HeaderColon/0019.tct.html5
index fe4f61b..0070e45 100644
--- a/test/Golden/TCT/HeaderColon/0019.tct.html5
+++ b/test/Golden/TCT/HeaderColon/0019.tct.html5
@@ -1,2 +1,2 @@
 <!DOCTYPE HTML>
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="style/tct-html5.css"></head><body><a id="line-1"></a>colon1:colon2:</body></html>
\ No newline at end of file
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="style/tct-html5.css"></head><body><a id="line-1"></a>code:code:</body></html>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0019.tct.plain b/test/Golden/TCT/HeaderColon/0019.tct.plain
new file mode 100644
index 0000000..13f5220
--- /dev/null
+++ b/test/Golden/TCT/HeaderColon/0019.tct.plain
@@ -0,0 +1 @@
+code:code:
diff --git a/test/Golden/TCT/HeaderColon/0019.tct.xml b/test/Golden/TCT/HeaderColon/0019.tct.xml
index 20f4e4c..0d19c31 100644
--- a/test/Golden/TCT/HeaderColon/0019.tct.xml
+++ b/test/Golden/TCT/HeaderColon/0019.tct.xml
@@ -1,4 +1,4 @@
-Cell 1:1 1:15 (XmlElem para)
+Cell (XmlElem para) [test/Golden/TCT/HeaderColon/0019.tct#1:1-1:11]
 |
-`- Cell 1:1 1:15 (XmlText "colon1:colon2:")
+`- Cell (XmlText "code:code:") [test/Golden/TCT/HeaderColon/0019.tct#1:1-1:11]
 
diff --git a/test/Golden/TCT/HeaderColon/0020.tct b/test/Golden/TCT/HeaderColon/0020.tct
index 8ec483d..fd6482d 100644
--- a/test/Golden/TCT/HeaderColon/0020.tct
+++ b/test/Golden/TCT/HeaderColon/0020.tct
@@ -1 +1 @@
-colon1: colon2:
+code: code:
diff --git a/test/Golden/TCT/HeaderColon/0020.tct.ast b/test/Golden/TCT/HeaderColon/0020.tct.ast
index e7d2445..3860f48 100644
--- a/test/Golden/TCT/HeaderColon/0020.tct.ast
+++ b/test/Golden/TCT/HeaderColon/0020.tct.ast
@@ -1,4 +1,4 @@
-[ Tree (Cell 1:1 1:16 (NodeHeader (HeaderColon "colon1" ""))) 
-    [ Tree (Cell 1:9 1:16 (NodeHeader (HeaderColon "colon2" ""))) []
+[ Tree (Cell (NodeHeader (HeaderColon "code" "")) [test/Golden/TCT/HeaderColon/0020.tct#1:1-1:12]) 
+    [ Tree (Cell (NodeHeader (HeaderColon "code" "")) [test/Golden/TCT/HeaderColon/0020.tct#1:7-1:12]) []
     ] 
 ] 
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0020.tct.dtc.en_US.html5 b/test/Golden/TCT/HeaderColon/0020.tct.dtc.en_US.html5
index ec92498..341e8aa 100644
--- a/test/Golden/TCT/HeaderColon/0020.tct.dtc.en_US.html5
+++ b/test/Golden/TCT/HeaderColon/0020.tct.dtc.en_US.html5
@@ -1,3 +1,36 @@
-1:1:
-unexpected <colon1> at 1:1-1:16
-expecting <about>, <artwork>, <b>, <br>, <code>, <del>, <eref>, <figure>, <i>, <index>, <iref>, <note>, <ol>, <para>, <q>, <quote>, <ref>, <references>, <rref>, <sc>, <section>, <sub>, <sup>, <toc>, <tof>, <u>, <ul>, comment, none, or text
+<!DOCTYPE HTML>
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type"
+          content="text/html; charset=UTF-8">
+    <meta name="generator"
+          content="https://hackage.haskell.org/package/hdoc">
+    <link rel="stylesheet"
+          type="text/css"
+          href="style/dtc-html5.css">
+  </head>
+  <body>
+    <div class="document-head">
+      <table>
+        <tbody>
+          <tr>
+            <td class="left">
+              <table class="document-headers">
+                <tbody>
+                </tbody>
+              </table>
+            </td>
+            <td class="right">
+              <table class="document-authors">
+                <tbody>
+                </tbody>
+              </table>
+            </td>
+          </tr>
+        </tbody>
+      </table>
+    </div>
+    <p class="para"><code><code></code></code></p>
+  </body>
+</html>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0020.tct.dtc.en_US.xml b/test/Golden/TCT/HeaderColon/0020.tct.dtc.en_US.xml
index ec92498..6082c19 100644
--- a/test/Golden/TCT/HeaderColon/0020.tct.dtc.en_US.xml
+++ b/test/Golden/TCT/HeaderColon/0020.tct.dtc.en_US.xml
@@ -1,3 +1,18 @@
-1:1:
-unexpected <colon1> at 1:1-1:16
-expecting <about>, <artwork>, <b>, <br>, <code>, <del>, <eref>, <figure>, <i>, <index>, <iref>, <note>, <ol>, <para>, <q>, <quote>, <ref>, <references>, <rref>, <sc>, <section>, <sub>, <sup>, <toc>, <tof>, <u>, <ul>, comment, none, or text
+
+<?xml-model type="application/relax-ng-compact-syntax"
+           href="./schema/dtc.rnc"?>
+
+<?xml-stylesheet type="text/xsl"
+                href="./xsl/document.html5.en.xsl"?>
+
+<?html5-stylesheet type="text/xsl"
+                  href="./xsl/document.html5.en.xsl"?>
+
+<?atom-stylesheet type="text/xsl"
+                 href="./xsl/document.atom.en.xsl"?>
+
+<document>
+  <about>
+  </about>
+  <p><code><code></code></code></p>
+</document>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0020.tct.html5 b/test/Golden/TCT/HeaderColon/0020.tct.html5
index 2c10e2f..7c0f11a 100644
--- a/test/Golden/TCT/HeaderColon/0020.tct.html5
+++ b/test/Golden/TCT/HeaderColon/0020.tct.html5
@@ -1,2 +1,2 @@
 <!DOCTYPE HTML>
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="style/tct-html5.css"></head><body><a id="line-1"></a><span class="header header-colon header-name-colon1"><span class="header-name">colon1</span><span class="header-mark">:</span></span><span class="header-value"> <span class="header header-colon header-name-colon2"><span class="header-name">colon2</span><span class="header-mark">:</span></span><span class="header-value"></span></span></body></html>
\ No newline at end of file
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="style/tct-html5.css"></head><body><a id="line-1"></a><span class="header header-colon header-name-code"><span class="header-name">code</span><span class="header-mark">:</span></span><span class="header-value"> <span class="header header-colon header-name-code"><span class="header-name">code</span><span class="header-mark">:</span></span><span class="header-value"></span></span></body></html>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0020.tct.plain b/test/Golden/TCT/HeaderColon/0020.tct.plain
new file mode 100644
index 0000000..fd6482d
--- /dev/null
+++ b/test/Golden/TCT/HeaderColon/0020.tct.plain
@@ -0,0 +1 @@
+code: code:
diff --git a/test/Golden/TCT/HeaderColon/0020.tct.xml b/test/Golden/TCT/HeaderColon/0020.tct.xml
index 83e7f01..e672563 100644
--- a/test/Golden/TCT/HeaderColon/0020.tct.xml
+++ b/test/Golden/TCT/HeaderColon/0020.tct.xml
@@ -1,4 +1,4 @@
-Cell 1:1 1:16 (XmlElem colon1)
+Cell (XmlElem code) [test/Golden/TCT/HeaderColon/0020.tct#1:1-1:12]
 |
-`- Cell 1:9 1:16 (XmlElem colon2)
+`- Cell (XmlElem code) [test/Golden/TCT/HeaderColon/0020.tct#1:7-1:12]
 
diff --git a/test/Golden/TCT/HeaderColon/0021.tct.ast b/test/Golden/TCT/HeaderColon/0021.tct.ast
index 3404150..553b74f 100644
--- a/test/Golden/TCT/HeaderColon/0021.tct.ast
+++ b/test/Golden/TCT/HeaderColon/0021.tct.ast
@@ -1,9 +1,9 @@
-[ Tree (Cell 1:1 4:8 (NodeHeader (HeaderColon "" ""))) 
-    [ Tree (Cell 1:3 1:8 NodePara) 
-        [ Tree (Cell 1:3 1:8 (NodeToken (TokenText "text1"))) []
+[ Tree (Cell (NodeHeader (HeaderColon "" "")) [test/Golden/TCT/HeaderColon/0021.tct#1:1-4:8]) 
+    [ Tree (Cell NodePara [test/Golden/TCT/HeaderColon/0021.tct#1:3-1:8]) 
+        [ Tree (Cell (NodeToken (TokenText "text1")) [test/Golden/TCT/HeaderColon/0021.tct#1:3-1:8]) []
         ] 
-    , Tree (Cell 3:3 4:8 NodePara) 
-        [ Tree (Cell 3:3 4:8 (NodeToken (TokenText "text2\ntext3"))) []
+    , Tree (Cell NodePara [test/Golden/TCT/HeaderColon/0021.tct#3:3-4:8]) 
+        [ Tree (Cell (NodeToken (TokenText "text2\ntext3")) [test/Golden/TCT/HeaderColon/0021.tct#3:3-4:8]) []
         ] 
     ] 
 ] 
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0021.tct.plain b/test/Golden/TCT/HeaderColon/0021.tct.plain
new file mode 100644
index 0000000..c5af656
--- /dev/null
+++ b/test/Golden/TCT/HeaderColon/0021.tct.plain
@@ -0,0 +1,4 @@
+: text1
+
+  text2
+  text3
diff --git a/test/Golden/TCT/HeaderColon/0021.tct.xml b/test/Golden/TCT/HeaderColon/0021.tct.xml
index 08ae3b2..7d12b21 100644
--- a/test/Golden/TCT/HeaderColon/0021.tct.xml
+++ b/test/Golden/TCT/HeaderColon/0021.tct.xml
@@ -1,12 +1,12 @@
-Cell 1:1 4:8 (XmlElem figure)
+Cell (XmlElem figure) [test/Golden/TCT/HeaderColon/0021.tct#1:1-4:8]
 |
-+- Cell 1:1 1:1 (XmlAttr type "")
++- Cell (XmlAttr type "") [test/Golden/TCT/HeaderColon/0021.tct#1:1-1:1]
 |
-+- Cell 1:3 1:8 (XmlElem title)
++- Cell (XmlElem title) [test/Golden/TCT/HeaderColon/0021.tct#1:3-1:8]
 |  |
-|  `- Cell 1:3 1:8 (XmlText "text1")
+|  `- Cell (XmlText "text1") [test/Golden/TCT/HeaderColon/0021.tct#1:3-1:8]
 |
-`- Cell 3:3 4:8 (XmlElem para)
+`- Cell (XmlElem para) [test/Golden/TCT/HeaderColon/0021.tct#3:3-4:8]
    |
-   `- Cell 3:3 4:8 (XmlText "text2\ntext3")
+   `- Cell (XmlText "text2\ntext3") [test/Golden/TCT/HeaderColon/0021.tct#3:3-4:8]
 
diff --git a/test/Golden/TCT/HeaderColon/0022.tct.ast b/test/Golden/TCT/HeaderColon/0022.tct.ast
index cb7f921..9846100 100644
--- a/test/Golden/TCT/HeaderColon/0022.tct.ast
+++ b/test/Golden/TCT/HeaderColon/0022.tct.ast
@@ -1,11 +1,11 @@
-[ Tree (Cell 1:1 1:8 (NodeHeader (HeaderColon "" ""))) 
-    [ Tree (Cell 1:3 1:8 NodePara) 
-        [ Tree (Cell 1:3 1:8 (NodeToken (TokenText "text1"))) []
+[ Tree (Cell (NodeHeader (HeaderColon "" "")) [test/Golden/TCT/HeaderColon/0022.tct#1:1-1:8]) 
+    [ Tree (Cell NodePara [test/Golden/TCT/HeaderColon/0022.tct#1:3-1:8]) 
+        [ Tree (Cell (NodeToken (TokenText "text1")) [test/Golden/TCT/HeaderColon/0022.tct#1:3-1:8]) []
         ] 
     ] 
-, Tree (Cell 2:1 3:8 (NodeHeader (HeaderGreat "" ""))) 
-    [ Tree (Cell 2:3 3:8 NodePara) 
-        [ Tree (Cell 2:3 3:8 (NodeToken (TokenText "text2\ntext3"))) []
+, Tree (Cell (NodeHeader (HeaderGreat "" "")) [test/Golden/TCT/HeaderColon/0022.tct#2:1-3:8]) 
+    [ Tree (Cell NodePara [test/Golden/TCT/HeaderColon/0022.tct#2:3-3:8]) 
+        [ Tree (Cell (NodeToken (TokenText "text2\ntext3")) [test/Golden/TCT/HeaderColon/0022.tct#2:3-3:8]) []
         ] 
     ] 
 ] 
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0022.tct.plain b/test/Golden/TCT/HeaderColon/0022.tct.plain
new file mode 100644
index 0000000..357c87a
--- /dev/null
+++ b/test/Golden/TCT/HeaderColon/0022.tct.plain
@@ -0,0 +1,3 @@
+: text1
+> text2
+> text3
diff --git a/test/Golden/TCT/HeaderColon/0022.tct.xml b/test/Golden/TCT/HeaderColon/0022.tct.xml
index 0619b72..fbcac2e 100644
--- a/test/Golden/TCT/HeaderColon/0022.tct.xml
+++ b/test/Golden/TCT/HeaderColon/0022.tct.xml
@@ -1,16 +1,16 @@
-Cell 1:1 1:8 (XmlElem figure)
+Cell (XmlElem figure) [test/Golden/TCT/HeaderColon/0022.tct#1:1-1:8]
 |
-+- Cell 1:1 1:1 (XmlAttr type "")
++- Cell (XmlAttr type "") [test/Golden/TCT/HeaderColon/0022.tct#1:1-1:1]
 |
-+- Cell 1:3 1:8 (XmlElem title)
++- Cell (XmlElem title) [test/Golden/TCT/HeaderColon/0022.tct#1:3-1:8]
 |  |
-|  `- Cell 1:3 1:8 (XmlText "text1")
+|  `- Cell (XmlText "text1") [test/Golden/TCT/HeaderColon/0022.tct#1:3-1:8]
 |
-`- Cell 2:1 3:8 (XmlElem quote)
+`- Cell (XmlElem quote) [test/Golden/TCT/HeaderColon/0022.tct#2:1-3:8]
    |
-   +- Cell 2:1 2:1 (XmlAttr type "")
+   +- Cell (XmlAttr type "") [test/Golden/TCT/HeaderColon/0022.tct#2:1-3:8]
    |
-   `- Cell 2:3 3:8 (XmlElem para)
+   `- Cell (XmlElem para) [test/Golden/TCT/HeaderColon/0022.tct#2:3-3:8]
       |
-      `- Cell 2:3 3:8 (XmlText "text2\ntext3")
+      `- Cell (XmlText "text2\ntext3") [test/Golden/TCT/HeaderColon/0022.tct#2:3-3:8]
 
diff --git a/test/Golden/TCT/HeaderColon/0023.tct.ast b/test/Golden/TCT/HeaderColon/0023.tct.ast
index 5e11ff7..6ea8656 100644
--- a/test/Golden/TCT/HeaderColon/0023.tct.ast
+++ b/test/Golden/TCT/HeaderColon/0023.tct.ast
@@ -1,9 +1,9 @@
-[ Tree (Cell 1:1 1:8 (NodeHeader (HeaderColon "" ""))) 
-    [ Tree (Cell 1:3 1:8 NodePara) 
-        [ Tree (Cell 1:3 1:8 (NodeToken (TokenText "text1"))) []
+[ Tree (Cell (NodeHeader (HeaderColon "" "")) [test/Golden/TCT/HeaderColon/0023.tct#1:1-1:8]) 
+    [ Tree (Cell NodePara [test/Golden/TCT/HeaderColon/0023.tct#1:3-1:8]) 
+        [ Tree (Cell (NodeToken (TokenText "text1")) [test/Golden/TCT/HeaderColon/0023.tct#1:3-1:8]) []
         ] 
     ] 
-, Tree (Cell 2:1 3:8 (NodeHeader (HeaderBar "" ""))) 
-    [ Tree (Cell 2:3 3:8 (NodeText "text2\ntext3")) []
+, Tree (Cell (NodeHeader (HeaderBar "" "")) [test/Golden/TCT/HeaderColon/0023.tct#2:1-3:8]) 
+    [ Tree (Cell (NodeText "text2\ntext3") [test/Golden/TCT/HeaderColon/0023.tct#2:3-3:8]) []
     ] 
 ] 
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderColon/0023.tct.plain b/test/Golden/TCT/HeaderColon/0023.tct.plain
new file mode 100644
index 0000000..c7ec865
--- /dev/null
+++ b/test/Golden/TCT/HeaderColon/0023.tct.plain
@@ -0,0 +1,3 @@
+: text1
+| text2
+| text3
diff --git a/test/Golden/TCT/HeaderColon/0023.tct.xml b/test/Golden/TCT/HeaderColon/0023.tct.xml
index 5e654c2..cff2273 100644
--- a/test/Golden/TCT/HeaderColon/0023.tct.xml
+++ b/test/Golden/TCT/HeaderColon/0023.tct.xml
@@ -1,14 +1,14 @@
-Cell 1:1 1:8 (XmlElem figure)
+Cell (XmlElem figure) [test/Golden/TCT/HeaderColon/0023.tct#1:1-1:8]
 |
-+- Cell 1:1 1:1 (XmlAttr type "")
++- Cell (XmlAttr type "") [test/Golden/TCT/HeaderColon/0023.tct#1:1-1:1]
 |
-+- Cell 1:3 1:8 (XmlElem title)
++- Cell (XmlElem title) [test/Golden/TCT/HeaderColon/0023.tct#1:3-1:8]
 |  |
-|  `- Cell 1:3 1:8 (XmlText "text1")
+|  `- Cell (XmlText "text1") [test/Golden/TCT/HeaderColon/0023.tct#1:3-1:8]
 |
-`- Cell 2:1 3:8 (XmlElem artwork)
+`- Cell (XmlElem artwork) [test/Golden/TCT/HeaderColon/0023.tct#2:1-3:8]
    |
-   +- Cell 2:1 2:1 (XmlAttr type "")
+   +- Cell (XmlAttr type "") [test/Golden/TCT/HeaderColon/0023.tct#2:1-3:8]
    |
-   `- Cell 2:3 3:8 (XmlText "text2\ntext3")
+   `- Cell (XmlText "text2\ntext3") [test/Golden/TCT/HeaderColon/0023.tct#2:3-3:8]
 
diff --git a/test/Golden/TCT/HeaderDotHash/0001.tct b/test/Golden/TCT/HeaderDotHash/0001.tct
new file mode 100644
index 0000000..9733cc5
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0001.tct
@@ -0,0 +1 @@
+./../HeaderColon/0004.tct
diff --git a/test/Golden/TCT/HeaderDotHash/0001.tct.ast b/test/Golden/TCT/HeaderDotHash/0001.tct.ast
new file mode 100644
index 0000000..8269c67
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0001.tct.ast
@@ -0,0 +1,11 @@
+[ Tree (Cell (NodeHeader (HeaderDotSlash "./../HeaderColon/0004.tct")) [test/Golden/TCT/HeaderDotHash/0001.tct#1:1-1:26]) 
+    [ Tree (Cell (NodeHeader (HeaderColon "code" "")) [test/Golden/TCT/HeaderColon/0004.tct#1:1-1:12,test/Golden/TCT/HeaderDotHash/0001.tct#1:1-1:26]) 
+        [ Tree (Cell NodePara [test/Golden/TCT/HeaderColon/0004.tct#1:7-1:12,test/Golden/TCT/HeaderDotHash/0001.tct#1:1-1:26]) 
+            [ Tree (Cell (NodeToken (TokenText "text0")) [test/Golden/TCT/HeaderColon/0004.tct#1:7-1:12,test/Golden/TCT/HeaderDotHash/0001.tct#1:1-1:26]) []
+            ] 
+        ] 
+    , Tree (Cell NodePara [test/Golden/TCT/HeaderColon/0004.tct#2:1-2:6,test/Golden/TCT/HeaderDotHash/0001.tct#1:1-1:26]) 
+        [ Tree (Cell (NodeToken (TokenText "text1")) [test/Golden/TCT/HeaderColon/0004.tct#2:1-2:6,test/Golden/TCT/HeaderDotHash/0001.tct#1:1-1:26]) []
+        ] 
+    ] 
+] 
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderDotHash/0001.tct.dtc.en_US.html5 b/test/Golden/TCT/HeaderDotHash/0001.tct.dtc.en_US.html5
new file mode 100644
index 0000000..3e514bb
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0001.tct.dtc.en_US.html5
@@ -0,0 +1,40 @@
+<!DOCTYPE HTML>
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type"
+          content="text/html; charset=UTF-8">
+    <meta name="generator"
+          content="https://hackage.haskell.org/package/hdoc">
+    <link rel="stylesheet"
+          type="text/css"
+          href="style/dtc-html5.css">
+  </head>
+  <body>
+    <div class="document-head">
+      <table>
+        <tbody>
+          <tr>
+            <td class="left">
+              <table class="document-headers">
+                <tbody>
+                </tbody>
+              </table>
+            </td>
+            <td class="right">
+              <table class="document-authors">
+                <tbody>
+                </tbody>
+              </table>
+            </td>
+          </tr>
+        </tbody>
+      </table>
+    </div>
+    <p class="para"><code>text0</code></p>
+    <div id="para1"
+         class="para">
+      <p>text1</p>
+    </div>
+  </body>
+</html>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderDotHash/0001.tct.dtc.en_US.xml b/test/Golden/TCT/HeaderDotHash/0001.tct.dtc.en_US.xml
new file mode 100644
index 0000000..2957fd1
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0001.tct.dtc.en_US.xml
@@ -0,0 +1,21 @@
+
+<?xml-model type="application/relax-ng-compact-syntax"
+           href="./schema/dtc.rnc"?>
+
+<?xml-stylesheet type="text/xsl"
+                href="./xsl/document.html5.en.xsl"?>
+
+<?html5-stylesheet type="text/xsl"
+                  href="./xsl/document.html5.en.xsl"?>
+
+<?atom-stylesheet type="text/xsl"
+                 href="./xsl/document.atom.en.xsl"?>
+
+<document>
+  <about>
+  </about>
+  <p><code>text0</code></p>
+  <para>
+    <p>text1</p>
+  </para>
+</document>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderDotHash/0001.tct.html5 b/test/Golden/TCT/HeaderDotHash/0001.tct.html5
new file mode 100644
index 0000000..3c84770
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0001.tct.html5
@@ -0,0 +1,2 @@
+<!DOCTYPE HTML>
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="style/tct-html5.css"></head><body><a id="line-1"></a><a class="header-dotslash" href="././../HeaderColon/0004.tct.html">././../HeaderColon/0004.tct</a></body></html>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderDotHash/0001.tct.plain b/test/Golden/TCT/HeaderDotHash/0001.tct.plain
new file mode 100644
index 0000000..68dd5ae
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0001.tct.plain
@@ -0,0 +1 @@
+././../HeaderColon/0004.tct
diff --git a/test/Golden/TCT/HeaderDotHash/0001.tct.xml b/test/Golden/TCT/HeaderDotHash/0001.tct.xml
new file mode 100644
index 0000000..862cee2
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0001.tct.xml
@@ -0,0 +1,8 @@
+Cell (XmlElem code) [test/Golden/TCT/HeaderColon/0004.tct#1:1-1:12,test/Golden/TCT/HeaderDotHash/0001.tct#1:1-1:26]
+|
+`- Cell (XmlText "text0") [test/Golden/TCT/HeaderColon/0004.tct#1:7-1:12,test/Golden/TCT/HeaderDotHash/0001.tct#1:1-1:26]
+
+Cell (XmlElem para) [test/Golden/TCT/HeaderColon/0004.tct#2:1-2:6,test/Golden/TCT/HeaderDotHash/0001.tct#1:1-1:26]
+|
+`- Cell (XmlText "text1") [test/Golden/TCT/HeaderColon/0004.tct#2:1-2:6,test/Golden/TCT/HeaderDotHash/0001.tct#1:1-1:26]
+
diff --git a/test/Golden/TCT/HeaderDotHash/0002.tct b/test/Golden/TCT/HeaderDotHash/0002.tct
new file mode 100644
index 0000000..4000dd5
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0002.tct
@@ -0,0 +1 @@
+./0001.tct
diff --git a/test/Golden/TCT/HeaderDotHash/0002.tct.ast b/test/Golden/TCT/HeaderDotHash/0002.tct.ast
new file mode 100644
index 0000000..41e6912
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0002.tct.ast
@@ -0,0 +1,13 @@
+[ Tree (Cell (NodeHeader (HeaderDotSlash "./0001.tct")) [test/Golden/TCT/HeaderDotHash/0002.tct#1:1-1:11]) 
+    [ Tree (Cell (NodeHeader (HeaderDotSlash "./../HeaderColon/0004.tct")) [test/Golden/TCT/HeaderDotHash/0001.tct#1:1-1:26,test/Golden/TCT/HeaderDotHash/0002.tct#1:1-1:11]) 
+        [ Tree (Cell (NodeHeader (HeaderColon "code" "")) [test/Golden/TCT/HeaderColon/0004.tct#1:1-1:12,test/Golden/TCT/HeaderDotHash/0001.tct#1:1-1:26,test/Golden/TCT/HeaderDotHash/0002.tct#1:1-1:11]) 
+            [ Tree (Cell NodePara [test/Golden/TCT/HeaderColon/0004.tct#1:7-1:12,test/Golden/TCT/HeaderDotHash/0001.tct#1:1-1:26,test/Golden/TCT/HeaderDotHash/0002.tct#1:1-1:11]) 
+                [ Tree (Cell (NodeToken (TokenText "text0")) [test/Golden/TCT/HeaderColon/0004.tct#1:7-1:12,test/Golden/TCT/HeaderDotHash/0001.tct#1:1-1:26,test/Golden/TCT/HeaderDotHash/0002.tct#1:1-1:11]) []
+                ] 
+            ] 
+        , Tree (Cell NodePara [test/Golden/TCT/HeaderColon/0004.tct#2:1-2:6,test/Golden/TCT/HeaderDotHash/0001.tct#1:1-1:26,test/Golden/TCT/HeaderDotHash/0002.tct#1:1-1:11]) 
+            [ Tree (Cell (NodeToken (TokenText "text1")) [test/Golden/TCT/HeaderColon/0004.tct#2:1-2:6,test/Golden/TCT/HeaderDotHash/0001.tct#1:1-1:26,test/Golden/TCT/HeaderDotHash/0002.tct#1:1-1:11]) []
+            ] 
+        ] 
+    ] 
+] 
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderDotHash/0002.tct.dtc.en_US.html5 b/test/Golden/TCT/HeaderDotHash/0002.tct.dtc.en_US.html5
new file mode 100644
index 0000000..3e514bb
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0002.tct.dtc.en_US.html5
@@ -0,0 +1,40 @@
+<!DOCTYPE HTML>
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type"
+          content="text/html; charset=UTF-8">
+    <meta name="generator"
+          content="https://hackage.haskell.org/package/hdoc">
+    <link rel="stylesheet"
+          type="text/css"
+          href="style/dtc-html5.css">
+  </head>
+  <body>
+    <div class="document-head">
+      <table>
+        <tbody>
+          <tr>
+            <td class="left">
+              <table class="document-headers">
+                <tbody>
+                </tbody>
+              </table>
+            </td>
+            <td class="right">
+              <table class="document-authors">
+                <tbody>
+                </tbody>
+              </table>
+            </td>
+          </tr>
+        </tbody>
+      </table>
+    </div>
+    <p class="para"><code>text0</code></p>
+    <div id="para1"
+         class="para">
+      <p>text1</p>
+    </div>
+  </body>
+</html>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderDotHash/0002.tct.dtc.en_US.xml b/test/Golden/TCT/HeaderDotHash/0002.tct.dtc.en_US.xml
new file mode 100644
index 0000000..2957fd1
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0002.tct.dtc.en_US.xml
@@ -0,0 +1,21 @@
+
+<?xml-model type="application/relax-ng-compact-syntax"
+           href="./schema/dtc.rnc"?>
+
+<?xml-stylesheet type="text/xsl"
+                href="./xsl/document.html5.en.xsl"?>
+
+<?html5-stylesheet type="text/xsl"
+                  href="./xsl/document.html5.en.xsl"?>
+
+<?atom-stylesheet type="text/xsl"
+                 href="./xsl/document.atom.en.xsl"?>
+
+<document>
+  <about>
+  </about>
+  <p><code>text0</code></p>
+  <para>
+    <p>text1</p>
+  </para>
+</document>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderDotHash/0002.tct.html5 b/test/Golden/TCT/HeaderDotHash/0002.tct.html5
new file mode 100644
index 0000000..b0ae7a6
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0002.tct.html5
@@ -0,0 +1,2 @@
+<!DOCTYPE HTML>
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="style/tct-html5.css"></head><body><a id="line-1"></a><a class="header-dotslash" href="././0001.tct.html">././0001.tct</a></body></html>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderDotHash/0002.tct.plain b/test/Golden/TCT/HeaderDotHash/0002.tct.plain
new file mode 100644
index 0000000..8d506d6
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0002.tct.plain
@@ -0,0 +1 @@
+././0001.tct
diff --git a/test/Golden/TCT/HeaderDotHash/0002.tct.xml b/test/Golden/TCT/HeaderDotHash/0002.tct.xml
new file mode 100644
index 0000000..bf359ff
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0002.tct.xml
@@ -0,0 +1,8 @@
+Cell (XmlElem code) [test/Golden/TCT/HeaderColon/0004.tct#1:1-1:12,test/Golden/TCT/HeaderDotHash/0001.tct#1:1-1:26,test/Golden/TCT/HeaderDotHash/0002.tct#1:1-1:11]
+|
+`- Cell (XmlText "text0") [test/Golden/TCT/HeaderColon/0004.tct#1:7-1:12,test/Golden/TCT/HeaderDotHash/0001.tct#1:1-1:26,test/Golden/TCT/HeaderDotHash/0002.tct#1:1-1:11]
+
+Cell (XmlElem para) [test/Golden/TCT/HeaderColon/0004.tct#2:1-2:6,test/Golden/TCT/HeaderDotHash/0001.tct#1:1-1:26,test/Golden/TCT/HeaderDotHash/0002.tct#1:1-1:11]
+|
+`- Cell (XmlText "text1") [test/Golden/TCT/HeaderColon/0004.tct#2:1-2:6,test/Golden/TCT/HeaderDotHash/0001.tct#1:1-1:26,test/Golden/TCT/HeaderDotHash/0002.tct#1:1-1:11]
+
diff --git a/test/Golden/TCT/HeaderDotHash/0003.tct b/test/Golden/TCT/HeaderDotHash/0003.tct
new file mode 100644
index 0000000..43bfa98
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0003.tct
@@ -0,0 +1,3 @@
+- ./../HeaderColon/0004.tct
+- ./../HeaderColon/0005.tct
+- ./../HeaderColon/0006.tct
diff --git a/test/Golden/TCT/HeaderDotHash/0003.tct.ast b/test/Golden/TCT/HeaderDotHash/0003.tct.ast
new file mode 100644
index 0000000..a7ded16
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0003.tct.ast
@@ -0,0 +1,34 @@
+[ Tree (Cell (NodeHeader HeaderDash) [test/Golden/TCT/HeaderDotHash/0003.tct#1:1-1:28]) 
+    [ Tree (Cell (NodeHeader (HeaderDotSlash "./../HeaderColon/0004.tct")) [test/Golden/TCT/HeaderDotHash/0003.tct#1:3-1:28]) 
+        [ Tree (Cell (NodeHeader (HeaderColon "code" "")) [test/Golden/TCT/HeaderColon/0004.tct#1:1-1:12,test/Golden/TCT/HeaderDotHash/0003.tct#1:3-1:28]) 
+            [ Tree (Cell NodePara [test/Golden/TCT/HeaderColon/0004.tct#1:7-1:12,test/Golden/TCT/HeaderDotHash/0003.tct#1:3-1:28]) 
+                [ Tree (Cell (NodeToken (TokenText "text0")) [test/Golden/TCT/HeaderColon/0004.tct#1:7-1:12,test/Golden/TCT/HeaderDotHash/0003.tct#1:3-1:28]) []
+                ] 
+            ] 
+        , Tree (Cell NodePara [test/Golden/TCT/HeaderColon/0004.tct#2:1-2:6,test/Golden/TCT/HeaderDotHash/0003.tct#1:3-1:28]) 
+            [ Tree (Cell (NodeToken (TokenText "text1")) [test/Golden/TCT/HeaderColon/0004.tct#2:1-2:6,test/Golden/TCT/HeaderDotHash/0003.tct#1:3-1:28]) []
+            ] 
+        ] 
+    ] 
+, Tree (Cell (NodeHeader HeaderDash) [test/Golden/TCT/HeaderDotHash/0003.tct#2:1-2:28]) 
+    [ Tree (Cell (NodeHeader (HeaderDotSlash "./../HeaderColon/0005.tct")) [test/Golden/TCT/HeaderDotHash/0003.tct#2:3-2:28]) 
+        [ Tree (Cell (NodeHeader (HeaderColon "note" "")) [test/Golden/TCT/HeaderColon/0005.tct#1:1-2:7,test/Golden/TCT/HeaderDotHash/0003.tct#2:3-2:28]) 
+            [ Tree (Cell NodePara [test/Golden/TCT/HeaderColon/0005.tct#1:7-1:12,test/Golden/TCT/HeaderDotHash/0003.tct#2:3-2:28]) 
+                [ Tree (Cell (NodeToken (TokenText "text0")) [test/Golden/TCT/HeaderColon/0005.tct#1:7-1:12,test/Golden/TCT/HeaderDotHash/0003.tct#2:3-2:28]) []
+                ] 
+            , Tree (Cell NodePara [test/Golden/TCT/HeaderColon/0005.tct#2:2-2:7,test/Golden/TCT/HeaderDotHash/0003.tct#2:3-2:28]) 
+                [ Tree (Cell (NodeToken (TokenText "text1")) [test/Golden/TCT/HeaderColon/0005.tct#2:2-2:7,test/Golden/TCT/HeaderDotHash/0003.tct#2:3-2:28]) []
+                ] 
+            ] 
+        ] 
+    ] 
+, Tree (Cell (NodeHeader HeaderDash) [test/Golden/TCT/HeaderDotHash/0003.tct#3:1-3:28]) 
+    [ Tree (Cell (NodeHeader (HeaderDotSlash "./../HeaderColon/0006.tct")) [test/Golden/TCT/HeaderDotHash/0003.tct#3:3-3:28]) 
+        [ Tree (Cell (NodeHeader (HeaderColon "code" "")) [test/Golden/TCT/HeaderColon/0006.tct#1:1-2:11,test/Golden/TCT/HeaderDotHash/0003.tct#3:3-3:28]) 
+            [ Tree (Cell NodePara [test/Golden/TCT/HeaderColon/0006.tct#1:6-2:11,test/Golden/TCT/HeaderDotHash/0003.tct#3:3-3:28]) 
+                [ Tree (Cell (NodeToken (TokenText " text0\ntext1")) [test/Golden/TCT/HeaderColon/0006.tct#1:6-2:11,test/Golden/TCT/HeaderDotHash/0003.tct#3:3-3:28]) []
+                ] 
+            ] 
+        ] 
+    ] 
+] 
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderDotHash/0003.tct.dtc.en_US.html5 b/test/Golden/TCT/HeaderDotHash/0003.tct.dtc.en_US.html5
new file mode 100644
index 0000000..52769b7
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0003.tct.dtc.en_US.html5
@@ -0,0 +1,56 @@
+<!DOCTYPE HTML>
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type"
+          content="text/html; charset=UTF-8">
+    <meta name="generator"
+          content="https://hackage.haskell.org/package/hdoc">
+    <link rel="stylesheet"
+          type="text/css"
+          href="style/dtc-html5.css">
+  </head>
+  <body>
+    <div class="document-head">
+      <table>
+        <tbody>
+          <tr>
+            <td class="left">
+              <table class="document-headers">
+                <tbody>
+                </tbody>
+              </table>
+            </td>
+            <td class="right">
+              <table class="document-authors">
+                <tbody>
+                </tbody>
+              </table>
+            </td>
+          </tr>
+        </tbody>
+      </table>
+    </div>
+    <dl class="para ul">
+      <dt>—</dt>
+      <dd>
+        <p class="para"><code>text0</code></p>
+        <div id="ul1.li1.para1"
+             class="para">
+          <p>text1</p>
+        </div>
+      </dd>
+      <dt>—</dt>
+      <dd>
+        <p class="para">
+          <sup class="note-numbers"><a class="note-ref" id="note-ref.1" href="#note.1">1</a></sup> 
+        </p>
+      </dd>
+      <dt>—</dt>
+      <dd>
+        <p class="para"><code> text0
+text1</code></p>
+      </dd>
+    </dl>
+  </body>
+</html>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderDotHash/0003.tct.dtc.en_US.xml b/test/Golden/TCT/HeaderDotHash/0003.tct.dtc.en_US.xml
new file mode 100644
index 0000000..783862d
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0003.tct.dtc.en_US.xml
@@ -0,0 +1,36 @@
+
+<?xml-model type="application/relax-ng-compact-syntax"
+           href="./schema/dtc.rnc"?>
+
+<?xml-stylesheet type="text/xsl"
+                href="./xsl/document.html5.en.xsl"?>
+
+<?html5-stylesheet type="text/xsl"
+                  href="./xsl/document.html5.en.xsl"?>
+
+<?atom-stylesheet type="text/xsl"
+                 href="./xsl/document.atom.en.xsl"?>
+
+<document>
+  <about>
+  </about>
+  <ul>
+    <li>
+      <p><code>text0</code></p>
+      <para>
+        <p>text1</p>
+      </para>
+    </li>
+    <li>
+      <p><note><para>
+        <p>text0</p>
+        </para><para>
+        <p>text1</p>
+        </para></note></p>
+    </li>
+    <li>
+      <p><code> text0
+text1</code></p>
+    </li>
+  </ul>
+</document>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderDotHash/0003.tct.html5 b/test/Golden/TCT/HeaderDotHash/0003.tct.html5
new file mode 100644
index 0000000..9636682
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0003.tct.html5
@@ -0,0 +1,4 @@
+<!DOCTYPE HTML>
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="style/tct-html5.css"></head><body><a id="line-1"></a><span class="header header-dash"><span class="header-mark">-</span> </span><span class="header-value"><a class="header-dotslash" href="././../HeaderColon/0004.tct.html">././../HeaderColon/0004.tct</a></span>
+<a id="line-2"></a><span class="header header-dash"><span class="header-mark">-</span> </span><span class="header-value"><a class="header-dotslash" href="././../HeaderColon/0005.tct.html">././../HeaderColon/0005.tct</a></span>
+<a id="line-3"></a><span class="header header-dash"><span class="header-mark">-</span> </span><span class="header-value"><a class="header-dotslash" href="././../HeaderColon/0006.tct.html">././../HeaderColon/0006.tct</a></span></body></html>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderDotHash/0003.tct.plain b/test/Golden/TCT/HeaderDotHash/0003.tct.plain
new file mode 100644
index 0000000..7038d48
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0003.tct.plain
@@ -0,0 +1,3 @@
+- ././../HeaderColon/0004.tct
+- ././../HeaderColon/0005.tct
+- ././../HeaderColon/0006.tct
diff --git a/test/Golden/TCT/HeaderDotHash/0003.tct.xml b/test/Golden/TCT/HeaderDotHash/0003.tct.xml
new file mode 100644
index 0000000..09d8c83
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0003.tct.xml
@@ -0,0 +1,30 @@
+Cell (XmlElem ul) [test/Golden/TCT/HeaderDotHash/0003.tct#1:1-1:28]
+|
++- Cell (XmlElem li) [test/Golden/TCT/HeaderDotHash/0003.tct#1:1-1:28]
+|  |
+|  +- Cell (XmlElem code) [test/Golden/TCT/HeaderColon/0004.tct#1:1-1:12,test/Golden/TCT/HeaderDotHash/0003.tct#1:3-1:28]
+|  |  |
+|  |  `- Cell (XmlText "text0") [test/Golden/TCT/HeaderColon/0004.tct#1:7-1:12,test/Golden/TCT/HeaderDotHash/0003.tct#1:3-1:28]
+|  |
+|  `- Cell (XmlElem para) [test/Golden/TCT/HeaderColon/0004.tct#2:1-2:6,test/Golden/TCT/HeaderDotHash/0003.tct#1:3-1:28]
+|     |
+|     `- Cell (XmlText "text1") [test/Golden/TCT/HeaderColon/0004.tct#2:1-2:6,test/Golden/TCT/HeaderDotHash/0003.tct#1:3-1:28]
+|
++- Cell (XmlElem li) [test/Golden/TCT/HeaderDotHash/0003.tct#2:1-2:28]
+|  |
+|  `- Cell (XmlElem note) [test/Golden/TCT/HeaderColon/0005.tct#1:1-2:7,test/Golden/TCT/HeaderDotHash/0003.tct#2:3-2:28]
+|     |
+|     +- Cell (XmlElem para) [test/Golden/TCT/HeaderColon/0005.tct#1:7-1:12,test/Golden/TCT/HeaderDotHash/0003.tct#2:3-2:28]
+|     |  |
+|     |  `- Cell (XmlText "text0") [test/Golden/TCT/HeaderColon/0005.tct#1:7-1:12,test/Golden/TCT/HeaderDotHash/0003.tct#2:3-2:28]
+|     |
+|     `- Cell (XmlElem para) [test/Golden/TCT/HeaderColon/0005.tct#2:2-2:7,test/Golden/TCT/HeaderDotHash/0003.tct#2:3-2:28]
+|        |
+|        `- Cell (XmlText "text1") [test/Golden/TCT/HeaderColon/0005.tct#2:2-2:7,test/Golden/TCT/HeaderDotHash/0003.tct#2:3-2:28]
+|
+`- Cell (XmlElem li) [test/Golden/TCT/HeaderDotHash/0003.tct#3:1-3:28]
+   |
+   `- Cell (XmlElem code) [test/Golden/TCT/HeaderColon/0006.tct#1:1-2:11,test/Golden/TCT/HeaderDotHash/0003.tct#3:3-3:28]
+      |
+      `- Cell (XmlText " text0\ntext1") [test/Golden/TCT/HeaderColon/0006.tct#1:6-2:11,test/Golden/TCT/HeaderDotHash/0003.tct#3:3-3:28]
+
diff --git a/test/Golden/TCT/HeaderDotHash/0004.tct b/test/Golden/TCT/HeaderDotHash/0004.tct
new file mode 100644
index 0000000..776a1f8
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0004.tct
@@ -0,0 +1 @@
+unexistent:
diff --git a/test/Golden/TCT/HeaderDotHash/0004.tct.ast b/test/Golden/TCT/HeaderDotHash/0004.tct.ast
new file mode 100644
index 0000000..7ae1940
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0004.tct.ast
@@ -0,0 +1,2 @@
+[ Tree (Cell (NodeHeader (HeaderColon "unexistent" "")) [test/Golden/TCT/HeaderDotHash/0004.tct#1:1-1:12]) []
+] 
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderDotHash/0004.tct.dtc.en_US.html5 b/test/Golden/TCT/HeaderDotHash/0004.tct.dtc.en_US.html5
new file mode 100644
index 0000000..9aec695
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0004.tct.dtc.en_US.html5
@@ -0,0 +1,4 @@
+1:1:
+unexpected <unexistent>
+ in test/Golden/TCT/HeaderDotHash/0004.tct#1:1-1:12
+expecting <about>, <artwork>, <b>, <br>, <code>, <del>, <eref>, <figure>, <i>, <index>, <iref>, <note>, <ol>, <para>, <q>, <quote>, <ref>, <references>, <rref>, <sc>, <section>, <sub>, <sup>, <toc>, <tof>, <u>, <ul>, comment, none, or text
diff --git a/test/Golden/TCT/HeaderDotHash/0004.tct.dtc.en_US.xml b/test/Golden/TCT/HeaderDotHash/0004.tct.dtc.en_US.xml
new file mode 100644
index 0000000..9aec695
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0004.tct.dtc.en_US.xml
@@ -0,0 +1,4 @@
+1:1:
+unexpected <unexistent>
+ in test/Golden/TCT/HeaderDotHash/0004.tct#1:1-1:12
+expecting <about>, <artwork>, <b>, <br>, <code>, <del>, <eref>, <figure>, <i>, <index>, <iref>, <note>, <ol>, <para>, <q>, <quote>, <ref>, <references>, <rref>, <sc>, <section>, <sub>, <sup>, <toc>, <tof>, <u>, <ul>, comment, none, or text
diff --git a/test/Golden/TCT/HeaderDotHash/0004.tct.html5 b/test/Golden/TCT/HeaderDotHash/0004.tct.html5
new file mode 100644
index 0000000..5fa05cb
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0004.tct.html5
@@ -0,0 +1,2 @@
+<!DOCTYPE HTML>
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="style/tct-html5.css"></head><body><a id="line-1"></a><span class="header header-colon header-name-unexistent"><span class="header-name">unexistent</span><span class="header-mark">:</span></span><span class="header-value"></span></body></html>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderDotHash/0004.tct.plain b/test/Golden/TCT/HeaderDotHash/0004.tct.plain
new file mode 100644
index 0000000..776a1f8
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0004.tct.plain
@@ -0,0 +1 @@
+unexistent:
diff --git a/test/Golden/TCT/HeaderDotHash/0004.tct.xml b/test/Golden/TCT/HeaderDotHash/0004.tct.xml
new file mode 100644
index 0000000..103d09d
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0004.tct.xml
@@ -0,0 +1,2 @@
+Cell (XmlElem unexistent) [test/Golden/TCT/HeaderDotHash/0004.tct#1:1-1:12]
+
diff --git a/test/Golden/TCT/HeaderDotHash/0005.tct b/test/Golden/TCT/HeaderDotHash/0005.tct
new file mode 100644
index 0000000..2703b06
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0005.tct
@@ -0,0 +1 @@
+./0004.tct
diff --git a/test/Golden/TCT/HeaderDotHash/0005.tct.ast b/test/Golden/TCT/HeaderDotHash/0005.tct.ast
new file mode 100644
index 0000000..7411a30
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0005.tct.ast
@@ -0,0 +1,4 @@
+[ Tree (Cell (NodeHeader (HeaderDotSlash "./0004.tct")) [test/Golden/TCT/HeaderDotHash/0005.tct#1:1-1:11]) 
+    [ Tree (Cell (NodeHeader (HeaderColon "unexistent" "")) [test/Golden/TCT/HeaderDotHash/0004.tct#1:1-1:12,test/Golden/TCT/HeaderDotHash/0005.tct#1:1-1:11]) []
+    ] 
+] 
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderDotHash/0005.tct.dtc.en_US.html5 b/test/Golden/TCT/HeaderDotHash/0005.tct.dtc.en_US.html5
new file mode 100644
index 0000000..9198b76
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0005.tct.dtc.en_US.html5
@@ -0,0 +1,5 @@
+1:1:
+unexpected <unexistent>
+ in test/Golden/TCT/HeaderDotHash/0004.tct#1:1-1:12
+ in test/Golden/TCT/HeaderDotHash/0005.tct#1:1-1:11
+expecting <about>, <artwork>, <b>, <br>, <code>, <del>, <eref>, <figure>, <i>, <index>, <iref>, <note>, <ol>, <para>, <q>, <quote>, <ref>, <references>, <rref>, <sc>, <section>, <sub>, <sup>, <toc>, <tof>, <u>, <ul>, comment, none, or text
diff --git a/test/Golden/TCT/HeaderDotHash/0005.tct.dtc.en_US.xml b/test/Golden/TCT/HeaderDotHash/0005.tct.dtc.en_US.xml
new file mode 100644
index 0000000..9198b76
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0005.tct.dtc.en_US.xml
@@ -0,0 +1,5 @@
+1:1:
+unexpected <unexistent>
+ in test/Golden/TCT/HeaderDotHash/0004.tct#1:1-1:12
+ in test/Golden/TCT/HeaderDotHash/0005.tct#1:1-1:11
+expecting <about>, <artwork>, <b>, <br>, <code>, <del>, <eref>, <figure>, <i>, <index>, <iref>, <note>, <ol>, <para>, <q>, <quote>, <ref>, <references>, <rref>, <sc>, <section>, <sub>, <sup>, <toc>, <tof>, <u>, <ul>, comment, none, or text
diff --git a/test/Golden/TCT/HeaderDotHash/0005.tct.html5 b/test/Golden/TCT/HeaderDotHash/0005.tct.html5
new file mode 100644
index 0000000..b36cd70
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0005.tct.html5
@@ -0,0 +1,2 @@
+<!DOCTYPE HTML>
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="style/tct-html5.css"></head><body><a id="line-1"></a><a class="header-dotslash" href="././0004.tct.html">././0004.tct</a></body></html>
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderDotHash/0005.tct.plain b/test/Golden/TCT/HeaderDotHash/0005.tct.plain
new file mode 100644
index 0000000..1cf1c03
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0005.tct.plain
@@ -0,0 +1 @@
+././0004.tct
diff --git a/test/Golden/TCT/HeaderDotHash/0005.tct.xml b/test/Golden/TCT/HeaderDotHash/0005.tct.xml
new file mode 100644
index 0000000..89394ae
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0005.tct.xml
@@ -0,0 +1,2 @@
+Cell (XmlElem unexistent) [test/Golden/TCT/HeaderDotHash/0004.tct#1:1-1:12,test/Golden/TCT/HeaderDotHash/0005.tct#1:1-1:11]
+
diff --git a/test/Golden/TCT/HeaderDotHash/0006.tct b/test/Golden/TCT/HeaderDotHash/0006.tct
new file mode 100644
index 0000000..991cc70
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0006.tct
@@ -0,0 +1 @@
+./0006.tct
diff --git a/test/Golden/TCT/HeaderDotHash/0006.tct.ast b/test/Golden/TCT/HeaderDotHash/0006.tct.ast
new file mode 100644
index 0000000..72f87c8
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0006.tct.ast
@@ -0,0 +1,3 @@
+ErrorReadIncludeLoop
+             test/Golden/TCT/HeaderDotHash/0006.tct
+ included by test/Golden/TCT/HeaderDotHash/0006.tct#1:1-1:11
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderDotHash/0006.tct.dtc.en_US.html5 b/test/Golden/TCT/HeaderDotHash/0006.tct.dtc.en_US.html5
new file mode 100644
index 0000000..72f87c8
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0006.tct.dtc.en_US.html5
@@ -0,0 +1,3 @@
+ErrorReadIncludeLoop
+             test/Golden/TCT/HeaderDotHash/0006.tct
+ included by test/Golden/TCT/HeaderDotHash/0006.tct#1:1-1:11
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderDotHash/0006.tct.dtc.en_US.xml b/test/Golden/TCT/HeaderDotHash/0006.tct.dtc.en_US.xml
new file mode 100644
index 0000000..72f87c8
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0006.tct.dtc.en_US.xml
@@ -0,0 +1,3 @@
+ErrorReadIncludeLoop
+             test/Golden/TCT/HeaderDotHash/0006.tct
+ included by test/Golden/TCT/HeaderDotHash/0006.tct#1:1-1:11
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderDotHash/0006.tct.html5 b/test/Golden/TCT/HeaderDotHash/0006.tct.html5
new file mode 100644
index 0000000..72f87c8
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0006.tct.html5
@@ -0,0 +1,3 @@
+ErrorReadIncludeLoop
+             test/Golden/TCT/HeaderDotHash/0006.tct
+ included by test/Golden/TCT/HeaderDotHash/0006.tct#1:1-1:11
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderDotHash/0006.tct.plain b/test/Golden/TCT/HeaderDotHash/0006.tct.plain
new file mode 100644
index 0000000..72f87c8
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0006.tct.plain
@@ -0,0 +1,3 @@
+ErrorReadIncludeLoop
+             test/Golden/TCT/HeaderDotHash/0006.tct
+ included by test/Golden/TCT/HeaderDotHash/0006.tct#1:1-1:11
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderDotHash/0006.tct.xml b/test/Golden/TCT/HeaderDotHash/0006.tct.xml
new file mode 100644
index 0000000..72f87c8
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0006.tct.xml
@@ -0,0 +1,3 @@
+ErrorReadIncludeLoop
+             test/Golden/TCT/HeaderDotHash/0006.tct
+ included by test/Golden/TCT/HeaderDotHash/0006.tct#1:1-1:11
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderDotHash/0007.tct b/test/Golden/TCT/HeaderDotHash/0007.tct
new file mode 100644
index 0000000..df17b21
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0007.tct
@@ -0,0 +1 @@
+./0008.tct
diff --git a/test/Golden/TCT/HeaderDotHash/0007.tct.ast b/test/Golden/TCT/HeaderDotHash/0007.tct.ast
new file mode 100644
index 0000000..98d0865
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0007.tct.ast
@@ -0,0 +1,4 @@
+ErrorReadIncludeLoop
+             test/Golden/TCT/HeaderDotHash/0007.tct
+ included by test/Golden/TCT/HeaderDotHash/0008.tct#1:1-1:11
+ included by test/Golden/TCT/HeaderDotHash/0007.tct#1:1-1:11
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderDotHash/0007.tct.dtc.en_US.html5 b/test/Golden/TCT/HeaderDotHash/0007.tct.dtc.en_US.html5
new file mode 100644
index 0000000..98d0865
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0007.tct.dtc.en_US.html5
@@ -0,0 +1,4 @@
+ErrorReadIncludeLoop
+             test/Golden/TCT/HeaderDotHash/0007.tct
+ included by test/Golden/TCT/HeaderDotHash/0008.tct#1:1-1:11
+ included by test/Golden/TCT/HeaderDotHash/0007.tct#1:1-1:11
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderDotHash/0007.tct.dtc.en_US.xml b/test/Golden/TCT/HeaderDotHash/0007.tct.dtc.en_US.xml
new file mode 100644
index 0000000..98d0865
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0007.tct.dtc.en_US.xml
@@ -0,0 +1,4 @@
+ErrorReadIncludeLoop
+             test/Golden/TCT/HeaderDotHash/0007.tct
+ included by test/Golden/TCT/HeaderDotHash/0008.tct#1:1-1:11
+ included by test/Golden/TCT/HeaderDotHash/0007.tct#1:1-1:11
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderDotHash/0007.tct.html5 b/test/Golden/TCT/HeaderDotHash/0007.tct.html5
new file mode 100644
index 0000000..98d0865
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0007.tct.html5
@@ -0,0 +1,4 @@
+ErrorReadIncludeLoop
+             test/Golden/TCT/HeaderDotHash/0007.tct
+ included by test/Golden/TCT/HeaderDotHash/0008.tct#1:1-1:11
+ included by test/Golden/TCT/HeaderDotHash/0007.tct#1:1-1:11
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderDotHash/0007.tct.plain b/test/Golden/TCT/HeaderDotHash/0007.tct.plain
new file mode 100644
index 0000000..98d0865
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0007.tct.plain
@@ -0,0 +1,4 @@
+ErrorReadIncludeLoop
+             test/Golden/TCT/HeaderDotHash/0007.tct
+ included by test/Golden/TCT/HeaderDotHash/0008.tct#1:1-1:11
+ included by test/Golden/TCT/HeaderDotHash/0007.tct#1:1-1:11
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderDotHash/0007.tct.xml b/test/Golden/TCT/HeaderDotHash/0007.tct.xml
new file mode 100644
index 0000000..98d0865
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0007.tct.xml
@@ -0,0 +1,4 @@
+ErrorReadIncludeLoop
+             test/Golden/TCT/HeaderDotHash/0007.tct
+ included by test/Golden/TCT/HeaderDotHash/0008.tct#1:1-1:11
+ included by test/Golden/TCT/HeaderDotHash/0007.tct#1:1-1:11
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderDotHash/0008.tct b/test/Golden/TCT/HeaderDotHash/0008.tct
new file mode 100644
index 0000000..0ef8910
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0008.tct
@@ -0,0 +1 @@
+./0007.tct
diff --git a/test/Golden/TCT/HeaderDotHash/0008.tct.ast b/test/Golden/TCT/HeaderDotHash/0008.tct.ast
new file mode 100644
index 0000000..66c3f79
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0008.tct.ast
@@ -0,0 +1,4 @@
+ErrorReadIncludeLoop
+             test/Golden/TCT/HeaderDotHash/0008.tct
+ included by test/Golden/TCT/HeaderDotHash/0007.tct#1:1-1:11
+ included by test/Golden/TCT/HeaderDotHash/0008.tct#1:1-1:11
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderDotHash/0008.tct.dtc.en_US.html5 b/test/Golden/TCT/HeaderDotHash/0008.tct.dtc.en_US.html5
new file mode 100644
index 0000000..66c3f79
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0008.tct.dtc.en_US.html5
@@ -0,0 +1,4 @@
+ErrorReadIncludeLoop
+             test/Golden/TCT/HeaderDotHash/0008.tct
+ included by test/Golden/TCT/HeaderDotHash/0007.tct#1:1-1:11
+ included by test/Golden/TCT/HeaderDotHash/0008.tct#1:1-1:11
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderDotHash/0008.tct.dtc.en_US.xml b/test/Golden/TCT/HeaderDotHash/0008.tct.dtc.en_US.xml
new file mode 100644
index 0000000..66c3f79
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0008.tct.dtc.en_US.xml
@@ -0,0 +1,4 @@
+ErrorReadIncludeLoop
+             test/Golden/TCT/HeaderDotHash/0008.tct
+ included by test/Golden/TCT/HeaderDotHash/0007.tct#1:1-1:11
+ included by test/Golden/TCT/HeaderDotHash/0008.tct#1:1-1:11
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderDotHash/0008.tct.html5 b/test/Golden/TCT/HeaderDotHash/0008.tct.html5
new file mode 100644
index 0000000..66c3f79
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0008.tct.html5
@@ -0,0 +1,4 @@
+ErrorReadIncludeLoop
+             test/Golden/TCT/HeaderDotHash/0008.tct
+ included by test/Golden/TCT/HeaderDotHash/0007.tct#1:1-1:11
+ included by test/Golden/TCT/HeaderDotHash/0008.tct#1:1-1:11
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderDotHash/0008.tct.plain b/test/Golden/TCT/HeaderDotHash/0008.tct.plain
new file mode 100644
index 0000000..66c3f79
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0008.tct.plain
@@ -0,0 +1,4 @@
+ErrorReadIncludeLoop
+             test/Golden/TCT/HeaderDotHash/0008.tct
+ included by test/Golden/TCT/HeaderDotHash/0007.tct#1:1-1:11
+ included by test/Golden/TCT/HeaderDotHash/0008.tct#1:1-1:11
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderDotHash/0008.tct.xml b/test/Golden/TCT/HeaderDotHash/0008.tct.xml
new file mode 100644
index 0000000..66c3f79
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0008.tct.xml
@@ -0,0 +1,4 @@
+ErrorReadIncludeLoop
+             test/Golden/TCT/HeaderDotHash/0008.tct
+ included by test/Golden/TCT/HeaderDotHash/0007.tct#1:1-1:11
+ included by test/Golden/TCT/HeaderDotHash/0008.tct#1:1-1:11
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderDotHash/0009.tct b/test/Golden/TCT/HeaderDotHash/0009.tct
new file mode 100644
index 0000000..df17b21
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0009.tct
@@ -0,0 +1 @@
+./0008.tct
diff --git a/test/Golden/TCT/HeaderDotHash/0009.tct.ast b/test/Golden/TCT/HeaderDotHash/0009.tct.ast
new file mode 100644
index 0000000..bd7c121
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0009.tct.ast
@@ -0,0 +1,5 @@
+ErrorReadIncludeLoop
+             test/Golden/TCT/HeaderDotHash/0008.tct
+ included by test/Golden/TCT/HeaderDotHash/0007.tct#1:1-1:11
+ included by test/Golden/TCT/HeaderDotHash/0008.tct#1:1-1:11
+ included by test/Golden/TCT/HeaderDotHash/0009.tct#1:1-1:11
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderDotHash/0009.tct.dtc.en_US.html5 b/test/Golden/TCT/HeaderDotHash/0009.tct.dtc.en_US.html5
new file mode 100644
index 0000000..bd7c121
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0009.tct.dtc.en_US.html5
@@ -0,0 +1,5 @@
+ErrorReadIncludeLoop
+             test/Golden/TCT/HeaderDotHash/0008.tct
+ included by test/Golden/TCT/HeaderDotHash/0007.tct#1:1-1:11
+ included by test/Golden/TCT/HeaderDotHash/0008.tct#1:1-1:11
+ included by test/Golden/TCT/HeaderDotHash/0009.tct#1:1-1:11
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderDotHash/0009.tct.dtc.en_US.xml b/test/Golden/TCT/HeaderDotHash/0009.tct.dtc.en_US.xml
new file mode 100644
index 0000000..bd7c121
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0009.tct.dtc.en_US.xml
@@ -0,0 +1,5 @@
+ErrorReadIncludeLoop
+             test/Golden/TCT/HeaderDotHash/0008.tct
+ included by test/Golden/TCT/HeaderDotHash/0007.tct#1:1-1:11
+ included by test/Golden/TCT/HeaderDotHash/0008.tct#1:1-1:11
+ included by test/Golden/TCT/HeaderDotHash/0009.tct#1:1-1:11
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderDotHash/0009.tct.html5 b/test/Golden/TCT/HeaderDotHash/0009.tct.html5
new file mode 100644
index 0000000..bd7c121
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0009.tct.html5
@@ -0,0 +1,5 @@
+ErrorReadIncludeLoop
+             test/Golden/TCT/HeaderDotHash/0008.tct
+ included by test/Golden/TCT/HeaderDotHash/0007.tct#1:1-1:11
+ included by test/Golden/TCT/HeaderDotHash/0008.tct#1:1-1:11
+ included by test/Golden/TCT/HeaderDotHash/0009.tct#1:1-1:11
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderDotHash/0009.tct.plain b/test/Golden/TCT/HeaderDotHash/0009.tct.plain
new file mode 100644
index 0000000..bd7c121
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0009.tct.plain
@@ -0,0 +1,5 @@
+ErrorReadIncludeLoop
+             test/Golden/TCT/HeaderDotHash/0008.tct
+ included by test/Golden/TCT/HeaderDotHash/0007.tct#1:1-1:11
+ included by test/Golden/TCT/HeaderDotHash/0008.tct#1:1-1:11
+ included by test/Golden/TCT/HeaderDotHash/0009.tct#1:1-1:11
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderDotHash/0009.tct.xml b/test/Golden/TCT/HeaderDotHash/0009.tct.xml
new file mode 100644
index 0000000..bd7c121
--- /dev/null
+++ b/test/Golden/TCT/HeaderDotHash/0009.tct.xml
@@ -0,0 +1,5 @@
+ErrorReadIncludeLoop
+             test/Golden/TCT/HeaderDotHash/0008.tct
+ included by test/Golden/TCT/HeaderDotHash/0007.tct#1:1-1:11
+ included by test/Golden/TCT/HeaderDotHash/0008.tct#1:1-1:11
+ included by test/Golden/TCT/HeaderDotHash/0009.tct#1:1-1:11
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderGreat/0001.tct.ast b/test/Golden/TCT/HeaderGreat/0001.tct.ast
index db22e58..cacaaab 100644
--- a/test/Golden/TCT/HeaderGreat/0001.tct.ast
+++ b/test/Golden/TCT/HeaderGreat/0001.tct.ast
@@ -1,6 +1,6 @@
-[ Tree (Cell 1:1 2:8 (NodeHeader (HeaderGreat "" ""))) 
-    [ Tree (Cell 1:3 2:8 NodePara) 
-        [ Tree (Cell 1:3 2:8 (NodeToken (TokenText "text1\ntext2"))) []
+[ Tree (Cell (NodeHeader (HeaderGreat "" "")) [test/Golden/TCT/HeaderGreat/0001.tct#1:1-2:8]) 
+    [ Tree (Cell NodePara [test/Golden/TCT/HeaderGreat/0001.tct#1:3-2:8]) 
+        [ Tree (Cell (NodeToken (TokenText "text1\ntext2")) [test/Golden/TCT/HeaderGreat/0001.tct#1:3-2:8]) []
         ] 
     ] 
 ] 
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderGreat/0001.tct.plain b/test/Golden/TCT/HeaderGreat/0001.tct.plain
new file mode 100644
index 0000000..79dbe2f
--- /dev/null
+++ b/test/Golden/TCT/HeaderGreat/0001.tct.plain
@@ -0,0 +1,2 @@
+> text1
+> text2
diff --git a/test/Golden/TCT/HeaderGreat/0001.tct.xml b/test/Golden/TCT/HeaderGreat/0001.tct.xml
index d791c35..04be16e 100644
--- a/test/Golden/TCT/HeaderGreat/0001.tct.xml
+++ b/test/Golden/TCT/HeaderGreat/0001.tct.xml
@@ -1,8 +1,8 @@
-Cell 1:1 2:8 (XmlElem quote)
+Cell (XmlElem quote) [test/Golden/TCT/HeaderGreat/0001.tct#1:1-2:8]
 |
-+- Cell 1:1 1:1 (XmlAttr type "")
++- Cell (XmlAttr type "") [test/Golden/TCT/HeaderGreat/0001.tct#1:1-2:8]
 |
-`- Cell 1:3 2:8 (XmlElem para)
+`- Cell (XmlElem para) [test/Golden/TCT/HeaderGreat/0001.tct#1:3-2:8]
    |
-   `- Cell 1:3 2:8 (XmlText "text1\ntext2")
+   `- Cell (XmlText "text1\ntext2") [test/Golden/TCT/HeaderGreat/0001.tct#1:3-2:8]
 
diff --git a/test/Golden/TCT/HeaderGreat/0002.tct.ast b/test/Golden/TCT/HeaderGreat/0002.tct.ast
index 2670e1f..b7020f5 100644
--- a/test/Golden/TCT/HeaderGreat/0002.tct.ast
+++ b/test/Golden/TCT/HeaderGreat/0002.tct.ast
@@ -1,6 +1,6 @@
-[ Tree (Cell 1:1 3:8 (NodeHeader (HeaderGreat "" ""))) 
-    [ Tree (Cell 1:3 3:8 NodePara) 
-        [ Tree (Cell 1:3 3:8 (NodeToken (TokenText "text1\ntext2\ntext3"))) []
+[ Tree (Cell (NodeHeader (HeaderGreat "" "")) [test/Golden/TCT/HeaderGreat/0002.tct#1:1-3:8]) 
+    [ Tree (Cell NodePara [test/Golden/TCT/HeaderGreat/0002.tct#1:3-3:8]) 
+        [ Tree (Cell (NodeToken (TokenText "text1\ntext2\ntext3")) [test/Golden/TCT/HeaderGreat/0002.tct#1:3-3:8]) []
         ] 
     ] 
 ] 
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderGreat/0002.tct.plain b/test/Golden/TCT/HeaderGreat/0002.tct.plain
new file mode 100644
index 0000000..2e42fc5
--- /dev/null
+++ b/test/Golden/TCT/HeaderGreat/0002.tct.plain
@@ -0,0 +1,3 @@
+> text1
+> text2
+> text3
diff --git a/test/Golden/TCT/HeaderGreat/0002.tct.xml b/test/Golden/TCT/HeaderGreat/0002.tct.xml
index 9797951..79a911d 100644
--- a/test/Golden/TCT/HeaderGreat/0002.tct.xml
+++ b/test/Golden/TCT/HeaderGreat/0002.tct.xml
@@ -1,8 +1,8 @@
-Cell 1:1 3:8 (XmlElem quote)
+Cell (XmlElem quote) [test/Golden/TCT/HeaderGreat/0002.tct#1:1-3:8]
 |
-+- Cell 1:1 1:1 (XmlAttr type "")
++- Cell (XmlAttr type "") [test/Golden/TCT/HeaderGreat/0002.tct#1:1-3:8]
 |
-`- Cell 1:3 3:8 (XmlElem para)
+`- Cell (XmlElem para) [test/Golden/TCT/HeaderGreat/0002.tct#1:3-3:8]
    |
-   `- Cell 1:3 3:8 (XmlText "text1\ntext2\ntext3")
+   `- Cell (XmlText "text1\ntext2\ntext3") [test/Golden/TCT/HeaderGreat/0002.tct#1:3-3:8]
 
diff --git a/test/Golden/TCT/HeaderGreat/0003.tct.ast b/test/Golden/TCT/HeaderGreat/0003.tct.ast
index bb6e970..403ea2b 100644
--- a/test/Golden/TCT/HeaderGreat/0003.tct.ast
+++ b/test/Golden/TCT/HeaderGreat/0003.tct.ast
@@ -1,7 +1,7 @@
-[ Tree (Cell 1:1 3:9 (NodeHeader (HeaderGreat "" ""))) 
-    [ Tree (Cell 1:2 3:9 (NodeHeader (HeaderGreat "" ""))) 
-        [ Tree (Cell 1:4 3:9 NodePara) 
-            [ Tree (Cell 1:4 3:9 (NodeToken (TokenText "text1\ntext2\ntext3"))) []
+[ Tree (Cell (NodeHeader (HeaderGreat "" "")) [test/Golden/TCT/HeaderGreat/0003.tct#1:1-3:9]) 
+    [ Tree (Cell (NodeHeader (HeaderGreat "" "")) [test/Golden/TCT/HeaderGreat/0003.tct#1:2-3:9]) 
+        [ Tree (Cell NodePara [test/Golden/TCT/HeaderGreat/0003.tct#1:4-3:9]) 
+            [ Tree (Cell (NodeToken (TokenText "text1\ntext2\ntext3")) [test/Golden/TCT/HeaderGreat/0003.tct#1:4-3:9]) []
             ] 
         ] 
     ] 
diff --git a/test/Golden/TCT/HeaderGreat/0003.tct.plain b/test/Golden/TCT/HeaderGreat/0003.tct.plain
new file mode 100644
index 0000000..2aa3b5d
--- /dev/null
+++ b/test/Golden/TCT/HeaderGreat/0003.tct.plain
@@ -0,0 +1,3 @@
+>> text1
+>> text2
+>> text3
diff --git a/test/Golden/TCT/HeaderGreat/0003.tct.xml b/test/Golden/TCT/HeaderGreat/0003.tct.xml
index 7cfbfe5..c9fab27 100644
--- a/test/Golden/TCT/HeaderGreat/0003.tct.xml
+++ b/test/Golden/TCT/HeaderGreat/0003.tct.xml
@@ -1,12 +1,12 @@
-Cell 1:1 3:9 (XmlElem quote)
+Cell (XmlElem quote) [test/Golden/TCT/HeaderGreat/0003.tct#1:1-3:9]
 |
-+- Cell 1:1 1:1 (XmlAttr type "")
++- Cell (XmlAttr type "") [test/Golden/TCT/HeaderGreat/0003.tct#1:1-3:9]
 |
-`- Cell 1:2 3:9 (XmlElem quote)
+`- Cell (XmlElem quote) [test/Golden/TCT/HeaderGreat/0003.tct#1:2-3:9]
    |
-   +- Cell 1:2 1:2 (XmlAttr type "")
+   +- Cell (XmlAttr type "") [test/Golden/TCT/HeaderGreat/0003.tct#1:2-3:9]
    |
-   `- Cell 1:4 3:9 (XmlElem para)
+   `- Cell (XmlElem para) [test/Golden/TCT/HeaderGreat/0003.tct#1:4-3:9]
       |
-      `- Cell 1:4 3:9 (XmlText "text1\ntext2\ntext3")
+      `- Cell (XmlText "text1\ntext2\ntext3") [test/Golden/TCT/HeaderGreat/0003.tct#1:4-3:9]
 
diff --git a/test/Golden/TCT/HeaderGreat/0004.tct.ast b/test/Golden/TCT/HeaderGreat/0004.tct.ast
index 3b4a88d..ed676d9 100644
--- a/test/Golden/TCT/HeaderGreat/0004.tct.ast
+++ b/test/Golden/TCT/HeaderGreat/0004.tct.ast
@@ -1,7 +1,7 @@
-[ Tree (Cell 1:1 3:10 (NodeHeader (HeaderGreat "" ""))) 
-    [ Tree (Cell 1:3 3:10 (NodeHeader (HeaderGreat "" ""))) 
-        [ Tree (Cell 1:5 3:10 NodePara) 
-            [ Tree (Cell 1:5 3:10 (NodeToken (TokenText "text1\ntext2\ntext3"))) []
+[ Tree (Cell (NodeHeader (HeaderGreat "" "")) [test/Golden/TCT/HeaderGreat/0004.tct#1:1-3:10]) 
+    [ Tree (Cell (NodeHeader (HeaderGreat "" "")) [test/Golden/TCT/HeaderGreat/0004.tct#1:3-3:10]) 
+        [ Tree (Cell NodePara [test/Golden/TCT/HeaderGreat/0004.tct#1:5-3:10]) 
+            [ Tree (Cell (NodeToken (TokenText "text1\ntext2\ntext3")) [test/Golden/TCT/HeaderGreat/0004.tct#1:5-3:10]) []
             ] 
         ] 
     ] 
diff --git a/test/Golden/TCT/HeaderGreat/0004.tct.plain b/test/Golden/TCT/HeaderGreat/0004.tct.plain
new file mode 100644
index 0000000..808ce57
--- /dev/null
+++ b/test/Golden/TCT/HeaderGreat/0004.tct.plain
@@ -0,0 +1,3 @@
+> > text1
+> > text2
+> > text3
diff --git a/test/Golden/TCT/HeaderGreat/0004.tct.xml b/test/Golden/TCT/HeaderGreat/0004.tct.xml
index 769a9ed..7b01504 100644
--- a/test/Golden/TCT/HeaderGreat/0004.tct.xml
+++ b/test/Golden/TCT/HeaderGreat/0004.tct.xml
@@ -1,12 +1,12 @@
-Cell 1:1 3:10 (XmlElem quote)
+Cell (XmlElem quote) [test/Golden/TCT/HeaderGreat/0004.tct#1:1-3:10]
 |
-+- Cell 1:1 1:1 (XmlAttr type "")
++- Cell (XmlAttr type "") [test/Golden/TCT/HeaderGreat/0004.tct#1:1-3:10]
 |
-`- Cell 1:3 3:10 (XmlElem quote)
+`- Cell (XmlElem quote) [test/Golden/TCT/HeaderGreat/0004.tct#1:3-3:10]
    |
-   +- Cell 1:3 1:3 (XmlAttr type "")
+   +- Cell (XmlAttr type "") [test/Golden/TCT/HeaderGreat/0004.tct#1:3-3:10]
    |
-   `- Cell 1:5 3:10 (XmlElem para)
+   `- Cell (XmlElem para) [test/Golden/TCT/HeaderGreat/0004.tct#1:5-3:10]
       |
-      `- Cell 1:5 3:10 (XmlText "text1\ntext2\ntext3")
+      `- Cell (XmlText "text1\ntext2\ntext3") [test/Golden/TCT/HeaderGreat/0004.tct#1:5-3:10]
 
diff --git a/test/Golden/TCT/HeaderGreat/0005.tct.ast b/test/Golden/TCT/HeaderGreat/0005.tct.ast
index a966a20..0409e57 100644
--- a/test/Golden/TCT/HeaderGreat/0005.tct.ast
+++ b/test/Golden/TCT/HeaderGreat/0005.tct.ast
@@ -1,8 +1,8 @@
-[ Tree (Cell 1:1 3:12 (NodeHeader (HeaderGreat "" ""))) 
-    [ Tree (Cell 1:3 3:12 (NodeHeader (HeaderGreat "" ""))) 
-        [ Tree (Cell 1:5 3:12 (NodeHeader (HeaderGreat "" ""))) 
-            [ Tree (Cell 1:7 3:12 NodePara) 
-                [ Tree (Cell 1:7 3:12 (NodeToken (TokenText "text1\ntext2\ntext3"))) []
+[ Tree (Cell (NodeHeader (HeaderGreat "" "")) [test/Golden/TCT/HeaderGreat/0005.tct#1:1-3:12]) 
+    [ Tree (Cell (NodeHeader (HeaderGreat "" "")) [test/Golden/TCT/HeaderGreat/0005.tct#1:3-3:12]) 
+        [ Tree (Cell (NodeHeader (HeaderGreat "" "")) [test/Golden/TCT/HeaderGreat/0005.tct#1:5-3:12]) 
+            [ Tree (Cell NodePara [test/Golden/TCT/HeaderGreat/0005.tct#1:7-3:12]) 
+                [ Tree (Cell (NodeToken (TokenText "text1\ntext2\ntext3")) [test/Golden/TCT/HeaderGreat/0005.tct#1:7-3:12]) []
                 ] 
             ] 
         ] 
diff --git a/test/Golden/TCT/HeaderGreat/0005.tct.plain b/test/Golden/TCT/HeaderGreat/0005.tct.plain
new file mode 100644
index 0000000..4e00c2a
--- /dev/null
+++ b/test/Golden/TCT/HeaderGreat/0005.tct.plain
@@ -0,0 +1,3 @@
+> > > text1
+> > > text2
+> > > text3
diff --git a/test/Golden/TCT/HeaderGreat/0005.tct.xml b/test/Golden/TCT/HeaderGreat/0005.tct.xml
index 3e59ac0..5bc1cc5 100644
--- a/test/Golden/TCT/HeaderGreat/0005.tct.xml
+++ b/test/Golden/TCT/HeaderGreat/0005.tct.xml
@@ -1,16 +1,16 @@
-Cell 1:1 3:12 (XmlElem quote)
+Cell (XmlElem quote) [test/Golden/TCT/HeaderGreat/0005.tct#1:1-3:12]
 |
-+- Cell 1:1 1:1 (XmlAttr type "")
++- Cell (XmlAttr type "") [test/Golden/TCT/HeaderGreat/0005.tct#1:1-3:12]
 |
-`- Cell 1:3 3:12 (XmlElem quote)
+`- Cell (XmlElem quote) [test/Golden/TCT/HeaderGreat/0005.tct#1:3-3:12]
    |
-   +- Cell 1:3 1:3 (XmlAttr type "")
+   +- Cell (XmlAttr type "") [test/Golden/TCT/HeaderGreat/0005.tct#1:3-3:12]
    |
-   `- Cell 1:5 3:12 (XmlElem quote)
+   `- Cell (XmlElem quote) [test/Golden/TCT/HeaderGreat/0005.tct#1:5-3:12]
       |
-      +- Cell 1:5 1:5 (XmlAttr type "")
+      +- Cell (XmlAttr type "") [test/Golden/TCT/HeaderGreat/0005.tct#1:5-3:12]
       |
-      `- Cell 1:7 3:12 (XmlElem para)
+      `- Cell (XmlElem para) [test/Golden/TCT/HeaderGreat/0005.tct#1:7-3:12]
          |
-         `- Cell 1:7 3:12 (XmlText "text1\ntext2\ntext3")
+         `- Cell (XmlText "text1\ntext2\ntext3") [test/Golden/TCT/HeaderGreat/0005.tct#1:7-3:12]
 
diff --git a/test/Golden/TCT/HeaderGreat/0006.tct.ast b/test/Golden/TCT/HeaderGreat/0006.tct.ast
index aa34b4b..f99f62a 100644
--- a/test/Golden/TCT/HeaderGreat/0006.tct.ast
+++ b/test/Golden/TCT/HeaderGreat/0006.tct.ast
@@ -1,12 +1,12 @@
-[ Tree (Cell 1:1 3:12 (NodeHeader (HeaderGreat "" ""))) 
-    [ Tree (Cell 1:3 3:12 NodePara) 
-        [ Tree (Cell 1:3 1:8 (NodeToken (TokenText "text1"))) []
-        , Tree (Cell 2:3 3:12 (NodeHeader (HeaderGreat "" ""))) 
-            [ Tree (Cell 2:5 3:12 NodePara) 
-                [ Tree (Cell 2:5 2:10 (NodeToken (TokenText "text2"))) []
-                , Tree (Cell 3:5 3:12 (NodeHeader (HeaderGreat "" ""))) 
-                    [ Tree (Cell 3:7 3:12 NodePara) 
-                        [ Tree (Cell 3:7 3:12 (NodeToken (TokenText "text3"))) []
+[ Tree (Cell (NodeHeader (HeaderGreat "" "")) [test/Golden/TCT/HeaderGreat/0006.tct#1:1-3:12]) 
+    [ Tree (Cell NodePara [test/Golden/TCT/HeaderGreat/0006.tct#1:3-3:12]) 
+        [ Tree (Cell (NodeToken (TokenText "text1")) [test/Golden/TCT/HeaderGreat/0006.tct#1:3-1:8]) []
+        , Tree (Cell (NodeHeader (HeaderGreat "" "")) [test/Golden/TCT/HeaderGreat/0006.tct#2:3-3:12]) 
+            [ Tree (Cell NodePara [test/Golden/TCT/HeaderGreat/0006.tct#2:5-3:12]) 
+                [ Tree (Cell (NodeToken (TokenText "text2")) [test/Golden/TCT/HeaderGreat/0006.tct#2:5-2:10]) []
+                , Tree (Cell (NodeHeader (HeaderGreat "" "")) [test/Golden/TCT/HeaderGreat/0006.tct#3:5-3:12]) 
+                    [ Tree (Cell NodePara [test/Golden/TCT/HeaderGreat/0006.tct#3:7-3:12]) 
+                        [ Tree (Cell (NodeToken (TokenText "text3")) [test/Golden/TCT/HeaderGreat/0006.tct#3:7-3:12]) []
                         ] 
                     ] 
                 ] 
diff --git a/test/Golden/TCT/HeaderGreat/0006.tct.plain b/test/Golden/TCT/HeaderGreat/0006.tct.plain
new file mode 100644
index 0000000..bd96c41
--- /dev/null
+++ b/test/Golden/TCT/HeaderGreat/0006.tct.plain
@@ -0,0 +1,3 @@
+> text1
+> > text2
+> > > text3
diff --git a/test/Golden/TCT/HeaderGreat/0006.tct.xml b/test/Golden/TCT/HeaderGreat/0006.tct.xml
index 639c1f1..6bf1099 100644
--- a/test/Golden/TCT/HeaderGreat/0006.tct.xml
+++ b/test/Golden/TCT/HeaderGreat/0006.tct.xml
@@ -1,24 +1,24 @@
-Cell 1:1 3:12 (XmlElem quote)
+Cell (XmlElem quote) [test/Golden/TCT/HeaderGreat/0006.tct#1:1-3:12]
 |
-+- Cell 1:1 1:1 (XmlAttr type "")
++- Cell (XmlAttr type "") [test/Golden/TCT/HeaderGreat/0006.tct#1:1-3:12]
 |
-`- Cell 1:3 3:12 (XmlElem para)
+`- Cell (XmlElem para) [test/Golden/TCT/HeaderGreat/0006.tct#1:3-3:12]
    |
-   +- Cell 1:3 1:8 (XmlText "text1")
+   +- Cell (XmlText "text1") [test/Golden/TCT/HeaderGreat/0006.tct#1:3-1:8]
    |
-   `- Cell 2:3 3:12 (XmlElem quote)
+   `- Cell (XmlElem quote) [test/Golden/TCT/HeaderGreat/0006.tct#2:3-3:12]
       |
-      +- Cell 2:3 2:3 (XmlAttr type "")
+      +- Cell (XmlAttr type "") [test/Golden/TCT/HeaderGreat/0006.tct#2:3-3:12]
       |
-      `- Cell 2:5 3:12 (XmlElem para)
+      `- Cell (XmlElem para) [test/Golden/TCT/HeaderGreat/0006.tct#2:5-3:12]
          |
-         +- Cell 2:5 2:10 (XmlText "text2")
+         +- Cell (XmlText "text2") [test/Golden/TCT/HeaderGreat/0006.tct#2:5-2:10]
          |
-         `- Cell 3:5 3:12 (XmlElem quote)
+         `- Cell (XmlElem quote) [test/Golden/TCT/HeaderGreat/0006.tct#3:5-3:12]
             |
-            +- Cell 3:5 3:5 (XmlAttr type "")
+            +- Cell (XmlAttr type "") [test/Golden/TCT/HeaderGreat/0006.tct#3:5-3:12]
             |
-            `- Cell 3:7 3:12 (XmlElem para)
+            `- Cell (XmlElem para) [test/Golden/TCT/HeaderGreat/0006.tct#3:7-3:12]
                |
-               `- Cell 3:7 3:12 (XmlText "text3")
+               `- Cell (XmlText "text3") [test/Golden/TCT/HeaderGreat/0006.tct#3:7-3:12]
 
diff --git a/test/Golden/TCT/HeaderGreat/0007.tct.ast b/test/Golden/TCT/HeaderGreat/0007.tct.ast
index b397a9e..7ad280b 100644
--- a/test/Golden/TCT/HeaderGreat/0007.tct.ast
+++ b/test/Golden/TCT/HeaderGreat/0007.tct.ast
@@ -1,16 +1,16 @@
-[ Tree (Cell 1:1 3:8 (NodeHeader (HeaderGreat "" ""))) 
-    [ Tree (Cell 1:3 2:10 (NodeHeader (HeaderGreat "" ""))) 
-        [ Tree (Cell 1:5 1:12 (NodeHeader (HeaderGreat "" ""))) 
-            [ Tree (Cell 1:7 1:12 NodePara) 
-                [ Tree (Cell 1:7 1:12 (NodeToken (TokenText "text1"))) []
+[ Tree (Cell (NodeHeader (HeaderGreat "" "")) [test/Golden/TCT/HeaderGreat/0007.tct#1:1-3:8]) 
+    [ Tree (Cell (NodeHeader (HeaderGreat "" "")) [test/Golden/TCT/HeaderGreat/0007.tct#1:3-2:10]) 
+        [ Tree (Cell (NodeHeader (HeaderGreat "" "")) [test/Golden/TCT/HeaderGreat/0007.tct#1:5-1:12]) 
+            [ Tree (Cell NodePara [test/Golden/TCT/HeaderGreat/0007.tct#1:7-1:12]) 
+                [ Tree (Cell (NodeToken (TokenText "text1")) [test/Golden/TCT/HeaderGreat/0007.tct#1:7-1:12]) []
                 ] 
             ] 
-        , Tree (Cell 2:5 2:10 NodePara) 
-            [ Tree (Cell 2:5 2:10 (NodeToken (TokenText "text2"))) []
+        , Tree (Cell NodePara [test/Golden/TCT/HeaderGreat/0007.tct#2:5-2:10]) 
+            [ Tree (Cell (NodeToken (TokenText "text2")) [test/Golden/TCT/HeaderGreat/0007.tct#2:5-2:10]) []
             ] 
         ] 
-    , Tree (Cell 3:3 3:8 NodePara) 
-        [ Tree (Cell 3:3 3:8 (NodeToken (TokenText "text3"))) []
+    , Tree (Cell NodePara [test/Golden/TCT/HeaderGreat/0007.tct#3:3-3:8]) 
+        [ Tree (Cell (NodeToken (TokenText "text3")) [test/Golden/TCT/HeaderGreat/0007.tct#3:3-3:8]) []
         ] 
     ] 
 ] 
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderGreat/0007.tct.plain b/test/Golden/TCT/HeaderGreat/0007.tct.plain
new file mode 100644
index 0000000..aa717fc
--- /dev/null
+++ b/test/Golden/TCT/HeaderGreat/0007.tct.plain
@@ -0,0 +1,3 @@
+> > > text1
+> > text2
+> text3
diff --git a/test/Golden/TCT/HeaderGreat/0007.tct.xml b/test/Golden/TCT/HeaderGreat/0007.tct.xml
index 0e9c7eb..361810c 100644
--- a/test/Golden/TCT/HeaderGreat/0007.tct.xml
+++ b/test/Golden/TCT/HeaderGreat/0007.tct.xml
@@ -1,24 +1,24 @@
-Cell 1:1 3:8 (XmlElem quote)
+Cell (XmlElem quote) [test/Golden/TCT/HeaderGreat/0007.tct#1:1-3:8]
 |
-+- Cell 1:1 1:1 (XmlAttr type "")
++- Cell (XmlAttr type "") [test/Golden/TCT/HeaderGreat/0007.tct#1:1-3:8]
 |
-+- Cell 1:3 2:10 (XmlElem quote)
++- Cell (XmlElem quote) [test/Golden/TCT/HeaderGreat/0007.tct#1:3-2:10]
 |  |
-|  +- Cell 1:3 1:3 (XmlAttr type "")
+|  +- Cell (XmlAttr type "") [test/Golden/TCT/HeaderGreat/0007.tct#1:3-2:10]
 |  |
-|  +- Cell 1:5 1:12 (XmlElem quote)
+|  +- Cell (XmlElem quote) [test/Golden/TCT/HeaderGreat/0007.tct#1:5-1:12]
 |  |  |
-|  |  +- Cell 1:5 1:5 (XmlAttr type "")
+|  |  +- Cell (XmlAttr type "") [test/Golden/TCT/HeaderGreat/0007.tct#1:5-1:12]
 |  |  |
-|  |  `- Cell 1:7 1:12 (XmlElem para)
+|  |  `- Cell (XmlElem para) [test/Golden/TCT/HeaderGreat/0007.tct#1:7-1:12]
 |  |     |
-|  |     `- Cell 1:7 1:12 (XmlText "text1")
+|  |     `- Cell (XmlText "text1") [test/Golden/TCT/HeaderGreat/0007.tct#1:7-1:12]
 |  |
-|  `- Cell 2:5 2:10 (XmlElem para)
+|  `- Cell (XmlElem para) [test/Golden/TCT/HeaderGreat/0007.tct#2:5-2:10]
 |     |
-|     `- Cell 2:5 2:10 (XmlText "text2")
+|     `- Cell (XmlText "text2") [test/Golden/TCT/HeaderGreat/0007.tct#2:5-2:10]
 |
-`- Cell 3:3 3:8 (XmlElem para)
+`- Cell (XmlElem para) [test/Golden/TCT/HeaderGreat/0007.tct#3:3-3:8]
    |
-   `- Cell 3:3 3:8 (XmlText "text3")
+   `- Cell (XmlText "text3") [test/Golden/TCT/HeaderGreat/0007.tct#3:3-3:8]
 
diff --git a/test/Golden/TCT/HeaderGreat/0008.tct.ast b/test/Golden/TCT/HeaderGreat/0008.tct.ast
index 9c23b0c..3590855 100644
--- a/test/Golden/TCT/HeaderGreat/0008.tct.ast
+++ b/test/Golden/TCT/HeaderGreat/0008.tct.ast
@@ -1,15 +1,15 @@
-[ Tree (Cell 1:1 3:12 (NodeHeader (HeaderGreat "" ""))) 
-    [ Tree (Cell 1:3 3:12 (NodeHeader (HeaderGreat "" ""))) 
-        [ Tree (Cell 1:7 1:12 NodePara) 
-            [ Tree (Cell 1:7 1:12 (NodeToken (TokenText "text1"))) []
+[ Tree (Cell (NodeHeader (HeaderGreat "" "")) [test/Golden/TCT/HeaderGreat/0008.tct#1:1-3:12]) 
+    [ Tree (Cell (NodeHeader (HeaderGreat "" "")) [test/Golden/TCT/HeaderGreat/0008.tct#1:3-3:12]) 
+        [ Tree (Cell NodePara [test/Golden/TCT/HeaderGreat/0008.tct#1:7-1:12]) 
+            [ Tree (Cell (NodeToken (TokenText "text1")) [test/Golden/TCT/HeaderGreat/0008.tct#1:7-1:12]) []
             ] 
-        , Tree (Cell 2:5 2:12 (NodeHeader (HeaderGreat "" ""))) 
-            [ Tree (Cell 2:7 2:12 NodePara) 
-                [ Tree (Cell 2:7 2:12 (NodeToken (TokenText "text2"))) []
+        , Tree (Cell (NodeHeader (HeaderGreat "" "")) [test/Golden/TCT/HeaderGreat/0008.tct#2:5-2:12]) 
+            [ Tree (Cell NodePara [test/Golden/TCT/HeaderGreat/0008.tct#2:7-2:12]) 
+                [ Tree (Cell (NodeToken (TokenText "text2")) [test/Golden/TCT/HeaderGreat/0008.tct#2:7-2:12]) []
                 ] 
             ] 
-        , Tree (Cell 3:7 3:12 NodePara) 
-            [ Tree (Cell 3:7 3:12 (NodeToken (TokenText "text3"))) []
+        , Tree (Cell NodePara [test/Golden/TCT/HeaderGreat/0008.tct#3:7-3:12]) 
+            [ Tree (Cell (NodeToken (TokenText "text3")) [test/Golden/TCT/HeaderGreat/0008.tct#3:7-3:12]) []
             ] 
         ] 
     ] 
diff --git a/test/Golden/TCT/HeaderGreat/0008.tct.plain b/test/Golden/TCT/HeaderGreat/0008.tct.plain
new file mode 100644
index 0000000..09f2fc6
--- /dev/null
+++ b/test/Golden/TCT/HeaderGreat/0008.tct.plain
@@ -0,0 +1,3 @@
+> >   text1
+> > > text2
+> >   text3
diff --git a/test/Golden/TCT/HeaderGreat/0008.tct.xml b/test/Golden/TCT/HeaderGreat/0008.tct.xml
index 0a72af9..c39d8a8 100644
--- a/test/Golden/TCT/HeaderGreat/0008.tct.xml
+++ b/test/Golden/TCT/HeaderGreat/0008.tct.xml
@@ -1,24 +1,24 @@
-Cell 1:1 3:12 (XmlElem quote)
+Cell (XmlElem quote) [test/Golden/TCT/HeaderGreat/0008.tct#1:1-3:12]
 |
-+- Cell 1:1 1:1 (XmlAttr type "")
++- Cell (XmlAttr type "") [test/Golden/TCT/HeaderGreat/0008.tct#1:1-3:12]
 |
-`- Cell 1:3 3:12 (XmlElem quote)
+`- Cell (XmlElem quote) [test/Golden/TCT/HeaderGreat/0008.tct#1:3-3:12]
    |
-   +- Cell 1:3 1:3 (XmlAttr type "")
+   +- Cell (XmlAttr type "") [test/Golden/TCT/HeaderGreat/0008.tct#1:3-3:12]
    |
-   +- Cell 1:7 1:12 (XmlElem para)
+   +- Cell (XmlElem para) [test/Golden/TCT/HeaderGreat/0008.tct#1:7-1:12]
    |  |
-   |  `- Cell 1:7 1:12 (XmlText "text1")
+   |  `- Cell (XmlText "text1") [test/Golden/TCT/HeaderGreat/0008.tct#1:7-1:12]
    |
-   +- Cell 2:5 2:12 (XmlElem quote)
+   +- Cell (XmlElem quote) [test/Golden/TCT/HeaderGreat/0008.tct#2:5-2:12]
    |  |
-   |  +- Cell 2:5 2:5 (XmlAttr type "")
+   |  +- Cell (XmlAttr type "") [test/Golden/TCT/HeaderGreat/0008.tct#2:5-2:12]
    |  |
-   |  `- Cell 2:7 2:12 (XmlElem para)
+   |  `- Cell (XmlElem para) [test/Golden/TCT/HeaderGreat/0008.tct#2:7-2:12]
    |     |
-   |     `- Cell 2:7 2:12 (XmlText "text2")
+   |     `- Cell (XmlText "text2") [test/Golden/TCT/HeaderGreat/0008.tct#2:7-2:12]
    |
-   `- Cell 3:7 3:12 (XmlElem para)
+   `- Cell (XmlElem para) [test/Golden/TCT/HeaderGreat/0008.tct#3:7-3:12]
       |
-      `- Cell 3:7 3:12 (XmlText "text3")
+      `- Cell (XmlText "text3") [test/Golden/TCT/HeaderGreat/0008.tct#3:7-3:12]
 
diff --git a/test/Golden/TCT/HeaderGreat/0009.tct.ast b/test/Golden/TCT/HeaderGreat/0009.tct.ast
index ece8482..ad775c9 100644
--- a/test/Golden/TCT/HeaderGreat/0009.tct.ast
+++ b/test/Golden/TCT/HeaderGreat/0009.tct.ast
@@ -1,11 +1,11 @@
-[ Tree (Cell 1:1 1:8 (NodeHeader (HeaderGreat "" ""))) 
-    [ Tree (Cell 1:3 1:8 NodePara) 
-        [ Tree (Cell 1:3 1:8 (NodeToken (TokenText "text1"))) []
+[ Tree (Cell (NodeHeader (HeaderGreat "" "")) [test/Golden/TCT/HeaderGreat/0009.tct#1:1-1:8]) 
+    [ Tree (Cell NodePara [test/Golden/TCT/HeaderGreat/0009.tct#1:3-1:8]) 
+        [ Tree (Cell (NodeToken (TokenText "text1")) [test/Golden/TCT/HeaderGreat/0009.tct#1:3-1:8]) []
         ] 
     ] 
-, Tree (Cell 3:1 4:8 (NodeHeader (HeaderGreat "" ""))) 
-    [ Tree (Cell 3:3 4:8 NodePara) 
-        [ Tree (Cell 3:3 4:8 (NodeToken (TokenText "text2\ntext3"))) []
+, Tree (Cell (NodeHeader (HeaderGreat "" "")) [test/Golden/TCT/HeaderGreat/0009.tct#3:1-4:8]) 
+    [ Tree (Cell NodePara [test/Golden/TCT/HeaderGreat/0009.tct#3:3-4:8]) 
+        [ Tree (Cell (NodeToken (TokenText "text2\ntext3")) [test/Golden/TCT/HeaderGreat/0009.tct#3:3-4:8]) []
         ] 
     ] 
 ] 
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderGreat/0009.tct.plain b/test/Golden/TCT/HeaderGreat/0009.tct.plain
new file mode 100644
index 0000000..4f4ccd5
--- /dev/null
+++ b/test/Golden/TCT/HeaderGreat/0009.tct.plain
@@ -0,0 +1,4 @@
+> text1
+
+> text2
+> text3
diff --git a/test/Golden/TCT/HeaderGreat/0009.tct.xml b/test/Golden/TCT/HeaderGreat/0009.tct.xml
index e637ec4..92fb341 100644
--- a/test/Golden/TCT/HeaderGreat/0009.tct.xml
+++ b/test/Golden/TCT/HeaderGreat/0009.tct.xml
@@ -1,16 +1,16 @@
-Cell 1:1 1:8 (XmlElem quote)
+Cell (XmlElem quote) [test/Golden/TCT/HeaderGreat/0009.tct#1:1-1:8]
 |
-+- Cell 1:1 1:1 (XmlAttr type "")
++- Cell (XmlAttr type "") [test/Golden/TCT/HeaderGreat/0009.tct#1:1-1:8]
 |
-`- Cell 1:3 1:8 (XmlElem para)
+`- Cell (XmlElem para) [test/Golden/TCT/HeaderGreat/0009.tct#1:3-1:8]
    |
-   `- Cell 1:3 1:8 (XmlText "text1")
+   `- Cell (XmlText "text1") [test/Golden/TCT/HeaderGreat/0009.tct#1:3-1:8]
 
-Cell 3:1 4:8 (XmlElem quote)
+Cell (XmlElem quote) [test/Golden/TCT/HeaderGreat/0009.tct#3:1-4:8]
 |
-+- Cell 3:1 3:1 (XmlAttr type "")
++- Cell (XmlAttr type "") [test/Golden/TCT/HeaderGreat/0009.tct#3:1-4:8]
 |
-`- Cell 3:3 4:8 (XmlElem para)
+`- Cell (XmlElem para) [test/Golden/TCT/HeaderGreat/0009.tct#3:3-4:8]
    |
-   `- Cell 3:3 4:8 (XmlText "text2\ntext3")
+   `- Cell (XmlText "text2\ntext3") [test/Golden/TCT/HeaderGreat/0009.tct#3:3-4:8]
 
diff --git a/test/Golden/TCT/HeaderGreat/0010.tct.ast b/test/Golden/TCT/HeaderGreat/0010.tct.ast
index 58c4d8a..60c28e5 100644
--- a/test/Golden/TCT/HeaderGreat/0010.tct.ast
+++ b/test/Golden/TCT/HeaderGreat/0010.tct.ast
@@ -1,11 +1,11 @@
-[ Tree (Cell 1:1 2:8 (NodeHeader (HeaderGreat "" ""))) 
-    [ Tree (Cell 1:3 2:8 NodePara) 
-        [ Tree (Cell 1:3 2:8 (NodeToken (TokenText "text1\ntext2"))) []
+[ Tree (Cell (NodeHeader (HeaderGreat "" "")) [test/Golden/TCT/HeaderGreat/0010.tct#1:1-2:8]) 
+    [ Tree (Cell NodePara [test/Golden/TCT/HeaderGreat/0010.tct#1:3-2:8]) 
+        [ Tree (Cell (NodeToken (TokenText "text1\ntext2")) [test/Golden/TCT/HeaderGreat/0010.tct#1:3-2:8]) []
         ] 
     ] 
-, Tree (Cell 4:1 4:8 (NodeHeader (HeaderGreat "" ""))) 
-    [ Tree (Cell 4:3 4:8 NodePara) 
-        [ Tree (Cell 4:3 4:8 (NodeToken (TokenText "text3"))) []
+, Tree (Cell (NodeHeader (HeaderGreat "" "")) [test/Golden/TCT/HeaderGreat/0010.tct#4:1-4:8]) 
+    [ Tree (Cell NodePara [test/Golden/TCT/HeaderGreat/0010.tct#4:3-4:8]) 
+        [ Tree (Cell (NodeToken (TokenText "text3")) [test/Golden/TCT/HeaderGreat/0010.tct#4:3-4:8]) []
         ] 
     ] 
 ] 
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderGreat/0010.tct.plain b/test/Golden/TCT/HeaderGreat/0010.tct.plain
new file mode 100644
index 0000000..75ce2ea
--- /dev/null
+++ b/test/Golden/TCT/HeaderGreat/0010.tct.plain
@@ -0,0 +1,4 @@
+> text1
+> text2
+
+> text3
diff --git a/test/Golden/TCT/HeaderGreat/0010.tct.xml b/test/Golden/TCT/HeaderGreat/0010.tct.xml
index fc9b8e4..758e108 100644
--- a/test/Golden/TCT/HeaderGreat/0010.tct.xml
+++ b/test/Golden/TCT/HeaderGreat/0010.tct.xml
@@ -1,16 +1,16 @@
-Cell 1:1 2:8 (XmlElem quote)
+Cell (XmlElem quote) [test/Golden/TCT/HeaderGreat/0010.tct#1:1-2:8]
 |
-+- Cell 1:1 1:1 (XmlAttr type "")
++- Cell (XmlAttr type "") [test/Golden/TCT/HeaderGreat/0010.tct#1:1-2:8]
 |
-`- Cell 1:3 2:8 (XmlElem para)
+`- Cell (XmlElem para) [test/Golden/TCT/HeaderGreat/0010.tct#1:3-2:8]
    |
-   `- Cell 1:3 2:8 (XmlText "text1\ntext2")
+   `- Cell (XmlText "text1\ntext2") [test/Golden/TCT/HeaderGreat/0010.tct#1:3-2:8]
 
-Cell 4:1 4:8 (XmlElem quote)
+Cell (XmlElem quote) [test/Golden/TCT/HeaderGreat/0010.tct#4:1-4:8]
 |
-+- Cell 4:1 4:1 (XmlAttr type "")
++- Cell (XmlAttr type "") [test/Golden/TCT/HeaderGreat/0010.tct#4:1-4:8]
 |
-`- Cell 4:3 4:8 (XmlElem para)
+`- Cell (XmlElem para) [test/Golden/TCT/HeaderGreat/0010.tct#4:3-4:8]
    |
-   `- Cell 4:3 4:8 (XmlText "text3")
+   `- Cell (XmlText "text3") [test/Golden/TCT/HeaderGreat/0010.tct#4:3-4:8]
 
diff --git a/test/Golden/TCT/HeaderGreat/0011.tct.ast b/test/Golden/TCT/HeaderGreat/0011.tct.ast
index 6dad53a..16027da 100644
--- a/test/Golden/TCT/HeaderGreat/0011.tct.ast
+++ b/test/Golden/TCT/HeaderGreat/0011.tct.ast
@@ -1,13 +1,13 @@
-[ Tree (Cell 1:1 1:8 (NodeHeader (HeaderGreat "" ""))) 
-    [ Tree (Cell 1:3 1:8 NodePara) 
-        [ Tree (Cell 1:3 1:8 (NodeToken (TokenText "text1"))) []
+[ Tree (Cell (NodeHeader (HeaderGreat "" "")) [test/Golden/TCT/HeaderGreat/0011.tct#1:1-1:8]) 
+    [ Tree (Cell NodePara [test/Golden/TCT/HeaderGreat/0011.tct#1:3-1:8]) 
+        [ Tree (Cell (NodeToken (TokenText "text1")) [test/Golden/TCT/HeaderGreat/0011.tct#1:3-1:8]) []
         ] 
     ] 
-, Tree (Cell 2:1 3:8 NodePara) 
-    [ Tree (Cell 2:1 2:6 (NodeToken (TokenText "text2"))) []
-    , Tree (Cell 3:1 3:8 (NodeHeader (HeaderGreat "" ""))) 
-        [ Tree (Cell 3:3 3:8 NodePara) 
-            [ Tree (Cell 3:3 3:8 (NodeToken (TokenText "text3"))) []
+, Tree (Cell NodePara [test/Golden/TCT/HeaderGreat/0011.tct#2:1-3:8]) 
+    [ Tree (Cell (NodeToken (TokenText "text2")) [test/Golden/TCT/HeaderGreat/0011.tct#2:1-2:6]) []
+    , Tree (Cell (NodeHeader (HeaderGreat "" "")) [test/Golden/TCT/HeaderGreat/0011.tct#3:1-3:8]) 
+        [ Tree (Cell NodePara [test/Golden/TCT/HeaderGreat/0011.tct#3:3-3:8]) 
+            [ Tree (Cell (NodeToken (TokenText "text3")) [test/Golden/TCT/HeaderGreat/0011.tct#3:3-3:8]) []
             ] 
         ] 
     ] 
diff --git a/test/Golden/TCT/HeaderGreat/0011.tct.plain b/test/Golden/TCT/HeaderGreat/0011.tct.plain
new file mode 100644
index 0000000..9cbd55f
--- /dev/null
+++ b/test/Golden/TCT/HeaderGreat/0011.tct.plain
@@ -0,0 +1,3 @@
+> text1
+text2
+> text3
diff --git a/test/Golden/TCT/HeaderGreat/0011.tct.xml b/test/Golden/TCT/HeaderGreat/0011.tct.xml
index 5c680af..9031a7d 100644
--- a/test/Golden/TCT/HeaderGreat/0011.tct.xml
+++ b/test/Golden/TCT/HeaderGreat/0011.tct.xml
@@ -1,20 +1,20 @@
-Cell 1:1 1:8 (XmlElem quote)
+Cell (XmlElem quote) [test/Golden/TCT/HeaderGreat/0011.tct#1:1-1:8]
 |
-+- Cell 1:1 1:1 (XmlAttr type "")
++- Cell (XmlAttr type "") [test/Golden/TCT/HeaderGreat/0011.tct#1:1-1:8]
 |
-`- Cell 1:3 1:8 (XmlElem para)
+`- Cell (XmlElem para) [test/Golden/TCT/HeaderGreat/0011.tct#1:3-1:8]
    |
-   `- Cell 1:3 1:8 (XmlText "text1")
+   `- Cell (XmlText "text1") [test/Golden/TCT/HeaderGreat/0011.tct#1:3-1:8]
 
-Cell 2:1 3:8 (XmlElem para)
+Cell (XmlElem para) [test/Golden/TCT/HeaderGreat/0011.tct#2:1-3:8]
 |
-+- Cell 2:1 2:6 (XmlText "text2")
++- Cell (XmlText "text2") [test/Golden/TCT/HeaderGreat/0011.tct#2:1-2:6]
 |
-`- Cell 3:1 3:8 (XmlElem quote)
+`- Cell (XmlElem quote) [test/Golden/TCT/HeaderGreat/0011.tct#3:1-3:8]
    |
-   +- Cell 3:1 3:1 (XmlAttr type "")
+   +- Cell (XmlAttr type "") [test/Golden/TCT/HeaderGreat/0011.tct#3:1-3:8]
    |
-   `- Cell 3:3 3:8 (XmlElem para)
+   `- Cell (XmlElem para) [test/Golden/TCT/HeaderGreat/0011.tct#3:3-3:8]
       |
-      `- Cell 3:3 3:8 (XmlText "text3")
+      `- Cell (XmlText "text3") [test/Golden/TCT/HeaderGreat/0011.tct#3:3-3:8]
 
diff --git a/test/Golden/TCT/HeaderGreat/0012.tct.ast b/test/Golden/TCT/HeaderGreat/0012.tct.ast
index 4eb6a3e..1c9d32e 100644
--- a/test/Golden/TCT/HeaderGreat/0012.tct.ast
+++ b/test/Golden/TCT/HeaderGreat/0012.tct.ast
@@ -1,10 +1,10 @@
-[ Tree (Cell 1:1 3:6 NodePara) 
-    [ Tree (Cell 1:1 1:6 (NodeToken (TokenText "text1"))) []
-    , Tree (Cell 2:1 2:8 (NodeHeader (HeaderGreat "" ""))) 
-        [ Tree (Cell 2:3 2:8 NodePara) 
-            [ Tree (Cell 2:3 2:8 (NodeToken (TokenText "text2"))) []
+[ Tree (Cell NodePara [test/Golden/TCT/HeaderGreat/0012.tct#1:1-3:6]) 
+    [ Tree (Cell (NodeToken (TokenText "text1")) [test/Golden/TCT/HeaderGreat/0012.tct#1:1-1:6]) []
+    , Tree (Cell (NodeHeader (HeaderGreat "" "")) [test/Golden/TCT/HeaderGreat/0012.tct#2:1-2:8]) 
+        [ Tree (Cell NodePara [test/Golden/TCT/HeaderGreat/0012.tct#2:3-2:8]) 
+            [ Tree (Cell (NodeToken (TokenText "text2")) [test/Golden/TCT/HeaderGreat/0012.tct#2:3-2:8]) []
             ] 
         ] 
-    , Tree (Cell 3:1 3:6 (NodeToken (TokenText "text3"))) []
+    , Tree (Cell (NodeToken (TokenText "text3")) [test/Golden/TCT/HeaderGreat/0012.tct#3:1-3:6]) []
     ] 
 ] 
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderGreat/0012.tct.plain b/test/Golden/TCT/HeaderGreat/0012.tct.plain
new file mode 100644
index 0000000..ec1c7e1
--- /dev/null
+++ b/test/Golden/TCT/HeaderGreat/0012.tct.plain
@@ -0,0 +1,3 @@
+text1
+> text2
+text3
diff --git a/test/Golden/TCT/HeaderGreat/0012.tct.xml b/test/Golden/TCT/HeaderGreat/0012.tct.xml
index 1f75cec..fe62b87 100644
--- a/test/Golden/TCT/HeaderGreat/0012.tct.xml
+++ b/test/Golden/TCT/HeaderGreat/0012.tct.xml
@@ -1,14 +1,14 @@
-Cell 1:1 3:6 (XmlElem para)
+Cell (XmlElem para) [test/Golden/TCT/HeaderGreat/0012.tct#1:1-3:6]
 |
-+- Cell 1:1 1:6 (XmlText "text1")
++- Cell (XmlText "text1") [test/Golden/TCT/HeaderGreat/0012.tct#1:1-1:6]
 |
-+- Cell 2:1 2:8 (XmlElem quote)
++- Cell (XmlElem quote) [test/Golden/TCT/HeaderGreat/0012.tct#2:1-2:8]
 |  |
-|  +- Cell 2:1 2:1 (XmlAttr type "")
+|  +- Cell (XmlAttr type "") [test/Golden/TCT/HeaderGreat/0012.tct#2:1-2:8]
 |  |
-|  `- Cell 2:3 2:8 (XmlElem para)
+|  `- Cell (XmlElem para) [test/Golden/TCT/HeaderGreat/0012.tct#2:3-2:8]
 |     |
-|     `- Cell 2:3 2:8 (XmlText "text2")
+|     `- Cell (XmlText "text2") [test/Golden/TCT/HeaderGreat/0012.tct#2:3-2:8]
 |
-`- Cell 3:1 3:6 (XmlText "text3")
+`- Cell (XmlText "text3") [test/Golden/TCT/HeaderGreat/0012.tct#3:1-3:6]
 
diff --git a/test/Golden/TCT/HeaderGreat/0013.tct.ast b/test/Golden/TCT/HeaderGreat/0013.tct.ast
index 24f69be..b37c7ae 100644
--- a/test/Golden/TCT/HeaderGreat/0013.tct.ast
+++ b/test/Golden/TCT/HeaderGreat/0013.tct.ast
@@ -1,6 +1,6 @@
-[ Tree (Cell 1:1 2:14 (NodeHeader (HeaderGreat "great1" ""))) 
-    [ Tree (Cell 1:9 2:14 NodePara) 
-        [ Tree (Cell 1:9 2:14 (NodeToken (TokenText "text1\ntext2"))) []
+[ Tree (Cell (NodeHeader (HeaderGreat "great1" "")) [test/Golden/TCT/HeaderGreat/0013.tct#1:1-2:14]) 
+    [ Tree (Cell NodePara [test/Golden/TCT/HeaderGreat/0013.tct#1:9-2:14]) 
+        [ Tree (Cell (NodeToken (TokenText "text1\ntext2")) [test/Golden/TCT/HeaderGreat/0013.tct#1:9-2:14]) []
         ] 
     ] 
 ] 
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderGreat/0013.tct.plain b/test/Golden/TCT/HeaderGreat/0013.tct.plain
new file mode 100644
index 0000000..6be61e3
--- /dev/null
+++ b/test/Golden/TCT/HeaderGreat/0013.tct.plain
@@ -0,0 +1,2 @@
+great1> text1
+great1> text2
diff --git a/test/Golden/TCT/HeaderGreat/0013.tct.xml b/test/Golden/TCT/HeaderGreat/0013.tct.xml
index 921c8f0..81e6eb8 100644
--- a/test/Golden/TCT/HeaderGreat/0013.tct.xml
+++ b/test/Golden/TCT/HeaderGreat/0013.tct.xml
@@ -1,8 +1,8 @@
-Cell 1:1 2:14 (XmlElem quote)
+Cell (XmlElem quote) [test/Golden/TCT/HeaderGreat/0013.tct#1:1-2:14]
 |
-+- Cell 1:1 1:1 (XmlAttr type "great1")
++- Cell (XmlAttr type "great1") [test/Golden/TCT/HeaderGreat/0013.tct#1:1-2:14]
 |
-`- Cell 1:9 2:14 (XmlElem para)
+`- Cell (XmlElem para) [test/Golden/TCT/HeaderGreat/0013.tct#1:9-2:14]
    |
-   `- Cell 1:9 2:14 (XmlText "text1\ntext2")
+   `- Cell (XmlText "text1\ntext2") [test/Golden/TCT/HeaderGreat/0013.tct#1:9-2:14]
 
diff --git a/test/Golden/TCT/HeaderGreat/0014.tct.ast b/test/Golden/TCT/HeaderGreat/0014.tct.ast
index 14c21b9..def5a5b 100644
--- a/test/Golden/TCT/HeaderGreat/0014.tct.ast
+++ b/test/Golden/TCT/HeaderGreat/0014.tct.ast
@@ -1,11 +1,11 @@
-[ Tree (Cell 1:1 1:14 (NodeHeader (HeaderGreat "great1" ""))) 
-    [ Tree (Cell 1:9 1:14 NodePara) 
-        [ Tree (Cell 1:9 1:14 (NodeToken (TokenText "text1"))) []
+[ Tree (Cell (NodeHeader (HeaderGreat "great1" "")) [test/Golden/TCT/HeaderGreat/0014.tct#1:1-1:14]) 
+    [ Tree (Cell NodePara [test/Golden/TCT/HeaderGreat/0014.tct#1:9-1:14]) 
+        [ Tree (Cell (NodeToken (TokenText "text1")) [test/Golden/TCT/HeaderGreat/0014.tct#1:9-1:14]) []
         ] 
     ] 
-, Tree (Cell 2:1 2:14 (NodeHeader (HeaderGreat "great2" ""))) 
-    [ Tree (Cell 2:9 2:14 NodePara) 
-        [ Tree (Cell 2:9 2:14 (NodeToken (TokenText "text2"))) []
+, Tree (Cell (NodeHeader (HeaderGreat "great2" "")) [test/Golden/TCT/HeaderGreat/0014.tct#2:1-2:14]) 
+    [ Tree (Cell NodePara [test/Golden/TCT/HeaderGreat/0014.tct#2:9-2:14]) 
+        [ Tree (Cell (NodeToken (TokenText "text2")) [test/Golden/TCT/HeaderGreat/0014.tct#2:9-2:14]) []
         ] 
     ] 
 ] 
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderGreat/0014.tct.plain b/test/Golden/TCT/HeaderGreat/0014.tct.plain
new file mode 100644
index 0000000..76f4cae
--- /dev/null
+++ b/test/Golden/TCT/HeaderGreat/0014.tct.plain
@@ -0,0 +1,2 @@
+great1> text1
+great2> text2
diff --git a/test/Golden/TCT/HeaderGreat/0014.tct.xml b/test/Golden/TCT/HeaderGreat/0014.tct.xml
index c48e869..f3892f4 100644
--- a/test/Golden/TCT/HeaderGreat/0014.tct.xml
+++ b/test/Golden/TCT/HeaderGreat/0014.tct.xml
@@ -1,16 +1,16 @@
-Cell 1:1 1:14 (XmlElem quote)
+Cell (XmlElem quote) [test/Golden/TCT/HeaderGreat/0014.tct#1:1-1:14]
 |
-+- Cell 1:1 1:1 (XmlAttr type "great1")
++- Cell (XmlAttr type "great1") [test/Golden/TCT/HeaderGreat/0014.tct#1:1-1:14]
 |
-`- Cell 1:9 1:14 (XmlElem para)
+`- Cell (XmlElem para) [test/Golden/TCT/HeaderGreat/0014.tct#1:9-1:14]
    |
-   `- Cell 1:9 1:14 (XmlText "text1")
+   `- Cell (XmlText "text1") [test/Golden/TCT/HeaderGreat/0014.tct#1:9-1:14]
 
-Cell 2:1 2:14 (XmlElem quote)
+Cell (XmlElem quote) [test/Golden/TCT/HeaderGreat/0014.tct#2:1-2:14]
 |
-+- Cell 2:1 2:1 (XmlAttr type "great2")
++- Cell (XmlAttr type "great2") [test/Golden/TCT/HeaderGreat/0014.tct#2:1-2:14]
 |
-`- Cell 2:9 2:14 (XmlElem para)
+`- Cell (XmlElem para) [test/Golden/TCT/HeaderGreat/0014.tct#2:9-2:14]
    |
-   `- Cell 2:9 2:14 (XmlText "text2")
+   `- Cell (XmlText "text2") [test/Golden/TCT/HeaderGreat/0014.tct#2:9-2:14]
 
diff --git a/test/Golden/TCT/HeaderGreat/0015.tct.ast b/test/Golden/TCT/HeaderGreat/0015.tct.ast
index 13956d4..408c4fd 100644
--- a/test/Golden/TCT/HeaderGreat/0015.tct.ast
+++ b/test/Golden/TCT/HeaderGreat/0015.tct.ast
@@ -1,14 +1,14 @@
-[ Tree (Cell 1:1 1:22 (NodeHeader (HeaderGreat "great1" ""))) 
-    [ Tree (Cell 1:9 1:22 (NodeHeader (HeaderGreat "great2" ""))) 
-        [ Tree (Cell 1:17 1:22 NodePara) 
-            [ Tree (Cell 1:17 1:22 (NodeToken (TokenText "text1"))) []
+[ Tree (Cell (NodeHeader (HeaderGreat "great1" "")) [test/Golden/TCT/HeaderGreat/0015.tct#1:1-1:22]) 
+    [ Tree (Cell (NodeHeader (HeaderGreat "great2" "")) [test/Golden/TCT/HeaderGreat/0015.tct#1:9-1:22]) 
+        [ Tree (Cell NodePara [test/Golden/TCT/HeaderGreat/0015.tct#1:17-1:22]) 
+            [ Tree (Cell (NodeToken (TokenText "text1")) [test/Golden/TCT/HeaderGreat/0015.tct#1:17-1:22]) []
             ] 
         ] 
     ] 
-, Tree (Cell 2:1 2:22 (NodeHeader (HeaderGreat "great2" ""))) 
-    [ Tree (Cell 2:9 2:22 (NodeHeader (HeaderGreat "great1" ""))) 
-        [ Tree (Cell 2:17 2:22 NodePara) 
-            [ Tree (Cell 2:17 2:22 (NodeToken (TokenText "text2"))) []
+, Tree (Cell (NodeHeader (HeaderGreat "great2" "")) [test/Golden/TCT/HeaderGreat/0015.tct#2:1-2:22]) 
+    [ Tree (Cell (NodeHeader (HeaderGreat "great1" "")) [test/Golden/TCT/HeaderGreat/0015.tct#2:9-2:22]) 
+        [ Tree (Cell NodePara [test/Golden/TCT/HeaderGreat/0015.tct#2:17-2:22]) 
+            [ Tree (Cell (NodeToken (TokenText "text2")) [test/Golden/TCT/HeaderGreat/0015.tct#2:17-2:22]) []
             ] 
         ] 
     ] 
diff --git a/test/Golden/TCT/HeaderGreat/0015.tct.plain b/test/Golden/TCT/HeaderGreat/0015.tct.plain
new file mode 100644
index 0000000..30ea500
--- /dev/null
+++ b/test/Golden/TCT/HeaderGreat/0015.tct.plain
@@ -0,0 +1,2 @@
+great1> great2> text1
+great2> great1> text2
diff --git a/test/Golden/TCT/HeaderGreat/0015.tct.xml b/test/Golden/TCT/HeaderGreat/0015.tct.xml
index e9e6e93..f90553e 100644
--- a/test/Golden/TCT/HeaderGreat/0015.tct.xml
+++ b/test/Golden/TCT/HeaderGreat/0015.tct.xml
@@ -1,24 +1,24 @@
-Cell 1:1 1:22 (XmlElem quote)
+Cell (XmlElem quote) [test/Golden/TCT/HeaderGreat/0015.tct#1:1-1:22]
 |
-+- Cell 1:1 1:1 (XmlAttr type "great1")
++- Cell (XmlAttr type "great1") [test/Golden/TCT/HeaderGreat/0015.tct#1:1-1:22]
 |
-`- Cell 1:9 1:22 (XmlElem quote)
+`- Cell (XmlElem quote) [test/Golden/TCT/HeaderGreat/0015.tct#1:9-1:22]
    |
-   +- Cell 1:9 1:9 (XmlAttr type "great2")
+   +- Cell (XmlAttr type "great2") [test/Golden/TCT/HeaderGreat/0015.tct#1:9-1:22]
    |
-   `- Cell 1:17 1:22 (XmlElem para)
+   `- Cell (XmlElem para) [test/Golden/TCT/HeaderGreat/0015.tct#1:17-1:22]
       |
-      `- Cell 1:17 1:22 (XmlText "text1")
+      `- Cell (XmlText "text1") [test/Golden/TCT/HeaderGreat/0015.tct#1:17-1:22]
 
-Cell 2:1 2:22 (XmlElem quote)
+Cell (XmlElem quote) [test/Golden/TCT/HeaderGreat/0015.tct#2:1-2:22]
 |
-+- Cell 2:1 2:1 (XmlAttr type "great2")
++- Cell (XmlAttr type "great2") [test/Golden/TCT/HeaderGreat/0015.tct#2:1-2:22]
 |
-`- Cell 2:9 2:22 (XmlElem quote)
+`- Cell (XmlElem quote) [test/Golden/TCT/HeaderGreat/0015.tct#2:9-2:22]
    |
-   +- Cell 2:9 2:9 (XmlAttr type "great1")
+   +- Cell (XmlAttr type "great1") [test/Golden/TCT/HeaderGreat/0015.tct#2:9-2:22]
    |
-   `- Cell 2:17 2:22 (XmlElem para)
+   `- Cell (XmlElem para) [test/Golden/TCT/HeaderGreat/0015.tct#2:17-2:22]
       |
-      `- Cell 2:17 2:22 (XmlText "text2")
+      `- Cell (XmlText "text2") [test/Golden/TCT/HeaderGreat/0015.tct#2:17-2:22]
 
diff --git a/test/Golden/TCT/HeaderSection/0000.tct.ast b/test/Golden/TCT/HeaderSection/0000.tct.ast
index ae6ba35..19c7373 100644
--- a/test/Golden/TCT/HeaderSection/0000.tct.ast
+++ b/test/Golden/TCT/HeaderSection/0000.tct.ast
@@ -1,16 +1,16 @@
-[ Tree (Cell 1:1 1:7 (NodeHeader (HeaderSection 1))) 
-    [ Tree (Cell 1:3 1:7 NodePara) 
-        [ Tree (Cell 1:3 1:7 (NodeToken (TokenText "sec1"))) []
+[ Tree (Cell (NodeHeader (HeaderSection 1)) [test/Golden/TCT/HeaderSection/0000.tct#1:1-1:7]) 
+    [ Tree (Cell NodePara [test/Golden/TCT/HeaderSection/0000.tct#1:3-1:7]) 
+        [ Tree (Cell (NodeToken (TokenText "sec1")) [test/Golden/TCT/HeaderSection/0000.tct#1:3-1:7]) []
         ] 
     ] 
-, Tree (Cell 2:1 2:7 (NodeHeader (HeaderSection 1))) 
-    [ Tree (Cell 2:3 2:7 NodePara) 
-        [ Tree (Cell 2:3 2:7 (NodeToken (TokenText "sec2"))) []
+, Tree (Cell (NodeHeader (HeaderSection 1)) [test/Golden/TCT/HeaderSection/0000.tct#2:1-2:7]) 
+    [ Tree (Cell NodePara [test/Golden/TCT/HeaderSection/0000.tct#2:3-2:7]) 
+        [ Tree (Cell (NodeToken (TokenText "sec2")) [test/Golden/TCT/HeaderSection/0000.tct#2:3-2:7]) []
         ] 
     ] 
-, Tree (Cell 3:1 3:7 (NodeHeader (HeaderSection 1))) 
-    [ Tree (Cell 3:3 3:7 NodePara) 
-        [ Tree (Cell 3:3 3:7 (NodeToken (TokenText "sec3"))) []
+, Tree (Cell (NodeHeader (HeaderSection 1)) [test/Golden/TCT/HeaderSection/0000.tct#3:1-3:7]) 
+    [ Tree (Cell NodePara [test/Golden/TCT/HeaderSection/0000.tct#3:3-3:7]) 
+        [ Tree (Cell (NodeToken (TokenText "sec3")) [test/Golden/TCT/HeaderSection/0000.tct#3:3-3:7]) []
         ] 
     ] 
 ] 
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderSection/0000.tct.plain b/test/Golden/TCT/HeaderSection/0000.tct.plain
new file mode 100644
index 0000000..d28086c
--- /dev/null
+++ b/test/Golden/TCT/HeaderSection/0000.tct.plain
@@ -0,0 +1,3 @@
+# sec1
+# sec2
+# sec3
diff --git a/test/Golden/TCT/HeaderSection/0000.tct.xml b/test/Golden/TCT/HeaderSection/0000.tct.xml
index 8137025..70bed7e 100644
--- a/test/Golden/TCT/HeaderSection/0000.tct.xml
+++ b/test/Golden/TCT/HeaderSection/0000.tct.xml
@@ -1,22 +1,22 @@
-Cell 1:3 1:7 (XmlElem about)
+Cell (XmlElem about) [test/Golden/TCT/HeaderSection/0000.tct#1:3-1:7]
 |
-`- Cell 1:3 1:7 (XmlElem title)
+`- Cell (XmlElem title) [test/Golden/TCT/HeaderSection/0000.tct#1:3-1:7]
    |
-   `- Cell 1:3 1:7 (XmlText "sec1")
+   `- Cell (XmlText "sec1") [test/Golden/TCT/HeaderSection/0000.tct#1:3-1:7]
 
-Cell 2:1 2:7 (XmlElem section)
+Cell (XmlElem section) [test/Golden/TCT/HeaderSection/0000.tct#2:1-2:7]
 |
-+- Cell 2:3 2:7 (XmlAttr id "sec2")
++- Cell (XmlAttr id "sec2") [test/Golden/TCT/HeaderSection/0000.tct#2:3-2:7]
 |
-`- Cell 2:3 2:7 (XmlElem title)
+`- Cell (XmlElem title) [test/Golden/TCT/HeaderSection/0000.tct#2:3-2:7]
    |
-   `- Cell 2:3 2:7 (XmlText "sec2")
+   `- Cell (XmlText "sec2") [test/Golden/TCT/HeaderSection/0000.tct#2:3-2:7]
 
-Cell 3:1 3:7 (XmlElem section)
+Cell (XmlElem section) [test/Golden/TCT/HeaderSection/0000.tct#3:1-3:7]
 |
-+- Cell 3:3 3:7 (XmlAttr id "sec3")
++- Cell (XmlAttr id "sec3") [test/Golden/TCT/HeaderSection/0000.tct#3:3-3:7]
 |
-`- Cell 3:3 3:7 (XmlElem title)
+`- Cell (XmlElem title) [test/Golden/TCT/HeaderSection/0000.tct#3:3-3:7]
    |
-   `- Cell 3:3 3:7 (XmlText "sec3")
+   `- Cell (XmlText "sec3") [test/Golden/TCT/HeaderSection/0000.tct#3:3-3:7]
 
diff --git a/test/Golden/TCT/HeaderSection/0001.tct.ast b/test/Golden/TCT/HeaderSection/0001.tct.ast
index 5703606..969faaa 100644
--- a/test/Golden/TCT/HeaderSection/0001.tct.ast
+++ b/test/Golden/TCT/HeaderSection/0001.tct.ast
@@ -1,15 +1,15 @@
-[ Tree (Cell 1:1 3:8 (NodeHeader (HeaderSection 1))) 
-    [ Tree (Cell 1:3 1:7 NodePara) 
-        [ Tree (Cell 1:3 1:7 (NodeToken (TokenText "sec1"))) []
+[ Tree (Cell (NodeHeader (HeaderSection 1)) [test/Golden/TCT/HeaderSection/0001.tct#1:1-3:8]) 
+    [ Tree (Cell NodePara [test/Golden/TCT/HeaderSection/0001.tct#1:3-1:7]) 
+        [ Tree (Cell (NodeToken (TokenText "sec1")) [test/Golden/TCT/HeaderSection/0001.tct#1:3-1:7]) []
         ] 
-    , Tree (Cell 2:1 2:8 (NodeHeader (HeaderSection 2))) 
-        [ Tree (Cell 2:4 2:8 NodePara) 
-            [ Tree (Cell 2:4 2:8 (NodeToken (TokenText "sec2"))) []
+    , Tree (Cell (NodeHeader (HeaderSection 2)) [test/Golden/TCT/HeaderSection/0001.tct#2:1-2:8]) 
+        [ Tree (Cell NodePara [test/Golden/TCT/HeaderSection/0001.tct#2:4-2:8]) 
+            [ Tree (Cell (NodeToken (TokenText "sec2")) [test/Golden/TCT/HeaderSection/0001.tct#2:4-2:8]) []
             ] 
         ] 
-    , Tree (Cell 3:1 3:8 (NodeHeader (HeaderSection 2))) 
-        [ Tree (Cell 3:4 3:8 NodePara) 
-            [ Tree (Cell 3:4 3:8 (NodeToken (TokenText "sec3"))) []
+    , Tree (Cell (NodeHeader (HeaderSection 2)) [test/Golden/TCT/HeaderSection/0001.tct#3:1-3:8]) 
+        [ Tree (Cell NodePara [test/Golden/TCT/HeaderSection/0001.tct#3:4-3:8]) 
+            [ Tree (Cell (NodeToken (TokenText "sec3")) [test/Golden/TCT/HeaderSection/0001.tct#3:4-3:8]) []
             ] 
         ] 
     ] 
diff --git a/test/Golden/TCT/HeaderSection/0001.tct.plain b/test/Golden/TCT/HeaderSection/0001.tct.plain
new file mode 100644
index 0000000..5c77934
--- /dev/null
+++ b/test/Golden/TCT/HeaderSection/0001.tct.plain
@@ -0,0 +1,3 @@
+# sec1
+## sec2
+## sec3
diff --git a/test/Golden/TCT/HeaderSection/0001.tct.xml b/test/Golden/TCT/HeaderSection/0001.tct.xml
index 8476169..fc2c4bb 100644
--- a/test/Golden/TCT/HeaderSection/0001.tct.xml
+++ b/test/Golden/TCT/HeaderSection/0001.tct.xml
@@ -1,22 +1,22 @@
-Cell 1:3 1:7 (XmlElem about)
+Cell (XmlElem about) [test/Golden/TCT/HeaderSection/0001.tct#1:3-1:7]
 |
-`- Cell 1:3 1:7 (XmlElem title)
+`- Cell (XmlElem title) [test/Golden/TCT/HeaderSection/0001.tct#1:3-1:7]
    |
-   `- Cell 1:3 1:7 (XmlText "sec1")
+   `- Cell (XmlText "sec1") [test/Golden/TCT/HeaderSection/0001.tct#1:3-1:7]
 
-Cell 2:1 2:8 (XmlElem section)
+Cell (XmlElem section) [test/Golden/TCT/HeaderSection/0001.tct#2:1-2:8]
 |
-+- Cell 2:4 2:8 (XmlAttr id "sec2")
++- Cell (XmlAttr id "sec2") [test/Golden/TCT/HeaderSection/0001.tct#2:4-2:8]
 |
-`- Cell 2:4 2:8 (XmlElem title)
+`- Cell (XmlElem title) [test/Golden/TCT/HeaderSection/0001.tct#2:4-2:8]
    |
-   `- Cell 2:4 2:8 (XmlText "sec2")
+   `- Cell (XmlText "sec2") [test/Golden/TCT/HeaderSection/0001.tct#2:4-2:8]
 
-Cell 3:1 3:8 (XmlElem section)
+Cell (XmlElem section) [test/Golden/TCT/HeaderSection/0001.tct#3:1-3:8]
 |
-+- Cell 3:4 3:8 (XmlAttr id "sec3")
++- Cell (XmlAttr id "sec3") [test/Golden/TCT/HeaderSection/0001.tct#3:4-3:8]
 |
-`- Cell 3:4 3:8 (XmlElem title)
+`- Cell (XmlElem title) [test/Golden/TCT/HeaderSection/0001.tct#3:4-3:8]
    |
-   `- Cell 3:4 3:8 (XmlText "sec3")
+   `- Cell (XmlText "sec3") [test/Golden/TCT/HeaderSection/0001.tct#3:4-3:8]
 
diff --git a/test/Golden/TCT/HeaderSection/0002.tct.ast b/test/Golden/TCT/HeaderSection/0002.tct.ast
index a146085..462a21b 100644
--- a/test/Golden/TCT/HeaderSection/0002.tct.ast
+++ b/test/Golden/TCT/HeaderSection/0002.tct.ast
@@ -1,15 +1,15 @@
-[ Tree (Cell 1:1 3:9 (NodeHeader (HeaderSection 1))) 
-    [ Tree (Cell 1:3 1:7 NodePara) 
-        [ Tree (Cell 1:3 1:7 (NodeToken (TokenText "sec1"))) []
+[ Tree (Cell (NodeHeader (HeaderSection 1)) [test/Golden/TCT/HeaderSection/0002.tct#1:1-3:9]) 
+    [ Tree (Cell NodePara [test/Golden/TCT/HeaderSection/0002.tct#1:3-1:7]) 
+        [ Tree (Cell (NodeToken (TokenText "sec1")) [test/Golden/TCT/HeaderSection/0002.tct#1:3-1:7]) []
         ] 
-    , Tree (Cell 2:2 2:9 (NodeHeader (HeaderSection 1))) 
-        [ Tree (Cell 2:4 2:9 NodePara) 
-            [ Tree (Cell 2:4 2:9 (NodeToken (TokenText "sec11"))) []
+    , Tree (Cell (NodeHeader (HeaderSection 1)) [test/Golden/TCT/HeaderSection/0002.tct#2:2-2:9]) 
+        [ Tree (Cell NodePara [test/Golden/TCT/HeaderSection/0002.tct#2:4-2:9]) 
+            [ Tree (Cell (NodeToken (TokenText "sec11")) [test/Golden/TCT/HeaderSection/0002.tct#2:4-2:9]) []
             ] 
         ] 
-    , Tree (Cell 3:2 3:9 (NodeHeader (HeaderSection 1))) 
-        [ Tree (Cell 3:4 3:9 NodePara) 
-            [ Tree (Cell 3:4 3:9 (NodeToken (TokenText "sec12"))) []
+    , Tree (Cell (NodeHeader (HeaderSection 1)) [test/Golden/TCT/HeaderSection/0002.tct#3:2-3:9]) 
+        [ Tree (Cell NodePara [test/Golden/TCT/HeaderSection/0002.tct#3:4-3:9]) 
+            [ Tree (Cell (NodeToken (TokenText "sec12")) [test/Golden/TCT/HeaderSection/0002.tct#3:4-3:9]) []
             ] 
         ] 
     ] 
diff --git a/test/Golden/TCT/HeaderSection/0002.tct.plain b/test/Golden/TCT/HeaderSection/0002.tct.plain
new file mode 100644
index 0000000..6a29146
--- /dev/null
+++ b/test/Golden/TCT/HeaderSection/0002.tct.plain
@@ -0,0 +1,3 @@
+# sec1
+ # sec11
+ # sec12
diff --git a/test/Golden/TCT/HeaderSection/0002.tct.xml b/test/Golden/TCT/HeaderSection/0002.tct.xml
index 83e4cfc..ea63345 100644
--- a/test/Golden/TCT/HeaderSection/0002.tct.xml
+++ b/test/Golden/TCT/HeaderSection/0002.tct.xml
@@ -1,14 +1,14 @@
-Cell 1:3 1:7 (XmlElem about)
+Cell (XmlElem about) [test/Golden/TCT/HeaderSection/0002.tct#1:3-1:7]
 |
-+- Cell 1:3 1:7 (XmlElem title)
++- Cell (XmlElem title) [test/Golden/TCT/HeaderSection/0002.tct#1:3-1:7]
 |  |
-|  `- Cell 1:3 1:7 (XmlText "sec1")
+|  `- Cell (XmlText "sec1") [test/Golden/TCT/HeaderSection/0002.tct#1:3-1:7]
 |
-+- Cell 2:4 2:9 (XmlElem title)
++- Cell (XmlElem title) [test/Golden/TCT/HeaderSection/0002.tct#2:4-2:9]
 |  |
-|  `- Cell 2:4 2:9 (XmlText "sec11")
+|  `- Cell (XmlText "sec11") [test/Golden/TCT/HeaderSection/0002.tct#2:4-2:9]
 |
-`- Cell 3:4 3:9 (XmlElem title)
+`- Cell (XmlElem title) [test/Golden/TCT/HeaderSection/0002.tct#3:4-3:9]
    |
-   `- Cell 3:4 3:9 (XmlText "sec12")
+   `- Cell (XmlText "sec12") [test/Golden/TCT/HeaderSection/0002.tct#3:4-3:9]
 
diff --git a/test/Golden/TCT/HeaderSection/0003.tct.ast b/test/Golden/TCT/HeaderSection/0003.tct.ast
index 03466a7..a7bc40f 100644
--- a/test/Golden/TCT/HeaderSection/0003.tct.ast
+++ b/test/Golden/TCT/HeaderSection/0003.tct.ast
@@ -1,15 +1,15 @@
-[ Tree (Cell 1:1 3:10 (NodeHeader (HeaderSection 1))) 
-    [ Tree (Cell 1:3 1:7 NodePara) 
-        [ Tree (Cell 1:3 1:7 (NodeToken (TokenText "sec1"))) []
+[ Tree (Cell (NodeHeader (HeaderSection 1)) [test/Golden/TCT/HeaderSection/0003.tct#1:1-3:10]) 
+    [ Tree (Cell NodePara [test/Golden/TCT/HeaderSection/0003.tct#1:3-1:7]) 
+        [ Tree (Cell (NodeToken (TokenText "sec1")) [test/Golden/TCT/HeaderSection/0003.tct#1:3-1:7]) []
         ] 
-    , Tree (Cell 2:3 2:10 (NodeHeader (HeaderSection 1))) 
-        [ Tree (Cell 2:5 2:10 NodePara) 
-            [ Tree (Cell 2:5 2:10 (NodeToken (TokenText "sec11"))) []
+    , Tree (Cell (NodeHeader (HeaderSection 1)) [test/Golden/TCT/HeaderSection/0003.tct#2:3-2:10]) 
+        [ Tree (Cell NodePara [test/Golden/TCT/HeaderSection/0003.tct#2:5-2:10]) 
+            [ Tree (Cell (NodeToken (TokenText "sec11")) [test/Golden/TCT/HeaderSection/0003.tct#2:5-2:10]) []
             ] 
         ] 
-    , Tree (Cell 3:3 3:10 (NodeHeader (HeaderSection 1))) 
-        [ Tree (Cell 3:5 3:10 NodePara) 
-            [ Tree (Cell 3:5 3:10 (NodeToken (TokenText "sec12"))) []
+    , Tree (Cell (NodeHeader (HeaderSection 1)) [test/Golden/TCT/HeaderSection/0003.tct#3:3-3:10]) 
+        [ Tree (Cell NodePara [test/Golden/TCT/HeaderSection/0003.tct#3:5-3:10]) 
+            [ Tree (Cell (NodeToken (TokenText "sec12")) [test/Golden/TCT/HeaderSection/0003.tct#3:5-3:10]) []
             ] 
         ] 
     ] 
diff --git a/test/Golden/TCT/HeaderSection/0003.tct.plain b/test/Golden/TCT/HeaderSection/0003.tct.plain
new file mode 100644
index 0000000..046e672
--- /dev/null
+++ b/test/Golden/TCT/HeaderSection/0003.tct.plain
@@ -0,0 +1,3 @@
+# sec1
+  # sec11
+  # sec12
diff --git a/test/Golden/TCT/HeaderSection/0003.tct.xml b/test/Golden/TCT/HeaderSection/0003.tct.xml
index a077f91..688b71f 100644
--- a/test/Golden/TCT/HeaderSection/0003.tct.xml
+++ b/test/Golden/TCT/HeaderSection/0003.tct.xml
@@ -1,14 +1,14 @@
-Cell 1:3 1:7 (XmlElem about)
+Cell (XmlElem about) [test/Golden/TCT/HeaderSection/0003.tct#1:3-1:7]
 |
-+- Cell 1:3 1:7 (XmlElem title)
++- Cell (XmlElem title) [test/Golden/TCT/HeaderSection/0003.tct#1:3-1:7]
 |  |
-|  `- Cell 1:3 1:7 (XmlText "sec1")
+|  `- Cell (XmlText "sec1") [test/Golden/TCT/HeaderSection/0003.tct#1:3-1:7]
 |
-+- Cell 2:5 2:10 (XmlElem title)
++- Cell (XmlElem title) [test/Golden/TCT/HeaderSection/0003.tct#2:5-2:10]
 |  |
-|  `- Cell 2:5 2:10 (XmlText "sec11")
+|  `- Cell (XmlText "sec11") [test/Golden/TCT/HeaderSection/0003.tct#2:5-2:10]
 |
-`- Cell 3:5 3:10 (XmlElem title)
+`- Cell (XmlElem title) [test/Golden/TCT/HeaderSection/0003.tct#3:5-3:10]
    |
-   `- Cell 3:5 3:10 (XmlText "sec12")
+   `- Cell (XmlText "sec12") [test/Golden/TCT/HeaderSection/0003.tct#3:5-3:10]
 
diff --git a/test/Golden/TCT/HeaderSection/0004.tct.ast b/test/Golden/TCT/HeaderSection/0004.tct.ast
index 059af95..66d8f98 100644
--- a/test/Golden/TCT/HeaderSection/0004.tct.ast
+++ b/test/Golden/TCT/HeaderSection/0004.tct.ast
@@ -1,15 +1,15 @@
-[ Tree (Cell 1:1 3:11 (NodeHeader (HeaderSection 1))) 
-    [ Tree (Cell 1:3 1:7 NodePara) 
-        [ Tree (Cell 1:3 1:7 (NodeToken (TokenText "sec1"))) []
+[ Tree (Cell (NodeHeader (HeaderSection 1)) [test/Golden/TCT/HeaderSection/0004.tct#1:1-3:11]) 
+    [ Tree (Cell NodePara [test/Golden/TCT/HeaderSection/0004.tct#1:3-1:7]) 
+        [ Tree (Cell (NodeToken (TokenText "sec1")) [test/Golden/TCT/HeaderSection/0004.tct#1:3-1:7]) []
         ] 
-    , Tree (Cell 2:4 2:11 (NodeHeader (HeaderSection 1))) 
-        [ Tree (Cell 2:6 2:11 NodePara) 
-            [ Tree (Cell 2:6 2:11 (NodeToken (TokenText "sub11"))) []
+    , Tree (Cell (NodeHeader (HeaderSection 1)) [test/Golden/TCT/HeaderSection/0004.tct#2:4-2:11]) 
+        [ Tree (Cell NodePara [test/Golden/TCT/HeaderSection/0004.tct#2:6-2:11]) 
+            [ Tree (Cell (NodeToken (TokenText "sub11")) [test/Golden/TCT/HeaderSection/0004.tct#2:6-2:11]) []
             ] 
         ] 
-    , Tree (Cell 3:4 3:11 (NodeHeader (HeaderSection 1))) 
-        [ Tree (Cell 3:6 3:11 NodePara) 
-            [ Tree (Cell 3:6 3:11 (NodeToken (TokenText "sub12"))) []
+    , Tree (Cell (NodeHeader (HeaderSection 1)) [test/Golden/TCT/HeaderSection/0004.tct#3:4-3:11]) 
+        [ Tree (Cell NodePara [test/Golden/TCT/HeaderSection/0004.tct#3:6-3:11]) 
+            [ Tree (Cell (NodeToken (TokenText "sub12")) [test/Golden/TCT/HeaderSection/0004.tct#3:6-3:11]) []
             ] 
         ] 
     ] 
diff --git a/test/Golden/TCT/HeaderSection/0004.tct.plain b/test/Golden/TCT/HeaderSection/0004.tct.plain
new file mode 100644
index 0000000..3fbe8ae
--- /dev/null
+++ b/test/Golden/TCT/HeaderSection/0004.tct.plain
@@ -0,0 +1,3 @@
+# sec1
+   # sub11
+   # sub12
diff --git a/test/Golden/TCT/HeaderSection/0004.tct.xml b/test/Golden/TCT/HeaderSection/0004.tct.xml
index cf11177..602e7ec 100644
--- a/test/Golden/TCT/HeaderSection/0004.tct.xml
+++ b/test/Golden/TCT/HeaderSection/0004.tct.xml
@@ -1,14 +1,14 @@
-Cell 1:3 1:7 (XmlElem about)
+Cell (XmlElem about) [test/Golden/TCT/HeaderSection/0004.tct#1:3-1:7]
 |
-+- Cell 1:3 1:7 (XmlElem title)
++- Cell (XmlElem title) [test/Golden/TCT/HeaderSection/0004.tct#1:3-1:7]
 |  |
-|  `- Cell 1:3 1:7 (XmlText "sec1")
+|  `- Cell (XmlText "sec1") [test/Golden/TCT/HeaderSection/0004.tct#1:3-1:7]
 |
-+- Cell 2:6 2:11 (XmlElem title)
++- Cell (XmlElem title) [test/Golden/TCT/HeaderSection/0004.tct#2:6-2:11]
 |  |
-|  `- Cell 2:6 2:11 (XmlText "sub11")
+|  `- Cell (XmlText "sub11") [test/Golden/TCT/HeaderSection/0004.tct#2:6-2:11]
 |
-`- Cell 3:6 3:11 (XmlElem title)
+`- Cell (XmlElem title) [test/Golden/TCT/HeaderSection/0004.tct#3:6-3:11]
    |
-   `- Cell 3:6 3:11 (XmlText "sub12")
+   `- Cell (XmlText "sub12") [test/Golden/TCT/HeaderSection/0004.tct#3:6-3:11]
 
diff --git a/test/Golden/TCT/HeaderSection/0005.tct.ast b/test/Golden/TCT/HeaderSection/0005.tct.ast
index 56de2d8..cf70bb4 100644
--- a/test/Golden/TCT/HeaderSection/0005.tct.ast
+++ b/test/Golden/TCT/HeaderSection/0005.tct.ast
@@ -1,15 +1,15 @@
-[ Tree (Cell 1:1 3:10 (NodeHeader (HeaderSection 2))) 
-    [ Tree (Cell 1:4 1:8 NodePara) 
-        [ Tree (Cell 1:4 1:8 (NodeToken (TokenText "sec1"))) []
+[ Tree (Cell (NodeHeader (HeaderSection 2)) [test/Golden/TCT/HeaderSection/0005.tct#1:1-3:10]) 
+    [ Tree (Cell NodePara [test/Golden/TCT/HeaderSection/0005.tct#1:4-1:8]) 
+        [ Tree (Cell (NodeToken (TokenText "sec1")) [test/Golden/TCT/HeaderSection/0005.tct#1:4-1:8]) []
         ] 
-    , Tree (Cell 2:3 2:10 (NodeHeader (HeaderSection 1))) 
-        [ Tree (Cell 2:5 2:10 NodePara) 
-            [ Tree (Cell 2:5 2:10 (NodeToken (TokenText "sub11"))) []
+    , Tree (Cell (NodeHeader (HeaderSection 1)) [test/Golden/TCT/HeaderSection/0005.tct#2:3-2:10]) 
+        [ Tree (Cell NodePara [test/Golden/TCT/HeaderSection/0005.tct#2:5-2:10]) 
+            [ Tree (Cell (NodeToken (TokenText "sub11")) [test/Golden/TCT/HeaderSection/0005.tct#2:5-2:10]) []
             ] 
         ] 
-    , Tree (Cell 3:3 3:10 (NodeHeader (HeaderSection 1))) 
-        [ Tree (Cell 3:5 3:10 NodePara) 
-            [ Tree (Cell 3:5 3:10 (NodeToken (TokenText "sub12"))) []
+    , Tree (Cell (NodeHeader (HeaderSection 1)) [test/Golden/TCT/HeaderSection/0005.tct#3:3-3:10]) 
+        [ Tree (Cell NodePara [test/Golden/TCT/HeaderSection/0005.tct#3:5-3:10]) 
+            [ Tree (Cell (NodeToken (TokenText "sub12")) [test/Golden/TCT/HeaderSection/0005.tct#3:5-3:10]) []
             ] 
         ] 
     ] 
diff --git a/test/Golden/TCT/HeaderSection/0005.tct.plain b/test/Golden/TCT/HeaderSection/0005.tct.plain
new file mode 100644
index 0000000..e32971e
--- /dev/null
+++ b/test/Golden/TCT/HeaderSection/0005.tct.plain
@@ -0,0 +1,3 @@
+## sec1
+  # sub11
+  # sub12
diff --git a/test/Golden/TCT/HeaderSection/0005.tct.xml b/test/Golden/TCT/HeaderSection/0005.tct.xml
index bc4e97e..137cd68 100644
--- a/test/Golden/TCT/HeaderSection/0005.tct.xml
+++ b/test/Golden/TCT/HeaderSection/0005.tct.xml
@@ -1,14 +1,14 @@
-Cell 1:4 1:8 (XmlElem about)
+Cell (XmlElem about) [test/Golden/TCT/HeaderSection/0005.tct#1:4-1:8]
 |
-+- Cell 1:4 1:8 (XmlElem title)
++- Cell (XmlElem title) [test/Golden/TCT/HeaderSection/0005.tct#1:4-1:8]
 |  |
-|  `- Cell 1:4 1:8 (XmlText "sec1")
+|  `- Cell (XmlText "sec1") [test/Golden/TCT/HeaderSection/0005.tct#1:4-1:8]
 |
-+- Cell 2:5 2:10 (XmlElem title)
++- Cell (XmlElem title) [test/Golden/TCT/HeaderSection/0005.tct#2:5-2:10]
 |  |
-|  `- Cell 2:5 2:10 (XmlText "sub11")
+|  `- Cell (XmlText "sub11") [test/Golden/TCT/HeaderSection/0005.tct#2:5-2:10]
 |
-`- Cell 3:5 3:10 (XmlElem title)
+`- Cell (XmlElem title) [test/Golden/TCT/HeaderSection/0005.tct#3:5-3:10]
    |
-   `- Cell 3:5 3:10 (XmlText "sub12")
+   `- Cell (XmlText "sub12") [test/Golden/TCT/HeaderSection/0005.tct#3:5-3:10]
 
diff --git a/test/Golden/TCT/HeaderSection/0006.tct.ast b/test/Golden/TCT/HeaderSection/0006.tct.ast
index 976e048..cf84e96 100644
--- a/test/Golden/TCT/HeaderSection/0006.tct.ast
+++ b/test/Golden/TCT/HeaderSection/0006.tct.ast
@@ -1,15 +1,15 @@
-[ Tree (Cell 1:1 3:11 (NodeHeader (HeaderSection 1))) 
-    [ Tree (Cell 1:3 1:7 NodePara) 
-        [ Tree (Cell 1:3 1:7 (NodeToken (TokenText "sec1"))) []
+[ Tree (Cell (NodeHeader (HeaderSection 1)) [test/Golden/TCT/HeaderSection/0006.tct#1:1-3:11]) 
+    [ Tree (Cell NodePara [test/Golden/TCT/HeaderSection/0006.tct#1:3-1:7]) 
+        [ Tree (Cell (NodeToken (TokenText "sec1")) [test/Golden/TCT/HeaderSection/0006.tct#1:3-1:7]) []
         ] 
-    , Tree (Cell 2:3 2:11 (NodeHeader (HeaderSection 2))) 
-        [ Tree (Cell 2:6 2:11 NodePara) 
-            [ Tree (Cell 2:6 2:11 (NodeToken (TokenText "sub11"))) []
+    , Tree (Cell (NodeHeader (HeaderSection 2)) [test/Golden/TCT/HeaderSection/0006.tct#2:3-2:11]) 
+        [ Tree (Cell NodePara [test/Golden/TCT/HeaderSection/0006.tct#2:6-2:11]) 
+            [ Tree (Cell (NodeToken (TokenText "sub11")) [test/Golden/TCT/HeaderSection/0006.tct#2:6-2:11]) []
             ] 
         ] 
-    , Tree (Cell 3:3 3:11 (NodeHeader (HeaderSection 2))) 
-        [ Tree (Cell 3:6 3:11 NodePara) 
-            [ Tree (Cell 3:6 3:11 (NodeToken (TokenText "sub12"))) []
+    , Tree (Cell (NodeHeader (HeaderSection 2)) [test/Golden/TCT/HeaderSection/0006.tct#3:3-3:11]) 
+        [ Tree (Cell NodePara [test/Golden/TCT/HeaderSection/0006.tct#3:6-3:11]) 
+            [ Tree (Cell (NodeToken (TokenText "sub12")) [test/Golden/TCT/HeaderSection/0006.tct#3:6-3:11]) []
             ] 
         ] 
     ] 
diff --git a/test/Golden/TCT/HeaderSection/0006.tct.plain b/test/Golden/TCT/HeaderSection/0006.tct.plain
new file mode 100644
index 0000000..b0eb163
--- /dev/null
+++ b/test/Golden/TCT/HeaderSection/0006.tct.plain
@@ -0,0 +1,3 @@
+# sec1
+  ## sub11
+  ## sub12
diff --git a/test/Golden/TCT/HeaderSection/0006.tct.xml b/test/Golden/TCT/HeaderSection/0006.tct.xml
index b842281..899227d 100644
--- a/test/Golden/TCT/HeaderSection/0006.tct.xml
+++ b/test/Golden/TCT/HeaderSection/0006.tct.xml
@@ -1,22 +1,22 @@
-Cell 1:3 1:7 (XmlElem about)
+Cell (XmlElem about) [test/Golden/TCT/HeaderSection/0006.tct#1:3-1:7]
 |
-`- Cell 1:3 1:7 (XmlElem title)
+`- Cell (XmlElem title) [test/Golden/TCT/HeaderSection/0006.tct#1:3-1:7]
    |
-   `- Cell 1:3 1:7 (XmlText "sec1")
+   `- Cell (XmlText "sec1") [test/Golden/TCT/HeaderSection/0006.tct#1:3-1:7]
 
-Cell 2:3 2:11 (XmlElem section)
+Cell (XmlElem section) [test/Golden/TCT/HeaderSection/0006.tct#2:3-2:11]
 |
-+- Cell 2:6 2:11 (XmlAttr id "sub11")
++- Cell (XmlAttr id "sub11") [test/Golden/TCT/HeaderSection/0006.tct#2:6-2:11]
 |
-`- Cell 2:6 2:11 (XmlElem title)
+`- Cell (XmlElem title) [test/Golden/TCT/HeaderSection/0006.tct#2:6-2:11]
    |
-   `- Cell 2:6 2:11 (XmlText "sub11")
+   `- Cell (XmlText "sub11") [test/Golden/TCT/HeaderSection/0006.tct#2:6-2:11]
 
-Cell 3:3 3:11 (XmlElem section)
+Cell (XmlElem section) [test/Golden/TCT/HeaderSection/0006.tct#3:3-3:11]
 |
-+- Cell 3:6 3:11 (XmlAttr id "sub12")
++- Cell (XmlAttr id "sub12") [test/Golden/TCT/HeaderSection/0006.tct#3:6-3:11]
 |
-`- Cell 3:6 3:11 (XmlElem title)
+`- Cell (XmlElem title) [test/Golden/TCT/HeaderSection/0006.tct#3:6-3:11]
    |
-   `- Cell 3:6 3:11 (XmlText "sub12")
+   `- Cell (XmlText "sub12") [test/Golden/TCT/HeaderSection/0006.tct#3:6-3:11]
 
diff --git a/test/Golden/TCT/HeaderSection/0007.tct.ast b/test/Golden/TCT/HeaderSection/0007.tct.ast
index 9a139fa..b56184e 100644
--- a/test/Golden/TCT/HeaderSection/0007.tct.ast
+++ b/test/Golden/TCT/HeaderSection/0007.tct.ast
@@ -1,16 +1,16 @@
-[ Tree (Cell 1:1 1:9 (NodeHeader (HeaderSection 2))) 
-    [ Tree (Cell 1:4 1:9 NodePara) 
-        [ Tree (Cell 1:4 1:9 (NodeToken (TokenText "sec11"))) []
+[ Tree (Cell (NodeHeader (HeaderSection 2)) [test/Golden/TCT/HeaderSection/0007.tct#1:1-1:9]) 
+    [ Tree (Cell NodePara [test/Golden/TCT/HeaderSection/0007.tct#1:4-1:9]) 
+        [ Tree (Cell (NodeToken (TokenText "sec11")) [test/Golden/TCT/HeaderSection/0007.tct#1:4-1:9]) []
         ] 
     ] 
-, Tree (Cell 2:1 2:7 (NodeHeader (HeaderSection 1))) 
-    [ Tree (Cell 2:3 2:7 NodePara) 
-        [ Tree (Cell 2:3 2:7 (NodeToken (TokenText "sec2"))) []
+, Tree (Cell (NodeHeader (HeaderSection 1)) [test/Golden/TCT/HeaderSection/0007.tct#2:1-2:7]) 
+    [ Tree (Cell NodePara [test/Golden/TCT/HeaderSection/0007.tct#2:3-2:7]) 
+        [ Tree (Cell (NodeToken (TokenText "sec2")) [test/Golden/TCT/HeaderSection/0007.tct#2:3-2:7]) []
         ] 
     ] 
-, Tree (Cell 3:1 3:7 (NodeHeader (HeaderSection 1))) 
-    [ Tree (Cell 3:3 3:7 NodePara) 
-        [ Tree (Cell 3:3 3:7 (NodeToken (TokenText "sec3"))) []
+, Tree (Cell (NodeHeader (HeaderSection 1)) [test/Golden/TCT/HeaderSection/0007.tct#3:1-3:7]) 
+    [ Tree (Cell NodePara [test/Golden/TCT/HeaderSection/0007.tct#3:3-3:7]) 
+        [ Tree (Cell (NodeToken (TokenText "sec3")) [test/Golden/TCT/HeaderSection/0007.tct#3:3-3:7]) []
         ] 
     ] 
 ] 
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderSection/0007.tct.plain b/test/Golden/TCT/HeaderSection/0007.tct.plain
new file mode 100644
index 0000000..30e3aaf
--- /dev/null
+++ b/test/Golden/TCT/HeaderSection/0007.tct.plain
@@ -0,0 +1,3 @@
+## sec11
+# sec2
+# sec3
diff --git a/test/Golden/TCT/HeaderSection/0007.tct.xml b/test/Golden/TCT/HeaderSection/0007.tct.xml
index c894a14..8ad31a8 100644
--- a/test/Golden/TCT/HeaderSection/0007.tct.xml
+++ b/test/Golden/TCT/HeaderSection/0007.tct.xml
@@ -1,22 +1,22 @@
-Cell 1:4 1:9 (XmlElem about)
+Cell (XmlElem about) [test/Golden/TCT/HeaderSection/0007.tct#1:4-1:9]
 |
-`- Cell 1:4 1:9 (XmlElem title)
+`- Cell (XmlElem title) [test/Golden/TCT/HeaderSection/0007.tct#1:4-1:9]
    |
-   `- Cell 1:4 1:9 (XmlText "sec11")
+   `- Cell (XmlText "sec11") [test/Golden/TCT/HeaderSection/0007.tct#1:4-1:9]
 
-Cell 2:1 2:7 (XmlElem section)
+Cell (XmlElem section) [test/Golden/TCT/HeaderSection/0007.tct#2:1-2:7]
 |
-+- Cell 2:3 2:7 (XmlAttr id "sec2")
++- Cell (XmlAttr id "sec2") [test/Golden/TCT/HeaderSection/0007.tct#2:3-2:7]
 |
-`- Cell 2:3 2:7 (XmlElem title)
+`- Cell (XmlElem title) [test/Golden/TCT/HeaderSection/0007.tct#2:3-2:7]
    |
-   `- Cell 2:3 2:7 (XmlText "sec2")
+   `- Cell (XmlText "sec2") [test/Golden/TCT/HeaderSection/0007.tct#2:3-2:7]
 
-Cell 3:1 3:7 (XmlElem section)
+Cell (XmlElem section) [test/Golden/TCT/HeaderSection/0007.tct#3:1-3:7]
 |
-+- Cell 3:3 3:7 (XmlAttr id "sec3")
++- Cell (XmlAttr id "sec3") [test/Golden/TCT/HeaderSection/0007.tct#3:3-3:7]
 |
-`- Cell 3:3 3:7 (XmlElem title)
+`- Cell (XmlElem title) [test/Golden/TCT/HeaderSection/0007.tct#3:3-3:7]
    |
-   `- Cell 3:3 3:7 (XmlText "sec3")
+   `- Cell (XmlText "sec3") [test/Golden/TCT/HeaderSection/0007.tct#3:3-3:7]
 
diff --git a/test/Golden/TCT/HeaderSection/0008.tct.ast b/test/Golden/TCT/HeaderSection/0008.tct.ast
index 6e54b1c..9bee0d9 100644
--- a/test/Golden/TCT/HeaderSection/0008.tct.ast
+++ b/test/Golden/TCT/HeaderSection/0008.tct.ast
@@ -1,16 +1,16 @@
-[ Tree (Cell 1:1 1:7 (NodeHeader (HeaderSection 1))) 
-    [ Tree (Cell 1:3 1:7 NodePara) 
-        [ Tree (Cell 1:3 1:7 (NodeToken (TokenText "sec1"))) []
+[ Tree (Cell (NodeHeader (HeaderSection 1)) [test/Golden/TCT/HeaderSection/0008.tct#1:1-1:7]) 
+    [ Tree (Cell NodePara [test/Golden/TCT/HeaderSection/0008.tct#1:3-1:7]) 
+        [ Tree (Cell (NodeToken (TokenText "sec1")) [test/Golden/TCT/HeaderSection/0008.tct#1:3-1:7]) []
         ] 
     ] 
-, Tree (Cell 2:1 2:8 (NodeHeader (HeaderSection 1))) 
-    [ Tree (Cell 2:3 2:8 NodePara) 
-        [ Tree (Cell 2:3 2:8 (NodeToken (TokenText "sec12"))) []
+, Tree (Cell (NodeHeader (HeaderSection 1)) [test/Golden/TCT/HeaderSection/0008.tct#2:1-2:8]) 
+    [ Tree (Cell NodePara [test/Golden/TCT/HeaderSection/0008.tct#2:3-2:8]) 
+        [ Tree (Cell (NodeToken (TokenText "sec12")) [test/Golden/TCT/HeaderSection/0008.tct#2:3-2:8]) []
         ] 
     ] 
-, Tree (Cell 3:1 3:7 (NodeHeader (HeaderSection 1))) 
-    [ Tree (Cell 3:3 3:7 NodePara) 
-        [ Tree (Cell 3:3 3:7 (NodeToken (TokenText "sec3"))) []
+, Tree (Cell (NodeHeader (HeaderSection 1)) [test/Golden/TCT/HeaderSection/0008.tct#3:1-3:7]) 
+    [ Tree (Cell NodePara [test/Golden/TCT/HeaderSection/0008.tct#3:3-3:7]) 
+        [ Tree (Cell (NodeToken (TokenText "sec3")) [test/Golden/TCT/HeaderSection/0008.tct#3:3-3:7]) []
         ] 
     ] 
 ] 
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderSection/0008.tct.plain b/test/Golden/TCT/HeaderSection/0008.tct.plain
new file mode 100644
index 0000000..1b70f0d
--- /dev/null
+++ b/test/Golden/TCT/HeaderSection/0008.tct.plain
@@ -0,0 +1,3 @@
+# sec1
+# sec12
+# sec3
diff --git a/test/Golden/TCT/HeaderSection/0008.tct.xml b/test/Golden/TCT/HeaderSection/0008.tct.xml
index 05ec653..b7c762c 100644
--- a/test/Golden/TCT/HeaderSection/0008.tct.xml
+++ b/test/Golden/TCT/HeaderSection/0008.tct.xml
@@ -1,22 +1,22 @@
-Cell 1:3 1:7 (XmlElem about)
+Cell (XmlElem about) [test/Golden/TCT/HeaderSection/0008.tct#1:3-1:7]
 |
-`- Cell 1:3 1:7 (XmlElem title)
+`- Cell (XmlElem title) [test/Golden/TCT/HeaderSection/0008.tct#1:3-1:7]
    |
-   `- Cell 1:3 1:7 (XmlText "sec1")
+   `- Cell (XmlText "sec1") [test/Golden/TCT/HeaderSection/0008.tct#1:3-1:7]
 
-Cell 2:1 2:8 (XmlElem section)
+Cell (XmlElem section) [test/Golden/TCT/HeaderSection/0008.tct#2:1-2:8]
 |
-+- Cell 2:3 2:8 (XmlAttr id "sec12")
++- Cell (XmlAttr id "sec12") [test/Golden/TCT/HeaderSection/0008.tct#2:3-2:8]
 |
-`- Cell 2:3 2:8 (XmlElem title)
+`- Cell (XmlElem title) [test/Golden/TCT/HeaderSection/0008.tct#2:3-2:8]
    |
-   `- Cell 2:3 2:8 (XmlText "sec12")
+   `- Cell (XmlText "sec12") [test/Golden/TCT/HeaderSection/0008.tct#2:3-2:8]
 
-Cell 3:1 3:7 (XmlElem section)
+Cell (XmlElem section) [test/Golden/TCT/HeaderSection/0008.tct#3:1-3:7]
 |
-+- Cell 3:3 3:7 (XmlAttr id "sec3")
++- Cell (XmlAttr id "sec3") [test/Golden/TCT/HeaderSection/0008.tct#3:3-3:7]
 |
-`- Cell 3:3 3:7 (XmlElem title)
+`- Cell (XmlElem title) [test/Golden/TCT/HeaderSection/0008.tct#3:3-3:7]
    |
-   `- Cell 3:3 3:7 (XmlText "sec3")
+   `- Cell (XmlText "sec3") [test/Golden/TCT/HeaderSection/0008.tct#3:3-3:7]
 
diff --git a/test/Golden/TCT/HeaderSection/0009.tct.ast b/test/Golden/TCT/HeaderSection/0009.tct.ast
index e3e8c00..1ac9a0f 100644
--- a/test/Golden/TCT/HeaderSection/0009.tct.ast
+++ b/test/Golden/TCT/HeaderSection/0009.tct.ast
@@ -1,15 +1,15 @@
-[ Tree (Cell 1:1 1:7 (NodeHeader (HeaderSection 1))) 
-    [ Tree (Cell 1:3 1:7 NodePara) 
-        [ Tree (Cell 1:3 1:7 (NodeToken (TokenText "sec1"))) []
+[ Tree (Cell (NodeHeader (HeaderSection 1)) [test/Golden/TCT/HeaderSection/0009.tct#1:1-1:7]) 
+    [ Tree (Cell NodePara [test/Golden/TCT/HeaderSection/0009.tct#1:3-1:7]) 
+        [ Tree (Cell (NodeToken (TokenText "sec1")) [test/Golden/TCT/HeaderSection/0009.tct#1:3-1:7]) []
         ] 
     ] 
-, Tree (Cell 2:1 3:9 (NodeHeader (HeaderSection 1))) 
-    [ Tree (Cell 2:3 2:7 NodePara) 
-        [ Tree (Cell 2:3 2:7 (NodeToken (TokenText "sec2"))) []
+, Tree (Cell (NodeHeader (HeaderSection 1)) [test/Golden/TCT/HeaderSection/0009.tct#2:1-3:9]) 
+    [ Tree (Cell NodePara [test/Golden/TCT/HeaderSection/0009.tct#2:3-2:7]) 
+        [ Tree (Cell (NodeToken (TokenText "sec2")) [test/Golden/TCT/HeaderSection/0009.tct#2:3-2:7]) []
         ] 
-    , Tree (Cell 3:1 3:9 (NodeHeader (HeaderSection 2))) 
-        [ Tree (Cell 3:4 3:9 NodePara) 
-            [ Tree (Cell 3:4 3:9 (NodeToken (TokenText "sec21"))) []
+    , Tree (Cell (NodeHeader (HeaderSection 2)) [test/Golden/TCT/HeaderSection/0009.tct#3:1-3:9]) 
+        [ Tree (Cell NodePara [test/Golden/TCT/HeaderSection/0009.tct#3:4-3:9]) 
+            [ Tree (Cell (NodeToken (TokenText "sec21")) [test/Golden/TCT/HeaderSection/0009.tct#3:4-3:9]) []
             ] 
         ] 
     ] 
diff --git a/test/Golden/TCT/HeaderSection/0009.tct.plain b/test/Golden/TCT/HeaderSection/0009.tct.plain
new file mode 100644
index 0000000..bf0b3ea
--- /dev/null
+++ b/test/Golden/TCT/HeaderSection/0009.tct.plain
@@ -0,0 +1,3 @@
+# sec1
+# sec2
+## sec21
diff --git a/test/Golden/TCT/HeaderSection/0009.tct.xml b/test/Golden/TCT/HeaderSection/0009.tct.xml
index d670ab2..3f0fa01 100644
--- a/test/Golden/TCT/HeaderSection/0009.tct.xml
+++ b/test/Golden/TCT/HeaderSection/0009.tct.xml
@@ -1,22 +1,22 @@
-Cell 1:3 1:7 (XmlElem about)
+Cell (XmlElem about) [test/Golden/TCT/HeaderSection/0009.tct#1:3-1:7]
 |
-`- Cell 1:3 1:7 (XmlElem title)
+`- Cell (XmlElem title) [test/Golden/TCT/HeaderSection/0009.tct#1:3-1:7]
    |
-   `- Cell 1:3 1:7 (XmlText "sec1")
+   `- Cell (XmlText "sec1") [test/Golden/TCT/HeaderSection/0009.tct#1:3-1:7]
 
-Cell 2:1 3:9 (XmlElem section)
+Cell (XmlElem section) [test/Golden/TCT/HeaderSection/0009.tct#2:1-3:9]
 |
-+- Cell 2:3 2:7 (XmlAttr id "sec2")
++- Cell (XmlAttr id "sec2") [test/Golden/TCT/HeaderSection/0009.tct#2:3-2:7]
 |
-+- Cell 2:3 2:7 (XmlElem title)
++- Cell (XmlElem title) [test/Golden/TCT/HeaderSection/0009.tct#2:3-2:7]
 |  |
-|  `- Cell 2:3 2:7 (XmlText "sec2")
+|  `- Cell (XmlText "sec2") [test/Golden/TCT/HeaderSection/0009.tct#2:3-2:7]
 |
-`- Cell 3:1 3:9 (XmlElem section)
+`- Cell (XmlElem section) [test/Golden/TCT/HeaderSection/0009.tct#3:1-3:9]
    |
-   +- Cell 3:4 3:9 (XmlAttr id "sec21")
+   +- Cell (XmlAttr id "sec21") [test/Golden/TCT/HeaderSection/0009.tct#3:4-3:9]
    |
-   `- Cell 3:4 3:9 (XmlElem title)
+   `- Cell (XmlElem title) [test/Golden/TCT/HeaderSection/0009.tct#3:4-3:9]
       |
-      `- Cell 3:4 3:9 (XmlText "sec21")
+      `- Cell (XmlText "sec21") [test/Golden/TCT/HeaderSection/0009.tct#3:4-3:9]
 
diff --git a/test/Golden/TCT/HeaderSection/0010.tct.ast b/test/Golden/TCT/HeaderSection/0010.tct.ast
index 1f57430..070c689 100644
--- a/test/Golden/TCT/HeaderSection/0010.tct.ast
+++ b/test/Golden/TCT/HeaderSection/0010.tct.ast
@@ -1,31 +1,31 @@
-[ Tree (Cell 1:1 4:9 (NodeHeader (HeaderSection 1))) 
-    [ Tree (Cell 1:3 1:7 NodePara) 
-        [ Tree (Cell 1:3 1:7 (NodeToken (TokenText "sec1"))) []
+[ Tree (Cell (NodeHeader (HeaderSection 1)) [test/Golden/TCT/HeaderSection/0010.tct#1:1-4:9]) 
+    [ Tree (Cell NodePara [test/Golden/TCT/HeaderSection/0010.tct#1:3-1:7]) 
+        [ Tree (Cell (NodeToken (TokenText "sec1")) [test/Golden/TCT/HeaderSection/0010.tct#1:3-1:7]) []
         ] 
-    , Tree (Cell 2:1 3:11 (NodeHeader (HeaderSection 2))) 
-        [ Tree (Cell 2:4 2:9 NodePara) 
-            [ Tree (Cell 2:4 2:9 (NodeToken (TokenText "sec11"))) []
+    , Tree (Cell (NodeHeader (HeaderSection 2)) [test/Golden/TCT/HeaderSection/0010.tct#2:1-3:11]) 
+        [ Tree (Cell NodePara [test/Golden/TCT/HeaderSection/0010.tct#2:4-2:9]) 
+            [ Tree (Cell (NodeToken (TokenText "sec11")) [test/Golden/TCT/HeaderSection/0010.tct#2:4-2:9]) []
             ] 
-        , Tree (Cell 3:1 3:11 (NodeHeader (HeaderSection 3))) 
-            [ Tree (Cell 3:5 3:11 NodePara) 
-                [ Tree (Cell 3:5 3:11 (NodeToken (TokenText "sec111"))) []
+        , Tree (Cell (NodeHeader (HeaderSection 3)) [test/Golden/TCT/HeaderSection/0010.tct#3:1-3:11]) 
+            [ Tree (Cell NodePara [test/Golden/TCT/HeaderSection/0010.tct#3:5-3:11]) 
+                [ Tree (Cell (NodeToken (TokenText "sec111")) [test/Golden/TCT/HeaderSection/0010.tct#3:5-3:11]) []
                 ] 
             ] 
         ] 
-    , Tree (Cell 4:1 4:9 (NodeHeader (HeaderSection 2))) 
-        [ Tree (Cell 4:4 4:9 NodePara) 
-            [ Tree (Cell 4:4 4:9 (NodeToken (TokenText "sec12"))) []
+    , Tree (Cell (NodeHeader (HeaderSection 2)) [test/Golden/TCT/HeaderSection/0010.tct#4:1-4:9]) 
+        [ Tree (Cell NodePara [test/Golden/TCT/HeaderSection/0010.tct#4:4-4:9]) 
+            [ Tree (Cell (NodeToken (TokenText "sec12")) [test/Golden/TCT/HeaderSection/0010.tct#4:4-4:9]) []
             ] 
         ] 
     ] 
-, Tree (Cell 5:1 5:7 (NodeHeader (HeaderSection 1))) 
-    [ Tree (Cell 5:3 5:7 NodePara) 
-        [ Tree (Cell 5:3 5:7 (NodeToken (TokenText "sec2"))) []
+, Tree (Cell (NodeHeader (HeaderSection 1)) [test/Golden/TCT/HeaderSection/0010.tct#5:1-5:7]) 
+    [ Tree (Cell NodePara [test/Golden/TCT/HeaderSection/0010.tct#5:3-5:7]) 
+        [ Tree (Cell (NodeToken (TokenText "sec2")) [test/Golden/TCT/HeaderSection/0010.tct#5:3-5:7]) []
         ] 
     ] 
-, Tree (Cell 6:1 6:7 (NodeHeader (HeaderSection 1))) 
-    [ Tree (Cell 6:3 6:7 NodePara) 
-        [ Tree (Cell 6:3 6:7 (NodeToken (TokenText "sec3"))) []
+, Tree (Cell (NodeHeader (HeaderSection 1)) [test/Golden/TCT/HeaderSection/0010.tct#6:1-6:7]) 
+    [ Tree (Cell NodePara [test/Golden/TCT/HeaderSection/0010.tct#6:3-6:7]) 
+        [ Tree (Cell (NodeToken (TokenText "sec3")) [test/Golden/TCT/HeaderSection/0010.tct#6:3-6:7]) []
         ] 
     ] 
 ] 
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderSection/0010.tct.plain b/test/Golden/TCT/HeaderSection/0010.tct.plain
new file mode 100644
index 0000000..270ac8c
--- /dev/null
+++ b/test/Golden/TCT/HeaderSection/0010.tct.plain
@@ -0,0 +1,6 @@
+# sec1
+## sec11
+### sec111
+## sec12
+# sec2
+# sec3
diff --git a/test/Golden/TCT/HeaderSection/0010.tct.xml b/test/Golden/TCT/HeaderSection/0010.tct.xml
index 1da9bb6..80adb91 100644
--- a/test/Golden/TCT/HeaderSection/0010.tct.xml
+++ b/test/Golden/TCT/HeaderSection/0010.tct.xml
@@ -1,46 +1,46 @@
-Cell 1:3 1:7 (XmlElem about)
+Cell (XmlElem about) [test/Golden/TCT/HeaderSection/0010.tct#1:3-1:7]
 |
-`- Cell 1:3 1:7 (XmlElem title)
+`- Cell (XmlElem title) [test/Golden/TCT/HeaderSection/0010.tct#1:3-1:7]
    |
-   `- Cell 1:3 1:7 (XmlText "sec1")
+   `- Cell (XmlText "sec1") [test/Golden/TCT/HeaderSection/0010.tct#1:3-1:7]
 
-Cell 2:1 3:11 (XmlElem section)
+Cell (XmlElem section) [test/Golden/TCT/HeaderSection/0010.tct#2:1-3:11]
 |
-+- Cell 2:4 2:9 (XmlAttr id "sec11")
++- Cell (XmlAttr id "sec11") [test/Golden/TCT/HeaderSection/0010.tct#2:4-2:9]
 |
-+- Cell 2:4 2:9 (XmlElem title)
++- Cell (XmlElem title) [test/Golden/TCT/HeaderSection/0010.tct#2:4-2:9]
 |  |
-|  `- Cell 2:4 2:9 (XmlText "sec11")
+|  `- Cell (XmlText "sec11") [test/Golden/TCT/HeaderSection/0010.tct#2:4-2:9]
 |
-`- Cell 3:1 3:11 (XmlElem section)
+`- Cell (XmlElem section) [test/Golden/TCT/HeaderSection/0010.tct#3:1-3:11]
    |
-   +- Cell 3:5 3:11 (XmlAttr id "sec111")
+   +- Cell (XmlAttr id "sec111") [test/Golden/TCT/HeaderSection/0010.tct#3:5-3:11]
    |
-   `- Cell 3:5 3:11 (XmlElem title)
+   `- Cell (XmlElem title) [test/Golden/TCT/HeaderSection/0010.tct#3:5-3:11]
       |
-      `- Cell 3:5 3:11 (XmlText "sec111")
+      `- Cell (XmlText "sec111") [test/Golden/TCT/HeaderSection/0010.tct#3:5-3:11]
 
-Cell 4:1 4:9 (XmlElem section)
+Cell (XmlElem section) [test/Golden/TCT/HeaderSection/0010.tct#4:1-4:9]
 |
-+- Cell 4:4 4:9 (XmlAttr id "sec12")
++- Cell (XmlAttr id "sec12") [test/Golden/TCT/HeaderSection/0010.tct#4:4-4:9]
 |
-`- Cell 4:4 4:9 (XmlElem title)
+`- Cell (XmlElem title) [test/Golden/TCT/HeaderSection/0010.tct#4:4-4:9]
    |
-   `- Cell 4:4 4:9 (XmlText "sec12")
+   `- Cell (XmlText "sec12") [test/Golden/TCT/HeaderSection/0010.tct#4:4-4:9]
 
-Cell 5:1 5:7 (XmlElem section)
+Cell (XmlElem section) [test/Golden/TCT/HeaderSection/0010.tct#5:1-5:7]
 |
-+- Cell 5:3 5:7 (XmlAttr id "sec2")
++- Cell (XmlAttr id "sec2") [test/Golden/TCT/HeaderSection/0010.tct#5:3-5:7]
 |
-`- Cell 5:3 5:7 (XmlElem title)
+`- Cell (XmlElem title) [test/Golden/TCT/HeaderSection/0010.tct#5:3-5:7]
    |
-   `- Cell 5:3 5:7 (XmlText "sec2")
+   `- Cell (XmlText "sec2") [test/Golden/TCT/HeaderSection/0010.tct#5:3-5:7]
 
-Cell 6:1 6:7 (XmlElem section)
+Cell (XmlElem section) [test/Golden/TCT/HeaderSection/0010.tct#6:1-6:7]
 |
-+- Cell 6:3 6:7 (XmlAttr id "sec3")
++- Cell (XmlAttr id "sec3") [test/Golden/TCT/HeaderSection/0010.tct#6:3-6:7]
 |
-`- Cell 6:3 6:7 (XmlElem title)
+`- Cell (XmlElem title) [test/Golden/TCT/HeaderSection/0010.tct#6:3-6:7]
    |
-   `- Cell 6:3 6:7 (XmlText "sec3")
+   `- Cell (XmlText "sec3") [test/Golden/TCT/HeaderSection/0010.tct#6:3-6:7]
 
diff --git a/test/Golden/TCT/HeaderSection/0011.tct.ast b/test/Golden/TCT/HeaderSection/0011.tct.ast
index 3de57d6..78391bd 100644
--- a/test/Golden/TCT/HeaderSection/0011.tct.ast
+++ b/test/Golden/TCT/HeaderSection/0011.tct.ast
@@ -1,9 +1,9 @@
-[ Tree (Cell 1:1 1:6 NodePara) 
-    [ Tree (Cell 1:1 1:6 (NodeToken (TokenText "text1"))) []
+[ Tree (Cell NodePara [test/Golden/TCT/HeaderSection/0011.tct#1:1-1:6]) 
+    [ Tree (Cell (NodeToken (TokenText "text1")) [test/Golden/TCT/HeaderSection/0011.tct#1:1-1:6]) []
     ] 
-, Tree (Cell 2:1 2:7 (NodeHeader (HeaderSection 1))) 
-    [ Tree (Cell 2:3 2:7 NodePara) 
-        [ Tree (Cell 2:3 2:7 (NodeToken (TokenText "sec1"))) []
+, Tree (Cell (NodeHeader (HeaderSection 1)) [test/Golden/TCT/HeaderSection/0011.tct#2:1-2:7]) 
+    [ Tree (Cell NodePara [test/Golden/TCT/HeaderSection/0011.tct#2:3-2:7]) 
+        [ Tree (Cell (NodeToken (TokenText "sec1")) [test/Golden/TCT/HeaderSection/0011.tct#2:3-2:7]) []
         ] 
     ] 
 ] 
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderSection/0011.tct.plain b/test/Golden/TCT/HeaderSection/0011.tct.plain
new file mode 100644
index 0000000..6977fb9
--- /dev/null
+++ b/test/Golden/TCT/HeaderSection/0011.tct.plain
@@ -0,0 +1,2 @@
+text1
+# sec1
diff --git a/test/Golden/TCT/HeaderSection/0011.tct.xml b/test/Golden/TCT/HeaderSection/0011.tct.xml
index 82960b2..6c7a81b 100644
--- a/test/Golden/TCT/HeaderSection/0011.tct.xml
+++ b/test/Golden/TCT/HeaderSection/0011.tct.xml
@@ -1,12 +1,12 @@
-Cell 1:1 1:6 (XmlElem para)
+Cell (XmlElem para) [test/Golden/TCT/HeaderSection/0011.tct#1:1-1:6]
 |
-`- Cell 1:1 1:6 (XmlText "text1")
+`- Cell (XmlText "text1") [test/Golden/TCT/HeaderSection/0011.tct#1:1-1:6]
 
-Cell 2:1 2:7 (XmlElem section)
+Cell (XmlElem section) [test/Golden/TCT/HeaderSection/0011.tct#2:1-2:7]
 |
-+- Cell 2:3 2:7 (XmlAttr id "sec1")
++- Cell (XmlAttr id "sec1") [test/Golden/TCT/HeaderSection/0011.tct#2:3-2:7]
 |
-`- Cell 2:3 2:7 (XmlElem title)
+`- Cell (XmlElem title) [test/Golden/TCT/HeaderSection/0011.tct#2:3-2:7]
    |
-   `- Cell 2:3 2:7 (XmlText "sec1")
+   `- Cell (XmlText "sec1") [test/Golden/TCT/HeaderSection/0011.tct#2:3-2:7]
 
diff --git a/test/Golden/TCT/HeaderSection/0012.tct.ast b/test/Golden/TCT/HeaderSection/0012.tct.ast
index 6e58cac..c5e1318 100644
--- a/test/Golden/TCT/HeaderSection/0012.tct.ast
+++ b/test/Golden/TCT/HeaderSection/0012.tct.ast
@@ -1,9 +1,9 @@
-[ Tree (Cell 1:1 2:6 (NodeHeader (HeaderSection 1))) 
-    [ Tree (Cell 1:3 1:7 NodePara) 
-        [ Tree (Cell 1:3 1:7 (NodeToken (TokenText "sec1"))) []
+[ Tree (Cell (NodeHeader (HeaderSection 1)) [test/Golden/TCT/HeaderSection/0012.tct#1:1-2:6]) 
+    [ Tree (Cell NodePara [test/Golden/TCT/HeaderSection/0012.tct#1:3-1:7]) 
+        [ Tree (Cell (NodeToken (TokenText "sec1")) [test/Golden/TCT/HeaderSection/0012.tct#1:3-1:7]) []
         ] 
-    , Tree (Cell 2:1 2:6 NodePara) 
-        [ Tree (Cell 2:1 2:6 (NodeToken (TokenText "text1"))) []
+    , Tree (Cell NodePara [test/Golden/TCT/HeaderSection/0012.tct#2:1-2:6]) 
+        [ Tree (Cell (NodeToken (TokenText "text1")) [test/Golden/TCT/HeaderSection/0012.tct#2:1-2:6]) []
         ] 
     ] 
 ] 
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderSection/0012.tct.plain b/test/Golden/TCT/HeaderSection/0012.tct.plain
new file mode 100644
index 0000000..3323a96
--- /dev/null
+++ b/test/Golden/TCT/HeaderSection/0012.tct.plain
@@ -0,0 +1,2 @@
+# sec1
+text1
diff --git a/test/Golden/TCT/HeaderSection/0012.tct.xml b/test/Golden/TCT/HeaderSection/0012.tct.xml
index 5606126..44ece6d 100644
--- a/test/Golden/TCT/HeaderSection/0012.tct.xml
+++ b/test/Golden/TCT/HeaderSection/0012.tct.xml
@@ -1,10 +1,10 @@
-Cell 1:3 1:7 (XmlElem about)
+Cell (XmlElem about) [test/Golden/TCT/HeaderSection/0012.tct#1:3-1:7]
 |
-`- Cell 1:3 1:7 (XmlElem title)
+`- Cell (XmlElem title) [test/Golden/TCT/HeaderSection/0012.tct#1:3-1:7]
    |
-   `- Cell 1:3 1:7 (XmlText "sec1")
+   `- Cell (XmlText "sec1") [test/Golden/TCT/HeaderSection/0012.tct#1:3-1:7]
 
-Cell 2:1 2:6 (XmlElem para)
+Cell (XmlElem para) [test/Golden/TCT/HeaderSection/0012.tct#2:1-2:6]
 |
-`- Cell 2:1 2:6 (XmlText "text1")
+`- Cell (XmlText "text1") [test/Golden/TCT/HeaderSection/0012.tct#2:1-2:6]
 
diff --git a/test/Golden/TCT/HeaderSection/0013.tct.ast b/test/Golden/TCT/HeaderSection/0013.tct.ast
index f381f7a..b6e7409 100644
--- a/test/Golden/TCT/HeaderSection/0013.tct.ast
+++ b/test/Golden/TCT/HeaderSection/0013.tct.ast
@@ -1,14 +1,14 @@
-[ Tree (Cell 1:1 2:6 (NodeHeader (HeaderSection 1))) 
-    [ Tree (Cell 1:3 1:7 NodePara) 
-        [ Tree (Cell 1:3 1:7 (NodeToken (TokenText "sec1"))) []
+[ Tree (Cell (NodeHeader (HeaderSection 1)) [test/Golden/TCT/HeaderSection/0013.tct#1:1-2:6]) 
+    [ Tree (Cell NodePara [test/Golden/TCT/HeaderSection/0013.tct#1:3-1:7]) 
+        [ Tree (Cell (NodeToken (TokenText "sec1")) [test/Golden/TCT/HeaderSection/0013.tct#1:3-1:7]) []
         ] 
-    , Tree (Cell 2:1 2:6 NodePara) 
-        [ Tree (Cell 2:1 2:6 (NodeToken (TokenText "text1"))) []
+    , Tree (Cell NodePara [test/Golden/TCT/HeaderSection/0013.tct#2:1-2:6]) 
+        [ Tree (Cell (NodeToken (TokenText "text1")) [test/Golden/TCT/HeaderSection/0013.tct#2:1-2:6]) []
         ] 
     ] 
-, Tree (Cell 3:1 3:7 (NodeHeader (HeaderSection 1))) 
-    [ Tree (Cell 3:3 3:7 NodePara) 
-        [ Tree (Cell 3:3 3:7 (NodeToken (TokenText "sec2"))) []
+, Tree (Cell (NodeHeader (HeaderSection 1)) [test/Golden/TCT/HeaderSection/0013.tct#3:1-3:7]) 
+    [ Tree (Cell NodePara [test/Golden/TCT/HeaderSection/0013.tct#3:3-3:7]) 
+        [ Tree (Cell (NodeToken (TokenText "sec2")) [test/Golden/TCT/HeaderSection/0013.tct#3:3-3:7]) []
         ] 
     ] 
 ] 
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderSection/0013.tct.plain b/test/Golden/TCT/HeaderSection/0013.tct.plain
new file mode 100644
index 0000000..94207e6
--- /dev/null
+++ b/test/Golden/TCT/HeaderSection/0013.tct.plain
@@ -0,0 +1,3 @@
+# sec1
+text1
+# sec2
diff --git a/test/Golden/TCT/HeaderSection/0013.tct.xml b/test/Golden/TCT/HeaderSection/0013.tct.xml
index bfdc7cd..4326331 100644
--- a/test/Golden/TCT/HeaderSection/0013.tct.xml
+++ b/test/Golden/TCT/HeaderSection/0013.tct.xml
@@ -1,18 +1,18 @@
-Cell 1:3 1:7 (XmlElem about)
+Cell (XmlElem about) [test/Golden/TCT/HeaderSection/0013.tct#1:3-1:7]
 |
-`- Cell 1:3 1:7 (XmlElem title)
+`- Cell (XmlElem title) [test/Golden/TCT/HeaderSection/0013.tct#1:3-1:7]
    |
-   `- Cell 1:3 1:7 (XmlText "sec1")
+   `- Cell (XmlText "sec1") [test/Golden/TCT/HeaderSection/0013.tct#1:3-1:7]
 
-Cell 2:1 2:6 (XmlElem para)
+Cell (XmlElem para) [test/Golden/TCT/HeaderSection/0013.tct#2:1-2:6]
 |
-`- Cell 2:1 2:6 (XmlText "text1")
+`- Cell (XmlText "text1") [test/Golden/TCT/HeaderSection/0013.tct#2:1-2:6]
 
-Cell 3:1 3:7 (XmlElem section)
+Cell (XmlElem section) [test/Golden/TCT/HeaderSection/0013.tct#3:1-3:7]
 |
-+- Cell 3:3 3:7 (XmlAttr id "sec2")
++- Cell (XmlAttr id "sec2") [test/Golden/TCT/HeaderSection/0013.tct#3:3-3:7]
 |
-`- Cell 3:3 3:7 (XmlElem title)
+`- Cell (XmlElem title) [test/Golden/TCT/HeaderSection/0013.tct#3:3-3:7]
    |
-   `- Cell 3:3 3:7 (XmlText "sec2")
+   `- Cell (XmlText "sec2") [test/Golden/TCT/HeaderSection/0013.tct#3:3-3:7]
 
diff --git a/test/Golden/TCT/HeaderSection/0014.tct.ast b/test/Golden/TCT/HeaderSection/0014.tct.ast
index 44ce0d9..0a0055d 100644
--- a/test/Golden/TCT/HeaderSection/0014.tct.ast
+++ b/test/Golden/TCT/HeaderSection/0014.tct.ast
@@ -1,22 +1,22 @@
-[ Tree (Cell 1:1 2:6 (NodeHeader (HeaderSection 1))) 
-    [ Tree (Cell 1:3 1:7 NodePara) 
-        [ Tree (Cell 1:3 1:7 (NodeToken (TokenText "sec1"))) []
+[ Tree (Cell (NodeHeader (HeaderSection 1)) [test/Golden/TCT/HeaderSection/0014.tct#1:1-2:6]) 
+    [ Tree (Cell NodePara [test/Golden/TCT/HeaderSection/0014.tct#1:3-1:7]) 
+        [ Tree (Cell (NodeToken (TokenText "sec1")) [test/Golden/TCT/HeaderSection/0014.tct#1:3-1:7]) []
         ] 
-    , Tree (Cell 2:1 2:6 NodePara) 
-        [ Tree (Cell 2:1 2:6 (NodeToken (TokenText "text1"))) []
+    , Tree (Cell NodePara [test/Golden/TCT/HeaderSection/0014.tct#2:1-2:6]) 
+        [ Tree (Cell (NodeToken (TokenText "text1")) [test/Golden/TCT/HeaderSection/0014.tct#2:1-2:6]) []
         ] 
     ] 
-, Tree (Cell 3:1 4:6 (NodeHeader (HeaderSection 1))) 
-    [ Tree (Cell 3:3 3:8 NodePara) 
-        [ Tree (Cell 3:3 3:8 (NodeToken (TokenText "sec11"))) []
+, Tree (Cell (NodeHeader (HeaderSection 1)) [test/Golden/TCT/HeaderSection/0014.tct#3:1-4:6]) 
+    [ Tree (Cell NodePara [test/Golden/TCT/HeaderSection/0014.tct#3:3-3:8]) 
+        [ Tree (Cell (NodeToken (TokenText "sec11")) [test/Golden/TCT/HeaderSection/0014.tct#3:3-3:8]) []
         ] 
-    , Tree (Cell 4:1 4:6 NodePara) 
-        [ Tree (Cell 4:1 4:6 (NodeToken (TokenText "text2"))) []
+    , Tree (Cell NodePara [test/Golden/TCT/HeaderSection/0014.tct#4:1-4:6]) 
+        [ Tree (Cell (NodeToken (TokenText "text2")) [test/Golden/TCT/HeaderSection/0014.tct#4:1-4:6]) []
         ] 
     ] 
-, Tree (Cell 5:1 5:7 (NodeHeader (HeaderSection 1))) 
-    [ Tree (Cell 5:3 5:7 NodePara) 
-        [ Tree (Cell 5:3 5:7 (NodeToken (TokenText "sec2"))) []
+, Tree (Cell (NodeHeader (HeaderSection 1)) [test/Golden/TCT/HeaderSection/0014.tct#5:1-5:7]) 
+    [ Tree (Cell NodePara [test/Golden/TCT/HeaderSection/0014.tct#5:3-5:7]) 
+        [ Tree (Cell (NodeToken (TokenText "sec2")) [test/Golden/TCT/HeaderSection/0014.tct#5:3-5:7]) []
         ] 
     ] 
 ] 
\ No newline at end of file
diff --git a/test/Golden/TCT/HeaderSection/0014.tct.plain b/test/Golden/TCT/HeaderSection/0014.tct.plain
new file mode 100644
index 0000000..a9fcf92
--- /dev/null
+++ b/test/Golden/TCT/HeaderSection/0014.tct.plain
@@ -0,0 +1,5 @@
+# sec1
+text1
+# sec11
+text2
+# sec2
diff --git a/test/Golden/TCT/HeaderSection/0014.tct.xml b/test/Golden/TCT/HeaderSection/0014.tct.xml
index a284221..cd85cb4 100644
--- a/test/Golden/TCT/HeaderSection/0014.tct.xml
+++ b/test/Golden/TCT/HeaderSection/0014.tct.xml
@@ -1,30 +1,30 @@
-Cell 1:3 1:7 (XmlElem about)
+Cell (XmlElem about) [test/Golden/TCT/HeaderSection/0014.tct#1:3-1:7]
 |
-`- Cell 1:3 1:7 (XmlElem title)
+`- Cell (XmlElem title) [test/Golden/TCT/HeaderSection/0014.tct#1:3-1:7]
    |
-   `- Cell 1:3 1:7 (XmlText "sec1")
+   `- Cell (XmlText "sec1") [test/Golden/TCT/HeaderSection/0014.tct#1:3-1:7]
 
-Cell 2:1 2:6 (XmlElem para)
+Cell (XmlElem para) [test/Golden/TCT/HeaderSection/0014.tct#2:1-2:6]
 |
-`- Cell 2:1 2:6 (XmlText "text1")
+`- Cell (XmlText "text1") [test/Golden/TCT/HeaderSection/0014.tct#2:1-2:6]
 
-Cell 3:1 4:6 (XmlElem section)
+Cell (XmlElem section) [test/Golden/TCT/HeaderSection/0014.tct#3:1-4:6]
 |
-+- Cell 3:3 3:8 (XmlAttr id "sec11")
++- Cell (XmlAttr id "sec11") [test/Golden/TCT/HeaderSection/0014.tct#3:3-3:8]
 |
-+- Cell 3:3 3:8 (XmlElem title)
++- Cell (XmlElem title) [test/Golden/TCT/HeaderSection/0014.tct#3:3-3:8]
 |  |
-|  `- Cell 3:3 3:8 (XmlText "sec11")
+|  `- Cell (XmlText "sec11") [test/Golden/TCT/HeaderSection/0014.tct#3:3-3:8]
 |
-`- Cell 4:1 4:6 (XmlElem para)
+`- Cell (XmlElem para) [test/Golden/TCT/HeaderSection/0014.tct#4:1-4:6]
    |
-   `- Cell 4:1 4:6 (XmlText "text2")
+   `- Cell (XmlText "text2") [test/Golden/TCT/HeaderSection/0014.tct#4:1-4:6]
 
-Cell 5:1 5:7 (XmlElem section)
+Cell (XmlElem section) [test/Golden/TCT/HeaderSection/0014.tct#5:1-5:7]
 |
-+- Cell 5:3 5:7 (XmlAttr id "sec2")
++- Cell (XmlAttr id "sec2") [test/Golden/TCT/HeaderSection/0014.tct#5:3-5:7]
 |
-`- Cell 5:3 5:7 (XmlElem title)
+`- Cell (XmlElem title) [test/Golden/TCT/HeaderSection/0014.tct#5:3-5:7]
    |
-   `- Cell 5:3 5:7 (XmlText "sec2")
+   `- Cell (XmlText "sec2") [test/Golden/TCT/HeaderSection/0014.tct#5:3-5:7]
 
-- 
2.47.2