[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: xsl-fo templates for svg
Quoting Karl Stubsjoen <kstubs@xxxxxxxxx>: > Is anyone extending xsl-fo with custom xsl/svg templates? For > example: an xsl template which return text rotated or a template > which produces pie charts (expressed as svg), etc... I'd be > interested in what has been done in this area. A quick and dirty one. Creates a coloured rounded rectangle with page number. <xsl:template name="SVG.page.number"> <fo:block-container display-align="center" text-align="center" width="{$page.width}pt" height="100%"> <fo:block width="{$SVG.button.width}{$measure}" height="{$SVG.button.height}{$measure}"> <fo:instream-foreign-object> <svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="{$SVG.button.width}{$measure}" height="{$SVG.button.height}{$measure}" id="svg{generate-id()}" viewBox="0 0 {$SVG.button.width} {$SVG.button.height}"> <rect width="{$SVG.button.width}{$measure}" height="{$SVG.button.height}{$measure}" rx="10" ry="10" x="0" y="0" style="opacity:1;fill:#FFD300;fill-opacity:1;" id="rect{generate-id()}"/> </svg> </fo:instream-foreign-object> </fo:block> </fo:block-container> <fo:block-container position="absolute" top="0" display-align="center" text-align="center" width="{$page.width}pt" height="100%"> <fo:block text-align="center" width="{$SVG.button.width}{$measure}" height="{$SVG.button.height}{$measure}" display-align="center"> <fo:inline color="#000" font-size="12pt" font-family="{$sans-serif}" font-weight="bold"> <fo:page-number/> </fo:inline> </fo:block> </fo:block-container> </xsl:template> -- Jacek Iwanski
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|