<div dir="ltr">Hi Joachim<div><br></div><div>It depends on what you&#39;re trying to achieve with this. Most people will use an XSL transformation, maybe a cut down version of simple.xsl just to do the notes? (<a href="http://www.crosswire.org/svn/jsword/trunk/bibledesktop/src/main/resources/xsl/cswing/simple.xsl">http://www.crosswire.org/svn/jsword/trunk/bibledesktop/src/main/resources/xsl/cswing/simple.xsl</a>). If that&#39;s what you&#39;re up for, then see below for some sample code I use. </div>
<div><br></div><div>Or, if you want to do this purely in Java, you could use OSISUtil.getNotes() &amp; OSISUtil.getReferences(). You have less control on the ouput, but this may be all you need?</div><div><br></div><div>Chris</div>
<div><br></div><div style>Your code can call XmlUtil.writeToString(htmlsep) on the return value of the following method:</div><div><br></div><div><br></div><div><div>    private TransformingSAXEventProvider executeStyleSheet(final List&lt;LookupOption&gt; options,</div>
<div>            final String interlinearVersion, final BookData bookData, final SAXEventProvider osissep,</div><div>            final InterlinearMode displayMode) throws TransformerException {</div><div>        final XslConversionType requiredTransformation = identifyStyleSheet(bookData.getFirstBook()</div>
<div>                .getBookCategory(), options, displayMode);</div><div><br></div><div>        final TransformingSAXEventProvider htmlsep = (TransformingSAXEventProvider) new Converter() {</div><div>            @Override</div>
<div>            public SAXEventProvider convert(final SAXEventProvider provider) throws TransformerException {</div><div>                try {</div><div>                    final String file = requiredTransformation.getFile();</div>
<div>                    final URI resourceURI = getClass().getResource(file).toURI();</div><div><br></div><div>                    final TransformingSAXEventProvider tsep = new TransformingSAXEventProvider(resourceURI,</div>
<div>                            osissep);</div><div><br></div><div>                    // set parameters here</div><div>                    setOptions(tsep, options, bookData.getFirstBook());</div><div>                    return tsep;<br>
</div><div>                } catch (final URISyntaxException e) {</div><div>                    throw new StepInternalException(&quot;Failed to load resource correctly&quot;, e);</div><div>                }</div><div>            }</div>
<div>        }.convert(osissep);</div><div>        return htmlsep;</div><div>    }</div></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 6 February 2013 19:53, Joachim Ansorg <span dir="ltr">&lt;<a href="mailto:nospam@joachim-ansorg.de" target="_blank">nospam@joachim-ansorg.de</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hi all,<div>I&#39;m fairly new to the JSword api, but I like it so far...</div><div><br>
</div><div>Which is the best way to retrieve a list of cross-references for a given verse of the Bible?</div><div>Basically I want to create a list of available cross references of the Bible. I&#39;ve looked at the Javadocs but couldn&#39;t find a good place to start.</div>
<div><br></div><div>Regards,</div><div>Joachim<span class="HOEnZb"><font color="#888888"><br><div>
<div style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;text-transform:none;font-size:medium;white-space:normal;font-family:Georgia;word-wrap:break-word;word-spacing:0px">
<span style="border-spacing:0px;text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<span style="border-spacing:0px;text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<span style="border-spacing:0px;text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<span style="border-spacing:0px;text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<span style="border-spacing:0px;text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<span style="border-spacing:0px;text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<div><span style="font-family:Verdana;font-size:12px">-- </span></div><div><span style="font-family:Verdana;font-size:12px">&lt;&gt;&lt; Re: deemed!</span></div></div></span></div></span></div></span></div></span></div></span></div>
</span></div>
</div>
</font></span></div><br></div><br>_______________________________________________<br>
jsword-devel mailing list<br>
<a href="mailto:jsword-devel@crosswire.org">jsword-devel@crosswire.org</a><br>
<a href="http://www.crosswire.org/mailman/listinfo/jsword-devel" target="_blank">http://www.crosswire.org/mailman/listinfo/jsword-devel</a><br>
<br></blockquote></div><br></div>