[sword-devel] KJV Ref List
Wolfgang Schultz
woschultz at googlemail.com
Wed Jul 16 12:29:50 MST 2008
OkiDoki Greg
here is a litle tool if you want to extract another refs from an OSIS
bible file. ;-)
http://www.zefania.de/tools/mis/OsisVerseRefExtractor.zip
Have fun!
Wolfgang
http://www.zefania.de
2008/7/16 Greg Hellings <greg.hellings at gmail.com>:
> On Wed, Jul 16, 2008 at 12:45 PM, Wolfgang Schultz
> <woschultz at googlemail.com> wrote:
>> Hi,
>>
>> i have not used XSLT but here are your IDS
>>
>> http://www.zefania.de/tools/mis/osisids-kjyfull.zip
>
> Thanks, that's exactly what I was looking for!
>
> I don't use or know anything about C# beyond what it is, but I don't
> really need to duplicate the effort, just utilize it.
>
> --Greg
>
>>
>>
>> and here is the code in c#
>>
>> using (sw)
>> {
>> using (XmlReader osisModulReader =
>> XmlReader.Create(PathToOsisBibleModul))
>> {
>> osisModulReader.MoveToContent();
>> while (osisModulReader.Read())
>> {
>> if (osisModulReader.NodeType ==
>> XmlNodeType.Element && osisModulReader.Name == "verse")
>> {
>> if (osisModulReader.HasAttributes)
>> {
>>
>> sw.WriteLine(osisModulReader.GetAttribute("osisID"));
>> }
>> }
>>
>> }
>>
>> }
>>
>> Greetings
>> wolfgang
>> http://www.zefania.de
>>
>>
>>
>>
>> 2008/7/16 Greg Hellings <greg.hellings at gmail.com>:
>>> Maybe someone has already done this, but I'm trying to extract an
>>> exhaustive list of all the osisID values in the KJV's original OSIS
>>> files so I can test it against my current output. I figured that XSL
>>> was the prime method to do this. So I wrote this, very basic, XSLT:
>>>
>>> <?xml version="1.0" encoding="UTF-8" ?>
>>>
>>> <xsl:stylesheet version="1.0"
>>> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>>>
>>> <xsl:template match="*|text()">
>>> <xsl:apply-templates select="*" />
>>> </xsl:template>
>>>
>>> <xsl:template match="verse">
>>> <xsl:value-of select="@osisID" /><xsl:text>
>>> </xsl:text>
>>> </xsl:template>
>>>
>>> </xsl:stylesheet>
>>>
>>>
>>> My head tells me this should produce every verse element's osisID
>>> value, listed one-per-line. However, when I run this through
>>> xsltproc, I get no output at all. When I run it with the --verbose
>>> command, sure enough, it tells me that it found three templates (one
>>> for *, one for text() and one for verse) and then it will come across
>>> a verse element and process it using the *|text() template.
>>>
>>> Clearly I have done something hideously wrong in the above, or there
>>> is the most basic bug in my version of xsltproc. Anyone see my error
>>> or have a ready-made file with the data I'm looking for in it?
>>>
>>> --Greg
>>>
>>> _______________________________________________
>>> 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
>
More information about the sword-devel
mailing list