Книга: XSLT

Создание встроенных областей:

Создание встроенных областей: <fo:inline>

Как вы уже видели в главе 11, при помощи элемента <fo:inline> вы можете форматировать части текста, задавая для них задний фон, подчеркивая текст или заключая текст в границы. Элемент позволяет форматировать встроенную область из нескольких слов в блоке текста как если бы они сами представляли собой блок.

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

• общие свойства доступа: 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;

• общие свойства шрифтов: font-family, font-size, font-stretch, font-size-adjust, font-style, font-variant, font-weight;

• общие свойства встроенных полей: space-end, space-start;

alignment-adjust;

baseline-identifier;

baseline-shift;

color;

dominant-baseline;

id;

keep-together;

keep-with-next;

keep-with-previous;

line-height;

line-height-shift-adjustment;

relative-position;

text-decoration;

visibility;

z-index.

Например, мы уже видели, как подчеркнуть отдельное слово внутри остального текста при помощи свойства text-decoration:

<xsl:template match="PLANET/MASS">
 <fo:block font-size="24pt" line-height="32pt"
  font-familу="Times">
  <fo:inline text-decoration="underline">
   Mass
  </fo:inline>:
  <xsl:apply-templates/>
  [Earth = 1]
 </fo:block>
</xsl:template>

Мы еще встретим элемент <fo:inline>, когда будем рассматривать сноски позже в этой главе.

Оглавление книги


Генерация: 1.152. Запросов К БД/Cache: 3 / 1
поделиться
Вверх Вниз