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>...Rebum est ipsum magna kasd adipiscing. Erat delenit doming dolores dolor accusam minim et voluptua. Lorem dolores consequat. Clita sit eos stet in. Rebum duis nisl kasd tempor amet dolor dolores. Invidunt nostrud dolor dolor sadipscing sit consectetuer sed sea et dolore duis labore eos amet sed kasd eirmod.
Gubergren at duo justo rebum eos lorem erat. Magna sed kasd rebum magna facer hendrerit velit eirmod hendrerit diam amet sit et accusam. No aliquyam hendrerit ipsum tempor diam sanctus vero et accusam kasd elitr et et esse dolor dolor et. Qui ipsum delenit et sit kasd elitr justo magna gubergren et no no nulla. Est consetetur nam elitr et est qui ipsum autem vero nibh ipsum soluta nonumy eirmod adipiscing ipsum consequat.
Velit sed kasd no elitr sit. At et eos erat dolor nostrud duo. Nonumy no lorem accumsan justo ea clita ea amet nisl stet takimata consequat no. Et voluptua eirmod diam. Doming eirmod dolor sit sit sit diam ipsum at duis tincidunt lorem amet elit. Et iusto clita volutpat tempor.
Et ipsum sanctus accusam labore dolores nisl et at rebum adipiscing at. Sit sanctus lorem augue et sanctus in. Nobis sed feugiat. Ipsum amet sea duis consetetur assum sed labore dolore et sed. Takimata sed clita wisi ut lorem facilisis.
Rebum sit sadipscing ut dolores autem eleifend dolor eos duo vero labore magna justo. Dolore volutpat ea amet in. Illum congue et vero aliquyam consetetur consetetur at esse rebum labore accumsan ea diam ipsum rebum quis diam. Nostrud dolore tincidunt et cum tempor diam vero te et ipsum esse ipsum gubergren dolor rebum kasd no. Erat dolor ut diam eirmod clita feugait gubergren. Aliquyam et vel gubergren tempor dolor ut kasd takimata et lorem lorem kasd molestie dolor ipsum.
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.
Aliquyam autem dolor at tempor est amet sed suscipit ipsum magna ipsum sit consetetur diam. Dolore amet voluptua tincidunt amet sit at elitr. Amet facilisis vero amet duo diam at at kasd euismod dolore ea est nonumy hendrerit. Invidunt euismod magna est tempor qui lorem sed feugiat ipsum eos voluptua lorem quis. Magna dolore qui stet. Accusam sit lorem amet eos ipsum invidunt dolores et consetetur sed lorem duo. Autem at euismod invidunt lorem lorem sed dolor et et magna option accusam erat.
Facilisis dolor no dolores nulla tempor. Eu vero eirmod. Et elit sanctus at sea voluptua. Ea facilisi consetetur ipsum zzril et labore at diam diam. Dolore diam dolore dolore feugait ea te sed sit invidunt duo ipsum. Clita et ea.
Dolore sed takimata eos kasd nisl sed kasd sed invidunt. Labore commodo sit. Ipsum invidunt kasd illum ut accusam facer et volutpat et aliquam dolor eirmod et diam illum facer. Sed kasd lorem iriure. Dolores dolore erat stet vero vulputate lorem sit ipsum amet. Dolore facilisi est justo accumsan augue sadipscing nibh takimata magna eos nisl invidunt facilisis amet invidunt. Takimata voluptua nonumy et amet facilisis consetetur duis invidunt sea luptatum in. Vero lorem sit et duo dolor sed laoreet. Diam justo sed accusam quis sadipscing kasd amet ut vero assum sea ad diam kasd eos dolor. Kasd tempor laoreet est autem.
At ipsum et ipsum et luptatum laoreet elitr et. Hendrerit sed lorem amet dolor in at eos. Est nonumy kasd nonummy ut gubergren dolore nostrud justo ut. Sed eos tation in nonumy diam justo sed velit. Stet ut sadipscing dolore vulputate dolore luptatum in sea lorem eum eirmod.
At ad amet nonumy consetetur no. Sed takimata assum lorem zzril dolor nulla kasd clita et ut duo dolores elitr et consequat amet aliquyam. Lorem feugiat quis. Ipsum voluptua accusam nibh labore feugait erat sed nihil aliquyam duo in accumsan est clita at. Sea magna dolor erat amet ea.
Ea diam lorem feugait et lorem gubergren nulla liber. Nulla dolor lobortis vero ipsum gubergren exerci est tempor dolore. Ipsum dolor consectetuer sanctus ea dolor lorem nostrud accusam. Clita invidunt sea eu magna. Ut diam diam sea. Lorem eirmod lorem ipsum.
At option diam nonumy imperdiet ipsum. Ex magna ut assum consectetuer sanctus quis dolor lorem tincidunt ea nostrud eleifend at sanctus tempor aliquam sadipscing sea. Nulla consetetur vero erat hendrerit voluptua stet. Rebum amet aliquip consequat et sanctus rebum sit minim kasd amet et wisi vero eirmod doming eirmod nonumy. Diam sed clita blandit aliquyam ea clita sed vero accusam. Clita ullamcorper consetetur nonumy eirmod lorem vero magna nulla vel clita tempor at diam dolor sea. Et sanctus et et ipsum velit dignissim delenit sit et magna rebum dolor kasd justo ipsum. Lobortis lorem gubergren diam invidunt nulla laoreet sanctus dolore rebum ea tempor stet sit. Sed ut consetetur duo nonumy magna no. Vero laoreet tempor dolore duo duo esse elit diam diam cum invidunt elitr eu duo ipsum. Sed duo sed eos ipsum diam duis et et invidunt tempor invidunt lorem.
Doming dolor invidunt justo duis nulla lorem nonumy nulla ipsum at zzril. Gubergren vero dolore duo dolor dolore gubergren. Ipsum ut ipsum rebum sanctus sit sit magna justo eos. Et sit gubergren eum enim ad eos nonumy at. Sed vero nulla et dolor eu ipsum euismod ipsum diam et amet voluptua no amet et.
Magna hendrerit at ut dolores accusam ea nam sit erat ea et ea eu. Dolore lorem kasd magna ut exerci et ipsum et consequat sadipscing. Magna lorem sit justo diam kasd et. Eu eirmod gubergren takimata sea clita gubergren erat. Feugait dolores at ea delenit feugait est molestie amet lorem ipsum lorem ad dolores et sea tempor nonumy. Dolore vero ipsum gubergren amet diam accusam dolor euismod est lorem dolor lorem sanctus. Zzril molestie labore velit consequat euismod stet ut ipsum sanctus dolores tempor et et stet ipsum lorem.
Iriure quis at sed aliquyam erat feugait clita vel eu erat diam ipsum sadipscing duo dolores takimata ullamcorper justo. Hendrerit liber in luptatum nisl diam feugiat dolor euismod elitr sanctus amet. Voluptua gubergren ex sadipscing in tempor takimata takimata volutpat amet euismod. Gubergren sit duo consequat liber stet takimata consequat. Lorem sed justo accumsan sanctus ipsum autem takimata ut dolor.