<fo:table-column column-width='30mm'/>

 <fo:table-column column-width='30mm'/>

 <fo:table-column column-width='30mm'/>

 <fo:table-column column-width='30mm'/>

 <fo:table-column column-width='30mm'/>

 <fo:table-body>

  .

  .

  .

 </fo:table-body>

</fo:table>

После создания тела таблицы нужно создать строки таблицы при помощи элемента <fo:table-row> — по одному элементу для каждой строки.

Создание строк таблицы: <fo:table-row>

Аналогично таблицам HTML, для создания строк таблицы применяется элемент <fo:table- row>, и каждая строка может содержать ячейки таблицы. Как и браузеры HTML, процессор XSL- FO определяет размеры таблицы по количеству строк.

С элементом <fo:table-row> можно применять следующие свойства:

• общие свойства доступа: source-document, role;

• общие звуковые свойства: azimuth, cue-after, cue- before, elevation, pause-after, pause-before, pitch, pitch-range, play-during, richness, speak, speak-header, speak-numeral, speak- punctuation, speech-rate, stress, voice-family, volume;

• общие свойства границ, заполнения и заднего фона: background-attachment, background-color, background-image, background-repeat, background-position-horizontal, background-position-vertical, border- before-color, border-before-style, border-before-width, border- after-color, border-after-style, border-after-width, border-start- color, border-start-style, border-start-width, border-end- color, border-end-style, border-end-width, border-top- color, border-top-style, border-top-width, border-bottom- color, border-bottom-style, border-bottom-width, border-left- color, border-left-style, border-left-width, border-right- color, border-right-style, border-right-width, padding- before, padding-after, padding-start, padding-end, padding-top, padding-bottom, padding-left, padding- right;

• block-progression-dimension;

• break-after;

• break-before;

• id;

• height;

• keep-together;

• keep-with-next;

• keep-with-previous;

• relative-position.

Я добавил строки в таблицу в tables.fo при помощи элементов <fo:table- row> следующим образом:

<fo:table>

 <fo:table-column column-width='30mm'/>

 <fo:table-column column-width='30mm'/>

 <fo:table-column column-width='30mm'/>

 <fo:table-column column-width='30mm'/>

 <fo:table-column column-width='30mm'/>

 <fo:table-column column-width='30mm'/>

 <fo:table-body>

  <fo:table-row>

   .

   .

   .

  </fo:table-row>

  <fo:table-row>

   .

   .

   .

  </fo:table-row>

 </fo:table-body>

</fo:table>

Создав нужные строки, мы теперь готовы к включению в ячейки таблицы самих данных.

Создание ячеек таблицы: <fo:table-cell>

Снова, почти как при создании таблицы в HTML, вы помещаете данные в отдельные ячейки таблицы при помощи элемента <fo:table-cell>. Заметьте: чтобы задать шрифт и другие характеристики этого содержимого, внутри каждого элемента <fo:table-cell> можно заключить элемент <fo:block>. При желании вы можете связать ячейку таблицы с определенным столбцом при помощи свойства column-number или даже растянуть ячейку на несколько строк и столбцов, как в таблицах HTML.

С элементом <fo:table-cell> можно применять следующие свойства:

• общие свойства доступа: source-document, role;

• общие звуковые свойства: azimuth, cue-after, cue- before, elevation, pause-after, pause-before, pitch, pitch-range, play-during, richness, speak, speak-header, speak-numeral, speak- punctuation, speech-rate, stress, voice-family, volume;

• общие свойства границ, заполнения и заднего фона: background-attachment, background-color, background-image, background-repeat, background-position-horizontal, background-position-vertical, border- before-color, border-before-style, border-before-width, border- after-color, border-after-style, border-after-width, border-start-

Вы читаете XSLT
Добавить отзыв
ВСЕ ОТЗЫВЫ О КНИГЕ В ИЗБРАННОЕ

0

Вы можете отметить интересные вам фрагменты текста, которые будут доступны по уникальной ссылке в адресной строке браузера.

Отметить Добавить цитату