xsl-fo

fixed: Multiple page-sequence objects

自闭症网瘾萝莉.ら 提交于 2020-01-01 19:27:01
问题 When working with big xml files fop breaks down due to the lack of ram(1.7gb in my case, is the limit), so one of the ways to fix this is to use multiple page sequence objects as described here . However the are no description how to use them... And what I tried to do is to "create" a new page sequence objects using for-each, but it seems that I have failed and fob breaks down when it reaches 1.7gb of ram anyways <xsl:template match="OurForm"> <fo:root xmlns:fo="http://www.w3.org/1999/XSL

XSLT & XSL-FO: Creating a table with multiple rows?

只愿长相守 提交于 2019-12-31 04:03:09
问题 I'm fairly new to XSLT and I am stuck with a problem where I have an Element with an unknown amount of children, and I need to display these children in a table such that there are 5-6 columns available to display the information. If I'm given an XML file that looks like this: <books> <book> <author>Ralls, Kim</author> <title>Midnight Rain</title> </book> <book> <author>Corets, Eva</author> <title>Maeve Ascendant</title> </book> <book> <author>Corets, Eva</author> <title>Oberon's Legacy<

XSL-FO footer on last page

和自甴很熟 提交于 2019-12-31 03:56:08
问题 I have an XSL-FO file with a header and footer. I added static content for the header and footer, but I want the footer to only display on the last page. How can I do this? <?xml version="1.0" encoding="ISO-8859-1"?> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> <fo:layout-master-set> <fo:simple-page-master master-name="A4" page-width="210mm" page-height="297mm" margin-top="1cm" margin-bottom="1cm" margin-left="1cm" margin-right="1cm"> <fo:region-body margin-top="90mm" margin-bottom=

Force line break after string length

白昼怎懂夜的黑 提交于 2019-12-29 08:24:09
问题 I want to force a line break after a string length of 14 characters in a PDF generated with AH Formatter. So this is my xsl code without any attempt of line breaking: <xsl:attribute-set name="big" use-attribute-sets="bold"> <xsl:attribute name="font-size">38pt</xsl:attribute> <xsl:attribute name="line-height">28.84pt</xsl:attribute> <xsl:attribute name="text-align">center</xsl:attribute> <xsl:attribute name="letter-spacing">1mm</xsl:attribute> </xsl:attribute-set> <xsl:attribute-set name=

Resolving relative paths when loading XSLT files

偶尔善良 提交于 2019-12-28 06:21:50
问题 I need to do an XSL transformation using Apache FOP and I had code like this: //Setup FOP Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, out); //Setup Transformer Source xsltSrc = new StreamSource(new File(xslPath)); Transformer transformer = tFactory.newTransformer(xsltSrc); //Make sure the XSL transformation's result is piped through to FOP Result res = new SAXResult(fop.getDefaultHandler()); //Setup input Source src = new StreamSource(new File(xmlPath)); //Start the transformation and

Resolving relative paths when loading XSLT files

孤人 提交于 2019-12-28 06:21:41
问题 I need to do an XSL transformation using Apache FOP and I had code like this: //Setup FOP Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, out); //Setup Transformer Source xsltSrc = new StreamSource(new File(xslPath)); Transformer transformer = tFactory.newTransformer(xsltSrc); //Make sure the XSL transformation's result is piped through to FOP Result res = new SAXResult(fop.getDefaultHandler()); //Setup input Source src = new StreamSource(new File(xmlPath)); //Start the transformation and

Resolving relative paths when loading XSLT files

痞子三分冷 提交于 2019-12-28 06:21:01
问题 I need to do an XSL transformation using Apache FOP and I had code like this: //Setup FOP Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, out); //Setup Transformer Source xsltSrc = new StreamSource(new File(xslPath)); Transformer transformer = tFactory.newTransformer(xsltSrc); //Make sure the XSL transformation's result is piped through to FOP Result res = new SAXResult(fop.getDefaultHandler()); //Setup input Source src = new StreamSource(new File(xmlPath)); //Start the transformation and

xsl:number restarts when count element is wrapped xslt 1.0 xsl-fo

落花浮王杯 提交于 2019-12-25 15:17:12
问题 Given: <dmodule> <content> <procedure> <mainProcedure> <proceduralStep> <proceduralStep id="ps-111-222-test"> <title>Air Valve Assemblies</title> <proceduralStep> <title>General</title><proceduralStep><para>Equivalent substitutes can be used for items listed in the Table</para> </proceduralStep></proceduralStep></proceduralStep> <proceduralStep><para>Continue with this</para><para>Hold air valve plate</para></proceduralStep> <proceduralStep><para>Turn the screw....</para><para>Install bushing

XSL-FO : How do I repeat an xsl table for every page?

倾然丶 夕夏残阳落幕 提交于 2019-12-25 08:48:20
问题 I've done it previously by including the table in region-before AKA header section of xsl-fo. However, this introduces a problem of needing to dynamically set the margin-top of the region-body because the table's height is not fixed. Hence, I would need to include it in region-body. I've found questions on this but they are only on how to repeat headers of a table. In my case, I need to repeat the whole table in each page. Is it possible? If so, how do I do that? EDIT Btw, I'm using FOP with

Strip encoded values between XML elements and namespaces in XSLT 1.0

末鹿安然 提交于 2019-12-25 05:05:29
问题 I have an XML with spaces between XML elements. I am transforming it to XSL FO with XSLT 1.0 template to print a pdf report. I would like to decode the values in XSLT to print in the PDF.Below is my XML and XSLT 1.0. Can anyone please guide me decoding the values between XML elements? XML <PdfPrinter> <Reports> <Report> <BranchID>SA-02</BranchID> <Trade_x0020_Date>2016-08-10T00:00:00</Trade_x0020_Date> <Account_x0020_No>ABCDE01384</Account_x0020_No> <CParty_x0020_ID/> <Reference_x0020_No>TS-N