dita-ot/dita-ot — pull request #1659 by eerohele (2014-03-11 19:11:47+00:00)
Title: Fix support for topics inside glossarylist #1189

Gist [here](https://github.com/dita-ot/dita-ot/issues/1189#issuecomment-15171589).

In the Gist that was attached to the issue, the problem is not in fact the `` element; it's the `` elements that are nested inside ``.

The cause of the issue is that `commons.xsl` creates a new `fo:page-sequence` for each *top-level* topic, and `glossary.xsl` creates a new `fo:page-sequence` for the `` element. However, the code in `commons.xsl` doesn't check whether the current topic is inside a `` element. Since the `` elements inside `` do not have ancestor topics (only topicheads), the generated XSL-FO code will have nested `` elements.

Adding a check for a `` ancestor into `commons.xsl` fixes the problem, because then the topicrefs inside `` are handled like regular nested topics.

By the way, on a semi-related note: `commons.xsl` seems to have a mix of Windows and Unix line endings, which tends to make diffing somewhat inconvenient. Can we fix that?