Элемент body — различия между версиями

Материал из FictionBook
Перейти к: навигация, поиск
Строка 4: Строка 4:
 
|description=Здесь собственно и находится текст книги.
 
|description=Здесь собственно и находится текст книги.
  
Допускается использование нескольких экземпляров '''<body>'''.
+
Хотя формально количество и порядок экземпляров [[Элемент body|<body>]] не ограничены,
На данный момент второй '''<body>''' может использоваться для сносок.
+
но для совместимости с существующим софтом рекомендуется помещать весь основной текст документа
 +
в первом [[Элемент body|<body>]] (сразу после [[Элемент description|<description>]]),
 +
а сноски и комментарии - во втором [[Элемент body|<body>]] с атрибутом '''name="notes"'''.
 +
При отсутствии сносок и комментариев второе [[Элемент body|<body>]] должно отсутствовать.
  
 
|version=2.0 и выше
 
|version=2.0 и выше
Строка 16: Строка 19:
  
 
|children=
 
|children=
Содержит в перечисленном порядке:
+
Содержит в перечисленном порядке следующие элементаы:
 
# [[Элемент image|<image>]] - ''0..1 (один, опционально)'' - задается изображение для отображения в начале книги (или конкретного '''<body>''');
 
# [[Элемент image|<image>]] - ''0..1 (один, опционально)'' - задается изображение для отображения в начале книги (или конкретного '''<body>''');
 
# [[Элемент title|<title>]] - ''0..1 (один, опционально)'' - задается заглавие для отображения в начале книги (или конкретного '''<body>''');
 
# [[Элемент title|<title>]] - ''0..1 (один, опционально)'' - задается заглавие для отображения в начале книги (или конкретного '''<body>''');
Строка 23: Строка 26:
  
 
|parents=
 
|parents=
Может содержаться в:
+
Может содержаться в следующих элементах:
 
* [[Элемент FictionBook|<FictionBook>]] ''(любое число, один обязaтелен)''
 
* [[Элемент FictionBook|<FictionBook>]] ''(любое число, один обязaтелен)''
  
Строка 64: Строка 67:
 
<xs:element name="body" maxOccurs="unbounded">
 
<xs:element name="body" maxOccurs="unbounded">
 
  <xs:annotation>
 
  <xs:annotation>
   <xs:documentation>Main content of the book, multiple bodies are used for additional information, like footnotes, that do not appear in the main book flow. The first body is presented to the reader by default, and content in the other bodies should be accessible by hyperlinks. Name attribute should describe the meaning of this body, this is optional for the main body.</xs:documentation>
+
   <xs:documentation>Main content of the book, multiple bodies are  
 +
    used for additional information, like footnotes, that do not  
 +
    appear in the main book flow. The first body is presented to  
 +
    the reader by default, and content in the other bodies should  
 +
    be accessible by hyperlinks. Name attribute should describe  
 +
    the meaning of this body, this is optional for the main body.
 +
  </xs:documentation>
 
  </xs:annotation>
 
  </xs:annotation>
 
  <xs:complexType>
 
  <xs:complexType>
Строка 70: Строка 79:
 
   <xs:element name="image" type="imageType" minOccurs="0">
 
   <xs:element name="image" type="imageType" minOccurs="0">
 
     <xs:annotation>
 
     <xs:annotation>
     <xs:documentation>Image to be displayed at the top of this section</xs:documentation>
+
     <xs:documentation>Image to be displayed at the top of this  
 +
      section</xs:documentation>
 
     </xs:annotation>
 
     </xs:annotation>
 
   </xs:element>
 
   </xs:element>
 
   <xs:element name="title" type="titleType" minOccurs="0">
 
   <xs:element name="title" type="titleType" minOccurs="0">
 
     <xs:annotation>
 
     <xs:annotation>
     <xs:documentation>A fancy title for the entire book, should be used if the simple text version in &lt;description&gt; is not adequate, e.g. the book title has multiple paragraphs and/or character styles</xs:documentation>
+
     <xs:documentation>A fancy title for the entire book, should  
 +
      be used if the simple text version in &lt;description&gt;  
 +
      is not adequate, e.g. the book title has multiple paragraphs
 +
      and/or character styles</xs:documentation>
 
     </xs:annotation>
 
     </xs:annotation>
 
   </xs:element>
 
   </xs:element>

Версия 13:44, 2 апреля 2007

Ошибка создания миниатюры: Не удаётся сохранить эскиз по месту назначения
Внимание!
Содержимое этой страницы требуется написать или доделать начатое.

Элемент <body>

Описание

Здесь собственно и находится текст книги.

Хотя формально количество и порядок экземпляров <body> не ограничены, но для совместимости с существующим софтом рекомендуется помещать весь основной текст документа в первом <body> (сразу после <description>), а сноски и комментарии - во втором <body> с атрибутом name="notes". При отсутствии сносок и комментариев второе <body> должно отсутствовать.

Версия FB

2.0 и выше

Поддерживается

Любой читалкой (или конвертером).

Атрибуты

  • name - (опционально) - название <body>, устанавливается в "notes" для тела, содержащего сноски.
  • xml:lang - (опционально) - задание языка для <body>

Подчиненные элементы

Содержит в перечисленном порядке следующие элементаы:

  1. <image> - 0..1 (один, опционально) - задается изображение для отображения в начале книги (или конкретного <body>);
  2. <title> - 0..1 (один, опционально) - задается заглавие для отображения в начале книги (или конкретного <body>);
  3. <epigraph> - 0..n (любое число, опционально) - задаются эпиграфы к книге;
  4. <section> - 1..n (любое число, один обязaтелен) - задаются части (главы, прочие структурные единицы) книги;

Подчинен

Может содержаться в следующих элементах:

  • <FictionBook> (любое число, один обязaтелен)

Пример использования

<body name="notes">
 <title><p>Примечания</p></title>
 <section id="note1">
  <title>
   <p>1</p>
  </title>
  <p>Известный английский архитектор XVIII века, испытавший в
  своем творчестве сильное влияние античной архитектуры. (Здесь и
  далее прим. ред.)</p>
 </section>
 <section id="note2">
  <title>
   <p>2</p>
  </title>
  <p>Американский просветитель, живший в XVIII веке</p>
 </section>
</body>

Смотри также

Комментарии

Фрагмент схемы

<xs:element name="body" maxOccurs="unbounded">
 <xs:annotation>
  <xs:documentation>Main content of the book, multiple bodies are 
    used for additional information, like footnotes, that do not 
    appear in the main book flow. The first body is presented to 
    the reader by default, and content in the other bodies should 
    be accessible by hyperlinks. Name attribute should describe 
    the meaning of this body, this is optional for the main body.
  </xs:documentation>
 </xs:annotation>
 <xs:complexType>
  <xs:sequence>
   <xs:element name="image" type="imageType" minOccurs="0">
    <xs:annotation>
     <xs:documentation>Image to be displayed at the top of this 
       section</xs:documentation>
    </xs:annotation>
   </xs:element>
   <xs:element name="title" type="titleType" minOccurs="0">
    <xs:annotation>
     <xs:documentation>A fancy title for the entire book, should 
       be used if the simple text version in <description> 
       is not adequate, e.g. the book title has multiple paragraphs
       and/or character styles</xs:documentation>
    </xs:annotation>
   </xs:element>
   <xs:element name="epigraph" type="epigraphType" minOccurs="0" maxOccurs="unbounded">
    <xs:annotation>
     <xs:documentation>Epigraph(s) for the entire book, if any</xs:documentation>
    </xs:annotation>
   </xs:element>
   <xs:element name="section" type="sectionType" maxOccurs="unbounded"/>
  </xs:sequence>
  <xs:attribute name="name" type="xs:string" use="optional"/>
  <xs:attribute ref="xml:lang"/>
 </xs:complexType>
</xs:element>

Эквивалент в EPUB3

{{{epub3}}}