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