OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: RE: [docbook-apps] XSL-FO and CSS stylesheets


Hi.
I would like to have styles (for example, my tables have specific background color on odd lines, headers, and so on), based on CSS class.
So, I have tried several things, keeping in mind I would like to use my already built CSS stylesheets.
-> use HTML output by DB XSL stylesheets (thus referencing my CS file)
-> use JTidy to convert to XHTML (not sure of this one, seems I get troubles with the result not being exactly xhtml)
-> use CSStoXSLFO (http://www.re.be/css2xslfo/index.xhtml) to (try) to convert the XHTML + CSS to an usable XSL-FO sheet
-> convert as PDF with FOP
So far I am stuck at step 3 because of the xhtml errors (complains about nbsp entity not being defined, after doing manual corrections, which will be difficult to automate in a real world use).
Raising my nose above my keyboard, I am wondering if that is not too much trouble comparing to designing XSL customized templates (BTW thanks for the suggestion Dick ;) )  
Thus, could you please send me a sample XSL-FO that would be equivalent to the following CSS style ? (because I have nothing related to XSL-FO so far in my brain). Then, I may be able to figure out how to proceed...

TD.Tab1 {
	border-top:solid #A50021 1.0pt;
	border-left:none;
  	border-bottom:solid #A50021 1.0pt;
  	border-right:none;
	background:#DFDFDF;
  	padding:0pt 5.4pt 0pt 5.4pt	
}

Thank you in advance,
Best regards,
Fabien



-----Message d'origine-----
De : Dick Hamilton [mailto:rlhamilton@frii.com] 
Envoyé : jeudi 1 juillet 2010 17:40
À : Fabien Tillier; docbook-apps@lists.oasis-open.org
Objet : RE: [docbook-apps] XSL-FO and CSS stylesheets

Fabien,

There are no direct analogs to CSS files in the FO stylesheets.
Customization typically uses two basic procedures (both documented in
Bob Stayton's book):

1) Set parameters when running the XSL stylesheets.  There are many
parameters that control things like fonts, page size, margins, and other
kinds of styling.

2) For things that aren't defined by a parameter, create a customization
layer to redefine existing or add new templates. 

It would be interesting to see if there were a way to parse css files
and generate fo parameters that match (or vice versa). I don't see how
you could do a 100% job, but you might get close enough to make the
result useful. But, I don't think anyone has tried to do that (or if
they have they haven't shared it with the list:).

Best Regards,
Dick Hamilton
---------------------------------
XML Press
XML for Technical Communicators
http://xmlpress.net
(970) 231-3624 


> -----Original Message-----
> From: Fabien Tillier [mailto:f.tillier@cerep.fr] 
> Sent: Thursday, July 01, 2010 9:18 AM
> To: docbook-apps@lists.oasis-open.org
> Subject: [docbook-apps] XSL-FO and CSS stylesheets
> 
> 
> Hi List.
> I was wondering how one can specify the style to be used when 
> going from
> docBook to XSLFO (then PDF). I mean, when going to HTML, you 
> can specify
> a CSS file that will style the output nicely, but how can one do that
> with xslfo ?
> The idea would be to generate the same output "look" with HTML and PDF
> (which seems to be so common something should exist...)
> 
> Thanks in advance,
> Regards,
> Fabien
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: 
> docbook-apps-help@lists.oasis-open.org
> 
> 




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]