<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Troy.</div><div><br></div><div>I installed GnomeSword and checked how they do with cross-references.</div><div>Actually it is quite similar to how BibleCS deals with it.</div><div><br></div><div>The main problem I have with this is that as far as I understood without Sword producing the markup output there is no full access to all the meta data because on the other hand you are saying that we should not use the raw access which I can understand because using raw access means one has to deal with different types of raw sources.</div><div>This in my opinion ties the hands of the frontend-developer in that Sword interferes too much into the display of the data or differently spoken does not give the flexibility and data access without having Sword produce data meant for display.</div><div>HTML is my eyes is a markup meant for display.</div><div><br></div><div>Although&nbsp;I don't understand right now how the Sword module data is stored, my proposal here is that Sword should have a simple intermediate XML format that can be used by API users to have full access to the module data.</div><div>Simple HTML/RTF can still be produced from this intermediate format by Sword. But HTML should not be used to give access to the module data while at the same time raw data access should not be used.</div><div>Having XSDs would make is easy for API-users to use XML->Object binding (I only know JAXB in Java but this might be available to most languages as it is used in protocols like SOAP).</div><div>Also XSLT stylesheets can be used to produce HTML or whatever output.</div><div>Frontends could choose to use the HTML rendered output or choose totally different approaches by using the data of the intermediate XML.</div><div><br></div><div>Let me know what you think.</div><div><br></div><div><br></div><div>Regards,</div><div>Manfred</div><div><br></div><div><br></div><div><br></div><div><div>Am 28.07.2008 um 12:35 schrieb Troy A. Griffitts:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Manfred,<br><br><span class="Apple-tab-span" style="white-space:pre">        </span>In addition to what Ben wrote, GnomeSword uses the stock HTMLHREF <br>filters and doesn't add their own. &nbsp;These filters are usually updated by <br>me or someone on their team. &nbsp;It might be good to pop in to <br>irc.freenode.net #sword and ask charcoal about how they do certain <br>things with these filters.<br><br><span class="Apple-tab-span" style="white-space:pre">        </span>-Troy.<br><br><br><br>Manfred Bergmann wrote:<br><blockquote type="cite">Hi Ben.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Ok, one can get the cross-references by getting the entry attributes.<br></blockquote><blockquote type="cite">But if the body is not passed in again to the filter you can't figure &nbsp;<br></blockquote><blockquote type="cite">anymore to which word the cross-reference is related to by just &nbsp;<br></blockquote><blockquote type="cite">parsing the attributes.<br></blockquote><blockquote type="cite">The only chance to get the relationship is to show the information in &nbsp;<br></blockquote><blockquote type="cite">the tooltip or while clicking on the cross-ref link.<br></blockquote><blockquote type="cite">Please correct me if I'm wrong.<br></blockquote><blockquote type="cite">If this is correct I have to say that this is quite unflexible.<br></blockquote><blockquote type="cite">If someone chooses to not render anything related to cross-references &nbsp;<br></blockquote><blockquote type="cite">but still wants to have the data (to show it somewhere else) there is &nbsp;<br></blockquote><blockquote type="cite">no way to get the word -> cross-ref relationship.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Regards,<br></blockquote><blockquote type="cite">Manfred<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Am 28.07.2008 um 01:35 schrieb Ben Morgan:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><blockquote type="cite">Yes, there was a change.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">I had to change BPBible as well :)<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">From r2157:<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Modified: trunk/src/modules/filters/<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">osisfootnotes.cpp<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">===================================================================<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">--- trunk/src/modules/filters/osisfootnotes.cpp 2008-05-13 02:58:16 &nbsp;<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">UTC (rev 2156)<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">+++ trunk/src/modules/filters/osisfootnotes.cpp 2008-05-13 23:37:56 &nbsp;<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">UTC (rev 2157)<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">@@ -108,7 +108,7 @@<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hide = false;<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (option || &nbsp;<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">(startTag.getAttribute("type") &amp;&amp; ! <br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">strcmp(startTag.getAttribute("type"), "crossReference"))) { &nbsp;&nbsp;&nbsp;// we &nbsp;<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">want the tag in the text; crossReferences are handled by another &nbsp;<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">filter<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;text.append(startTag);<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;text.append(tagText);<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">+// &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">text.append(tagText); &nbsp;&nbsp;// we don't put the body back in because it &nbsp;<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">is retrievable from EntryAttributes["Footnotes"][]["body"].<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else &nbsp;&nbsp;&nbsp;continue;<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">As it says, you can just get the text using getEntryAttributes at &nbsp;<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">the end of the note.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">The way BPBible installs custom filters is by subclassing the &nbsp;<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">MarkupFilterMgr's AddRenderFilters, rather than the SWMgr's<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">It would be nice if you could pass the filters you wanted used in, &nbsp;<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">though. This would be a pretty common use case...<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">God Bless,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Ben<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">-------------------------------------------------------------------------------------------<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">The Lord is not slow to fulfill his promise as some count slowness,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">but is patient toward you, not wishing that any should perish,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">but that all should reach repentance.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">2 Peter 3:9 (ESV)<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">On Sun, Jul 27, 2008 at 9:09 PM, Manfred Bergmann &nbsp;<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">&lt;<a href="mailto:bergmannmd@web.de">bergmannmd@web.de</a>> wrote:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Hi Troy.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Am 26.07.2008 um 18:44 schrieb Troy A. Griffitts:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Do you have:<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;swordManager.setGlobalOption("Cross-references", "On");<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">anywhere in your code?<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Yes.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">I just tested a version of MacSword with Sword library 1.5.10 where<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">the cross ref list (&lt;reference> elements) are placed inside the note<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">element and are passed to the HTML filter.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Has there been a change for this from 1.5.10 to 1.5.11?<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Yes. &nbsp;You should never have to call AddRenderFilter to a module,<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">though<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">we do allow you to add your own special filters by overriding the<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">virtual SWMgr::AddRenderFilters() method if one of the default SWORD<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">filter sets does not work for you. &nbsp;Not sure how MacSword does it &nbsp;<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">now.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Hmm, we are doing exactly that ATM.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">We didn't override AddRenderFilters() in SWMgr but set Filter subclass<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">instances for every module in a loop via Module::AddRenderFilter().<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">So the prefered way is to do this via SWMgr::AddRenderFilters().<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">The MarkupFilterMgr is the mechanism to ask SWORD to give you a<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">specific<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">output markup from RenderText(). &nbsp;This code figures out which filter<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">set<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">to apply to each module depending on the module SourceType (OSIS, &nbsp;<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">GBF,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">ThML, etc...) and will apply the correct filters to meet your<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">requested<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">output type. &nbsp;But if you can't use any of the default filter sets,<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">then<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">you'll have to override SWMgr::AddRenderFilters() and apply your<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">custom<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">filters.<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">We did that and used RenderFilters from BibleTime project from 2001.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">But I adapted some changes of the current Sword render filters so the<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">new attributes are checked for additionally to the depricated ones.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Regards,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Manfred<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">_______________________________________________<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">sword-devel mailing list: <a href="mailto:sword-devel@crosswire.org">sword-devel@crosswire.org</a><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><a href="http://www.crosswire.org/mailman/listinfo/sword-devel">http://www.crosswire.org/mailman/listinfo/sword-devel</a><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Instructions to unsubscribe/change your settings at above page<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">_______________________________________________<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">sword-devel mailing list: <a href="mailto:sword-devel@crosswire.org">sword-devel@crosswire.org</a><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><a href="http://www.crosswire.org/mailman/listinfo/sword-devel">http://www.crosswire.org/mailman/listinfo/sword-devel</a><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Instructions to unsubscribe/change your settings at above page<br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">_______________________________________________<br></blockquote><blockquote type="cite">sword-devel mailing list: <a href="mailto:sword-devel@crosswire.org">sword-devel@crosswire.org</a><br></blockquote><blockquote type="cite"><a href="http://www.crosswire.org/mailman/listinfo/sword-devel">http://www.crosswire.org/mailman/listinfo/sword-devel</a><br></blockquote><blockquote type="cite">Instructions to unsubscribe/change your settings at above page<br></blockquote><br><br>_______________________________________________<br>sword-devel mailing list: <a href="mailto:sword-devel@crosswire.org">sword-devel@crosswire.org</a><br><a href="http://www.crosswire.org/mailman/listinfo/sword-devel">http://www.crosswire.org/mailman/listinfo/sword-devel</a><br>Instructions to unsubscribe/change your settings at above page<br></div></blockquote></div><br></body></html>