Вход/Регистрация
XSLT
вернуться

Холзнер Стивен

Шрифт:

Встроенные объекты можно применять для форматирования частей текста блока; например, в главе 11 мы видели, как свойство

text-decoration
объекта
<fo:inline>
применялось для подчеркивания текста:

<xsl:template match="PLANET/MASS">

 <fo:block font-size="24pt" line-height="32pt"

font-family="Times">

<fo:inline text-decoration="underline">

Mass;

</fo:inline>:

<xsl:apply-templates/>

[Earth = 1]

 </fo:block>

</xsl:template>

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

•

<fo:bidi-override>
;

•

<fo:character>
;

•

<fo:initial-property-set>
;

•

<fo:external-graphic>
;

•

<fo:instream-foreign-object>
;

•

<fo:inline>
;

•

<fo:inline-container>
;

•

<fo:leader>
;

•

<fo:page-number>
;

•

<fo:page-number-citation>
.

Я опишу несколько самых распространенных встроенных элементов, начав с самого

<fo:inline>
.

Создание встроенных областей: <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>

  • Читать дальше
  • 1
  • ...
  • 249
  • 250
  • 251
  • 252
  • 253
  • 254
  • 255
  • 256
  • 257
  • 258
  • 259
  • ...

Ебукер (ebooker) – онлайн-библиотека на русском языке. Книги доступны онлайн, без утомительной регистрации. Огромный выбор и удобный дизайн, позволяющий читать без проблем. Добавляйте сайт в закладки! Все произведения загружаются пользователями: если считаете, что ваши авторские права нарушены – используйте форму обратной связи.

Полезные ссылки

  • Моя полка

Контакты

  • chitat.ebooker@gmail.com

Подпишитесь на рассылку: