User: robertDouglass Branch: DRUPAL-5 Date: Wed, 20 Aug 2008 13:26:35 +0000 Modified files: /modules/export_docbook export_docbook.module h2db.xsl Log message: 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>. Links: http://cvs.drupal.org/diff.php?path=contributions/modules/export_docbook/exp... http://cvs.drupal.org/diff.php?path=contributions/modules/export_docbook/h2d...