Discussion:
[sword-devel] Tables across verse boundaries
Chris Burrell
2014-03-17 17:07:18 UTC
Permalink
Hello

I'm looking at converting a module that has tables across verse
boundaries... Is this supported? I'm using the sword utilities to convert
the module, however, I'm seeing that the 'table' element is getting
dropped? (both using mod2imp to check, as well as using JSword).

If this is supported, does someone have some example mark-up that I could
use as a starting point?

Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20140317/76e422fc/attachment.html>
David Haslam
2014-03-17 21:07:47 UTC
Permalink
Did you start with USFM ?

i.e. Using table markers \tr, \th#, \thr#, \tc#, \tcr#

The first example in the USFM User Reference is

Text - Numbers 7.12-83 (GNT)

\p
\v 12-83 They presented their offerings in the following order:
\tr \th1 Day \th2 Tribe \th3 Leader
\tr \tcr1 1st \tc2 Judah \tc3 Nahshon son of Amminadab
\tr \tcr1 2nd \tc2 Issachar \tc3 Nethanel son of Zuar
\tr \tcr1 3rd \tc2 Zebulun \tc3 Eliab son of Helon
\tr \tcr1 4th \tc2 Reuben \tc3 Elizur son of Shedeur
\tr \tcr1 5th \tc2 Simeon \tc3 Shelumiel son of Zurishaddai
...


As you see, this example has a verse range preceding the table header.

I guess you must be facing something slightly different,
e.g. with verse tags within the table?

What's the outcome of usfm2osis.py ?

Note that work to process sub-verses is not yet done.

See the first part of this remark within the script (line 44):
# 0.7 expand sub-verses with ! in osisIDs; unittest; make fully OO; PyDev
project?


Best regards,

David



--
View this message in context: http://sword-dev.350566.n4.nabble.com/Tables-across-verse-boundaries-tp4653761p4653762.html
Sent from the SWORD Dev mailing list archive at Nabble.com.
Chris Little
2014-03-17 22:08:35 UTC
Permalink
Post by David Haslam
Note that work to process sub-verses is not yet done.
# 0.7 expand sub-verses with ! in osisIDs; unittest; make fully OO; PyDev
project?
Why would this be relevant to the issue of tables (if they were
generated from USFM)?

--Chris
Chris Burrell
2014-03-17 23:05:17 UTC
Permalink
They're not related to usfm (but David knows i'm working on some modules in
usfm hence the question I assume).

I'm simply trying to work out how to do this in Sword. Seems like the OSIS
specs caters for it but not the Sword module implementation we have which
is verse based.

Any recommendations or workarounds?

Chris
Post by David Haslam
Note that work to process sub-verses is not yet done.
# 0.7 expand sub-verses with ! in osisIDs; unittest; make fully OO; PyDev
project?
Why would this be relevant to the issue of tables (if they were generated
from USFM)?
--Chris
_______________________________________________
sword-devel mailing list: sword-devel at crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20140317/e1ca929c/attachment.html>
David Haslam
2014-03-18 08:34:34 UTC
Permalink
It was relevant insomuch that it helped me to understand and clarify the
problem.

And for DM too, as the example from the GNB in the USFM User Reference
illustrates that some modern translations have opted to use tables to
simplify repetitive looking lists in passages such as the one in Numbers.
Can't blame the translators. It's a good idea, even if it departs from a
wooden literalness.

Best regards,

David

PS. There are 11 tables in the Welsh Beibl.net USFM files for the Complete
Bible.
Here's the first example in Numbers 1

\p
\v 5-15 ?Dyma enwau'r dynion sydd i'ch helpu chi:
\tr \th1 Llwyth \th2 Arweinydd
\tr \tc1 Reuben \tc2 Elisur fab Shede?r
\tr \tc1 Simeon \tc2 Shelwmiel fab Swrishadai
\tr \tc1 Jwda \tc2 Nachshon fab Aminadab
\tr \tc1 Issachar \tc2 Nethanel fab Tsw?r
\tr \tc1 Sabulon \tc2 Eliab fab Chelon
\m Yna meibion Joseff:
\tr \tc1 Effraim \tc2 Elishama fab Amihwd
\tr \tc1 Manasse \tc2 Gamaliel fab Pedatswr
\m Wedyn,
\tr \tc1 Benjamin \tc2 Abidan fab Gideoni
\tr \tc1 Dan \tc2 Achieser fab Amishadai
\tr \tc1 Asher \tc2 Pagiel fab Ochran
\tr \tc1 Gad \tc2 Eliasaff fab Dewel
\tr \tc1 Nafftali \tc2 Achira fab Enan.?
\m

In none of the tables do they cross verse boundaries.
They all use a verse range before the table begins.

This source text is yet to be made into an updated module, even though we
have had the files since last July.
Tables are not the main obstacle. Nested tags are the unsolved issue in
usfm2osis.py





--
View this message in context: http://sword-dev.350566.n4.nabble.com/Tables-across-verse-boundaries-tp4653761p4653768.html
Sent from the SWORD Dev mailing list archive at Nabble.com.
Chris Burrell
2014-03-18 08:53:56 UTC
Permalink
In this module, we have various types of lists and various types of tables.

For example, the start of Genesis 1 is rendered as "list" markup in the
source of the module. This is representing as a hanging paragraph in the
print version, e.g.

aaaaa d dddd
bbbb c d ddddd dd
cccc ddd d ddd

In Neh 7, for example, this is rendered as a two-column table, with some
items marked as indented, e.g.


1 aaaaaaa hhh hhh 18
nnnn 7
2 mmmm 9
jjjj 88


I will try later on to render this as a list. I guess it makes sense that
the source module tables may map to the OSIS list types. I suspect the
<list> tag would get dropped. Will test.
Chris
Post by David Haslam
It was relevant insomuch that it helped me to understand and clarify the
problem.
And for DM too, as the example from the GNB in the USFM User Reference
illustrates that some modern translations have opted to use tables to
simplify repetitive looking lists in passages such as the one in Numbers.
Can't blame the translators. It's a good idea, even if it departs from a
wooden literalness.
Best regards,
David
PS. There are 11 tables in the Welsh Beibl.net USFM files for the Complete
Bible.
Here's the first example in Numbers 1
\p
\tr \th1 Llwyth \th2 Arweinydd
\tr \tc1 Reuben \tc2 Elisur fab Shede?r
\tr \tc1 Simeon \tc2 Shelwmiel fab Swrishadai
\tr \tc1 Jwda \tc2 Nachshon fab Aminadab
\tr \tc1 Issachar \tc2 Nethanel fab Tsw?r
\tr \tc1 Sabulon \tc2 Eliab fab Chelon
\tr \tc1 Effraim \tc2 Elishama fab Amihwd
\tr \tc1 Manasse \tc2 Gamaliel fab Pedatswr
\m Wedyn,
\tr \tc1 Benjamin \tc2 Abidan fab Gideoni
\tr \tc1 Dan \tc2 Achieser fab Amishadai
\tr \tc1 Asher \tc2 Pagiel fab Ochran
\tr \tc1 Gad \tc2 Eliasaff fab Dewel
\tr \tc1 Nafftali \tc2 Achira fab Enan.?
\m
In none of the tables do they cross verse boundaries.
They all use a verse range before the table begins.
This source text is yet to be made into an updated module, even though we
have had the files since last July.
Tables are not the main obstacle. Nested tags are the unsolved issue in
usfm2osis.py
--
http://sword-dev.350566.n4.nabble.com/Tables-across-verse-boundaries-tp4653761p4653768.html
Sent from the SWORD Dev mailing list archive at Nabble.com.
_______________________________________________
sword-devel mailing list: sword-devel at crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20140318/535d613f/attachment-0001.html>
DM Smith
2014-03-18 11:18:24 UTC
Permalink
The other type of markup that is list like is for poetry and such stanza-like text. The <lg>, line group, is meant as a container for <l>, lines, where each line can have a level, indicating the indent level. In our wiki on OSIS, we note that if the level attribute is absent, we presume it is level="1", and that a level of 1 means no indent. The <l> element only occurs within <lg>.

One of the peculiarities of <lg> is that it cannot contain text. Text has to be contained by an element. There are some other elements that can be found in a <lg>:
<chapter>
<verse>
<q>
<lb/>
<milestone/>
<index/>
It is intended that <chapter>, <verse> and <q> are milestoned.

We recommend that in writing OSIS that every chapter is a valid, well-formed xml fragment. That is, we don't recommend having <chapter> within <lg>.

<q> is problematic to have outside of <l>. The semantic of line start is not defined by OSIS. It could be that every <l> begins a new line and </lg> finishes the group. Or that </l> starts a new line and that <lg> starts the group. If the quote is outside it may have a newline on the wrong side. The <milestone type="cQuote"/> is provided for continuation quotes and has the same issue.
Post by Chris Burrell
In this module, we have various types of lists and various types of tables.
For example, the start of Genesis 1 is rendered as "list" markup in the source of the module. This is representing as a hanging paragraph in the print version, e.g.
aaaaa d dddd
bbbb c d ddddd dd
cccc ddd d ddd
This seems to be an example of using markup for presentation. In OSIS, we want to represent structure using elements. Presentation markup is held in type and subType attributes.

This probably would be best represented as <p type="x-hanging"> or as <lg> and <l>. Note that by using x-hanging you are pretty much guaranteeing that no front-end will provide a hanging indent. There are only a few x-YYYY values that have meaning in SWORD/JSword.

The <l level="n"> where n is a whole number is the way to do subsequent line indenting. I think this is the only mechanism that SWORD/JSword provide.

Print, large displays and small displays differ in how they respond to presentational markup. Print is a rigid format display governed by margins, font and paper size. Other formats may not be rigid allowing for variations in margin, font and viewport. Even management of the viewport (e.g. page flipping vs continuous scrolling vs scrolling & flipping)
Post by Chris Burrell
In Neh 7, for example, this is rendered as a two-column table, with some items marked as indented, e.g.
This probably should be marked up as a table, since it is tabular data. The particular indent of the verse number 2 is not something that you should expect to control.

Looking through Neh 7, the tabular data I see starts in verse 8. I don't see two rows per verse, but rather 1.
Post by Chris Burrell
1 aaaaaaa hhh hhh 18
nnnn 7
2 mmmm 9
jjjj 88
This probably should be something like:
<table>
<row><cell align="start"><lg><l level="1"><verse sID="Neh.7.8" osisID="Neh.7.1"/>aaaaaaa hhh hhh</l></lg></cell><cell align="end">18</cell></row>
<row><cell align="start"><lg><l level="2">nnnn</l><cell><cell align="right">7<verse eID="Neh.7.1" osisID="Neh.7.8"/></cell></row>
<row><cell align="start"><lg><l level="2"><verse sID="Neh.7.9" osisID="Neh.7.2"/>mmmm</l></lg></cell><cell align="end">9</cell></row>
<row><cell align="start"><lg><l level="2">jjjj</l><cell><cell align="right">88<verse eID="Neh.7.2" osisID="Neh.7.9"/></cell></row>
</table>
Note: Having the verse start w/in <l> ensures that the verse number is not orphaned on the previous line. It also means that it can be indented.
Post by Chris Burrell
I will try later on to render this as a list. I guess it makes sense that the source module tables may map to the OSIS list types. I suspect the <list> tag would get dropped. Will test.
Chris
It was relevant insomuch that it helped me to understand and clarify the
problem.
And for DM too, as the example from the GNB in the USFM User Reference
illustrates that some modern translations have opted to use tables to
simplify repetitive looking lists in passages such as the one in Numbers.
Can't blame the translators. It's a good idea, even if it departs from a
wooden literalness.
Best regards,
David
PS. There are 11 tables in the Welsh Beibl.net USFM files for the Complete
Bible.
Here's the first example in Numbers 1
\p
\tr \th1 Llwyth \th2 Arweinydd
\tr \tc1 Reuben \tc2 Elisur fab Shede?r
\tr \tc1 Simeon \tc2 Shelwmiel fab Swrishadai
\tr \tc1 Jwda \tc2 Nachshon fab Aminadab
\tr \tc1 Issachar \tc2 Nethanel fab Tsw?r
\tr \tc1 Sabulon \tc2 Eliab fab Chelon
\tr \tc1 Effraim \tc2 Elishama fab Amihwd
\tr \tc1 Manasse \tc2 Gamaliel fab Pedatswr
\m Wedyn,
\tr \tc1 Benjamin \tc2 Abidan fab Gideoni
\tr \tc1 Dan \tc2 Achieser fab Amishadai
\tr \tc1 Asher \tc2 Pagiel fab Ochran
\tr \tc1 Gad \tc2 Eliasaff fab Dewel
\tr \tc1 Nafftali \tc2 Achira fab Enan.?
\m
In none of the tables do they cross verse boundaries.
They all use a verse range before the table begins.
This source text is yet to be made into an updated module, even though we
have had the files since last July.
Tables are not the main obstacle. Nested tags are the unsolved issue in
usfm2osis.py
--
View this message in context: http://sword-dev.350566.n4.nabble.com/Tables-across-verse-boundaries-tp4653761p4653768.html
Sent from the SWORD Dev mailing list archive at Nabble.com.
_______________________________________________
sword-devel mailing list: sword-devel at crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page
_______________________________________________
sword-devel mailing list: sword-devel at crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20140318/431e7761/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4145 bytes
Desc: not available
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20140318/431e7761/attachment.p7s>
DM Smith
2014-03-18 01:01:21 UTC
Permalink
Hello
I'm looking at converting a module that has tables across verse boundaries... Is this supported?
It should be. At least by osis2mod. I don't know if SWORD renderers have code for tables. I'll leave that for someone else to answer. JSword probably will choke on tables. I'll go into that in a bit.
I'm using the sword utilities to convert the module, however, I'm seeing that the 'table' element is getting dropped?
I'm presuming that you are using osis2mod. osis2mod should not drop anything. To verify what osis2mod creates I recommend creating a raw module (that is, use no compression flags) and use the -d 2 flag. This will put milestones for the start and end of the verses into the module. Then you can use a text editor (stay away from NotePad as the line endings may not be windows friendly) to look at the file and search for the constructs.
(both using mod2imp to check,
Using mod2imp is also useful because it marks each index entry with the verse slot name. But it may not be necessary, if the raw file gives what you wish.
as well as using JSword).
JSword has some problems going to OSIS. It assumes that each verse is well-formed xml. If it is not, it strips all xml, leaving text (with notes inline).

This is a fairly safe assumption, but tables will probably will make that fail.

This assumption is something that all SWORD/JSword frontends make at some points. Two examples:
Search results list that show verse content as well as references.
Stacked or side-by-side parallel display.
If this is supported, does someone have some example mark-up that I could use as a starting point?
I'm trying to understand where in a Bible a table would be useful. I can see it in an introduction. But spanning verses? No way. There is no tabular data in the Bible. (Please correct me if I'm wrong!)

I have seen people use tables to control rendering. If this is what is being done, some one needs guidance.

In a commentary, which is indexed by verse numbers, anything could happen.

Regarding sample markup, it is analogous to simple HTML tables, but other than <table> the element names are different.
The <table> element can be wholly contained within:
<div>
<chapter>
<speech>
<note>
<cell>
<p>
Nothing else can be a parent to <table>.

A table has a few attributes, cols and rows to give dimensions; canonical to indicate whether it contains canonical material; and the standard OSIS attributes.
It can contain a <head> and also <row> elements. Both are optional, but it doesn't make sense to have a table without rows.

I'm not clear what is the purpose of head. It can contain many of the same content as a verse.

The <row> element can only contain <cell> elements and it has a role attribute that can have a value of label or data. It also has a canonical attribute and the standard OSIS attributes.

The <cell> element can contain pretty much anything that a <div> or a <chapter> can contain except <div> and <chapter>. It also has the same role attribute, but defaults to data. It also has an align attribute with a value from left, right, center, justify, start and end. And of course it has canonical and standard OSIS attributes.

Since a table cannot be milestoned, the element it is contained within also cannot be milestoned. The manual states that for any given element you can chose to use the milestoned version or the container version but not both in the same document.

I guess a verse can be split across multiple cells and even rows by using the milestoned version of a verse.

If a <table> only has a single column, a <list> may be a better container.

Hope this helps.

Together in His Service,
DM

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4145 bytes
Desc: not available
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20140317/a852cb18/attachment.p7s>
Jonathan Morgan
2014-03-18 13:50:47 UTC
Permalink
Hi DM,
Post by Chris Burrell
Post by Chris Burrell
Hello
I'm looking at converting a module that has tables across verse
boundaries... Is this supported?
It should be. At least by osis2mod. I don't know if SWORD renderers have
code for tables. I'll leave that for someone else to answer. JSword
probably will choke on tables. I'll go into that in a bit.
Last time we discussed OSIS tables they weren't supported by the SWORD
renderers.
I don't think anything has changed.

Jon
Post by Chris Burrell
Post by Chris Burrell
I'm using the sword utilities to convert the module, however, I'm seeing
that the 'table' element is getting dropped?
I'm presuming that you are using osis2mod. osis2mod should not drop
anything. To verify what osis2mod creates I recommend creating a raw module
(that is, use no compression flags) and use the -d 2 flag. This will put
milestones for the start and end of the verses into the module. Then you
can use a text editor (stay away from NotePad as the line endings may not
be windows friendly) to look at the file and search for the constructs.
Post by Chris Burrell
(both using mod2imp to check,
Using mod2imp is also useful because it marks each index entry with the
verse slot name. But it may not be necessary, if the raw file gives what
you wish.
Post by Chris Burrell
as well as using JSword).
JSword has some problems going to OSIS. It assumes that each verse is
well-formed xml. If it is not, it strips all xml, leaving text (with notes
inline).
This is a fairly safe assumption, but tables will probably will make that fail.
This assumption is something that all SWORD/JSword frontends make at some
Search results list that show verse content as well as references.
Stacked or side-by-side parallel display.
Post by Chris Burrell
If this is supported, does someone have some example mark-up that I
could use as a starting point?
I'm trying to understand where in a Bible a table would be useful. I can
see it in an introduction. But spanning verses? No way. There is no tabular
data in the Bible. (Please correct me if I'm wrong!)
I have seen people use tables to control rendering. If this is what is
being done, some one needs guidance.
In a commentary, which is indexed by verse numbers, anything could happen.
Regarding sample markup, it is analogous to simple HTML tables, but other
than <table> the element names are different.
<div>
<chapter>
<speech>
<note>
<cell>
<p>
Nothing else can be a parent to <table>.
A table has a few attributes, cols and rows to give dimensions; canonical
to indicate whether it contains canonical material; and the standard OSIS
attributes.
It can contain a <head> and also <row> elements. Both are optional, but it
doesn't make sense to have a table without rows.
I'm not clear what is the purpose of head. It can contain many of the same
content as a verse.
The <row> element can only contain <cell> elements and it has a role
attribute that can have a value of label or data. It also has a canonical
attribute and the standard OSIS attributes.
The <cell> element can contain pretty much anything that a <div> or a
<chapter> can contain except <div> and <chapter>. It also has the same role
attribute, but defaults to data. It also has an align attribute with a
value from left, right, center, justify, start and end. And of course it
has canonical and standard OSIS attributes.
Since a table cannot be milestoned, the element it is contained within
also cannot be milestoned. The manual states that for any given element you
can chose to use the milestoned version or the container version but not
both in the same document.
I guess a verse can be split across multiple cells and even rows by using
the milestoned version of a verse.
If a <table> only has a single column, a <list> may be a better container.
Hope this helps.
Together in His Service,
DM
_______________________________________________
sword-devel mailing list: sword-devel at crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20140319/30ba61a5/attachment.html>
Chris Burrell
2014-03-18 19:29:52 UTC
Permalink
Hi DM

1- You're right, it was my mistake around across verses. Ezra 1 would be an
example where you have 3 rows per verse, and a table over two verses.

2- My issue with the markup and having the verse number inside the cell was
that I got a 'nesting' warning by mod2osis. Is that something i just
ignore? (i.e. "verse sID" in the first cell with "verse eID" in the second
cell)

3- I had another look at the output, and the module does in fact have the
table in it. It looks like it wrapped it into verse 8, as expected. So it
seems, that maybe this is an issue specific to JSword?

Chris
Post by Jonathan Morgan
Hi DM,
Post by Chris Burrell
Post by Chris Burrell
Hello
I'm looking at converting a module that has tables across verse
boundaries... Is this supported?
It should be. At least by osis2mod. I don't know if SWORD renderers have
code for tables. I'll leave that for someone else to answer. JSword
probably will choke on tables. I'll go into that in a bit.
Last time we discussed OSIS tables they weren't supported by the SWORD
renderers.
I don't think anything has changed.
Jon
Post by Chris Burrell
Post by Chris Burrell
I'm using the sword utilities to convert the module, however, I'm
seeing that the 'table' element is getting dropped?
I'm presuming that you are using osis2mod. osis2mod should not drop
anything. To verify what osis2mod creates I recommend creating a raw module
(that is, use no compression flags) and use the -d 2 flag. This will put
milestones for the start and end of the verses into the module. Then you
can use a text editor (stay away from NotePad as the line endings may not
be windows friendly) to look at the file and search for the constructs.
Post by Chris Burrell
(both using mod2imp to check,
Using mod2imp is also useful because it marks each index entry with the
verse slot name. But it may not be necessary, if the raw file gives what
you wish.
Post by Chris Burrell
as well as using JSword).
JSword has some problems going to OSIS. It assumes that each verse is
well-formed xml. If it is not, it strips all xml, leaving text (with notes
inline).
This is a fairly safe assumption, but tables will probably will make that fail.
This assumption is something that all SWORD/JSword frontends make at some
Search results list that show verse content as well as references.
Stacked or side-by-side parallel display.
Post by Chris Burrell
If this is supported, does someone have some example mark-up that I
could use as a starting point?
I'm trying to understand where in a Bible a table would be useful. I can
see it in an introduction. But spanning verses? No way. There is no tabular
data in the Bible. (Please correct me if I'm wrong!)
I have seen people use tables to control rendering. If this is what is
being done, some one needs guidance.
In a commentary, which is indexed by verse numbers, anything could happen.
Regarding sample markup, it is analogous to simple HTML tables, but other
than <table> the element names are different.
<div>
<chapter>
<speech>
<note>
<cell>
<p>
Nothing else can be a parent to <table>.
A table has a few attributes, cols and rows to give dimensions; canonical
to indicate whether it contains canonical material; and the standard OSIS
attributes.
It can contain a <head> and also <row> elements. Both are optional, but
it doesn't make sense to have a table without rows.
I'm not clear what is the purpose of head. It can contain many of the
same content as a verse.
The <row> element can only contain <cell> elements and it has a role
attribute that can have a value of label or data. It also has a canonical
attribute and the standard OSIS attributes.
The <cell> element can contain pretty much anything that a <div> or a
<chapter> can contain except <div> and <chapter>. It also has the same role
attribute, but defaults to data. It also has an align attribute with a
value from left, right, center, justify, start and end. And of course it
has canonical and standard OSIS attributes.
Since a table cannot be milestoned, the element it is contained within
also cannot be milestoned. The manual states that for any given element you
can chose to use the milestoned version or the container version but not
both in the same document.
I guess a verse can be split across multiple cells and even rows by using
the milestoned version of a verse.
If a <table> only has a single column, a <list> may be a better container.
Hope this helps.
Together in His Service,
DM
_______________________________________________
sword-devel mailing list: sword-devel at crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page
_______________________________________________
sword-devel mailing list: sword-devel at crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20140318/6e528fea/attachment.html>
DM Smith
2014-03-18 20:45:46 UTC
Permalink
Hi DM
1- You're right, it was my mistake around across verses. Ezra 1 would be an example where you have 3 rows per verse, and a table over two verses.
No problem. It's hard to debug a problem where the text is made up.
2- My issue with the markup and having the verse number inside the cell was that I got a 'nesting' warning by mod2osis. Is that something i just ignore? (i.e. "verse sID" in the first cell with "verse eID" in the second cell)
The nesting warnings are relatively benign. They indicate that the verse in isolation is not well-formed XML and that when displayed in certain contexts it will have problems.

That the verse sID is in one cell and the verse eID is in another by itself is not a problem. It is more a question if the raw data from the module is a well-formed fragment.
3- I had another look at the output, and the module does in fact have the table in it. It looks like it wrapped it into verse 8, as expected. So it seems, that maybe this is an issue specific to JSword?
It is a particularily bad problem with JSword. JSword passes the verse raw data to an xml parser to create an xml fragment, which it fails when not well-formed. When the exception is caught, we then strip all markup out of the raw data and re-parse it.
This is particular to JSword.

However, when the verse is shown in isolation by any SWORD frontend or in a table cell, it most likely will not display as intended. It's that JSword does it one worse. If we wish to discuss JSword's shortcoming more, we should do that on jsword-devel or create an issue for it (if there isn't already one, as we have talked about this problem in the long past.)
Chris
Hi DM,
Hello
I'm looking at converting a module that has tables across verse boundaries... Is this supported?
It should be. At least by osis2mod. I don't know if SWORD renderers have code for tables. I'll leave that for someone else to answer. JSword probably will choke on tables. I'll go into that in a bit.
Last time we discussed OSIS tables they weren't supported by the SWORD renderers.
I don't think anything has changed.
Jon
I'm using the sword utilities to convert the module, however, I'm seeing that the 'table' element is getting dropped?
I'm presuming that you are using osis2mod. osis2mod should not drop anything. To verify what osis2mod creates I recommend creating a raw module (that is, use no compression flags) and use the -d 2 flag. This will put milestones for the start and end of the verses into the module. Then you can use a text editor (stay away from NotePad as the line endings may not be windows friendly) to look at the file and search for the constructs.
(both using mod2imp to check,
Using mod2imp is also useful because it marks each index entry with the verse slot name. But it may not be necessary, if the raw file gives what you wish.
as well as using JSword).
JSword has some problems going to OSIS. It assumes that each verse is well-formed xml. If it is not, it strips all xml, leaving text (with notes inline).
This is a fairly safe assumption, but tables will probably will make that fail.
Search results list that show verse content as well as references.
Stacked or side-by-side parallel display.
If this is supported, does someone have some example mark-up that I could use as a starting point?
I'm trying to understand where in a Bible a table would be useful. I can see it in an introduction. But spanning verses? No way. There is no tabular data in the Bible. (Please correct me if I'm wrong!)
I have seen people use tables to control rendering. If this is what is being done, some one needs guidance.
In a commentary, which is indexed by verse numbers, anything could happen.
Regarding sample markup, it is analogous to simple HTML tables, but other than <table> the element names are different.
<div>
<chapter>
<speech>
<note>
<cell>
<p>
Nothing else can be a parent to <table>.
A table has a few attributes, cols and rows to give dimensions; canonical to indicate whether it contains canonical material; and the standard OSIS attributes.
It can contain a <head> and also <row> elements. Both are optional, but it doesn't make sense to have a table without rows.
I'm not clear what is the purpose of head. It can contain many of the same content as a verse.
The <row> element can only contain <cell> elements and it has a role attribute that can have a value of label or data. It also has a canonical attribute and the standard OSIS attributes.
The <cell> element can contain pretty much anything that a <div> or a <chapter> can contain except <div> and <chapter>. It also has the same role attribute, but defaults to data. It also has an align attribute with a value from left, right, center, justify, start and end. And of course it has canonical and standard OSIS attributes.
Since a table cannot be milestoned, the element it is contained within also cannot be milestoned. The manual states that for any given element you can chose to use the milestoned version or the container version but not both in the same document.
I guess a verse can be split across multiple cells and even rows by using the milestoned version of a verse.
If a <table> only has a single column, a <list> may be a better container.
Hope this helps.
Together in His Service,
DM
_______________________________________________
sword-devel mailing list: sword-devel at crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page
_______________________________________________
sword-devel mailing list: sword-devel at crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page
_______________________________________________
sword-devel mailing list: sword-devel at crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20140318/aa584d6d/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4145 bytes
Desc: not available
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20140318/aa584d6d/attachment-0001.p7s>
Kahunapule Michael Johnson
2014-03-19 17:51:09 UTC
Permalink
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20140319/6faa4b9a/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MichaelHead64.jpg
Type: image/jpeg
Size: 3159 bytes
Desc: not available
URL: <Loading Image...>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kahunapule.png
Type: image/png
Size: 8368 bytes
Desc: not available
URL: <Loading Image...>
Loading...