I use an external XML file containing groups of elements that can be used to assign attributes to a FO element - given a unique key.
I load this into a variable in XSLT and do lookups and assign attributes using a template 'with-param's as I process the output nodes. I just need to be able to tell for each output element what key it requires. If the content drives the style then I have a simple rule for deriving the key from the content. If not then I have to hard code the key into the particular XSLT. I actually do something a bit more complicated to determine scope / inheritance of the attributes and if they reformat the context element but as a general approach it is pretty flexible and nice and modular / re-useable and can also provide CSS stylesheets so I get HTML looking same as PDF. Mike Trotman -----Original Message----- From: Matthew Lancashire [mailto:[EMAIL PROTECTED] Sent: 21 February 2003 12:30 To: Fop-User-Help (E-mail) Subject: Common formatting What is the easiest methond of defineing what font/colour/sizes an element has without re-coding the definitions in each xsl. e.g. A text field of name has font arial, colour grey and size 12 point.. It appears in 20 xml documents that are to be tranformed by fop to pdf. I do not want to have to type the fo formatting commands into 20 xsl-fo stylesheets because of the maintenance overhead. I want some standard class of some sort that I can apply to the xsl element that pics up the style from one place. hence if the cont changes to courier I only need to change it once and not in each of the 20 xsl style sheets. Matthew Lancashire IT Project Manager Initial Electronic Security Ltd Tel: +44 1282 473554 Fax: +44 1254 267552 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]