[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Bible chapter number in heading
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|