Re: Vietnamese complex-script support?
On 08/01/2013 09:49 AM, Pascal Sancho wrote: I'm not sure there is a specific script for Vietnamese. IIUC, this can be written either with latin script, or with a chinese subset script. Both Latin ans Chinese scripts are handled correctly with Fop, without complex script feature. You should just feed FOP with an appropriate font. Maybe I'm wrong; Glenn can confirm | infirm? I’ll let Jonathan clarify exactly what he meant, but Vietnamese is typically written in the Latin script with a *lot* of combining diacritics. A naïve implementation can result in very ugly characters; some sophistication is needed to stack multiple combining characters correctly. ~Chris -- Chris Maden, text nerd URL: http://crism.maden.org/ “Peace has other governments that don’t go through the will of politicians.” — Mia Couto, “Rain, the Dreamsend” (tr. Austen Hyde) GnuPG fingerprint: DB08 CF6C 2583 7F55 3BE9 A210 4A51 DBAC 5C5C 3D5E - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Speeding up FOP 1.0
On 11/30/2011 04:03 AM, Theresa Jayne Forster wrote: But then the big problem is when I transform the XSL / XML into PDF it is taking forever to generate Creating PDF Creation of PDF took 106384 Miliseconds transformer.transform(src, res); Why is this taking so long and is there any way to get it working faster? Can you separate the timing into the XSLT processing and the FO processing? I realize your application may be streaming the events and not be so cleanly separated, but for testing purposes, those numbers would be very helpful. There are some pathological XSLT patterns that may be causing the lag, and which could be cleaned up; it may even be the case that substituting a different XSLT processor could give a performance boost. OTOH, if the problem is in the actual FOP code, there may be some patterns in your FO that could be cleaned up, or optimization opportunities within FOP. ~Chris -- Chris Maden, text nerd URL: http://crism.maden.org/ “Be wary of great leaders. Hope that there are many, many small leaders.” — Pete Seeger - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Speeding up FOP 1.0
On 11/30/2011 11:12 AM, Theresa Jayne Forster wrote: On top of that, if I make the images local and not from the 3rd party site, the pdf then takes 2.5 seconds The images only take 8 seconds to download from the 3rd party site, so why is it taking so long? Oh, I missed that bit... I suspect (and one of the developers should be able to confirm or deny) that FOP is initiating a separate connection for each graphic, serially, and so you’re incurring a lot of overhead to start and terminate each one. I would look into strategies to preëmptively fetch the graphics if possible. ~Chris -- Chris Maden, text nerd URL: http://crism.maden.org/ “Be wary of great leaders. Hope that there are many, many small leaders.” — Pete Seeger - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Problem With Keep Together
On 11/08/2011 11:32 AM, Rita Greenberg wrote: Any suggestions as to how to keep the 8 lines together on the same page will be greatly appreciated! The best approach to solving problems like this is to hand-tweak the XSL-FO and get that to work, first. Then change your XSLT to generate that XSL-FO. From your XSLT, it’s hard to tell exactly what’s going on, and the expertise on this list is focused on how FOP handles the XSL-FO directly. Offhand, it looks like the fo:block inside the xsl:if allows breaking. ~Chris -- Chris Maden, text nerd URL: http://crism.maden.org/ “Be wary of great leaders. Hope that there are many, many small leaders.” — Pete Seeger - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Problem with basic-link
On 11/02/2011 10:19 AM, Peder wrote: I'm having a problem with the basic link element. No, you are having problems with URLs. http:/www.google.com is not a well-formed URL; you need two slashes between the method and the host. ~Chris -- Chris Maden, text nerd URL: http://crism.maden.org/ “Be wary of great leaders. Hope that there are many, many small leaders.” — Pete Seeger - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: FOP font warning invalid
On 09/13/2011 02:42 PM, Eric Douglas wrote: Is there an official keyword list? Yes, the link previously posted: URL: http://www.w3.org/TR/xsl/#font-weight . ~Chris -- Chris Maden, text nerd URL: http://crism.maden.org/ “The present tendency and drift towards the Police State gives all free Americans pause.” — Alabama Supreme Court, 1955 (Pike v. Southern Bell Tel. Telegraph, 81 So.2d 254) - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: pagenumbering
On 08/30/2011 09:49 AM, Theresa Jayne Forster wrote: I was wondering, how can you change the page numbering on page-number-citation stuff, We have the requirement of numbering starting on the inside cover as page 1 not page 2 as currently the front page is classed as page 1. Is there any way to make the numbering start from 1 on the inside of the front cover? [This is really an XSL question, not a FOP-specific question.] The thing to change is not the page-number-citation, but the page number itself. Make the inside cover start a new page-sequence, starting its number from 1. Simple! (-: ~Chris -- Chris Maden, text nerd URL: http://crism.maden.org/ “The present tendency and drift towards the Police State gives all free Americans pause.” — Alabama Supreme Court, 1955 (Pike v. Southern Bell Tel. Telegraph, 81 So.2d 254) - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
XSL vs. FOP [was: Re: pagenumbering]
On 08/30/2011 10:52 AM, Glenn Adams wrote: actually, this is an FO issue, not XSL, since it is FOP that generates page numbers via fo:page-number XSL encompasses both Formatting Objects (sometimes “XSL-FO”) and XSL Tranformations (XSLT). An FO issue *is* an XSL issue. It is FOP that generates page numbers, but what Theresa needed was the FO instruction, which is agnostic about the software that consumes it (whether FOP, RenderX, Antenna House, or anything else). The XSL List (URL: http://www.mulberrytech.com/xsl/xsl-list/ ) covers all of XSL, including XSL-FO. We’ve previously had discussions on this list about allowing XML+XSLT as input to FOP, and the potential user confusion that results as to what FOP actually does. For similar reasons, when I reply to questions here, I try to make it clear what parts are specific to FOP, and which questions are about XML, XSLT, or FO, and orthogonal to FOP’s operation specifically. the correct answer is that you need to use the initial-page-number property on fo:page-sequence to specify a different starting number than is generated by auto; see http://www.w3.org/TR/2006/REC-xsl11-20061205/#initial-page-number and and http://www.w3.org/TR/2006/REC-xsl11-20061205/#fo_page-sequence for details; Yes, and I apologize for not taking the time to look up the references that Theresa needs. ~Chris [Emotional content notice (since plain text is really bad at communicating this): I want to be very clear that I am not attacking or criticizing Glenn or Theresa. And certainly, I’ve known Glenn by his work for far too long to accuse him of anything remotely resembling ignorance. I have simply attempted to be somewhat detailed and pedantic here for maximal clarity to everyone who might read this.] -- Chris Maden, text nerd URL: http://crism.maden.org/ “The present tendency and drift towards the Police State gives all free Americans pause.” — Alabama Supreme Court, 1955 (Pike v. Southern Bell Tel. Telegraph, 81 So.2d 254) - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: pagenumbering
On 08/30/2011 11:24 AM, Theresa Jayne Forster wrote: So, If I have it right, I need to set up 2 page-sequences one with the cover and one with the rest, And I need to set the page number at 1 for the second one, Reading through the links you gave appear to show that you cannot set a pagenumber of 0 quoteA positive integer. If a non-positive or non-integer value is provided, the value will be rounded to the nearest integer value greater than or equal to 1./quote So something like fo:simple-page-master master-name=Front Page” fo:simple-page-master master-name=free-text-odd fo:simple-page-master master-name=free-text-even fo:page-sequence-master master-name=Contents fo:page-sequence-master master-name=Free Text- initial-page-number=”1” Almost. The initial-page-number goes on the actual fo:page-sequence that uses the page-sequence-master. BTW, while those master-names are legal, having spaces in them makes them prone to breakage from line-wrapping or other oddities; single tokens are good practice, though not required. ~Chris -- Chris Maden, text nerd URL: http://crism.maden.org/ “The present tendency and drift towards the Police State gives all free Americans pause.” — Alabama Supreme Court, 1955 (Pike v. Southern Bell Tel. Telegraph, 81 So.2d 254) - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: XSL vs. FOP [was: Re: pagenumbering]
On 08/30/2011 11:41 PM, Glenn Adams wrote: We may be applying different ontological models here. That does seem likely, since... I label anything having to do with XSL-FO as FO related. I label anything having to do with XSLT as XSL related. For me, FO related != XSL related. The XSL-FO language is defined in URL: http://www.w3.org/TR/xsl/ , “Extensible Stylesheet Language (XSL).” Early drafts did not even separate the transformation and formatting parts of XSL, but since the transformation was so useful on its own, it was spun out. However, formatting was the primary goal of the XSL work. IOW, FO *is* XSL. XSLT is a by-product, but is often (mistakenly) called “XSL.” Because FOP supports both XSL(T) [indirectly} and FO, it certainly covers both areas, but as far as I'm concerned the XSL(T) portion of it is a convenience function, unrelated to its core functionality. I concur with that... it is now clear that the only confusion is whether or not FO is part of XSL; I hope the title of the W3C Recommendation defining it clarifies that. [Argumentum ad verecundiam: I was on the W3C XSL Working Group from its inception in 1997 until 2002.] It is also quite clear at URL: http://www.mulberrytech.com/xsl/xsl-list/#introduction that XSL-FO is in scope for that list. I wouldn’t and can’t stop anyone from posting questions about FO here. However, I will try, in my answers, to make clear whether their questions pertain to FOP behavior or whether they would have the same questions regardless of which tool they were using. ~Chris -- Chris Maden, text nerd URL: http://crism.maden.org/ “The present tendency and drift towards the Police State gives all free Americans pause.” — Alabama Supreme Court, 1955 (Pike v. Southern Bell Tel. Telegraph, 81 So.2d 254) - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Dynamic bookmark-tree
On 07/25/2011 02:50 PM, Michael Uplawski wrote: For simplicity I attach a screenshot of the generated and functional bookmarks in the Okular-reader. Compared to the examples that I find elsewhhere, I deem this a success already. But does one of you have a hint on how I can finally break out of the for-each structure or rather: in which way can I avoid to handle those nodes, which are *siblings of the current node* but follow a node of a different type. First of all, this question is not specific to FOP, but is a general XSLT question. Please follow up on the XSL List, URL: http://www.mulberrytech.com/xsl/xsl-list/ . Second, you appear to have fallen into a common problem of using for-each when apply-templates would be more appropriate. Try rewriting your code that way; it may be that the solution becomes apparent when you do, and if not, it will be much easier for people on the XSL List to help you out. ~Chris -- Chris Maden, text nerd URL: http://crism.maden.org/ This week, the Transportation Security Administration intercepted and searched a suspected war criminal and noted supporter of Saddam Hussein, but permitted Donald Rumsfeld to board his flight anyway. - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: org.apache.fop.fo.ValidationException: fo:list-block is missing child elements
On 07/12/2011 08:08 AM, tecshine wrote: fo:list-block line-height=1.5 provisional-label-separation=1cm provisional-distance-between-starts=6cm fo:list-item fo:list-item-label end-indent=label-end() fo:block font-weight=bold text-align=start/ /fo:list-item-label fo:list-item-body start-indent=body-start() fo:list-block space-after=1cm provisional-label-separation=1cm provisional-distance-between-starts=3cm/ This list-block is empty. That is illegal. /fo:list-item-body /fo:list-item /fo:list-block ~Chris -- Chris Maden, text nerd URL: http://crism.maden.org/ “Mankind are more disposed to suffer, while evils are sufferable than to right themselves by abolishing the forms to which they are accustomed.” — Thomas Jefferson - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: numberformatting problem (austrian format)
On 07/12/2011 10:21 AM, haichao.m...@raibau.at wrote: I?m using fop to process PDFs. I need to format a number. code: xsl:value-of select=format-number(1, ',###.00') / The output in this case is 10,000.00 My problem is, that I need the number format in Austria, which is 10.000,00 (the comma and the point are switched) I already tried .###,00 but a TransformerException was thrown. Seems that the point is only used to separate integer and decimal places and the comma is only used to group numerals. Anyone knows how I can get the number formatted with the Austrian/German format? This is not a FOP-specific question. Questions about XSLT should be sent to the XSL list, URL: http://www.mulberrytech.com/xsl/xsl-list/ . You need to use a named decimal format as described in URL: http://www.w3.org/TR/xslt#format-number . ~Chris -- Chris Maden, text nerd URL: http://crism.maden.org/ “Mankind are more disposed to suffer, while evils are sufferable than to right themselves by abolishing the forms to which they are accustomed.” — Thomas Jefferson - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: FOP Extension to handle Wiki Syntax
On 06/14/2011 07:25 AM, kalgon wrote: Yes I could transform the XML prior to rendering it to PDF but that wouldn't be as nice and clean as an extension which would take care of everything. Moreover, an extension can be reused whereas pre-transforming the XML would require a specific XSLT for each XML schema... definitely not the way I want to go. Except that’s how XSL works, and what FOP implements. FOP takes exactly[*] 1 kind of input: the FO markup in XML defined by the XSL Recommendations. Nearly all FOP users, as well as users of other XSL formatters, transform their source either with XSLT or some other tool into FO for presentation to the formatter. If FOP supports MediaWiki syntax natively, why not MoinMoin or some other wiki? Why not HTML, DocBook, DITA, CALS, ...? ~Chris [*] approximately -- Chris Maden, text nerd URL: http://crism.maden.org/ “Before I built a wall I’d ask to know / What I was walling in or out, / And to whom I was like to give offence.” — RF, Mending Wall GnuPG Fingerprint: C6E4 E2A9 C9F8 71AC 9724 CAA3 19F8 6677 0077 C319 - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: FOP Extension to handle Wiki Syntax
On 06/14/2011 10:15 AM, kalgon wrote: But then, what is the purpose of extensions? There are several extensions which generate barcodes (barcode4j, zxing-fop-qrcode)... so if I follow your reasoning, we should not use those and rather pre-generate the images and use fo:external-graphic, right? There isn’t anything in the XSL Recommendation about barcodes, so a barcode extension made sense. True, graphics could have been used, but barcodes make a lot of sense as formatting artifacts as well. The MediaWiki markup for which you’re asking involves headings, paragraphs, and lists, which are already supported by XSL. No extension is needed to provide the functionality. I don't see what you're talking about FOP supporting natively MediaWiki. How does it support MediaWiki? It doesn’t. That’s what you are asking for. (Remember that “wiki” is a concept of user-edited Web sites; specific kinds of wiki software use different markup. Wikipedia and the other Wikimedia Foundation sites use software called MediaWiki.) What I want to do is create an extension which can create a subtree of the FO tree (and reusing basic nodes like Block, Table, FOText) but I can't find any documentation explaining how to do that (if it's possible). I'd prefer an extension doing the wiki-fo transformation in one pass instead of having to write two XSL's with intermediate results: I prefer having a self-contained extension which does all the work for me. That kind of encapsulated transformation makes a lot of sense. However, like other pre-FO transformations, it does not belong in FOP. FOP starts with XSL FO markup; transformations come before that. ~Chris -- Chris Maden, text nerd URL: http://crism.maden.org/ “Before I built a wall I’d ask to know / What I was walling in or out, / And to whom I was like to give offence.” — RF, Mending Wall GnuPG Fingerprint: C6E4 E2A9 C9F8 71AC 9724 CAA3 19F8 6677 0077 C319 - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: FOP Extension to handle Wiki Syntax
On 06/14/2011 11:23 AM, kalgon wrote: I understand but if we want to be strict, XSLT only transform from XML to another format (often XML but also Text). In my case wiki syntax is not XML so we could say it shouldn't be transformed through XSLT. Text nodes are part of XML... XSLT can handle processing the contents of those text nodes. However, it’s not always the best tool for doing that. I would probably write something in your language-of-choice that takes in an XML tree and writes it out identically, except for upgrading the free-text markup. There are converters out there to do it... the Freebase BFG project used one written by one of the original Wikipedia markup designers... see URL: https://secure.wikimedia.org/wikipedia/en/wiki/User:Magnus_Manske . This has gotten off-topic for FOP. If you decide to do this in XSLT, see URL: http://www.mulberrytech.com/xsl/xsl-list/ . Otherwise, see the discussion fora for whatever other programming language you’re using. ~Chris -- Chris Maden, text nerd URL: http://crism.maden.org/ “Before I built a wall I’d ask to know / What I was walling in or out, / And to whom I was like to give offence.” — RF, Mending Wall GnuPG Fingerprint: C6E4 E2A9 C9F8 71AC 9724 CAA3 19F8 6677 0077 C319 - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: How to determine which block are fo:table-row from XML-AT output?
On 06/10/2011 12:49 PM, Andreas L. Delmelle wrote: It does make perfect sense, but from FOP perspective, also poses the challenge of properly implementing id on fo:table-row... Since there is no area to attach the id to, we currently have no location in the area tree that ref-ids can point to. I hadn’t really thought about that. But IMO, the ID ought to attach to the first cell within the row. More generically, if any FO element has an ID but no area, the ID ought to attach to the first area generated by any of its descendants. That raises the possibility of a single area having multiple IDs... is that a problem in PDF? ~Chris -- Chris Maden, text nerd URL: http://crism.maden.org/ “Before I built a wall I’d ask to know / What I was walling in or out, / And to whom I was like to give offence.” — RF, Mending Wall GnuPG Fingerprint: C6E4 E2A9 C9F8 71AC 9724 CAA3 19F8 6677 0077 C319 - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Apache FOP Newbie needs Help Converting XML to PDF
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/09/2011 11:41 AM, italocardwell wrote: Thanks everyone for helping me out. I do appologize for being a moron with this stuff. Is there any way to convert my xsl file to a xslfo file so that it can be used? Or will it have to be completely re-created? XSLT is a transformation language that turns one kind of XML into another. XHTML is one kind of XML; XSL-FO is a completely different kind of XML. Since you said you were a SQL guy, think of XSLT as like a report generator. If you have a report that lists employees by ID with their SSNs and salaries, and you instead need a report that lists employees by department and last name with salaries and managers, you’re going to need to write a new report. ~Chris - -- Chris Maden, text nerd URL: http://crism.maden.org/ “Those in power write the history, while those who suffer write the songs.” — Frank Harte GnuPG Fingerprint: C6E4 E2A9 C9F8 71AC 9724 CAA3 19F8 6677 0077 C319 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk13rv8ACgkQGfhmdwB3wxlAHgCfRVuyfZqQkMfZu0m5O8vnCpOQ RDwAnj7G88fTYFst9A2mkmyHcjUOLG38 =M6qQ -END PGP SIGNATURE- - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: AW: ValidationException: Document is empty
On 12/07/2010 11:43 AM, Georg Datterl wrote: I'm not quite sure WHO exactly complains. The original xslt (with lt;) works fine if I use it to transform the xml file. It generates a fo-file which I can then transform into a pdf. The corrected xslt works fine, if I don't use more complex transformations. It stops working when I use variables. Ah... I’ve got it now. This is why use of disable-output-escaping is so strongly discouraged... When you use XSLT to transform your XML and serialize it to disk, the d-o-e is applied and you get a valid FO. However, when you feed XML and XSLT to FOP, your transformation result is never serialized. The d-o-e directive is never applied, and a poorly-formed XML data structure is passed to FOP, resulting in your error. You will need to rewrite your transformation to avoid use of d-o-e. It is an unfortunate hack that really shouldn’t have been included in XSLT; it is never necessary, and while it enables some quick hacks that would be more complicated otherwise, it also is prone to mysterious breakage like your case. ~Chris -- Chris Maden, text nerd URL: http://crism.maden.org/ MISSING: land of free, home of brave. Last seen 10 September 2001. Reward offered. GnuPG Fingerprint: C6E4 E2A9 C9F8 71AC 9724 CAA3 19F8 6677 0077 C319 - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Greek text in the HelloWorld example causes Severe Exception
Nikolaos Paraschou wrote: This is the first time I am using Apache FOP. I started with the quick start guide and the Hello World example which worked just fine (with Latin characters). I decided to replace Frank with a name in Greek characters, lets say Νίκος. ; SystemID: file:/C:/Users/nikos/Desktop/name.xml; Line#: 1; Column#: 7 javax.xml.transform.TransformerException: Invalid byte 2 of 2-byte UTF-8 sequenc e. I suspect you have a bad second byte of a 2-byte UTF-8 sequence on line 1 of name.xml. (-: This is not a FOP question; the problem is happening when the XML parser tries to read your input XML file. I suspect that the editor you used to edit the XML file used ISO 8859-7 instead of UTF-8, but that you did not give an appropriate encoding declaration. The easiest way to avoid these problems is to instruct your editor to always save as UTF-8, which is one of the default encodings for XML, and needs no declaration. ~Chris -- Chris Maden, text nerd URL: http://crism.maden.org/ “I like being free, and that makes me an idiot, I suppose.” — Stan Rogers, “The Idiot” GnuPG Fingerprint: C6E4 E2A9 C9F8 71AC 9724 CAA3 19F8 6677 0077 C319 - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Possible Bug: No control Over Itemized List Marks
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tom Browder wrote: 1. Is this a fop bug? No. Your FO markup is almost certainly requesting the symbol you see. FOP does not make up list markers on its own; it uses the requested symbol. If you believe otherwise, post a sample of the FO XML that is the input to FOP. I believe you previously mentioned you are using DocBook; the DocBook stylesheets may be using the same list marker at every list level. Follow up to fop-users if necessary, but this is extremely unlikely to be a FOP issue. ~Chris - -- Chris Maden, text nerd URL: http://crism.maden.org/ “I like being free, and that makes me an idiot, I suppose.” — Stan Rogers, “The Idiot” GnuPG Fingerprint: C6E4 E2A9 C9F8 71AC 9724 CAA3 19F8 6677 0077 C319 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkwqKEgACgkQGfhmdwB3wxk9LgCgyq6tSbnTwCzBtbzT8oDeppVA uSEAnA1HuzQK9RoI5y8r0b1HzCxL4X7a =Sl7L -END PGP SIGNATURE- - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: word wrap, hyphenation
Vincent Hennebert wrote: In your particular case though, you should not use the degree character as an abbreviation for number (which I guess it is). Looking on the web, the correct abbreviation seems to be ‘no’ or ‘no.’ [2]. In which case you wouldn’t have that line-breaking issue (you may still want to use non-breaking spaces to prevent line breaking between ‘no.’ and ‘16’ though). Indeed. It should be the masculine ordinal, U+00BA, º. Unicode also has the numero sign, U+2116, №, which I prefer, though it looks odd in some typefaces and may not be present in others. ~Chris -- Chris Maden, text nerd URL: http://crism.maden.org/ “The State is that great fiction by which everyone tries to live at the expense of everyone else.” — Frédéric Bastiat, “L’État” GnuPG Fingerprint: C6E4 E2A9 C9F8 71AC 9724 CAA3 19F8 6677 0077 C319 - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Sobtotal per Page
Carsten B. wrote: I finally i found something. But I have a problem in calling the template. What ist wrong, can't figure it out. xsl:template mode=do-sum match=Auftrag fo:block font-size=9ptZwischensumme: ### Call Template xsl:call-template name=getSubtotal/ /fo:block I don't know what wrong and where zo put my templates. Everytime I get the-template-could-not-be-found. You are calling a template called “getSubtotal” and don’t have a template called “getSubtotal.” Hence, the template could not be found. I would recommend making a very simple XSLT that produces plain text or HTML from your data, with a running subtotal at every section. That should point the way to doing it in FO. You may also consider raising this question on the xsl-list, as it’s independent of FOP. However, the very helpful people there are also very busy, so prepare a stripped-down example that demonstrates your problem. (You may also find that preparing such an example helps you to solve it yourself.) I skipped dealing with markers, because I couldn't figure out how to call the last marker on a page. When you retrieve a marker with last-ending-within-page, you’ll get the last one on that page. So if you generated five subtotal markers on the page, you’ll just get the fifth one. ~Chris -- Chris Maden, text nerd URL: http://crism.maden.org/ “All I ask of living is to have no chains on me, And all I ask of dying is to go naturally.” — Laura Nyro GnuPG Fingerprint: C6E4 E2A9 C9F8 71AC 9724 CAA3 19F8 6677 0077 C319 - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Sobtotal per Page
Carsten B. wrote: Is this in possible in any way. I would do something like that in JS or Java. This is the root of your problem. XSLT is not like JS or Java. Those languages are procedural, while XSLT is a declarative language. Think about this processing model: the XSLT processor walks over the input XML, executing the appropriate templates for each node it finds. Now think about this model: the XSLT processor collects all the nodes in the input XML, then fires up a separate thread for every single one to find and execute the appropriate template. The results should be the same. That means that your XSLT needs to be able to determine the subtotal for the 30,000th item in complete ignorance of what the subtotal was for the 29,999th item. ~Chris -- Chris Maden, text nerd URL: http://crism.maden.org/ “All I ask of living is to have no chains on me, And all I ask of dying is to go naturally.” — Laura Nyro GnuPG Fingerprint: C6E4 E2A9 C9F8 71AC 9724 CAA3 19F8 6677 0077 C319 - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Subtotal per Page
c.bueh...@xdot.de wrote: a short small question. I could iterate through my XML until i find the OrderNumber witch i now use. Until that point i add all OrderSums together. So: First Oder: I iterate to order 1 check - Add the OrderSum - and step out of my iteration, because the compared OrderNumbers are equal. Now i iterate to Order 2: I iterate to order 1 - Add the OrderSum - check if the OrderNumber is eqal ( will be false) - I iterate to order 2 - Add the OrderSum - and step out of my iteration, because the compared OrderNumbers are equal. ... But this proces will only work if XSLT is able to step out of (recursion or for each-loops) XSLT cannot step out of for-each loops. When you construct the loop, you must select the right pieces. For example: xsl:for-each select=preceding::oder/ Recursion can exit; in fact, if it doesn’t, you will have a very large problem. xsl:template ... xsl:param name=subtotal select=0/ xsl:choose xsl:when test=no-more-to-do() xsl:value-of select=$subtotal/ /xsl:when xsl:otherwise xsl:call-template... xsl:with-param name=subtotal select=$subtotal + $this-one/ /xsl:call-template /xsl:otherwise /xsl:choose /xsl:template Keep your recursive structures tail-recursive, and many processors will optimize them into a more procedural execution ~Chris -- Chris Maden, text nerd URL: http://crism.maden.org/ “All I ask of living is to have no chains on me, And all I ask of dying is to go naturally.” — Laura Nyro GnuPG Fingerprint: C6E4 E2A9 C9F8 71AC 9724 CAA3 19F8 6677 0077 C319 - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Sobtotal per Page
J.Pietschmann wrote: On 16.07.2009 18:11, Carsten B. wrote: i searching about 2 days now. I need a subtotal on each page. That's known to be a difficult problem. In this case, I think it’s tractable. In fact, I think Carsten might be having problems with the XSLT rather than the FO. The use of marker is the right approach; each row should have a marker whose value is the running total to that point. Carsten’s comment (“update $totalsum”) indicates the usual problem with procedural coding; the totalsum should be calculated afresh at each point. The value of the last marker on the page can be retrieved in the footer pretty easily, once that problem is addressed. ~Chris -- Chris Maden, text nerd URL: http://crism.maden.org/ “All I ask of living is to have no chains on me, And all I ask of dying is to go naturally.” — Laura Nyro GnuPG Fingerprint: C6E4 E2A9 C9F8 71AC 9724 CAA3 19F8 6677 0077 C319 - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Dynamically replace argument for 'if' test
Bernmeister wrote: However, is it possible to replace the argument for an 'if' test? These are really XSLT questions, not FOP questions, and are better suited for the XSL list[1]. That said, both of your questions have been pretty basic questions about stylesheet parameters, and you would probably benefit from an introductory text on XSLT. Michael Kay’s book[2] is very good, as is Ken Holman’s[3]. In general, if you want to pass an argument into your transformation, you need an xsl:param in your XSLT stylesheet; that is what transformer.setParameter() changes. After that, the parameter is available just as any other value is. You are also confused about the difference between XSLT instructions and output elements and attributes. The curly braces are needed in literal output attributes, because otherwise the processor will just output $foo literally. In an XSLT instruction, such as xsl:if, the values are presumed to be XPath instructions, and $foo is interpreted. HTH, Chris [1] URL: http://www.mulberrytech.com/xsl/xsl-list/ [2] URL: http://www.amazon.com/XSLT-Programmers-Reference-2nd-Michael/dp/1861005067 [3] URL: http://cranesoftwrights.com/training/index.htm , _Practical Transformation Using XSLT and XPath_. -- Chris Maden, text nerd URL: http://crism.maden.org/ “All I ask of living is to have no chains on me, And all I ask of dying is to go naturally.” — Laura Nyro GnuPG Fingerprint: C6E4 E2A9 C9F8 71AC 9724 CAA3 19F8 6677 0077 C319 - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Suppress the Form-Feed at the end of a page-sequence
Steffanina, Jeff wrote: Unfortunately, the single page-sequence is so large that I run out of memory. The problem is that figuring out a pagination strategy consumes memory. The page-sequence is one way FOP knows that it can stop calculating pagination and issue a bunch of complete pages; if pagination continued across page-sequences, you’d have the same memory problem with multiple page-sequences. I wonder if FOP could “harden” pages after some window, say 100 pages, and free the relevant memory, regardless of page-sequence breaks. That would address your problem and several others’. ~Chris -- Chris Maden, text nerd URL: http://crism.maden.org/ “All I ask of living is to have no chains on me, And all I ask of dying is to go naturally.” — Laura Nyro GnuPG Fingerprint: C6E4 E2A9 C9F8 71AC 9724 CAA3 19F8 6677 0077 C319 - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Suppress the Form-Feed at the end of a page-sequence
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Steffanina, Jeff wrote: To clarify: Current Process When you come to the end of a page-sequence, FOP automatically executes a form feed and continues at the top of the NEXT page. Desired Process: When you get to the end of a page-sequence, do NOT advance to the top of the next page. Instead, continue printing exactly where you left off on the same page. As well ask a dog to meow... this is pretty much what page-sequences do, what they’re for. It sounds like your document needs to be one long(?) page-sequence. ~Chris - -- Chris Maden, text nerd URL: http://crism.maden.org/ “All I ask of living is to have no chains on me, And all I ask of dying is to go naturally.” — Laura Nyro GnuPG Fingerprint: C6E4 E2A9 C9F8 71AC 9724 CAA3 19F8 6677 0077 C319 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkmIsNkACgkQGfhmdwB3wxlKKACg3eM7XQH1kQgZIGlkbMl40aGe RywAn0YbuJmd6PQt+spB890bBGZYaWoE =1lEB -END PGP SIGNATURE- - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Pronunciation
On Sat, 2008-11-15 at 23:04 -0600, Jay Bryant wrote: I pronounce it the latter way (as a single syllable). I think that, if one were being strict, it should be three syllables, as one would do with other acronyms. With FOP, though, it amuses me to conflate the acronym with the term for a dandy (see http://en.wikipedia.org/wiki/Fop). Such are the perils of a Master's degree in English Literature That was the point, actually. That the acronym for Formatting Object to PDF was also a word for someone obsessed with style was just irresistible. ~Chris, whose sole contribution to the project was the name... -- Chris Maden, text nerd URL: http://crism.maden.org/ Part of the fact-based community since 1975. GnuPG Fingerprint: C6E4 E2A9 C9F8 71AC 9724 CAA3 19F8 6677 0077 C319 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FOP 0.95b observations
On Wed, 2008-04-09 at 09:39 +0200, Jeremias Maerki wrote: The thing with the stacktrace was a temporary measure as some exceptions were swallowed due to suboptimal exception handling. This will be improved with the next release as we add an processing feedback system that allows more fine-grained event handling. Good to know; thanks. I assume you have a keep-together=always somewhere upstream of the table-cell. Please note that some support for inline keeps has been added. If you do keep-together=always you're indirectly setting keep-together.within-line=always which forbids FOP to break the line. Just change that to keep-together.within-column=always. Ah! I helped write XSL, but it was now many years ago, and little things like that occasionally jump up and surprise me, especially when the same stylesheet has been working acceptably for years. (-: Confirmed. There is indeed a bug there. But keep in mind, it should be keep-together.within-column=always! Thanks for the feedback! Gotcha. An anonymized test, if it helps, is at URL: http://crism.maden.org/table-test.fo and URL: http://crism.maden.org/table-test.pdf . Thanks, Chris -- Chris Maden, text nerd URL: http://crism.maden.org/ We’ve replaced American airports with incompetent mini-police- states. Let’s see if they notice! GnuPG Fingerprint: C6E4 E2A9 C9F8 71AC 9724 CAA3 19F8 6677 0077 C319 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FOP 0.95b observations
On Wed, 2008-04-09 at 11:17 +0200, Jeremias Maerki wrote: Actually, I have to correct myself. I just noticed that keep-together does not apply to fo:table.body: http://www.w3.org/TR/xsl11/#fo_table-body Wow... thanks for catching that. It’s working perfectly now. I can’t explain or understand the rationale for that decision, though... this is one of the things that using multiple table-body elements is great for. Not being able to keep them together doesn’t gain anything. Thanks again, Chris -- Chris Maden, text nerd URL: http://crism.maden.org/ We’ve replaced American airports with incompetent mini-police- states. Let’s see if they notice! GnuPG Fingerprint: C6E4 E2A9 C9F8 71AC 9724 CAA3 19F8 6677 0077 C319 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
FOP 0.95b observations
1) FOP now complains about empty fo:table-cells. This is strictly correct, I suppose, but annoying. More troubling, it fails with an exception and a stack trace when it happens, rather than a simpler error message. 2) Line-wrapping doesn’t seem to happen automatically in table cells: Apr 8, 2008 4:09:58 PM org.apache.fop.layoutmgr.inline.LineLayoutManager $LineBreakingAlgorithm updateData2 WARNING: Line 1 of a paragraph overflows the available area by 11431mpt. (fo:block, location: 2/56170) is the message, now. These same paragraphs used to wrap in 0.94 and in 0.20.5. 3) While this doesn’t produce the strange page-breaking behavior seen in 0.94 (thanks!) it still does not appear to honor keep-together=always on table-body. By comparison 0.20.5 kept table-bodies together by default. My document consists of a series of these: fo:table-body border=solid 1pt black keep-together=always Dummy output is available on request, if it would be helpful. Thanks, Chris -- Chris Maden, text nerd URL: http://crism.maden.org/ We’ve replaced American airports with incompetent mini-police- states. Let’s see if they notice! GnuPG Fingerprint: C6E4 E2A9 C9F8 71AC 9724 CAA3 19F8 6677 0077 C319 signature.asc Description: This is a digitally signed message part
Re: FOP, Type 1 fonts, and .pfm files
On Tue, 2008-03-25 at 09:07 +0100, Jeremias Maerki wrote: One more reason to look forward to 0.95: see below. Spectacular. Thanks for the good news, Jeremias. My bated breath — can you smell it from there? (-: ~Chris -- Chris Maden, text nerd URL: http://crism.maden.org/ “Metonymy and synecdoche don’t do the fighting and dying, the soldiers and the townspeople do.” —John Crowley, _Endless Things_ GnuPG Fingerprint: C6E4 E2A9 C9F8 71AC 9724 CAA3 19F8 6677 0077 C319 signature.asc Description: This is a digitally signed message part
FOP, Type 1 fonts, and .pfm files
Thanks to Vincent for the earlier answer about page-breaking and tables; I am looking forward to trying 0.95 when it’s available. On a completely different project, I am having trouble (still with 0.94) with PostScript Type 1 fonts. I have the complete set of New Caledonia Type 1 fonts, originally installed on a Macintosh. I have .pfb and .afm files for each font. However, FOP complains: Mar 21, 2008 4:32:44 PM org.apache.fop.fonts.autodetect.FontInfoFinder find SEVERE: Unable to load font file: file:/home/crism/src/atmom/./new-caledonia/NewCaledonia.pfb. Reason: Cannot load font: failed to create Source for font file /home/crism/src/atmom/./new-caledonia/newcaledonia.pfm The long-term question: Why does FOP care about PFMs when AFMs are available? PFMs contain less information and are usually only found on Windows machines. Short-term question: Does anyone know of a better AFM-to-PFM convertor than the 14-year-old afm2pfm that’s still floating around? It dumps core on my Linux box and does not produce helpful results. Thanks in advance for any help, Chris [Just in case anyone cares: Yes, I purchased the set of New Caledonia from Linotype, which included a license to install the fonts on up to five computers and one printer. (-: Unfortunately, the install key is long since lost, and wouldn’t have let me install on Linux anyway.] -- Chris Maden, text nerd URL: http://crism.maden.org/ “Metonymy and synecdoche don’t do the fighting and dying, the soldiers and the townspeople do.” —John Crowley, _Endless Things_ GnuPG Fingerprint: C6E4 E2A9 C9F8 71AC 9724 CAA3 19F8 6677 0077 C319 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Pagination and multiple fo:table-body instances
I have a multi-page document which is one large table. I previously produced this document with FOP 0.20.5, and have recently switched to 0.94. The table has multiple fo:table-body elements in it. With 0.20.5, it paginated rather neatly, filling a page with as many table bodies as it could, and dropping an entire body to the next page when there was no more room. None of the table-body elements are more than 6 rows long. With 0.94, as soon as page 1 threatens to fill up, all but the first two bodies are moved to page 2, which then fills nicely, but breaks the page to page 3 in the middle of a table-body. Adding keep-together=always on the table-body elements does not seem to have any effect on either behavior. I can mock up a demonstration of the problem, but it will take a little work since the data I’m working with contains confidential information. Before I do that, does this ring any bells for anyone as a known problem? Thanks in advance, Chris -- Chris Maden, text nerd URL: http://crism.maden.org/ “Metonymy and synecdoche don’t do the fighting and dying, the soldiers and the townspeople do.” —John Crowley, _Endless Things_ GnuPG Fingerprint: C6E4 E2A9 C9F8 71AC 9724 CAA3 19F8 6677 0077 C319 signature.asc Description: This is a digitally signed message part
Re: 508 compliance
On Wed, 2008-01-09 at 20:29 +0100, Andreas L Delmelle wrote: At first glance, it seems to be something that applies to accessibility of information in general (is not restricted to printed media). Yes. It would be better to make the information available in the PDF available in other formats as well. This was kind of the point of XML and XSL: provide your information via multiple channels. Note that the 'Common Accessibility' properties, as defined by the XSL Rec, are for the largest part unimplemented in FOP at the moment. I’m honestly not sure what FOP would do with them, anyway. A single XSL stylesheet might say that emphasis should be both bold and loud, but I would expect a print formatter to ignore the loudness just as I would expect an audio formatter to ignore the boldness. ~Chris -- Chris Maden, text nerd URL: http://crism.maden.org/ “Metonymy and synecdoche don’t do the fighting and dying, the soldiers and the townspeople do.” —John Crowley, _Endless Things_ GnuPG Fingerprint: C6E4 E2A9 C9F8 71AC 9724 CAA3 19F8 6677 0077 C319 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Syntax of xsl:if
bharathi kongara wrote: Can somebody tell if the yntax of xsl:if I'm using is correct?(If so, why didn't it work) xsl:template match=Question xsl:if test=Question/FullPage = 'true' Questions like this are better suited to the XSL list; this is not specific to FOP. See URL: http://www.mulberrytech.com/xsl/xsl-list/ . In this case, the problem is that the template match pattern sets the context for any paths inside it. So from the context of your Question element, there is no Question/FullPage, because there is no Question child of Question. Change your test to just FullPage = 'true'. ~Chris -- Christopher R. Maden, Principal Consultant, crism consulting XML-SGML-HTML-DTDs-schemas-XSL-DSSSL-conversion-training-ebooks-B2B URL: http://crism.maden.org/consulting/ PGP Fingerprint: BBA6 4085 DED0 E176 D6D4 5DFC AC52 F825 AFEC 58DA - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]