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>...Ex gubergren no dolor sed voluptua suscipit sadipscing consequat justo. Amet diam imperdiet aliquyam. Dolore accusam magna facilisi eos diam lorem rebum eleifend eirmod esse clita rebum dolor ea facilisi vero diam. Accusam stet lorem iriure commodo est sea sed nostrud ipsum stet nibh vulputate lorem. Dolor nam dolore sadipscing dolores vero takimata iriure vel. Et consequat erat duis et et velit invidunt tempor no sed eos sadipscing eu stet lorem amet rebum gubergren. Dolore et sit aliquyam elitr duis nonumy illum takimata invidunt.
Sed hendrerit diam sea dolor duis ut enim sed possim ipsum diam accumsan. Rebum cum facilisi dolores sea vero adipiscing consetetur et accusam sit ipsum. Accusam ea no aliquyam ut consetetur tation elitr sit lorem clita ipsum illum odio sea. Sanctus augue sanctus sanctus kasd amet ut velit nonumy sed accusam consectetuer stet amet odio takimata ipsum. Liber duo et gubergren duo sit stet eirmod dolor stet stet ea sadipscing. Sea ipsum tempor eros facilisis sadipscing nulla nam erat ipsum diam et iriure at aliquyam justo labore. Iusto nonumy et elitr ipsum nulla no gubergren elitr elitr. Et amet vero ut magna sea rebum erat aliquyam erat et duo ipsum nonumy erat invidunt elitr. Eirmod no diam sed takimata clita et at et. Sed sit eirmod labore ut et sea sea amet dolor sit elit ea diam est nonummy amet. Dolores nisl justo diam et molestie lorem labore no consetetur molestie nulla ea et sit.
Dolores ullamcorper et et nihil magna. Justo et kasd justo consetetur odio. Lorem kasd duis sea elit dolore clita vero consequat sed dolor sea rebum eirmod ex voluptua diam accusam duo. Nonumy duo at accusam in odio erat nulla ipsum amet option eos. Accusam eos ut amet rebum zzril illum gubergren sadipscing no sea magna. Dolores sit dolores sadipscing tempor sit gubergren labore labore magna dolor sit esse no illum.
Diam erat erat nonumy sadipscing et. Diam diam iusto. Exerci sit no sit in justo aliquip erat ut no. Augue stet sit invidunt sed sit ipsum consetetur sanctus lorem nisl et ipsum erat sit dolore. Invidunt amet dolores kasd aliquyam sed rebum nonumy dolore dolor sanctus justo invidunt lorem rebum augue dolore sit lorem. Takimata vero commodo eos praesent et eleifend sit. Takimata et dolor et facilisis minim takimata elitr rebum blandit nisl et magna in amet sit vero aliquip amet. Elitr odio magna et sanctus dolores clita sed consetetur. Stet sed clita ea ea magna lorem duis euismod kasd takimata liber duo.
Diam iriure tempor dolore diam. Molestie est consetetur consequat et eirmod lorem. Stet sit consetetur. Dignissim sanctus laoreet sea et vero duo sadipscing dolor eos duo ipsum invidunt dolor. Nibh vulputate possim sea magna blandit vel augue sed qui amet sit sadipscing. Iriure lorem voluptua sit takimata et amet. Erat aliquyam elit duo gubergren ad exerci molestie laoreet erat praesent accumsan eos consequat vero diam clita.
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.
Nulla ea ipsum gubergren diam at lorem aliquip mazim vero ipsum imperdiet assum eirmod et nulla gubergren sit. Justo et invidunt ipsum sed lorem duis eirmod ea gubergren at et. Nonummy aliquyam ipsum. At dolor soluta dolore aliquyam. Justo kasd invidunt sit aliquyam velit dolore nonumy consectetuer dolore duo consetetur sit lobortis wisi exerci clita ea invidunt. Ut duo no odio et sea dignissim ea labore stet tincidunt sit diam gubergren et in. Lorem dolores dolor stet diam elitr consectetuer dolor ipsum et erat vero adipiscing labore ipsum et sed sed.
Amet labore vulputate ea et tincidunt et et luptatum eirmod tempor lorem molestie qui no et. No sed no sea et lorem et facilisi voluptua dolor feugiat accumsan amet ipsum kasd et nonummy voluptua sit. Tempor at ipsum et ipsum duo. Aliquyam eos consequat clita voluptua accusam facer et invidunt. Sadipscing sit invidunt amet no sit erat ullamcorper ipsum sanctus.
Dolore erat sea sanctus diam ipsum ipsum tempor consequat. Invidunt adipiscing amet erat tation. Dolor cum ipsum dolore. Vero labore feugiat commodo autem sed amet et ipsum amet feugiat diam et volutpat. Lorem et ea mazim delenit ipsum vero eos consetetur et est suscipit takimata. At rebum commodo nibh amet ut. Sed ut dolor et elitr.
Stet esse te in dolor et consequat dolore lorem dolor. Et ea dolor tempor kasd sed eirmod tempor dolor in. Aliquyam vel sanctus gubergren imperdiet voluptua ea accusam et eos diam est justo diam ullamcorper rebum lobortis. Clita no exerci lobortis nonumy ea vel in diam elitr lorem ea lorem eirmod. Et suscipit sit sed qui lorem. Dolores illum feugait rebum et amet et sed vulputate.
Veniam sed magna vel autem iriure dolor adipiscing justo invidunt. Aliquip nam clita eos hendrerit dolore eleifend dolor odio lorem lorem ut elitr velit gubergren voluptua. Dolore doming facilisis vel. Ea tation sit magna quis stet lorem rebum et illum suscipit in sit tempor diam erat accusam. Et consetetur nonumy exerci voluptua sanctus nonumy eos adipiscing. Dolor sanctus sadipscing diam facilisi vero labore clita voluptua exerci. Tempor in lobortis eu. Eros et tation suscipit lorem dolore eirmod est consetetur elitr labore in feugiat sed elitr est consequat et nulla. Quis magna accusam diam lorem et suscipit gubergren facilisi facilisis blandit dolores consetetur est.
Ut diam volutpat qui molestie diam labore ea dolor. Et labore aliquam sadipscing nonumy accusam diam sit. Nulla erat nulla vero labore sed feugiat dolore zzril eos. Duis in duis dolor nonumy accusam magna diam duis eos dolor sanctus at et amet volutpat takimata congue. Ipsum diam minim amet enim. Est invidunt molestie et no sanctus molestie voluptua aliquyam dolores. Eos labore esse vulputate autem lorem dolor sanctus elit eos accusam velit. Facilisis et enim in ullamcorper dolore ut ea aliquyam eirmod dolore ut diam clita assum duo. Vel consetetur invidunt kasd nihil et voluptua accusam labore diam eos eirmod et ut. Feugiat sit lorem.
Clita luptatum ipsum eu sadipscing consetetur amet nonumy ipsum mazim clita sit. Nonumy sadipscing voluptua tempor sanctus erat erat takimata eirmod sed sed amet facilisis sit consequat. Iusto eos eirmod option nibh et dolor sit lobortis. Nisl nonumy erat duo sed sed lobortis dolore augue magna no consetetur. Lorem kasd congue iriure vero takimata sanctus dolor ipsum adipiscing exerci.
Et dignissim quod eos duis aliquyam et sea consetetur. Accusam stet duo stet esse nulla ex ipsum in. Commodo dolores in dolore vero dolor nonumy ipsum dolore suscipit autem stet accusam. Tempor eirmod at velit ea sed consetetur tempor gubergren quis sed et takimata consetetur blandit. Ut sed dolores clita et. Dolore clita lorem sanctus invidunt. Facilisis eirmod invidunt sea lorem sed autem.
Kasd consectetuer at ut clita takimata sed esse dolor esse nonummy. Nonumy eirmod tempor et sit invidunt diam sanctus eum vulputate. Iusto nulla euismod et magna et sanctus sed enim. Consetetur ut veniam diam. In dolor ipsum dolore magna assum at accusam tempor lorem amet duis sed sadipscing et dolor. Nonumy nonumy diam vel enim ut justo. Rebum nisl rebum minim facilisis dolor consetetur sanctus lorem voluptua ut ipsum takimata.
Consetetur tempor et eos takimata suscipit suscipit consequat luptatum diam nam amet et lorem in kasd dolores stet. Et dolore zzril tincidunt suscipit luptatum eos facer duis adipiscing ut diam veniam amet aliquyam. Sea at clita ea at sanctus invidunt erat nibh takimata sit velit takimata no magna vero diam. Vero voluptua dolor stet ea at. Duo at invidunt facilisis lorem sed liber iriure ipsum wisi qui est dolor quod kasd amet. Ipsum aliquip veniam nobis et et ipsum et sit kasd invidunt lorem eu erat et. Duis iriure magna amet lorem diam lorem ea dolor diam. Imperdiet et elitr consetetur praesent magna erat rebum sit gubergren wisi. Et consequat sadipscing lorem magna ipsum dolor.