xsl-fo

how to parse the xml inside CDATA of another xml using xslt?

橙三吉。 提交于 2019-11-29 07:10:52
I need to transform the XML inside the CDATA of the XML using the single XSLT. I have an XML as below with xml inside the CDATA as in the below xml. <message channel-id="e01db0aa-b3db-4b6c-a055-7a0d5c1d1f20" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" > <send-parameters> <agent-parameter multi-valued="false"> <name>Networks</name> <value><![CDATA[<Networks> <Network> <GroupCode>EXTPRI</GroupCode> <NetworkTypeId>LANI</NetworkTypeId> <OrgNetworkPlatformName>EON-0cbu0cust12301dcd-D-PCL-0002</OrgNetworkPlatformName> <OrgNetworkPlatformID>urn:vcloud:network:b7ccfd5f-cfd7-48eb-9dd6

Does FOP 2.1 support ViewerPreferences?

谁说我不能喝 提交于 2019-11-28 13:54:11
I'm using FOP 2.1 and am trying to set ViewerPreferences, e.g. DisplayDocTitle -> true. I'm trying (from this question <fo:declarations> <pdf:dictionary type="Catalog" xmlns:pdf="http://xmlgraphics.apache/org/fop/extensions/pdf"> <pdf:dictionary type="normal" key="ViewerPreferences"> <pdf:entry key="DisplayDocTitle" type="boolean">true</pdf:entry> </pdf:dictionary> </pdf:dictionary> <x:xmpmeta xmlns:x="adobe:ns:meta/"> ... but getting Jul 13, 2016 11:18:31 AM org.apache.fop.events.LoggingEventListener processEvent WARNING: Unknown formatting object "{http://xmlgraphics.apache/org/fop

XSL-FO external-graphic not showing

余生颓废 提交于 2019-11-28 09:27:45
问题 I'm having some issues getting the external-graphic to show in my PDF. I've tried using all sorts of paths using the url() but nothing seems to work. Is it something else I'm missing? <fo:table-cell> <fo:block> <fo:external-graphic src="url(ss/naam.png)"></fo:external-graphic> </fo:block> </fo:table-cell> 回答1: I am using Apache FOP 1.1 Ver. first you should tell apache FOP that where is base path in follwing way. You should copy code as it is. fopFactory = FopFactory.newInstance(); // for

XSL-FO fop. Long text flows into adjacent cells/block, obscuring stuff there

匆匆过客 提交于 2019-11-28 02:56:34
问题 Could anyone suggest me a way to make long words (like serial numbers) to be wrapped? I tried some commercial software and there is no such issue. Is it a fop bug or probably there is a solution available? I can't insert zero length space after each character of every word in document. This solution sounds insane for me. 回答1: You can specify the wrap-option attribute in your fo:block like so: <fo:block wrap-option="wrap"> ... stuff </fo:block> Here's the XSL-FO specification for this

Resolving relative paths when loading XSLT files

霸气de小男生 提交于 2019-11-27 22:56:55
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 rendering process transformer.transform(src, res); where xslPath is the path where my XSLT file is

How do I check for the existence of an external file with XSL?

自闭症网瘾萝莉.ら 提交于 2019-11-27 17:38:24
问题 I've found a lot of examples that reference Java and C for this, but how do I, or can I, check for the existence of an external file with XSL. First, I realize that this is only a snippet, but it's part of a huge stylesheet, so I'm hoping it's enough to show my issue. <!-- Use this template for Received SMSs --> <xsl:template name="ReceivedSMS"> <!-- Set/Declare "SMSname" variable (local, evaluates per instance) --> <xsl:variable name="SMSname"> <xsl:value-of select=" following-sibling::Name"

Inserting a line break in a PDF generated from XSL FO using <xsl:value-of>

一世执手 提交于 2019-11-27 15:27:32
I am using XSL FO to generate a PDF file containing a table with information. One of these columns is a "Description" column. An example of a string that I am populating one of these Description fields with is as follows: This is an example Description.<br/>List item 1<br/>List item 2<br/>List item 3<br/>List item 4 Inside the table cell that corresponds to this Description, I would like the output to display as such: This is an example Description. List item 1 List item 2 List item 3 List item 4 I've learned from searching elsewhere that you can make line breaks in XSL FO using an <fo:block><

XSL-FO: Force Wrap on Table Entries

人盡茶涼 提交于 2019-11-26 17:55:01
I'm having an issue where when I publish my modspecs to pdf (XSL-FO). My tables are having issues, where the content of a cell will overflow its column into the next one. How do I force a break on the text so that a new line is created instead? I can't manually insert zero-space characters since the table entries are programmatically entered. I'm looking for a simple solution that I can just simply add to docbook_pdf.xsl (either as a xsl:param or xsl:attribute) EDIT: Here is where I'm at currently: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" xmlns:fo="http:/

XSL-FO: Force Wrap on Table Entries

五迷三道 提交于 2019-11-26 05:39:11
问题 I\'m having an issue where when I publish my modspecs to pdf (XSL-FO). My tables are having issues, where the content of a cell will overflow its column into the next one. How do I force a break on the text so that a new line is created instead? I can\'t manually insert zero-space characters since the table entries are programmatically entered. I\'m looking for a simple solution that I can just simply add to docbook_pdf.xsl (either as a xsl:param or xsl:attribute) EDIT: Here is where I\'m at

Use of XSL-FO, CSS3 instead of CSS2 to create Paginated documents like PDF?

痴心易碎 提交于 2019-11-26 00:37:21
问题 There are a lot of old texts, like this 2002 book, stating that we must use \"CSS for Web\" and \"XSL-FO for print\". I think in nowadays (2012) we can, finally, to use CSS with render engines that understand paged media of CSS2 and something of CSS3... But where the \"new texts\", the consensus of programmers, and the investment of softhouses? XSL-FO or \"XSL Formatting Objects\" (a W3C standard) was the most often used technology to generate PDF documents, from XML or XHTML content. Version