Re: [sword-devel] osis2mod changes

2016-02-07 Thread David Haslam
If someone would kindly compile the Win32 edition, I'd be happy to give the
updated osis2mod.exe a whirl.

David



--
View this message in context: 
http://sword-dev.350566.n4.nabble.com/osis2mod-changes-tp4656015p4656020.html
Sent from the SWORD Dev mailing list archive at Nabble.com.

___
sword-devel mailing list: sword-devel@crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page


[sword-devel] osis2mod changes

2016-02-06 Thread DM Smith
I’ve just updated osis2mod to do 2 things:
1) leave … alone. That is don’t change the divs to 
milestones.
2) look for entities that shouldn’t be in a module and report them. While 
numeric entities are allowed in xml, SWORD does not convert these to their text 
value. At a later date, we can change osis2mod to convert them to their text 
value.

Now to document the change in the wiki…

In Him,
DM


___
sword-devel mailing list: sword-devel@crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page

[sword-devel] osis2mod changes for Words of Christ and container elements

2008-09-11 Thread DM Smith
I have just checked in changes to osis2mod that addresses two earlier 
postings:
osis2mod and WoC
(see: 
http://www.crosswire.org/pipermail/sword-devel/2008-July/028513.html)
osis2mod and container elements
(see: 
http://www.crosswire.org/pipermail/sword-devel/2008-July/028520.html)
The third posting will be addressed later (near the SWORD release of 1.5.12)
osis2mod and preverse content
   (see: 
http://www.crosswire.org/pipermail/sword-devel/2008-July/028526.html)

These changes will allow the building of a module compatible with SWORD 
1.5.9.

Here are the changes:
plugged memory leak
osis2mod uses stacks of XMLTag*, but does not call delete on them.
The tag stacks have been changed to be object stacks.

misc changes
   currentVerse changed from pointer to object.
   writeEntry clears text (i.e. text = ;) rather than at several 
places in the main loop.
   removed unnecessary/invalid/wrong/outdated comments and commented code
   Ignored everything preceeding the first div
   Improved comments
   Added #define INCLUDE_TAGS to include all tags.
   Currently osis2mod preserves text and most tags.
   This would include all tags and their attributes, but it is 
turned off.

fixed some linking bugs
1) The parsing of osisID=Matt.1.1 Matt.1.2 Matt.1.3 was handled badly
 and caused incomplete and in some cases wrong linking.
 This was a straightforward bug fix.
2) Appending text to a linked range would break the linked range.
There are two identified scenarios where this was happening.
a) osis2mod will append non-title interverse material to the 
prior verse.
b) osis2mod will append Non-KJV verses to the prior verse.
There were two parts to the fix.
i) Postpone linking until after these situations.
   Linking is now done after all verses have been written and appended.
ii) because linking was postponed, appending needed to be to the 
first verse in a range.

fixed an intra-verse title bug
It is legal to have a title within a verse. These should have been 
left alone,
but they were being pulled out of place and put before the verse.

Words of Christ change
osis2mod had left the markup of WoC to the OSIS author, requiring a 
complicated hack
in order for the WoC to be highlighted (e.g. red-letter text) in all 
usages in all applications.
This change allows the OSIS author to mark up WoC in a natural 
manner, and osis2mod
will make the changes.
The following is supported:
1) The use of
q who=Jesus.../q (container form)
or
q sID=XXX who=Jesus/...q eID=XXX who=Jesus/ 
(milestone form)
to mark where quotation marks should go.
Note: milestone type=cQuote/ is still used to mark up 
continuation quotation marks.
2) The marker attribute can still be used to specify the desired 
quotation marks.
3) The quotation can span chapters. (For example, The sermon on the 
mount.)

Here is what osis2mod will do:
Split the functionality of quotation mark choice and placement
from identification of the Words of Christ.
Given q sID=XXX who=Jesus marker=#8220;...q eID=XXX 
who=Jesus marker=#8221;/
1) Quotation marks choice and placement with:
q sID=XXX marker=#8220;...q eID=XXX marker=#8221;/
   (Note, who=Jesus is removed)
2) All WoC highlighted text, including quotation marks is surrounded 
with:
q who=Jesus marker=.../q
3) WoC highlighted text is repeated within each verse.

Container element change:
Authors of OSIS texts are geard toward BSP (Book/Section/Paragraph).
Every SWORD application is geared toward BCV (Book/Chapter/Verse) 
modules.
osis2mod did very little to bridge this gap.
With this change BSP container elements are changed to their 
milestone form.
One thing to note, I've used genX as the sID/eID value (where X is 
unique to the pair). This allows for reverse engineering in mod2osis.

Chris would you mind testing this with the beta modules? And if it works 
like you want, would you make a Windows build available?

In His Service,
DM


___
sword-devel mailing list: sword-devel@crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page


Re: [sword-devel] osis2mod changes for Words of Christ and container elements

2008-09-11 Thread Greg Hellings
DM, two questions:

On Thu, Sep 11, 2008 at 1:57 PM, DM Smith [EMAIL PROTECTED] wrote:

   Added #define INCLUDE_TAGS to include all tags.
   Currently osis2mod preserves text and most tags.
   This would include all tags and their attributes, but it is
 turned off.

Why did you turn this off by default?  I would presume it might break
output with filters which are not currently set to strip out this
extra tagset - was that your reason?

One thing to note, I've used genX as the sID/eID value (where X is
 unique to the pair). This allows for reverse engineering in mod2osis.

What is the value placed in X?  Recreating in mod2osis should be
relatively straightforward if my formulated thoughts on how you
described it are accurate.  However, there would need to be some
indication from the Sword library that we're entering a new
section/paragraph.  I don't believe mod2osis currently looks for any
such information.  Finding those locations seems almost like it would
fall to the filters to have direct access to the module data,
especially for a section which might be placed before the start
milestone for version book.1.1 or book.0.0, etc.

--Greg

___
sword-devel mailing list: sword-devel@crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page


Re: [sword-devel] osis2mod changes for Words of Christ and container elements

2008-09-11 Thread DM Smith
Greg Hellings wrote:
 DM, two questions:

 On Thu, Sep 11, 2008 at 1:57 PM, DM Smith [EMAIL PROTECTED] wrote:

   
   Added #define INCLUDE_TAGS to include all tags.
   Currently osis2mod preserves text and most tags.
   This would include all tags and their attributes, but it is
 turned off.
 

 Why did you turn this off by default?  I would presume it might break
 output with filters which are not currently set to strip out this
 extra tagset - was that your reason?
   
It preserves prior behavior.
That behavior is that verse, /verse, chapter, /chapter and div 
type=book are not included in the module.
   
One thing to note, I've used genX as the sID/eID value (where X is
 unique to the pair). This allows for reverse engineering in mod2osis.
 

 What is the value placed in X?
osis2mod starts with 1 and every time an sID is created, osis2mod use 
the next number.

A stack is used to find the corresponding end tag and when it is found, 
the top element is changed from sID to eID and output.

   Recreating in mod2osis should be
 relatively straightforward if my formulated thoughts on how you
 described it are accurate.  However, there would need to be some
 indication from the Sword library that we're entering a new
 section/paragraph.  I don't believe mod2osis currently looks for any
 such information.  Finding those locations seems almost like it would
 fall to the filters to have direct access to the module data,
 especially for a section which might be placed before the start
 milestone for version book.1.1 or book.0.0, etc.
   

I haven't looked at mod2osis. If the module is already osis, then there 
is no need for filters. A simple loop over all keys calling getRawText 
and transforming that should be nearly sufficient.

You might want to have two routines, one for OSIS modules and one for 
other encodings.

-- DM





___
sword-devel mailing list: sword-devel@crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page


Re: [sword-devel] osis2mod changes for Words of Christ and container elements

2008-09-11 Thread DM Smith
Regarding the q tag, Troy pointed out to me that who=Jesus does not  
need to be repeated with eID closing milestone in the OSIS document.

On Sep 11, 2008, at 2:57 PM, DM Smith wrote:

 I have just checked in changes to osis2mod that addresses two earlier
 postings:
 osis2mod and WoC
(see:
 http://www.crosswire.org/pipermail/sword-devel/2008-July/028513.html)
 osis2mod and container elements
(see:
 http://www.crosswire.org/pipermail/sword-devel/2008-July/028520.html)
 The third posting will be addressed later (near the SWORD release of  
 1.5.12)
osis2mod and preverse content
   (see:
 http://www.crosswire.org/pipermail/sword-devel/2008-July/028526.html)

 These changes will allow the building of a module compatible with  
 SWORD
 1.5.9.

 Here are the changes:
 plugged memory leak
osis2mod uses stacks of XMLTag*, but does not call delete on them.
The tag stacks have been changed to be object stacks.

 misc changes
   currentVerse changed from pointer to object.
   writeEntry clears text (i.e. text = ;) rather than at several
 places in the main loop.
   removed unnecessary/invalid/wrong/outdated comments and commented  
 code
   Ignored everything preceeding the first div
   Improved comments
   Added #define INCLUDE_TAGS to include all tags.
   Currently osis2mod preserves text and most tags.
   This would include all tags and their attributes, but it is
 turned off.

 fixed some linking bugs
1) The parsing of osisID=Matt.1.1 Matt.1.2 Matt.1.3 was handled  
 badly
 and caused incomplete and in some cases wrong linking.
 This was a straightforward bug fix.
2) Appending text to a linked range would break the linked range.
There are two identified scenarios where this was happening.
a) osis2mod will append non-title interverse material to the
 prior verse.
b) osis2mod will append Non-KJV verses to the prior verse.
There were two parts to the fix.
i) Postpone linking until after these situations.
   Linking is now done after all verses have been written and  
 appended.
ii) because linking was postponed, appending needed to be to the
 first verse in a range.

 fixed an intra-verse title bug
It is legal to have a title within a verse. These should have been
 left alone,
but they were being pulled out of place and put before the verse.

 Words of Christ change
osis2mod had left the markup of WoC to the OSIS author, requiring a
 complicated hack
in order for the WoC to be highlighted (e.g. red-letter text) in  
 all
 usages in all applications.
This change allows the OSIS author to mark up WoC in a natural
 manner, and osis2mod
will make the changes.
The following is supported:
1) The use of
q who=Jesus.../q (container form)
or
q sID=XXX who=Jesus/...q eID=XXX who=Jesus/
 (milestone form)
to mark where quotation marks should go.
Note: milestone type=cQuote/ is still used to mark up
 continuation quotation marks.
2) The marker attribute can still be used to specify the desired
 quotation marks.
3) The quotation can span chapters. (For example, The sermon on the
 mount.)

 Here is what osis2mod will do:
Split the functionality of quotation mark choice and placement
from identification of the Words of Christ.
Given q sID=XXX who=Jesus marker=#8220;...q eID=XXX
 who=Jesus marker=#8221;/
1) Quotation marks choice and placement with:
q sID=XXX marker=#8220;...q eID=XXX  
 marker=#8221;/
   (Note, who=Jesus is removed)
2) All WoC highlighted text, including quotation marks is  
 surrounded
 with:
q who=Jesus marker=.../q
3) WoC highlighted text is repeated within each verse.

 Container element change:
Authors of OSIS texts are geard toward BSP (Book/Section/ 
 Paragraph).
Every SWORD application is geared toward BCV (Book/Chapter/Verse)
 modules.
osis2mod did very little to bridge this gap.
With this change BSP container elements are changed to their
 milestone form.
One thing to note, I've used genX as the sID/eID value (where X  
 is
 unique to the pair). This allows for reverse engineering in mod2osis.

 Chris would you mind testing this with the beta modules? And if it  
 works
 like you want, would you make a Windows build available?

 In His Service,
DM


 ___
 sword-devel mailing list: sword-devel@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@crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page