I have created some XSLT stylesheets to convert some XML into an XSL-FO document. I now have a requirement to move any font or font-size attributes for fo:blocks into a child fo:inline element.
So say I have something like this:
<fo:block font-size="6pt">
This font is 6 points
</fo:block>
<fo:block font="8px Arial">
This font is Arial 8 points
</fo:block>
<fo:block>Just text</fo:block>
<fo:block>
<fo:external-graphic src="graphic.gif"/>
</fo:block>
I would like to create an xslt stylesheet to transform it to:
<fo:block>
<fo:inline font-size="6pt">
This font is 6 points
</fo:inline>
</fo:block>
<fo:block>
<fo:inline font="8px Arial">
This font is Arial 8 points
</fo:inline>
</fo:block>
<fo:block>Just text</fo:block>
<fo:block>
<fo:external-graphic src="graphic.gif"/>
</fo:block>
So say I have something like this:
<fo:block font-size="6pt">
This font is 6 points
</fo:block>
<fo:block font="8px Arial">
This font is Arial 8 points
</fo:block>
<fo:block>Just text</fo:block>
<fo:block>
<fo:external-graphic src="graphic.gif"/>
</fo:block>
I would like to create an xslt stylesheet to transform it to:
<fo:block>
<fo:inline font-size="6pt">
This font is 6 points
</fo:inline>
</fo:block>
<fo:block>
<fo:inline font="8px Arial">
This font is Arial 8 points
</fo:inline>
</fo:block>
<fo:block>Just text</fo:block>
<fo:block>
<fo:external-graphic src="graphic.gif"/>
</fo:block>