In the HTML DSSSL stylesheet, $linespecific-display$ converts spaces and
carriage returns to &nbsp; and <br> amongst the children of the current
But if there is any markup within the <literallayout>, then the
spaces and carriage returns embedded therein are ignored; e.g.
<literallayout>... CR ... <emphasis>... CR ... </emphasis></literallayout>.
The first CR will be converted to <br>, as it is a child of the literallayout node. The second CR will
not, as it is rather a grandchild of the literallayout node.
(The particular domain this comes up in my document is linguistic glossing: two lines
within a <foreignphrase>, followed by two normal lines of English, all within a <literallayout>. The
linebreak within the foreign text is not preserved in the HTML.)
So $linespecific-display$ needs to iterate over descendants of the current
note, rather than children.