Skip to content

Commit

Permalink
Add Beblia XML format
Browse files Browse the repository at this point in the history
Fixes #85
  • Loading branch information
schierlm committed Feb 17, 2024
1 parent bfde314 commit 2c3ece5
Show file tree
Hide file tree
Showing 6 changed files with 388 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ In addition, the following other formats are supported, with varying accuracy:
- **[SwordSearcher](https://www.swordsearcher.com/) ([Forge](https://www.swordsearcher.com/forge/))**: export only
- **[MySword](https://www.mysword.info/)**: import and export
- **[Obsidian](https://obsidian.md/)**: export only
- **[Beblia XML](https://beblia.com/)**: import and export

In combination with third party tools, other export formats are available:

Expand Down
13 changes: 13 additions & 0 deletions biblemulticonverter-schemas/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,19 @@
<packageName>biblemulticonverter.schema.usx3</packageName>
</configuration>
</execution>
<execution>
<id>xjc-beblia</id>
<goals>
<goal>xjc</goal>
</goals>
<configuration>
<outputDirectory>target/generated-sources/xjc10</outputDirectory>
<sources>
<source>src/main/resources/beblia.xsd</source>
</sources>
<packageName>biblemulticonverter.schema.beblia</packageName>
</configuration>
</execution>
</executions>
<configuration>
<locale>en</locale>
Expand Down
65 changes: 65 additions & 0 deletions biblemulticonverter-schemas/src/main/resources/beblia.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">

<xs:simpleType name="positiveIntType">
<xs:restriction base="xs:int">
<xs:minInclusive value="1"></xs:minInclusive>
</xs:restriction>
</xs:simpleType>

<xs:simpleType name="TestamentType">
<xs:restriction base="xs:string">
<xs:enumeration value="Old" />
<xs:enumeration value="New" />
</xs:restriction>
</xs:simpleType>

<xs:complexType name="BookType">
<xs:sequence>
<xs:element name="chapter" minOccurs="1" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="verse" minOccurs="0" maxOccurs="unbounded" >
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="number" type="positiveIntType" use="required" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="number" type="positiveIntType" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="number" type="positiveIntType" use="required" />
</xs:complexType>

<xs:complexType name="BibleType">
<xs:sequence>
<xs:element name="testament" minOccurs="0" maxOccurs="2">
<xs:complexType>
<xs:sequence>
<xs:element name="book" minOccurs="1" maxOccurs="unbounded" type="BookType" />
</xs:sequence>
<xs:attribute name="name" type="TestamentType" use="optional" />
</xs:complexType>
</xs:element>
<xs:element name="book" minOccurs="0" maxOccurs="unbounded" type="BookType" />
</xs:sequence>
<xs:attribute name="translation" type="xs:string" use="optional" />
<xs:attribute name="name" type="xs:string" use="optional" />
<xs:attribute name="id" type="xs:string" use="optional" />
<xs:attribute name="bible" type="xs:string" use="optional" />
<xs:attribute name="language" type="xs:string" use="optional" />
<xs:attribute name="status" type="xs:string" use="optional" />
<xs:attribute name="info" type="xs:string" use="optional" />
<xs:attribute name="version" type="xs:string" use="optional" />
<xs:attribute name="link" type="xs:string" use="optional" />
<xs:attribute name="site" type="xs:string" use="optional" />
<xs:attribute name="Copyright" type="xs:string" use="optional" />
</xs:complexType>

<xs:element name="bible" type="BibleType" />
</xs:schema>
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ public Collection<Module<RoundtripFormat>> getRoundtripFormats() {
result.add(new Module<RoundtripFormat>("BibleWorksRTF", "RTF import and export format for BibleWorks", BibleWorksRTF.HELP_TEXT, BibleWorksRTF.class));
result.add(new Module<RoundtripFormat>("RoundtripTaggedText", "A text-format that consistently uses numbered tags to make automated editing easy.", RoundtripTaggedText.HELP_TEXT, RoundtripTaggedText.class));
result.add(new Module<RoundtripFormat>("SoftProjector", "Bible format used by SoftProjector", SoftProjector.HELP_TEXT, SoftProjector.class));
result.add(new Module<RoundtripFormat>("BebliaXML", "Beblia XML format.", BebliaXML.HELP_TEXT, BebliaXML.class));
return result;
}

Expand Down

0 comments on commit 2c3ece5

Please sign in to comment.