xsl-fo

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

随声附和 提交于 2019-11-30 08:40:27
问题 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

Using XSLT to create XSL-FO with nested bold/italic tags

混江龙づ霸主 提交于 2019-11-30 03:28:13
问题 I'm creating xslt file, which should convert my xml into xsl-fo. XML is something like that: <doc> <par> <point> <text>some text</text> </point> </par> </doc> Of course, there are many paragraphs and points in document. I would like to add possibility to format "some text", for example <bold>bolded text</bold> and <italic>italic</italic> Should give <fo:block><fo:inline font-weight="bold">bolded text</fo:inline> and <fo:inline font-style="italic">italic</fo:inline> Now I have quite simple

PDF report with embedded HTML

混江龙づ霸主 提交于 2019-11-30 03:18:30
问题 We have a Java-based system that reads data from a database, merges individual data fields with preset XSL-FO tags and converts the result to PDF with Apache FOP . In XSL-FO format it looks like this: <?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE Html [ <!ENTITY nbsp " "> <!-- all other entities --> ]> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format"> <xsl:output method="xml" indent="yes" /> <xsl:template match="/"

What's the difference between XSLT and XSL-FO?

假装没事ソ 提交于 2019-11-30 03:07:10
What's the difference between XSLT and XSL-FO ? Every resource I've read deal with them as if they were 1, or at least very closely tied.. Murph I was wondering about the basis of the question because I thought it was easy to answer, however as soon as you go here: http://www.w3.org/TR/xsl/ it becomes clear that its actually a good question - because pretty much the first thing on the page is this statement: This specification defines the features and syntax for the Extensible Stylesheet Language (XSL), a language for expressing stylesheets. It consists of two parts: a language for

XSL FO inline alignment

跟風遠走 提交于 2019-11-30 02:02:54
I need to get text aligned right and left on the same line. This should be possible, but i can't seem to find a way. I'm using Apache FOP to convert xml to pdf. Can someone help me to get this right? Elegance wasn't a stated requirement, but this should fit the bill: <fo:block text-align-last="justify"> LEFT TEXT <fo:leader leader-pattern="space" /> RIGHT TEXT </fo:block> This works by justifying the last line of text in the block, so that the text begins at the left of the line and ends at the right. The leader, which is usually used on Table of Contents pages, stretches to fill the space

XSL-FO external-graphic not showing

倾然丶 夕夏残阳落幕 提交于 2019-11-29 15:32:48
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> 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 image base URL : images from Resource path of project String serverPath = request.getSession()

Cakephp Security

≡放荡痞女 提交于 2019-11-29 13:41:30
问题 I am new to Security of Web apps. I am developing an application in Cakephp and one of my friends told me about the Cross-site request forgery (CSRF) and cross-site scripting (XSS) attacks etc. not sure how many more are there. I need some help in understanding how to make Cakephp defend my web app against these. we are low budget and we cant hire a security consulant as of now. We are still developing the app and plan to release in by the end of the month. so wanna take care of the initial

How can I sum up some values per page in a table in XSL-FO?

流过昼夜 提交于 2019-11-29 13:02:00
I'm using XSL-FO to generate an account statement print out. The PDF is actually just a simple table with a simple header on every page. The difficulty is that I have to display transaction volumes per page, e.g. Page 1 +------------------------------+-----------+-----------+---------------------+ | Text | Credit | Debit | Balance | +------------------------------+-----------+-----------+---------------------+ | Previous month | | | (*1) 1000 | | abc | 1000 | | 2000 | | abc | | 500 | 1500 | | abc | | 200 | 1300 | | ... | | | | | Carry over | (*2) 1000 | (*3) 700 | (*4) 1300 | +----------------

How to detect the last page of the document?

我与影子孤独终老i 提交于 2019-11-29 12:07:58
I create pdf files from xml files with FOP. I would like to display something on the last page of the pdf. The thing is I can not know how many pages are needed to display the content so how can I know I am on the actual last page? (each page-sequence can generate 1+ document pages according to the size of the content) Thanks. You can specify conditional page masters for general page layout and headers and footers (fo:static-content): http://www.w3.org/TR/xsl/#page-position Usage: 1.) In your fo:layout-master-set, define the different page masters you want to have. For example, a normal page

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

被刻印的时光 ゝ 提交于 2019-11-29 09:30:19
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. 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 attribute: XSL Definition: Value : no-wrap | wrap | inherit Initial : wrap Applies to : fo:block, fo:inline, fo:page