[jsword-svn] bibledesktop/resource/xsl/cswing s
jswordcvs at crosswire.org
jswordcvs at crosswire.org
Fri Apr 1 10:10:16 MST 2005
Update of /cvs/jsword/bibledesktop/resource/xsl/cswing
In directory www.crosswire.org:/tmp/cvs-serv5440/resource/xsl/cswing
Modified Files:
index.txt simple.xsl
Log Message:
Improved ranking, bible display and fixed a few bugs.
Index: simple.xsl
===================================================================
RCS file: /cvs/jsword/bibledesktop/resource/xsl/cswing/simple.xsl,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** simple.xsl 23 Mar 2005 02:50:49 -0000 1.15
--- simple.xsl 1 Apr 2005 17:10:14 -0000 1.16
***************
*** 132,136 ****
<td valign="top" width="20%" style="background:#f4f4e8;">
<p> </p>
! <xsl:apply-templates select="//note" mode="print-notes"/>
</td>
</tr>
--- 132,136 ----
<td valign="top" width="20%" style="background:#f4f4e8;">
<p> </p>
! <xsl:apply-templates select="//verse" mode="print-notes"/>
</td>
</tr>
***************
*** 217,221 ****
<xsl:choose>
<xsl:when test="$VLine = 'true'">
! <div class="l"><xsl:call-template name="versenum"/><xsl:apply-templates/><xsl:text> </xsl:text></div>
</xsl:when>
<xsl:otherwise>
--- 217,221 ----
<xsl:choose>
<xsl:when test="$VLine = 'true'">
! <div class="l"><a name="{@osisID}"><xsl:call-template name="versenum"/></a><xsl:apply-templates/></div>
</xsl:when>
<xsl:otherwise>
***************
*** 235,239 ****
</xsl:variable>
<xsl:choose>
- <!-- create anchors for verses if we allow notes -->
<xsl:when test="$TinyVNum = 'true' and $Notes = 'true'">
<a name="{@osisID}"><sup class="verse"><xsl:value-of select="$versenum"/></sup></a>
--- 235,238 ----
***************
*** 252,256 ****
--- 251,272 ----
</xsl:choose>
</xsl:if>
+ <xsl:if test="$VNum = 'false' and $Notes = 'true'">
+ <a name="{@osisID}"></a>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template match="verse" mode="print-notes">
+ <xsl:if test="./note">
+ <xsl:variable name="book" select="substring-before(@osisID, '.')"/>
+ <xsl:variable name="chapter" select="substring-before(substring-after(@osisID, '.'), '.')"/>
+ <xsl:variable name="versenum" select="substring-after(substring-after(@osisID, '.'), '.')"/>
+ <a href="#{@osisID}">
+ <xsl:value-of select="concat($book, ' ', $chapter, ':', $versenum)"/>
+ </a>
+ <xsl:apply-templates select="./note" mode="print-notes" />
+ <div><xsl:text> </xsl:text></div>
+ </xsl:if>
</xsl:template>
+
<!--=======================================================================-->
<!-- Avoid adding whitespace -->
***************
*** 260,273 ****
<!--=======================================================================-->
<!-- When we encounter a note, we merely output a link to the note. -->
<xsl:template match="note">
<xsl:if test="$Notes = 'true'">
<!-- If the preceeding sibling was a note, emit a separator -->
! <xsl:if test="preceding-sibling::*[local-name() = 'note']">
! <sup class="note">, </sup>
! </xsl:if>
! <a href="#note-{generate-id(.)}">
! <sup class="note"><xsl:number level="any" from="/" format="a"/></sup>
! </a>
</xsl:if>
</xsl:template>
--- 276,292 ----
<!--=======================================================================-->
+ <!-- Avoid adding whitespace -->
<!-- When we encounter a note, we merely output a link to the note. -->
<xsl:template match="note">
<xsl:if test="$Notes = 'true'">
<!-- If the preceeding sibling was a note, emit a separator -->
! <xsl:choose>
! <xsl:when test="following-sibling::*[1][self::note]">
! <sup class="note"><a href="#note-{generate-id(.)}"><xsl:number level="any" from="/osis//verse" format="a"/></a>, </sup>
! </xsl:when>
! <xsl:otherwise>
! <sup class="note"><a href="#note-{generate-id(.)}"><xsl:number level="any" from="/osis//verse" format="a"/></a></sup>
! </xsl:otherwise>
! </xsl:choose>
</xsl:if>
</xsl:template>
***************
*** 276,285 ****
<xsl:template match="note" mode="print-notes">
<div class="margin">
! <b><xsl:number level="any" from="/" format="a"/></b>
<a name="note-{generate-id(.)}">
<xsl:text> </xsl:text>
</a>
<xsl:apply-templates/>
- [<a href="#{ancestor::verse[1]/@osisID}">verse</a>]
</div>
</xsl:template>
--- 295,303 ----
<xsl:template match="note" mode="print-notes">
<div class="margin">
! <b><xsl:number level="any" from="/osis//verse" format="a"/></b>
<a name="note-{generate-id(.)}">
<xsl:text> </xsl:text>
</a>
<xsl:apply-templates/>
</div>
</xsl:template>
***************
*** 489,493 ****
<!-- We add a single space to the end of the line because of a bug in Sun's rendering. -->
<xsl:template match="l">
! <div class="l"><xsl:apply-templates/><xsl:text> </xsl:text></div>
</xsl:template>
--- 507,511 ----
<!-- We add a single space to the end of the line because of a bug in Sun's rendering. -->
<xsl:template match="l">
! <div class="l"><xsl:apply-templates/></div>
</xsl:template>
***************
*** 495,501 ****
<!-- While a BR is a break, if it is immediately followed by punctuation,
indenting this rule can introduce whitespace.
! We use <div class="l"><xsl:text> </xsl:text></div> here because <br/> does not work. Nor does <br>
-->
! <xsl:template match="lb"><div class="l"><xsl:text> </xsl:text></div></xsl:template>
<!-- Avoid adding whitespace -->
--- 513,519 ----
<!-- While a BR is a break, if it is immediately followed by punctuation,
indenting this rule can introduce whitespace.
! We use <div class="l"></div> here because <br/> does not work. Nor does <br>
-->
! <xsl:template match="lb"><div class="l"></div></xsl:template>
<!-- Avoid adding whitespace -->
***************
*** 658,683 ****
<xsl:template match="hi">
<xsl:choose>
! <xsl:when test="@rend = 'bold'">
<strong><xsl:apply-templates/></strong>
</xsl:when>
! <xsl:when test="@rend = 'illuminated'">
<strong><em><xsl:apply-templates/></em></strong>
</xsl:when>
! <xsl:when test="@rend = 'italic'">
<em><xsl:apply-templates/></em>
</xsl:when>
! <xsl:when test="@rend = 'line-through'">
<!-- later -->
<xsl:apply-templates/>
</xsl:when>
! <xsl:when test="@rend = 'normal'">
<!-- later -->
<xsl:apply-templates/>
</xsl:when>
! <xsl:when test="@rend = 'small-caps'">
<!-- later -->
<xsl:apply-templates/>
</xsl:when>
! <xsl:when test="@rend = 'underline'">
<u><xsl:apply-templates/></u>
</xsl:when>
--- 676,701 ----
<xsl:template match="hi">
<xsl:choose>
! <xsl:when test="@type = 'bold'">
<strong><xsl:apply-templates/></strong>
</xsl:when>
! <xsl:when test="@type = 'illuminated'">
<strong><em><xsl:apply-templates/></em></strong>
</xsl:when>
! <xsl:when test="@type = 'italic'">
<em><xsl:apply-templates/></em>
</xsl:when>
! <xsl:when test="@type = 'line-through'">
<!-- later -->
<xsl:apply-templates/>
</xsl:when>
! <xsl:when test="@type = 'normal'">
<!-- later -->
<xsl:apply-templates/>
</xsl:when>
! <xsl:when test="@type = 'small-caps'">
<!-- later -->
<xsl:apply-templates/>
</xsl:when>
! <xsl:when test="@type = 'underline'">
<u><xsl:apply-templates/></u>
</xsl:when>
Index: index.txt
===================================================================
RCS file: /cvs/jsword/bibledesktop/resource/xsl/cswing/index.txt,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** index.txt 26 Sep 2004 10:14:35 -0000 1.2
--- index.txt 1 Apr 2005 17:10:14 -0000 1.3
***************
*** 1,3 ****
! simple.xsl
! cutandpaste.xsl
! cutandpaste2.xsl
--- 1 ----
! simple.xsl
\ No newline at end of file
More information about the jsword-svn
mailing list