[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] Bible chapter number in heading


Subject: [xsl] Bible chapter number in heading
From: "Jim Albright jim_albright@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 23 Feb 2016 17:55:00 -0000

I am producing PDFs for publishing a waterproof Bible using PrinceXML, XSL
version 2.0, and saxon9he.

The top-left of left hand pages should have the book name and chapter
number of the start of the page like:
Matthew 5

I can set the chapter number with
.Chapter_Number {
  	string-set: stringChapterNumber content();

and display with
@page :left {
    @top-left {
	content: string(stringBookName, last) " "
string(stringChapterNumber, start)
    }

Problem:
When a Section head is the first element on the left hand page, the page
heading says it is the previous chapter number.
This is technically correct but we expect the new chapter number to be
shown.
Currently with the following xml the heading is displayed as
Matthew 4 and should be
Matthew 5 when this is the top of the page.

         <p class="Section_Head_Major_Level2">3b. JesC:s yarbirgi dulemar
odurdaksad</p>
         <p class="Section_Major_Range_Paragraph">(5:1b7:29)</p>
         <p class="Section_Head">JesC:s Dulegi-bur-nued-binsalegedgi
sunmaksad</p>
         <p class="Parallel_Passage">(Lucas 6:20-23)<verseEnd
ID="cuk.MAT.4.25-END" from="cuk.MAT.4.25"/>
            <chapterEnd ID="cuk.MAT.4-END" from="cuk.MAT.4"/>
         </p>
         <p class="Paragraph">
            <chapterStart id="cuk.MAT.5">5</chapterStart>
            <verseStart id="cuk.MAT.5.1">1</verseStart>JesC:s
dulemar-bukidar ese duurmakdani-dakdegu,


      I have control of the text so I propose adding a new element:
     <span class="next_chapter">5</span>
just before a Section_Head_Majorb&. or Section Head

So far I have
	<xsl:template
match="*[@class='Section_Head_Major_Level2']|*[@class='Section_Head']">

		<xsl:variable name="valueOfNextChapterNumber"
select="following::chapterStart/>

Now I need a conditional that states If the next chapterStart is less than
10 elements below our current position insert
<span class="next_chapter">5</span>
          into the current location before the Section_Headb&b&


And adding the following to the CSS, it should fix the problem.
.next_chapter {
    string-set: stringChapterNumber content();
	display: inline;
	font-size: 0pt;  [hides the text]
[note: display:none; DOES NOT WORK]

Jim Albright
704*562*1529 cell unlimited
JAARS, Speeding Bible Translation
Wycliffe, Partners in Bible Translation


Current Thread
Keywords