<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
I am checking in a change to the stylesheet that uses JSword's java
code to convert an osisID to a friendly internationalized version. I
have highlighted how it is done. Basically you tell the stylesheet that
you will be using java but to be quiet about it. Then you create
variables and then call methods on them. The odd difference is that the
notation is not object-&gt;method() but method(object). So you just put
the object at the front of the list. Xalan sorts it out.<br>
<br>
I think this is marginally faster than what was there before.<br>
<br>
Yes, this does create a dependency upon xalan, but it is bundled in
Java since 1.4.<br>
<br>
<tt>&lt;xsl:stylesheet<br>
&nbsp; xmlns=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/TR/REC-html40">"http://www.w3.org/TR/REC-html40"</a><br>
&nbsp; xmlns:xsl=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/1999/XSL/Transform">"http://www.w3.org/1999/XSL/Transform"</a><br>
&nbsp; version="1.0"<br>
&nbsp; <small><font color="#ff0000"><big><b>xmlns:jsword=<a class="moz-txt-link-rfc2396E" href="http://xml.apache.org/xalan/java">"http://xml.apache.org/xalan/java"</a><br>
&nbsp; extension-element-prefixes="jsword"</b></big></font></small>&gt;<br>
<br>
&nbsp; &lt;xsl:template match="verse" mode="print-notes"&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;xsl:if test="./note"&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <b><font color="#ff0000">&lt;xsl:variable name="verse"
select="jsword:org.crosswire.jsword.passage.VerseFactory.fromString(@osisID)"/&gt;</font></b><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;a href="#{@osisID}"&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#ff0000"><b>&lt;xsl:value-of
select="jsword:getName($verse)"/&gt;</b></font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/a&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;xsl:apply-templates select="./note" mode="print-notes" /&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;div&gt;&lt;xsl:text&gt;&amp;#160;&lt;/xsl:text&gt;&lt;/div&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;/xsl:if&gt;<br>
&nbsp; &lt;/xsl:template&gt;<br>
&lt;/xsl:stylesheet&gt;</tt><br>
</body>
</html>