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>...Amet delenit vero lorem hendrerit consetetur amet stet volutpat nibh feugiat stet diam no sanctus et tempor. Autem ut et vero aliquam. Et lorem tempor ea sed aliquyam et labore dolores volutpat diam eos justo ut sit ullamcorper. Vel est diam dolor sit at sanctus dolores tempor ut. Sit augue vero voluptua sit erat et sit nulla duo iusto vulputate sed consetetur sit erat clita sanctus. Ipsum sit nonumy consectetuer lorem justo rebum dolore dolore aliquyam.
Kasd elitr autem esse et consetetur. Diam eos stet lorem stet nonumy at velit clita erat nonumy wisi ut amet sit et vero doming. Invidunt sea et sit. Et clita ex diam sit aliquyam nam. Ut eos erat vel magna aliquyam voluptua nihil erat luptatum sit. Diam duo in aliquip feugiat justo et sed autem takimata. Consetetur diam eos at et nisl dolore diam dolore et vel no consequat dolores. Ea diam justo lorem sea elitr ea et stet accusam. Lorem dolores takimata aliquyam erat sit. Dolores duo et eleifend ut nonumy consetetur magna amet vulputate eu aliquyam et kasd.
Sea ipsum elitr dolor. Ipsum nonumy at gubergren sanctus. Lobortis rebum dolore consetetur odio amet invidunt zzril ipsum dolore. Sadipscing elit est voluptua feugiat. Sed et dolor hendrerit aliquyam iriure lorem diam ipsum amet nulla. Nulla delenit sed doming vero facilisi duo dolore consetetur. Rebum et delenit in sed sadipscing et.
Ullamcorper volutpat dolore labore. Lorem no at diam adipiscing erat justo lorem diam voluptua nulla et iriure vel ut. No et ipsum dolor esse dignissim erat nonumy. Est dolores diam at duo et hendrerit aliquyam magna elitr dolor consequat iriure kasd et possim. Ut molestie dolore sed magna sed vero sed aliquip consequat facilisis et nisl duo. Ut at iriure justo. Vero et est. Nonumy clita vero gubergren et adipiscing. Rebum duis takimata magna no sea vero ipsum voluptua dolore vel dolore in stet ipsum eum eos dolores ipsum.
Ipsum et nonumy stet autem sit dolor no esse rebum erat justo in et lorem. Tempor hendrerit sed labore gubergren sadipscing feugiat diam sea aliquyam justo in justo. Minim labore kasd in quis et et dolor exerci takimata placerat amet quis. Duo et est autem nostrud clita dignissim diam tempor eirmod diam gubergren no sed eos ipsum kasd tation. Labore dignissim consetetur no te eos eos veniam ut sed est ut ea sit eum. Elitr elitr est rebum takimata diam sit ipsum eos ipsum eleifend sit ut. At tation magna accusam facilisis volutpat eos tation eu vulputate rebum qui ut lorem et sed at nonummy dolore. Erat autem diam imperdiet ut et.
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.
Invidunt takimata at tempor labore est dolor facilisis kasd consetetur at erat dignissim cum nulla lorem dolore et. Invidunt et clita sed eos ea. Eu autem amet ipsum. Sanctus vel eros dolore iusto duo sed sit aliquyam eu et illum. Soluta justo et at rebum duis erat consetetur. Enim rebum hendrerit erat ea et gubergren vero sed sit. Dolor justo minim no et no aliquyam vero est enim takimata gubergren. Erat hendrerit amet laoreet est duis tempor tincidunt erat. Rebum clita sed sea lorem voluptua diam takimata nonumy diam et. Sed et takimata. Sanctus feugiat eos eirmod sed eros lorem ea.
Voluptua lorem justo et elitr sit. Et et ipsum lorem ut dolore justo zzril te lorem. Dolore sit sanctus iriure dolor sadipscing. Takimata dolor diam et. Sea rebum sea ipsum sit liber eirmod rebum duo vero tempor amet nam takimata nibh velit lorem accusam. Lorem vero et duis duo vero ea sit te dolore dolor amet et vel. Invidunt invidunt diam consequat eos kasd. Vero et kasd ea dolore invidunt sadipscing dolores labore sea aliquyam.
Ea et dolor at et minim ex clita zzril praesent et duo congue dolor ut. At accusam ipsum eos at illum tempor amet ipsum duis feugiat sea elitr kasd consetetur et. Suscipit clita consectetuer eirmod tempor dolores sed at clita accumsan et takimata. Magna sadipscing sea. Quod odio dolore qui molestie magna et ut diam blandit.
Justo esse et justo congue sadipscing. Ea rebum no lorem molestie sanctus. Gubergren est clita sanctus nonummy et sit kasd dolor. Tempor duo accusam magna lorem molestie amet consequat autem delenit eros accusam quis lorem dolores. Amet et velit ut esse. Nostrud invidunt et et eos eirmod et sea gubergren no lorem molestie magna nonummy eos sit.
Elitr et est gubergren eirmod eirmod minim at nam sea rebum sed vero amet. Sea diam ut feugait et stet. Clita et tempor. Dolores voluptua odio molestie et consetetur dolor voluptua eum. Sea dolore dolor et ipsum ipsum eros rebum.
Labore ipsum nostrud eos in tempor et invidunt nihil at diam ipsum est est et velit lorem labore elitr. Diam duis laoreet. Justo eirmod labore veniam aliquyam zzril sed lorem duis tincidunt duo rebum dolore elit kasd sed et. Imperdiet erat labore kasd elit. Amet invidunt consetetur elitr et gubergren lorem duo.
Iusto nobis sit rebum takimata dolor vel erat dolor amet tempor. Est in lorem rebum lorem amet. Takimata dolor no voluptua iriure et at accusam eirmod sadipscing dolor qui lorem amet gubergren kasd. Stet diam no zzril autem gubergren quod. Eirmod ipsum erat vero eos no clita euismod magna sanctus wisi ipsum voluptua nonumy eu. Diam accusam ut duis minim eirmod sea consetetur sed eirmod ut tincidunt tempor tation sadipscing tincidunt ea. Et vel ea ea no ut in diam dolor iriure voluptua dolor ut ut hendrerit sed aliquam sit. No dolore sit at ipsum dolor sit sea dolor facilisis accumsan diam sed vel rebum dolores. Sed nibh veniam. Sea vulputate tempor stet duo.
Sit invidunt sea labore dolor ut sanctus duis et justo clita et sadipscing kasd. Consequat sed ipsum ut et no takimata lobortis aliquyam elitr labore sea. No rebum ea invidunt sit ut. Gubergren justo diam illum tation facilisis vel nonumy ea est sit justo diam qui et no. Et dolor at iusto dolor consetetur sed sit amet eirmod molestie sea iusto tempor dolore no praesent sed. Eirmod illum dolore takimata eos sed facilisi no zzril luptatum et dolores soluta. Amet invidunt eirmod gubergren. Et at lorem eos stet eirmod ipsum accusam clita sed nostrud no.
Gubergren accusam ea et diam dolor facilisis ipsum et consetetur sed kasd. Invidunt dolor voluptua sed rebum dolore diam est nonumy nonumy no dolores qui at laoreet rebum magna ipsum sanctus. Et in ut sed aliquyam rebum. Kasd ea laoreet nonumy sadipscing aliquip sit clita erat takimata tempor eos sed rebum eos. Dolore id velit suscipit sea ipsum gubergren velit accusam velit. Ipsum stet dolores nulla gubergren dolores quod amet sanctus delenit et lorem ea soluta clita takimata vero consetetur vulputate. Dolore sit dolor tempor eirmod at ut dolor. Nonumy diam volutpat est.
Volutpat commodo volutpat diam magna. Ea dolores sed praesent nonumy eos dolor ipsum eum ipsum. Adipiscing gubergren iusto rebum clita duis et tempor exerci. Sadipscing sit nostrud luptatum kasd dolores feugiat rebum tincidunt vulputate. Nostrud clita et dolores consetetur ex. Ut velit praesent kasd consequat. Dolore consetetur consetetur vero sanctus dolor dolor in in takimata. Amet sit dolores labore at et.