[jsword-svn] bibledesktop/resource/xsl/cswing s

jswordcvs at crosswire.org jswordcvs at crosswire.org
Sat Sep 10 04:13:20 MST 2005


Update of /cvs/jsword/bibledesktop/resource/xsl/cswing
In directory www.crosswire.org:/tmp/cvs-serv20195/resource/xsl/cswing

Modified Files:
	simple.xsl 
Log Message:
use the n attr of note if present for xrefs.

Index: simple.xsl
===================================================================
RCS file: /cvs/jsword/bibledesktop/resource/xsl/cswing/simple.xsl,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** simple.xsl	14 Aug 2005 16:06:14 -0000	1.26
--- simple.xsl	10 Sep 2005 11:13:18 -0000	1.27
***************
*** 332,341 ****
      <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>
--- 332,342 ----
      <xsl:if test="$Notes = 'true'">
        <!-- If the preceeding sibling was a note, emit a separator -->
+       <!-- TODO(DMS): If n="xxx" is present and within this verse xxx was already seen, then skip it. -->
        <xsl:choose>
          <xsl:when test="following-sibling::*[1][self::note]">
!           <sup class="note"><a href="#note-{generate-id(.)}"><xsl:call-template name="generateNoteXref"/></a>, </sup>
          </xsl:when>
          <xsl:otherwise>
!           <sup class="note"><a href="#note-{generate-id(.)}"><xsl:call-template name="generateNoteXref"/></a></sup>
          </xsl:otherwise>
        </xsl:choose>
***************
*** 346,350 ****
    <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>
--- 347,351 ----
    <xsl:template match="note" mode="print-notes">
      <div class="margin">
!       <b><xsl:call-template name="generateNoteXref"/></b>
        <a name="note-{generate-id(.)}">
          <xsl:text> </xsl:text>
***************
*** 354,357 ****
--- 355,373 ----
    </xsl:template>
  
+   <!--
+     == If the n attribute is present then use that for the cross ref otherwise create a letter.
+     == Note: numbering restarts with each verse.
+     -->
+   <xsl:template name="generateNoteXref">
+   	<xsl:choose>
+   	  <xsl:when test="@n">
+   	    <xsl:value-of select="@n"/>
+   	  </xsl:when>
+   	  <xsl:otherwise>
+   	    <xsl:number level="any" from="/osis//verse" format="a"/>
+   	  </xsl:otherwise>
+   	</xsl:choose>
+   </xsl:template>
+ 
    <!--=======================================================================-->
    <xsl:template match="p">



More information about the jsword-svn mailing list