We implemented the spacialized attribute fostyle to carry this information.
Because the browser just ignores this, you must be careful to structure it correctly for processing.
The proper structure is name: value; noting that the ":" after name is followed
by a space and the ";" between items is also followed by a space.
In some instances you may wish to pass through XSL FO attributes that are not
supported in HTML. This is an example, while the text in the HTML has a brown color
applied, we have applied a CMYK color for the PDF generation through the use of the
fostyle attribute. All fostyle attributes are applied
after HTML css and also after direct attributes and override those in the HTML. This
paragraph also has text-align justify in the HTML and font-stretch,
font-size-adjust and hyphenate in the PDF output. The fostyle attribute
is attached right in the HTML, just like style and uses the same
structure internally as style.
The code for the paragraph above looks like this:
<p style="color: brown; text-align:justify;"
fostyle="text-align-last: left;
font-stretch: wider;
font-size-adjust: 0.6;
hyphenate: true;
color: rgb-icc (255, 255, 0, #CMYK, .1, .2, .7, .5);">In some instances ...
Another common use for passing through custom elements is for properties that have specific meaning in a pagination situation like "keeps". There are several forms of keeps that can help you organize content so it is glued together as you like it.
The following are the most commonly used keeps:
keep-together.within-page: set to "always" and used to keep a block
of content always together in a single pagekeep-with-next.within-page: set to "always" and used to keep a
block of content glued to the next one always together in a single pagekeep-with-previous.within-page: set to "always" and used to keep a
block of content glued to the previous one always together in a single pagekeep-together.within-line: set to "always" and used to keep a span
of content glued always together in a single lineThe following shows some demonstrations of these capabilities.
This paragraph, the instructions and the following three para's of LoremIpsum
text are surrounded by a <div> with
keep-together.within-page as always, like
this:
<div fostyle="keep-together.within-page: always;">
<p>This paragraph, the instructions and the following five para's of LoremIpsum text are surrounded
by a <div> with "keep-together.within-page" as "always", like this:</p>...Est praesent mazim eos ea ut invidunt sed et at ea rebum consetetur sadipscing sea mazim sit consectetuer lorem. At consequat ad est justo dolor est tempor. Dolor et lobortis dolore ut autem et justo clita vero eu duo. Vero amet dolores est magna dolore dolor ea possim et commodo magna sadipscing. Amet eirmod eirmod ut commodo tempor ea blandit diam et amet elitr. Dolore vero magna clita invidunt eum dolore. Sanctus stet rebum et ipsum dolores lorem erat vel sanctus invidunt. Clita dolore ea sea. Aliquyam no amet tincidunt duo. Vero nonumy sit ipsum sed ea nonumy stet eirmod kasd. Augue dolores diam.
Dignissim et stet nulla invidunt ea sit praesent sadipscing feugait feugiat facer est aliquyam. Eirmod eirmod zzril nulla feugiat dolor et sea et dolor sadipscing ipsum aliquyam tempor clita sed blandit. Exerci euismod amet tempor. Kasd gubergren esse dolor voluptua ex ut velit ut nulla erat invidunt voluptua ut consequat dolor. Lorem takimata est sit.
Accusam aliquyam dolore voluptua rebum dolore. Aliquam magna vel et dolores et no. Takimata nulla erat duis invidunt velit sit ut ut erat ipsum accumsan hendrerit sed sadipscing dolore voluptua ut. Ea dolores amet et et diam ipsum vero dolor ut. Duo sit iriure aliquyam nulla augue mazim et sit sit justo sit sit augue gubergren gubergren dolor erat eirmod. Vero consectetuer suscipit elitr eirmod clita ipsum voluptua eos diam et diam lorem. Stet ut dolore kasd. No nonumy elitr vulputate stet sed accusam ipsum kasd kasd. Sit sed no stet aliquip lorem in sit tincidunt dolore gubergren dolores erat elitr delenit consequat sit.
Sed sed sed amet nulla consectetuer magna takimata erat nonummy amet rebum sadipscing et sadipscing diam. Feugiat tempor diam sea elitr rebum dolor gubergren lorem. Feugiat ipsum zzril et tation quis gubergren ut tempor est diam. Amet ut vel amet accumsan kasd justo dolores sit tempor et kasd et gubergren ea et dolores. Eos sed justo sed amet no ad vel dolore ea et aliquyam takimata dolor ullamcorper tempor et dolore et. Diam sed sed tempor diam doming duis velit kasd commodo autem nisl ipsum. Et tempor clita takimata tation ipsum et lorem erat erat labore eirmod aliquyam ut justo sed. Et amet diam vero dolore amet ut sit diam dolore eos dolore eos aliquip congue duis. Ut esse ea elit eum. Takimata at eirmod dolor ipsum dolor delenit te accusam dolore clita.
Imperdiet lorem sit eirmod voluptua sea et diam dolor duis duis. Lorem in stet dolor diam. Tincidunt nulla velit commodo ipsum nostrud eros aliquip ipsum in accusam sit. At nonumy diam et lorem sit lorem in eos. Tempor diam amet et vero ipsum tempor ut no tation erat vel no et amet amet. Aliquyam vel no ullamcorper qui nulla ipsum accusam at ea vero. Dolor vel consetetur lobortis et amet vero esse diam lorem.
Thus all of this content from the header through this paragraph is together on a single page.
A common practice in print documents is keeping together headings and some of the following lines of a paragraph so no heading is orphaned at bottom of a page and at least a few lines of text from any paragraph stay together.
What follows this are a series of headings and LoremIpsum paragraphs. The headings all have "keep-with-next.within-page" as "always" which will at least glue them to the paragraph. The paragraphs all have widows of "3" and orphans of "3" which will attempt to glue together at least three lines of paragraph at the bottom and top of any page. The LoremIpsum paragraphs are randomly generated on refresh of the page so you can test various layouts just by refresing and printing again.
Elitr eum aliquyam et no aliquyam duo accusam. Sadipscing sit sadipscing dolor sit ipsum illum sit cum dolores commodo elit takimata sea eros tincidunt. Dolor lorem hendrerit duis dolores magna sed ex erat et dolor et kasd eum dolor. Takimata elitr amet sit lobortis lorem stet lorem quis suscipit dolore. Takimata labore possim in eros. Lorem amet duis hendrerit amet in ipsum erat et. Suscipit aliquyam elitr et aliquyam diam qui amet ad tincidunt. Gubergren sadipscing duis ipsum clita et sed vel dolores.
Takimata eleifend gubergren ipsum takimata delenit. Iusto dolor feugiat et labore. Magna stet gubergren elit erat dolore ipsum accusam dolor ipsum in dolor ea facer vel at. Eleifend zzril clita duis et. Nonummy diam lorem et ipsum. Nibh lorem voluptua te option accusam amet est at et consectetuer duis tempor eos congue luptatum blandit sed. Et dolor tempor sed justo et tation gubergren voluptua commodo consetetur vel at amet vero id lorem. Nulla dolores blandit eu dignissim sit eu rebum. Accumsan lorem sea erat blandit clita dolore molestie dolor diam lorem sea.
Clita duis voluptua ut sea et kasd consetetur eum te labore voluptua dolore nulla sit doming justo dolor. Nam autem gubergren consetetur erat quis et duo lorem erat est blandit vero et sadipscing nisl et erat. Elitr sed eos commodo stet. Sit sed erat eirmod dolor accusam magna vero lorem dolores. Dolor blandit takimata at elitr est clita rebum iriure voluptua sadipscing takimata et dolor. Sit ipsum esse rebum labore ea eos. Iusto wisi eu erat magna nulla ea autem accusam ipsum ea justo.
Sed dolores invidunt veniam labore erat at erat labore diam ut accusam accusam. Justo in dolore no aliquyam takimata lorem sed eum voluptua luptatum. Diam duis nonumy. Ex labore erat erat. Nam sed in ut consetetur invidunt amet elit diam nibh voluptua takimata labore voluptua no et sanctus velit sanctus. Amet lorem gubergren kasd dolor nonumy voluptua consequat magna velit dolor eos sed tation stet stet gubergren sea. Accusam ipsum nibh placerat ea accumsan option lorem ut no labore quod sed justo kasd consetetur dolor duo sit. Sanctus gubergren velit ea molestie vero diam et dolor dolor sit at lorem dolor takimata duis sadipscing.
Accusam wisi gubergren labore ut dolor aliquyam. Lorem erat ipsum iriure amet enim molestie magna. Dolores eos sea molestie labore et sit voluptua nonummy vero amet magna clita stet dolor invidunt diam ullamcorper lobortis. Et clita liber lorem invidunt consectetuer ipsum. Amet sanctus rebum sed suscipit sit magna justo est sed et eos eirmod.
Lorem justo duo. Dolores sit sanctus est est. Elitr diam est. Tempor sit velit magna sed exerci accusam sea ea et et dolore consequat erat. In no aliquam gubergren ea rebum esse duo lorem tempor invidunt ea sit sadipscing option sit sanctus voluptua. Duo diam amet dolor ut iusto voluptua rebum ipsum ipsum at labore facilisis tempor sanctus rebum velit et stet. Et et et. Sadipscing nihil consetetur ipsum justo duo elit gubergren nonumy blandit option no feugiat sea sit et diam justo adipiscing. Nulla dolor tincidunt nonummy amet. Gubergren diam dolore invidunt facilisis luptatum sanctus clita ut at eu et sit esse diam ea veniam. Voluptua sit ex adipiscing voluptua sea amet ipsum nonumy duo diam elitr vero illum nulla eos eos est duo.
Et ipsum magna. Et eros duo vero sadipscing imperdiet. Ullamcorper minim est ipsum nostrud ipsum praesent. Tempor eros in nonumy sea et sit consetetur ad laoreet lorem lorem. Sit et justo consetetur aliquyam delenit est ea. Erat amet facer odio est sed rebum erat. At et rebum magna magna diam zzril vero ut et dolore aliquam aliquam nostrud ipsum ut. Dolor magna accusam sed elit clita eirmod hendrerit eum dolor volutpat et clita sed ea esse tempor invidunt. Luptatum kasd suscipit amet ad tempor dolor. Amet consetetur eu sit sadipscing ipsum sit nonumy.
Consectetuer sed quis voluptua tation. Voluptua et facer justo augue sit eirmod. Eos sit ipsum diam dolore dolore laoreet eu et sed eos autem duo zzril vero aliquip. Dolor dolores vero dolor rebum. Velit vulputate nonumy facilisi erat diam at et dolore sanctus invidunt sed vero et duo sed. Dolores ipsum diam labore laoreet et nobis kasd elitr ut eos. Dolores facilisis vel gubergren ut delenit et elitr at erat vel sit diam. Dolor et amet amet accusam sit clita illum gubergren laoreet vero ut invidunt vero. Sit hendrerit kasd qui duis magna clita ipsum ipsum accusam molestie sit ipsum et.
Duis sit magna autem vel no sed consequat et et adipiscing justo takimata tempor. Clita feugiat tempor sanctus diam invidunt eros et quis nonummy rebum. Erat labore est vel elitr velit et sed diam et erat odio tempor nihil dolor congue sed. Elitr sit duo eos sed enim dolor ea magna ipsum sit accusam ipsum duo et sea clita. Dolores dolore diam congue est facilisi nulla at dolor. Vero kasd suscipit stet et.
Dolores amet tincidunt mazim suscipit ipsum sed et duo euismod. Sit clita et erat vel. Diam takimata esse stet feugait vero amet justo. Amet nulla assum nibh aliquam velit amet. Est sea sanctus takimata sadipscing erat lorem diam tempor rebum feugait nonumy. Option doming et voluptua ex ullamcorper vulputate. Et elitr diam et sit sea qui justo takimata sanctus erat sanctus vero rebum accusam erat et in. Dolore iusto eos delenit est erat tempor ea rebum sed qui eos ea dolor erat. Amet sed aliquip et kasd stet nisl magna.