<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Mar 17, 2019, at 10:07 AM, Karl Kleinpaste &lt;<a href="mailto:karl@kleinpaste.org" class="">karl@kleinpaste.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="caret-color: rgb(0, 0, 0); font-family: FreeSerif; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration: none; float: none; display: inline !important;" class="">However, for this purpose, the deeper problem is that Sword erroneously generates self-closing &lt;div&gt; tags, which do not work. Search "html self-closing div" and discover all the conflicting noise over it. My solution in Xiphos was simply to obliterate these tags in introductory material; they have no visual manifestation and I don't know why the XHTML filters pass them in the 1st place. They look like</span><br style="caret-color: rgb(0, 0, 0); font-family: FreeSerif; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br style="caret-color: rgb(0, 0, 0); font-family: FreeSerif; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: FreeSerif; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration: none; float: none; display: inline !important;" class="">&lt;div sID="gen34165" type="introduction"/&gt;</span><br style="caret-color: rgb(0, 0, 0); font-family: FreeSerif; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br style="caret-color: rgb(0, 0, 0); font-family: FreeSerif; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: FreeSerif; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration: none; float: none; display: inline !important;" class="">and they caused my .introMaterial change to bleed throughout the chapter until I implemented the obliteration. See<span class="Apple-converted-space">&nbsp;</span></span><font face="FreeSerif" class=""><a href="https://github.com/crosswire/xiphos/issues/845" class="">https://github.com/crosswire/xiphos/issues/845</a></font><br style="caret-color: rgb(0, 0, 0); font-family: FreeSerif; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""></div></blockquote><br class=""></div><div>I don’t know why the OSIS-&gt;XHTML renderer passes the self-closing divs from OSIS to XHTML. I do know why they are that way in OSIS. OSIS’s schema allows a div to be milestoned, meaning it has an sID or an eID and is self-closing.</div><div><br class=""></div><div>At this time &lt;div type=“colophon”&gt;…&lt;/div&gt; is the only container div in the OSIS document that osis2mod preserves. All others are converted to milestoned divs.</div><div><br class=""></div><div>SWORD’s OSIS-&gt;XHTML filter can be changed to output OSIS’s milestoned, self-closed divs as empty but not self closing, e.g. &lt;div sID=“xyz”&gt;&lt;/div&gt;.</div><div><br class=""></div><div>As to why they are passed, they can be styled with top and bottom margin and padding.</div><div><br class=""></div><div>The fundamental reason is that a module defines the addressable verse as the presentation unit. This notion of a verse is more than just the marked up content of the verse but also includes all the markup between verses. So that unit has to be well-formed xml. The only way is for structural elements that span verses to be milestoned when the module is built.</div><div><br class=""></div><div>The largest front-end use case is that a chapter is displayed all at once. In this case, the chapter needs to be well-formed and it could be composed of verses that are not well-formed.</div><div><br class=""></div><div>The other front-end use case is the rendering of search hits, where a search hit is an individual verse. In this case, it needs to be well-formed or presented differently.</div><div><br class=""></div><div>JSword uses an XML parser to parse each verse as XML to build the DOM for it. An XML parser requires well-formed XML to parse.</div><div><br class=""></div><div>In Him,</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>DM</div><br class=""></body></html>