I am trying to add styles to my XML documents. In the past I have achieved this simply by including "style" and "class" attributes, and then copying those into the generated HTML.
I was considering adding CSS-like attributes to my XML elements (like in source below) to ease the transformation into formats such as PDF to avoid heavy processing on the "style" attribute. This should be easy to translate into HTML because I could simply concatenate all attributes within the "fx" namespace into a single "style" attribute.
From my searches on Google it seems as though XSL:FO is an absolute must for creating PDF files. I have never used FO before; is this what I need to use? If it is, how would I transform such "fx" styles from the source document?
Does Saxon support the XSL formatting objects?
<paragraph fx:text-align="center" fx:font-weight="bold">
Bold text with center alignment.