Commit 135101 by robertDouglass

Commit #135101 by robertDouglass at 13:26
Export DocBook: /modules/export_docbook/export_docbook.module 1.5.2.16 @ DRUPAL-5Export DocBook: /modules/export_docbook/h2db.xsl 1.1.4.30 @ DRUPAL-5
Major experimental addition to the xslt. In XHTML, it is allowed to have free-floating text nodes. Often, what looks like a paragraph of text actually has no <p> tag to speak of, but is a collection of text nodes and other nodes like <em> or <strong>. This is problematic because in DocBook XML they all belong in a <para> tag. But where to put those <para> tags is more complex than 'just wrap the text nodes in <para>'. So the XSLT that I've written looks at text nodes, determines if they are the children of block level elements (as opposed to children of <em>), and then, depending on whether or not there are previous or following siblings, and whether or not those siblings are block level elements, prints [[para]] or [[/para]] in the XML document. This is a hack to get around the fact that you can't print unmatched <para> and </para> elements in XSLT. Finally, back in PHP, the [[para]] placeholders are replaced with <para>.