Code Monkey home page Code Monkey logo

Comments (11)

karlkleinpaste avatar karlkleinpaste commented on September 14, 2024

That's a function of module markup, not Xiphos. Xiphos has no opinion on where line breaks go, except when enabling verse-per-line as a module option. Xiphos just prepares a verse marker, then asks the Sword engine, "Give me ThisVerse," and stuffs the returned text into the widget after the verse marker.

You didn't mention what module this is, or which Psalm; I went through all the French modules I have installed for Ps.1.1 and none rendered that way.

Offhand, I suggest mod2imp YourModule | less to find your instance and see the underlying markup.

from xiphos.

karlkleinpaste avatar karlkleinpaste commented on September 14, 2024

For that matter, ask diatheke to show you exactly how rendering works, using XHTML (as Xiphos does), and using your module and verse:

diatheke -b KJV -f xhtml -o fmhlswi -k ps1.1

from xiphos.

LAfricain avatar LAfricain commented on September 14, 2024

The module is not yet published, it's an experimental module of FreVulgGlaire. We just implemented this tag psalm_title.

diatheke -b FreVulgGlaireX -f xhtml -o fmhlswi -k ps3.1
<html><head><meta http-equiv="content-type" content="text/html" charset="UTF-8" lang="en" xml:lang="en"/>
<style type="text/css">		.divineName { font-variant: small-caps; }
		.wordsOfJesus { color: red; }
		.transChange { font-style: italic; }
		.transChange.transChange-supplied { font-style: italic; }
		.transChange.transChange-added { font-style: italic; }
		.transChange.transChange-tenseChange::before { content: '*'; }
		.transChange.transChange-tenseChange { font-style: normal; }
		.transChange:lang(zh) { font-style: normal; text-decoration: dotted underline; }
		.overline { text-decoration: overline; }
		.indent1 { margin-left: 1em; }
		.indent2 { margin-left: 2em; }
		.indent3 { margin-left: 3em; }
		.indent4 { margin-left: 4em; }
		abbr { &:hover{ &:before{ content: attr(title); } } }
		.small-caps { font-variant: small-caps; }
		.otPassage { font-variant: small-caps; }
		.selah { text-align: right; width: 50%; margin: 0; padding: 0; }
		.acrostic { text-align: center; }
		.colophon {font-style: italic; font-size: small; display: block; }
		.rdg { font-style: italic; }
		.inscription {font-variant: small-caps; }
		.catchWord {font-style: bold; }
		.x-p-indent {text-indent: 1em; }
	</style></head><body>Psalms 3:1: <span style="font:Gentium;" lang="fr"></span><br />
(FreVulgGlaireX)
</body></html>

Content of the osis:

<chapter sID="Ps.3-aka-3" osisID="Ps.3" n="3"/>
      </p>
      <div type="introduction">David se soutient contre la crainte qu’on veut lui donner de ses ennemis, par le souvenir des secours qu’il a reçus de Dieu, et par l’espérance qu’il a d’en recevoir de nouveaux de sa bonté.</div>
      <verse sID="Ps.3.1" osisID="Ps.3.1" n="1"/>
      <title type="psalm" canonical="true">Psaume de David, lorsqu’il fuyait devant Absalom son fils.
        <note>Ps. 3,1 : 
          <q>Lorsqu’il fuyait</q>, etc. Cette fuite de David est racontée dans 
          <reference osisRef="2Sam.15.15">2 Rois, 15, verset</reference> 14 et suivants.</note>
        <verse eID="Ps.3.1"/>
        <verse sID="Ps.3.2" osisID="Ps.3.2" n="2"/>
      </title>
      <p>Seigneur, pourquoi se sont-ils multipliés, ceux qui me persécutent ? Ils sont bien nombreux, ceux qui s’élèvent contre moi.
        <note>Ps. 3,2-3 : * Multitude des ennemis de David.</note>
        <verse eID="Ps.3.2"/>

As you can see, Xiphos displayed nothing:
Ps 3 1FreVulgGlaireX

This is probably due to the wrong location of a tag. @UnasZole is working on it.
But When the tag is well formed it looks like this (I don't know if it's a Xiphos issue or a sword issue)

       <chapter sID="Ps.12-aka-12" osisID="Ps.12" n="12"/>
      </p>
      <div type="introduction">David prie le Seigneur de ne pas le laisser tomber dans la mort que son ennemi veut lui donner, et il fait cette prière avec une ferveur et une confiance qui peuvent servir de modèle à tous ceux qui veulent recourir à Dieu.</div>
      <verse sID="Ps.12.1" osisID="Ps.12.1" n="1"/>
      <title type="psalm" canonical="true">Pour la fin, psaume de David. </title>
      <p>Jusques à quand, Seigneur, m’oublierez-vous pour toujours ?  Jusques à quand détournerez-vous de moi votre visage ?
        <note>Ps. 12,1 : Pour toujours. Il faut nécessairement suppléer devant ces mots : sera-ce, ou bien les traduire par entièrement, absolument ; sens dont ils sont susceptibles en hébreu.</note>
        <note>Ps. 12,1-3 : Plainte à Dieu qui abandonne le Psalmiste.</note>
        <verse eID="Ps.12.1"/>
diatheke -b FreVulgGlaireX -f xhtml -o fmhlswi -k ps12.1
<html><head><meta http-equiv="content-type" content="text/html" charset="UTF-8" lang="en" xml:lang="en"/>
<style type="text/css">		.divineName { font-variant: small-caps; }
		.wordsOfJesus { color: red; }
		.transChange { font-style: italic; }
		.transChange.transChange-supplied { font-style: italic; }
		.transChange.transChange-added { font-style: italic; }
		.transChange.transChange-tenseChange::before { content: '*'; }
		.transChange.transChange-tenseChange { font-style: normal; }
		.transChange:lang(zh) { font-style: normal; text-decoration: dotted underline; }
		.overline { text-decoration: overline; }
		.indent1 { margin-left: 1em; }
		.indent2 { margin-left: 2em; }
		.indent3 { margin-left: 3em; }
		.indent4 { margin-left: 4em; }
		abbr { &:hover{ &:before{ content: attr(title); } } }
		.small-caps { font-variant: small-caps; }
		.otPassage { font-variant: small-caps; }
		.selah { text-align: right; width: 50%; margin: 0; padding: 0; }
		.acrostic { text-align: center; }
		.colophon {font-style: italic; font-size: small; display: block; }
		.rdg { font-style: italic; }
		.inscription {font-variant: small-caps; }
		.catchWord {font-style: bold; }
		.x-p-indent {text-indent: 1em; }
	</style></head><body>Psalms 12:1: <span style="font:Gentium;" lang="fr"><h3 class="title psalm canonical">Pour la fin, psaume de David. </h3>

<br />
Jusques à quand, Seigneur, m’oublierez-vous pour toujours ? Jusques à quand détournerez-vous de moi votre visage ? <a class="noteMarker" href="passagestudy.jsp?action=showNote&type=n&value=1&module=FreVulgGlaireX&passage=Psalms+12%3A1"><small><sup class="n">*n</sup></small></a> <a class="noteMarker" href="passagestudy.jsp?action=showNote&type=n&value=2&module=FreVulgGlaireX&passage=Psalms+12%3A1"><small><sup class="n">*n</sup></small></a></span><br />
(FreVulgGlaireX)
</body></html>

Ps12FreVulgGlaireX

from xiphos.

karlkleinpaste avatar karlkleinpaste commented on September 14, 2024

I suggest you compare against KJV for the same verse, where the superscription appears normally, with a few newlines inserted for readability.

<div type="x-milestone" subType="x-preverse" sID="pv1"/>
<title canonical="true" type="psalm">
<w lemma="strong:H04210">A Psalm</w> 
<w lemma="strong:H01732">of David</w>, 
<w lemma="strong:H01272" morph="strongMorph:TH8800">when he fled</w> 
<w lemma="strong:H06440">from</w> <w lemma="strong:H053">Absalom</w> 
<w lemma="strong:H01121">his son</w>.
</title>
<div type="x-milestone" subType="x-preverse" eID="pv1"/>
<w lemma="strong:H03068"><divineName>Lord</divineName></w>, 
<w lemma="strong:H07231" morph="strongMorph:TH8804">how are they increased</w> 
<w lemma="strong:H06862">that trouble</w> <w lemma="strong:H07227">me! many</w> 
<transChange type="added">are</transChange> 
<w lemma="strong:H06965" morph="strongMorph:TH8801">they that rise up</w> against me.

diatheke output abbreviated to just the <body> content:

diatheke -b KJV -f xhtml -o fmhlswi -k ps3.1

<h3 class="title psalm canonical">A Psalm of David, when he fled
<small><em class="morph">
(<a class="morph" href="passagestudy.jsp?action=showMorph&type=strongMorph%3ATH8800&value=TH8800"
class="morph">8800</a>)</em></small> 
from Absalom his son.</h3>

Psalms 3:1: <span style="font:Gentium;" ><span class="divineName">Lord</span>, 
how are they increased<small><em class="morph">
(<a class="morph" href="passagestudy.jsp?action=showMorph&type=strongMorph%3ATH8804&value=TH8804"
class="morph">8804</a>)</em></small> 
that trouble me! many <span class="transChange transChange-added">are</span> they that rise up
<small><em class="morph">
(<a class="morph" href="passagestudy.jsp?action=showMorph&type=strongMorph%3ATH8801&value=TH8801"
class="morph">8801</a>)</em></small> 
\against me.</span><br />

from xiphos.

LAfricain avatar LAfricain commented on September 14, 2024

But the difference is in KJV the psalm title is not in the verse 1 as it is in all the catholic bibles.

from xiphos.

UnasZole avatar UnasZole commented on September 14, 2024

Hi @karlkleinpaste ,

If I may add some precisions :

  • I'm building a tool to convert bibles from various online sources into OSIS. @LAfricain is using my tool to build sword modules from a French catholic bible he maintains on Wikisource.
  • After studying the OSIS spec, the strategy I used in my tool is to use the normal form of elements for the tags which represent the semantic structure of the text (sections, titles, introductions, paragraphs...), and the milestoned form for the tags that only serve to identify portions of canonical text (chapter and verse).
  • I recently implemented the psalm title tag. In bibles where the psalm title is before verse 1 (typically considered verse "0" in protestant versifications like KJV), no problem. But in catholic bibles, the versification usually includes the psalm title, and in varying ways (eg. For psalm 3, the title is verse 1. For psalm 12, the title is only the first half of verse 1 - and the end of verse 1 is the actual beginning of the psalm. For others, the title spans both verses 1 and 2. Etc.)

It's in this context that you get the example @LAfricain presented : you can end up with verse end and start tags in the middle of the psalm title.

As far as I understand, it's perfectly valid in the OSIS spec, but apparently not handled in the rendering engine here, leading to the completely blank verses in his first screenshot.

So I suppose a significant change to the rendering engine would be needed to handle that properly.

from xiphos.

UnasZole avatar UnasZole commented on September 14, 2024

To be more accurate, I just checked and it seems the issue is in osis2mod itself, not really the rendering side.

In these cases where there are <verse /> markers in the middle of a title, then the <title> and </title> tags end up on different verses - and since each verse is formatted independently, each verse is considered invalid XML.
Osis2mod should have converted the <title></title> tags to milestoned form, like it does for all document structure tags such as <p>, <lg>, <l>, etc. A canonical title should just be treated as a special type of paragraph.

So the core problem here is in osis2mod - though it may likely still require some changes on the rendering side afterwards.

from xiphos.

karlkleinpaste avatar karlkleinpaste commented on September 14, 2024

Being an osis2mod problem and, as I said originally, Xiphos having no opinion about line breaks, I'm closing this for now.

from xiphos.

LAfricain avatar LAfricain commented on September 14, 2024

Someone can open an issue on osis2mod tool tracker?

from xiphos.

karlkleinpaste avatar karlkleinpaste commented on September 14, 2024

You should do that at this link.

from xiphos.

LAfricain avatar LAfricain commented on September 14, 2024

https://tracker.crosswire.org/projects/MODTOOLS/issues/MODTOOLS-107

from xiphos.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.