List of eXtensions to OSIS used in SWORD

From CrossWire Bible Society
Revision as of 16:37, 2 May 2012 by David Haslam (talk | contribs) (x-trademark: added description)

Jump to: navigation, search

Purpose

This page is intended to be a one-stop reference which lists all the extensions to OSIS recognized by the SWORD API.

Introduction

The OSIS reference standard permits custom extensions to XML elements in the form of attribute values with the prefix x-. [1]

Several such extensions are already in use by the SWORD API and are designed to facilitate solutions (or workarounds) to particular requirements that arise in the course of module creation.[2]

Notes:

  1. In rarer cases, the x-prefix has been used to define an attribute name or even an element name.
  2. Not all front-end applications support these extensions to OSIS. For some further details, refer to Choosing a SWORD program.

The list

This list may be incomplete. When adding extensions to this page, please keep them in alphabetical order.
State clearly which OSIS element and attribute they apply to, and most importantly, include any rules that govern their proper use.
If any are now deprecated for use in new modules, please mention this status, even though existing modules may have made use thereof.
For extensions where the SWORD support is unclear, it may be better to add them to the talk page.
A few of these extensions are essentially methods to record metadata, and have no effect on the module display.

x-1, x-2, etc

These can be used within the seg element as a value of the attribute subType.

They are used along with type="x-variant" to identify whether the reading is the primary or secondary variant. See marking variants.


These can also be used within the w element as a value of the attribute subType.

They are used along with type="x-split", for which see below.

x-added

This can be used within the seg element as a value of the attribute subType.

It can be used as a workaround for places where the text added by the translator is within a w element. See note in OSIS Bibles.

x-begin-paragraph

This can be used within the lb element as a value of the attribute type.

It's used in some modules as an alternative to using the paragraph element p. See also x-end-paragraph below.

x-big

x-br

This can be used within the lb element as a value of the attribute type.

It does not add anything significant to the line breaks, and seems to be used to distinguish simple line breaks from those at the start & end of paragraphs in some modules.

x-center

This can be used within the p element as a value of the attribute type.

It may be used to mark a centered paragraph.

x-centered

This can be used within the l element as a value of the attribute type.

It may be used to mark a centered line of poetry.

x-comments-to

This can be used in the rights element as a value of the attribute type.

It's used to mark the email address for enquiries regarding the distribution license. See also x-license and x-license-URL below.

x-copyright

This can be used in the rights element as a value of the attribute type.

It's used to embed the copyright information, i.e. in addition to what may be stated in the module conf file.

x-end-paragraph

This can be used within the lb element as a value of the attribute type.

It's used in some modules as an alternative to using the paragraph element p. See also x-begin-paragraph above.

x-extra-p

This can be used within the milestone element as a value of the attribute type.

It is used (for example) in the KJV module to mark an extra paragraph break in places where the printed edition does not have a pilcrow.
Most front-ends do not support this feature.

x-glossary

This can be used within the reference element as a value of the attribute type.

It may be used to link references to items in an ancillary glossary module, and should be accompanied by a valid osisRef attribute.
See the module support table in the comparison of notable front-end applications.

x-importer

This can be used within the milestone element as a value of the attribute type.

It appears in the testament heading(s). Along with subType="x-osis2mod" it's used solely for traceability, being generated automatically by recent versions of osis2mod.
The n attribute within this milestone element identifies the version of the SWORD utility by which the module was created. e.g.

<milestone type="x-importer" subType="x-osis2mod" n="$Rev: 2562 $"/>

x-intro

This can be used within the title element as a value of the attribute type.

It may be used to identify a title for a Bible book introduction. See module support.

x-level-1, x-level-2, etc

These can be used within the milestone element as a value of the attribute subType.

These are used along with the attribute type="cQuote" to mark the quote level within a continuation quote passage. Up to 4 quote levels are supported by SWORD.

x-license

This can be used within the milestone form of the div element as a value of the attribute type.

It's used to embed a distribution license within the module itself (i.e. in addition to whatever is stated in the conf file).
For example, it's found in the module SBLGNT, immediately after the titlePage element.


This can also be used in the rights element as a value of the attribute type.

This is to be preferred, as it makes use of the element in the OSIS standard that was intended for this very purpose.

x-license-url

This can be used in the rights element as a value of the attribute type.

It's used to mark the URL for the distribution license information.

x-milestone

This can be used for the milestone form of the div element as a value of the attribute type.

It's used (e.g.) along with the attribute subType="x-preverse", for which see below. An example is the module JPS.

x-noindent

This can be used within the p element as a value of the attribute type.

It can be used to mark a paragraph flush left, with no indentation.

x-osis2mod

See above under x-importer.

x-p

This can be used within the milestone element as a value of the attribute type.

It may be used along with the attribute marker="¶" to include the pilcrow sign as a visible paragraph marker, as (for example) found in the KJV module.

x-preverse

This can be used within the title element as a value of the attribute subType.

It provides a means to correctly display a title just before the current verse. For proper use, the title element must occur within the verse element, or (for milestoned OSIS) after the verse sID milestone and before the eID milestone for the same verse or verse range. Failure to adhere to this rule can have the adverse effect of making the title display before the previous verse, or (worse still) in the previous chapter.


This can also be used within the milestone form of the div element as a value of the attribute subType.

This is intended to provide support for content associated with a verse, that should be displayed before the verse marker. These used to be called "preverse title" or "preverse heading". We agreed a while back to generalize this concept to simply be called a 'preverse div'. Other things besides a single title might be shown before a verse.
Support for this is still at the beta stage. It should be fixed in SWORD release version 1.7 – the syntax is already present in module KJV 2.4 in CrossWire Beta.

x-right

This can be used within the l element as a value of the attribute type.

It may be used to mark a right aligned line of poetry, which may be useful for poetical text in a module that uses a RtL script.
If the use of x-selah is insufficient, this may also help in LtR languages for proper placement of the word translated from the Hebrew, usually transliterated as Selah in some English Bibles.

x-selah

This can be used within the foreign element as a value of the attribute type.

It's used in several of the Psalms (also in Habakkuk) to mark the Hebrew word (transliterated to English as) Selah.

This extension is deprecated, even though it's found in the ESV module.

The OSIS standard already provides a means to mark Selah within poetry markup.

<l type="selah">Selah</l>

x-small

x-speaker

This can be used within the title element as a value of the attribute type.

It's used to mark each of the speakers in some translations of the Song of Songs.
This extension is deprecated. The OSIS standard already has two methods to identify speakers in association with a castlist.

x-split

This can be used within the w element as a value of the attribute type.

It's used to mark a lemma in places where the translation text splits the word of the original language.
It's used along with an appropriate subType attribute numerical value such as x-1, x-2, etc. For usage examples, see the KJV module.

x-Strongs:...

This can be used within the w element as a value of the attribute lemma.

The colon is followed by the Strongs reference(s).

x-StrongsMorph:...

This can be used within the w element as a value of the attribute morph.

The colon is followed by the morphology reference.

x-strongsMarkup

This could be used within the milestone element as a value of the attribute type.

It was used in the KJV module merely to track editing changes to the XML. It has no effect on the displayed text. Now deprecated.

x-sub

This can be used within the title element as a value of the attribute type.

It is used to mark subsections within the Biblical text.

x-subSubSection

This can be used within the milestone form of the div element as a value of the attribute type.

For example, it's used in the ABN module to mark the start & end of the acrostic stanza divisions in Psalm 119 and similar passages. [1]

x-testament

This can be used within the div element as a value of the attribute type.

This may be used to indicate one of the two traditional top-level major text divisions of a Bible. See Text Divisions.
It is functionally equivalent to the type attribute value bookGroup. See body under the general structure for OSIS Bibles.

x-trademark

This can be used within the milestone form of the div element as a value of the attribute type.

It's used to embed a registered trademark within the module itself (i.e. in addition to whatever is stated in the conf file).
For example, it's found in the module LEB, in just after the titlePage element.

x-transChange

This can be used within the seg element as a value of the attribute type.

It can be used as a workaround for places where the text added by the translator is within a w element. See note in OSIS Bibles.

x-unit

The div attribute x-unit provides a level of division between book and chapter. It is sometimes used in GenBook modules.

x-variant

This can be used within the seg element as a value of the attribute type.

It can be use for marking variants present in different versions of a text. See marking variants.

End notes

  1. Currently, this feature is commented out in usfm2osis.pl.