image Strona Główna       image SKFAB00GBB       image ceelt smp       image Artykul1       image ArmyBeasts       image 2006 nov p3       

Odnośniki

[ Pobierz całość w formacie PDF ]

removed from, the space between letters.
3236-7 ch15.F.qc 6/29/99 1:09 PM Page 557
Chapter 15 &' XSL Formatting Objects
557
Word Spacing Properties
The word-spacingproperty adjusts the amount of space between words.
Otherwise, it behaves much like the letter spacing properties. The value is a signed
length giving the amount of extra space to add between two words. For example:
This is pretty loose text.
Line Spacing Properties
An XSL formatting engine divides block areas into line areas. You cannot create line
areas directly from XSL. However, with these five properties you can affect how
they re vertically spaced:
&' line-height: the minimum height of a line
&' line-height-shift-adjustment: consider-shiftsif subscripts and
superscripts should expand the height of a line, disregard-shiftsif they
shouldn t
&' line-stacking-strategy: line-height(the CSS model and the default);
font-height(make the line as tall as the font height after addition of font-
height-override-beforeand font-height-override-after); or
max-height(distance between the maximum ascender height and maximum
descender depth)
&' font-height-override-after: a signed length specifying additional vertical
space added after each line; can also be the keyword use-font-metrics(the
default) to indicate that this depends on the font
&' font-height-override-before: a signed length specifying the minimum
additional vertical space added before each line; can also be the keyword
use-font-metrics(the default) to indicate that this depends on the font
The line height also depends to a large extent on the size of the font in which the
line is drawn. Larger font sizes will naturally have taller lines. For example, the
following opening paragraph from Mary Wollstonecraft s Of the Rights of Woman is
effectively double-spaced:
In the present state of society it appears necessary to go
back to first principles in search of the most simple truths,
and to dispute with some prevailing prejudice every inch of
ground. To clear my way, I must be allowed to ask some plain
questions, and the answers will probably appear as
unequivocal as the axioms on which reasoning is built;
though, when entangled with various motives of action, they
are formally contradicted, either by the words or conduct
of men.
3236-7 ch15.F.qc 6/29/99 1:09 PM Page 558
Part III &' Style Languages
558
Text Alignment Properties
The text-alignand text-align-lastproperties specify how the inline content
is horizontally aligned within its box. The six possible values are:
1. start: left aligned in right-to-left scripts
2. centered: centered
3. end: right aligned in right-to-left scripts
4. justify: expanded with extra space as necessary to fill out the line
5. page-inside: align with the inside edge of the page, that is, the right edge on
the left page of two facing pages or the left edge on the right page of two
facing pages
6. page-outside: align with the outside edge of the page, that is, the left edge
on the left page of two facing pages or the right edge on the right page of two
facing pages
The text-align-lastproperty enables you to specify a different value for the last
line in a block. This is especially important for justified text, where the last line
often doesn t have enough words to be attractively justified. The possible values
are start, end, justified, and relative. The relativevalue uses the same
value as the text-alignproperty unless text-alignis justified, in which case
the last line will align with the start edge instead.
Whitespace Property
The whitespace-treatmentproperty specifies what the formatting engine should
do with whitespace that s still present after the original source document is
transformed into formatting objects. There are three possible values:
1. preserve: leave the whitespace as it is
2. collapse: collapse all whitespace to a single space
3. ignore: throw away leading and trailing whitespace
My preference is to preserve all whitespace that s still left after transformation. If
it s insignificant, it s easy for the transformation process to throw it away using
xsl:strip-space.
The wrap-option Property
Thewrap-optionproperty determines how text that s too long to fit on a line is
handled. This property has two possible keyword values:
1. wrap: soft wrap the text to the next line
2. no-wrap: do not wrap the text
3236-7 ch15.F.qc 6/29/99 1:09 PM Page 559
Chapter 15 &' XSL Formatting Objects
559
Area Properties
Area properties are applied to boxes. These may be either block-level or inline
boxes. Each of these boxes has:
&' a background
&' margins
&' borders
&' padding
&' a size
Background Properties
The background properties are basically identical to the CSS1 background
properties. There are five:
&' Thebackground-colorproperty specifies the color of the box s background.
Its value is either a color or the keyword transparent.
&' The background-imageproperty gives the URI of an image to be used as a
background. The value can be the keyword none.
&' The background-attachmentproperty specifies whether the background
image is attached to the window or the document. Its value is one of the two
keywords fixedor scroll.
&' The background-positionproperty specifies how a background image is
placed in the box. Possible values include center, left, right, bottom,
middle, top, or a coordinate.
&' Thebackground-repeatproperty specifies how and whether a background
image is tiled if it is smaller than its box. Possible values include repeat, no-
repeat, repeat-x, and repeat-y.
The following block shows the use of the background-image, background-
position, background-repeat, and background-colorproperties:
background-position= 0,0
background-repeat= repeat
background-color= white >
Two strings walk into a bar...
3236-7 ch15.F.qc 6/29/99 1:09 PM Page 560
Part III &' Style Languages
560
Border Properties
The border properties describe the appearance of a border around the box. They
are mostly the same as the CSS border properties. However, as well as border-
XXX-bottom, border-XXX-top, border-XXX-left, and border-XXX-right
properties, the XSL versions also have border-XXX-before, border-XXX-after,
border-XXX-start, and border-XXX-endversions. There are 31 border
properties in all. These are:
&' color: border-color, border-before-color, border-after-color,
border-start-color, border-end-color, border-top-color, border-
bottom-color, border-left-color, border-right-color. The default
border color is black.
&' width: border-width, border-before-width, border-after-width,
border-start-width, border-end-width, border-top-width, border-
bottom-width, border-left-width, border-right-width.
&' style: border-style, border-before-style, border-after-style,
border-start-style, border-end-style, border-top-style, border- [ Pobierz całość w formacie PDF ]

  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • blacksoulman.xlx.pl