ubsicap / usx

Unified Scripture XML
30 stars 6 forks source link

Introduction Wrappers #38

Open bryceallison opened 5 years ago

bryceallison commented 5 years ago

Please consider wrapping book introductions in an <introduction> tag to make post processing easier on developers.

<usx version="3.0">
  <book code="GEN" style="id">English: Good News Translation 2nd Ed. 1992</book>
  <para style="usfm">3.0</para>
  <para style="ide">Unicode (UTF8)</para>
  <para style="rem">For any non-Paratext use of this text, permission must be obtained from the copyright holder.</para>
  <para style="rem">CAP Information: checked/corrected 2009</para>
  <para style="h">Genesis</para>
  <para style="toc1">GENESIS</para>
  <para style="toc2">Genesis</para>
  <para style="toc3">Gn</para>
  <para style="mt1">GENESIS</para>
  <introduction>
    <para style="imt">Introduction</para>
    <para style="ip">The name <char style="bk">Genesis</char> means “origin.” The book tells about the creation of the universe, the origin of human beings, the beginning of sin and suffering in the world, and about God's way of dealing with people. Genesis can be divided into two main parts:</para>
    <para style="ip">1) <char style="it">Chapters 1—11</char> The creation of the world and the early history of the human race. Here are the accounts of Adam and Eve, Cain and Abel, Noah and the flood, and the Tower of Babylon.</para>
    <para style="ip">2) <char style="it">Chapters 12—50</char> The history of the early ancestors of the Israelites. The first is Abraham, who was notable for his faith and his obedience to God. Then follow the stories of his son Isaac, and grandson Jacob (also called Israel), and of Jacob's twelve sons, the founders of the twelve tribes of Israel. Special attention is given to one of the sons, Joseph, and the events that brought Jacob and his other sons with their families to live in Egypt.</para>
    <para style="ip">While this book tells stories about people, it is first and foremost an account of what God has done. It begins with the affirmation that God created the universe, and it ends with a promise that God will continue to show his concern for his people. Throughout the book the main character is God, who judges and punishes those who do wrong, leads and helps his people, and shapes their history. This ancient book was written to record the story of a people's faith and to help keep that faith alive.</para>
    <para style="iot">Outline of Contents</para>
    <para style="io1">Creation of the universe and of human beings <char style="ior">(1.1–2.25)</char></para>
    <para style="io1">The beginning of sin and suffering <char style="ior">(3.1-24)</char></para>
  <para style="io1">From Adam to Noah <char style="ior">(4.1–5.32)</char></para>
  <para style="io1">Noah and the flood <char style="ior">(6.1–10.32)</char></para>
  <para style="io1">The tower of Babylon <char style="ior">(11.1-9)</char></para>
  <para style="io1">From Shem to Abram <char style="ior">(11.10-32)</char></para>
  <para style="io1">The patriarchs: Abraham, Isaac, Jacob <char style="ior">(12.1–35.29)</char></para>
  <para style="io1">The descendants of Esau <char style="ior">(36.1-43)</char></para>
  <para style="io1">Joseph and his brothers <char style="ior">(37.1–45.28)</char></para>
  <para style="io1">The Israelites in Egypt <char style="ior">(46.1–50.26)</char></para>
  </introduction>
  <chapter number="1" style="c" sid="GEN 1" />
  <para style="s">The Story of Creation</para>
  <para style="p”>
  ...
jonbitgood commented 4 years ago

Does the introduction of ie solve this?

bryceallison commented 4 years ago

What would be the best way to know when an introduction starts? Is there an element that it always starts with?

jonbitgood commented 4 years ago

imt would be the go to. Though a more resilient method would be to use the last BookIdentification style and collect everything between that and start of the first chapter and/or ie

bryceallison commented 4 years ago

Yeah, that's essentially what I've been doing. While common, it doesn't seem like imt is guaranteed to start the introduction. That's why I thought it would be easier for everyone to just have a wrapper or start milestone as well.

jonbitgood commented 4 years ago

It's invalid USX 3.0 if it's missing imt but contains other introduction elements. So if you did want to go imt to ie that's possible... as long as everyone is sure to validate their scripture output :disappointed:

klassenjm commented 4 years ago

To validate, there needs to be at least one of the following para styles

    "mt" # The main title of the book (if single level)
    | "mt1" # The main title of the book (if multiple levels)
    | "mt2" # A secondary title usually occurring before the main title
    | "mt3" # A tertiary title occurring after the main title
    | "mt4"
    | "imt" # Introduction major title, level 1 (if single level)
    | "imt1" # Introduction major title, level 1 (if multiple levels)
    | "imt2" # Introduction major title, level 2

after the book identification, but it does not need to be imt. It's commonly mt#

(not ignoring that the original post was for considering a wrapper)

bryceallison commented 4 years ago

Thanks,@klassenjm. That's helpful and I think it helps underscore the need for either a wrapper or intro start milestone.