Re: DTD name retrieving
First question: what is the DTD name: the system identifier (usually a file name or URL), the optional public identifer, or the name of the document element? The DTD name is the name of the DTD file, for example: 'foo.dtd'. is it the system identifier ? There is no standardized mechanism to get either the system or the public identifier from within XSLT. You'll have to pass it as a parameter, or use an extension function. There isn't a standard Java API method to retrieve them either. I used the following solution but it isn't run with fop: ** foo.xsl * ?xml version=1.0 ? xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xmlns:msxsl=urn:schemas-microsoft-com:xslt xmlns:utilitaires=urn:x-msxsl-script:mes-utilitaires exclude-result-prefixes=msxsl utilitaires version=1.0 msxsl:script language=JScript implements-prefix=utilitaires![CDATA[ function doctypeSystemID(domNodeList) { var result = domNodeList.item(0).doctype.xml, suffix_index, i, docURL, docPath; suffix_index = result.indexOf(.dtd\); i = result.substring(0, suffix_index).lastIndexOf(\); result = result.substring(i + 1, suffix_index + 4); docURL = domNodeList.item(0).url; docPath = docURL.substring(0, docURL.lastIndexOf(/) + 1); result = docPath + result; return ( result ); } ]]/msxsl:script xsl:template match=/ htmlbody h1Document source DTD :/h1 xsl:value-of select=utilitaires:doctypeSystemID(/) / /body/html /xsl:template /xsl:stylesheet Why do you think you need it? There are not much use cases, and none in connection with generating FO that I am aware of. I need it because I build a technical document within I must display it. Thank you, Marie -- Profitez des 2 offres exceptionnelles Tiscali ! Internet Gratuit le Jour et Modem ADSL remboursé Cliquez ici, http://register.tiscali.fr/forfaits_ls/ Offres soumises à conditions.
AW: Java 1.1.x
Hello, I had also problems compiling FOP-0.20.3 with JDK 1.2. For example some changes in AWTFontMetrics concerning Fonts are not portable on JDK1.2. The release notes should be changed to reflect this. They still say JDK 1.2(or later) is required. Since I didnt want i18n support I could take the older versions of those files and do a custom build. I also removed all batik related stuff, since I dont use any SVG, and so can use FOP on a Websphere in a EJB context. Greetings, Patrick Dipl. Inform. Patrick Chaumette T-Systems ITS GmbH Service Prozesse Retail Hausanschrift: Fasanenweg 9, 70771 Leinfelden-Echterdingen Postanschrift: Postfach 100258, 70746 Leinfelden-Echterdingen Telefon: (0711)972-2437 Telefax: (0711)972-1949 E-Mail: [EMAIL PROTECTED] Internet: http://www.t-systems.de -Ursprüngliche Nachricht- Von: Peter B. West [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 7. Mai 2002 02:30 An: [EMAIL PROTECTED] Betreff: Re: Java 1.1.x Kendall, You might want to examine this thread: http://marc.theaimsgroup.com/?l=fop-devm=101551941500565w=4 I don't know whether this is the only problem of the migration to 1.2/1.3. If it were, you could copy the source tree, and use a find and a perl one-liner to change all of the occurrences. Not nice, and nasty to keep up-to-date, but it may be a way out. If it were not, you will have to follow Joerg's suggestion. Does anyone else know what the relevant incompatibilities are? Peter J.Pietschmann wrote: Kendall Adkins wrote: I have a client who is using a Domino server. Domino only supports the Java 1.1.8 SDK. I have been unable to find a version of FOP that will run with this SDK. Does anyone have any suggestions? Recent FOP versions need JDK1.2, perhaps even 1.3. I think you should look for 0.18 or even 0.17 on the old versions archive.
Re: Basic-link problem in JSPs
First of all: Thank you very much for your help! fo:basic-link internal-destination=addressListHeading fo:page-number-citation color=blue ref-id=addressListHeading/ /fo:basic-link This is the real problem. You probably noticed that the link area is not the whole page number, in particular with multiple digit page numbers. Yes, that is right. I will follow your advise and use the headline text as link area. Your style sheet appear to be a bit more convoluted than usual. Some other hints: xsl:template match=address_list/row/* mode=address_list xsl:choose xsl:when test=local-name()='ZIP_CODE_CITY' xsl:call-template name=plzOrtRow If this comes directly from your original style sheet, you should better use matching precise templates instead of piping everything into a match-all and then use a choose in it. Is this just a matter of style or do exact templates perform better? There is not all that much value in abstracting really low-level stuff like table cell generation. Hm, I generate quite a lot of cells (the document contains only tables) and thought that a template for generating cells would reduce filesize and improve readability of the stylesheet. Thanks for your hints!!! Ralf
MissingResourceException
I'm trying to upgrade from FOP 0.20.1 to 0.20.3. I do my development within the VisualAge 3.5.3 IDE. When trying to create a PDF using FOP 0.20.3, I get the following error: java.lang.ExceptionInInitializerError: java.util.MissingResourceException: Can't find resource for base name org.apache.batik.util.resources.XMLResourceDescriptor, locale en_US The PDF is simple. There is only one graphic (repeated on every page header) and just text -- no SVG or anything. I have Batik, LogKit, and Avalon in my classpath as projects, so I don't think it is a classpath issue, but I'm just not sure. Any help is greatly appreciated. Thanks!!
MissingResourceException
I'm trying to upgrade from FOP 0.20.1 to 0.20.3. I'm developing within the VisualAge for Java 3.5.3 IDE. When trying to create a PDF using FOP 0.20.3, I get the following error message: java.lang.ExceptionInInitializerError: java.util.MissingResourceException: Can't find resource for base name org.apache.batik.util.resources.XMLResourceDescriptor, locale en_US The PDF itself is simple. There is only one graphic, appearing in the header of each page, and no SVG graphics, just text. I have Batik, LogKit, and Avalon in the classpath as projects, so I don't think it's a classpath issue, but I'm just not sure. Any help is greatly appreciated. Thanks!
Tables in Inline Object
Hello, I would like to have 2 tables side by side on a single page. +---+---+ +---+---+ | | | | | | | T1 | | T2 | | | | | | | +---+---+ +---+---+ I try to do this by using fo:inline but it doesn't work? Is there another solution? Thank!
X-Y Text positioning
Guys, Do you know if FOP explicitly supports absolute X-Y placement of data on a page, i.e. put this text right here, 6 cm down from the top left corner and 4 cm in from the left edge? John *** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. Any unauthorised distribution or copying is strictly prohibited. Whilst Cedar Plc takes steps to prevent the transmission of viruses via e-mail, we can not guarantee that any email or attachment is free from computer viruses and you are strongly advised to undertake your own anti-virus precautions. Cedar Plc grants no warranties regarding performance, use or quality of any e-mail or attachment and undertakes no liability for loss or damage, howsoever caused.
AW: X-Y Text positioning
Hello John I use with FOP 0.20.3 the following: fo:static-content flow-name=xsl-region-before fo:block-container position=absolute top=4.5cm left=13cm width=7.2cm height=0.8cm fo:block border-style=solid border-color=redI am here/fo:block /fo:block-container /fo:static-content It positions where I set it, relative to the xsl-region-before margins. Hope this helps, greetings, Patrick. Dipl. Inform. Patrick Chaumette T-Systems ITS GmbH Service Prozesse Retail Hausanschrift: Fasanenweg 9, 70771 Leinfelden-Echterdingen Postanschrift: Postfach 100258, 70746 Leinfelden-Echterdingen Telefon: (0711)972-2437 Telefax: (0711)972-1949 E-Mail: [EMAIL PROTECTED] Internet: http://www.t-systems.de -Ursprüngliche Nachricht- Von: John Bourke [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 7. Mai 2002 17:29 An: Fop Users (E-mail) Betreff: X-Y Text positioning Guys, Do you know if FOP explicitly supports absolute X-Y placement of data on a page, i.e. put this text right here, 6 cm down from the top left corner and 4 cm in from the left edge? John ** * This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. Any unauthorised distribution or copying is strictly prohibited. Whilst Cedar Plc takes steps to prevent the transmission of viruses via e-mail, we can not guarantee that any email or attachment is free from computer viruses and you are strongly advised to undertake your own anti-virus precautions. Cedar Plc grants no warranties regarding performance, use or quality of any e-mail or attachment and undertakes no liability for loss or damage, howsoever caused. ** **
step-by-step instructions how to print Chinese in PDF?
I have to print documents with Chinese (and other languages). I couldn't find a clear instruction how to do it. Can anybody help? \fop-0.20.3\docs\examples\advanced folder didn't help me much. thanx, Argyn
sup with fo
Hello, I have 5*10sup5/sup in my xml file and trying to do a superscript using the following xsl lines. Unfortunately, this does nothing. Any clue??? xsl:template match=//sup fo:inline baseline-shift=sup font-size=3px xsl:apply-templates/ /fo:inline /xsl:template Thanks Mathy
Re: MissingResourceException
I also get this error: java.lang.NoClassDefFoundError: XMLResourceDescriptor java.lang.Throwable(java.lang.String) java.lang.Error(java.lang.String) java.lang.LinkageError(java.lang.String) java.lang.NoClassDefFoundError(java.lang.String) void org.apache.fop.svg.SVGElementMapping.setupSVG() void org.apache.fop.svg.SVGElementMapping.setupSVG() void org.apache.fop.svg.SVGElementMapping.addToBuilder(org.apache.fop.fo.TreeBuilder) void org.apache.fop.apps.Driver.addElementMapping(org.apache.fop.fo.ElementMapping) void org.apache.fop.apps.Driver.addElementMapping(java.lang.String) void org.apache.fop.apps.Driver.setupDefaultMappings() org.apache.fop.apps.Driver() But I can't find any reference to an XMLResourceDescriptor class anywhere. [EMAIL PROTECTED] aul.com To: [EMAIL PROTECTED] cc: 05/07/2002 09:17 Subject: MissingResourceException AM Please respond to fop-user I'm trying to upgrade from FOP 0.20.1 to 0.20.3. I'm developing within the VisualAge for Java 3.5.3 IDE. When trying to create a PDF using FOP 0.20.3, I get the following error message: java.lang.ExceptionInInitializerError: java.util.MissingResourceException: Can't find resource for base name org.apache.batik.util.resources.XMLResourceDescriptor, locale en_US The PDF itself is simple. There is only one graphic, appearing in the header of each page, and no SVG graphics, just text. I have Batik, LogKit, and Avalon in the classpath as projects, so I don't think it's a classpath issue, but I'm just not sure. Any help is greatly appreciated. Thanks!
Re: Basic-link problem in JSPs
Ralf Steppacher wrote: If this comes directly from your original style sheet, you should better use matching precise templates instead of piping everything into a match-all and then use a choose in it. Is this just a matter of style or do exact templates perform better? A matter of robustness and maintainability. Just add templates instead of adding when-clauses, perhaps with ever more intricate conditions. In general, templates are slower but there is rarely a mesurable difference (you need hundreths of matching tamplates). Hm, I generate quite a lot of cells (the document contains only tables) and thought that a template for generating cells would reduce filesize and improve readability of the stylesheet. The verbose call-template syntax doesn't reduce the filesize either, and named template invocations can really hide what's going on. But it's your choice. Try both on a small part and see what fits you better. J.Pietschmann
Re: DTD name retrieving
Marie Steinberg wrote: The DTD name is the name of the DTD file, for example: 'foo.dtd'. is it the system identifier ? This is the system identifier. I used the following solution but it isn't run with fop: ** foo.xsl * ?xml version=1.0 ? xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xmlns:msxsl=urn:schemas-microsoft-com:xslt You need MSXML to run it. If you are runing your stuff from the command line, try to get the file name elswhere and pass it as a parameter to the style sheet: Xalan -in foo.xml -xsl foo-transform.xsl -out foo.fo -param dtdname 'foo.dtd' In the style sheet xsl:param name=dtdname/ Alternatively you can write your own wrapper, retrieving the system identifer from the DOM using JAXP. I have the code somewhere else, will post it tomorrow. J.Pietschmann
Re: MissingResourceException
[EMAIL PROTECTED] wrote: When trying to create a PDF using FOP 0.20.3, I get the following error: java.lang.ExceptionInInitializerError: java.util.MissingResourceException: Can't find resource for base name org.apache.batik.util.resources.XMLResourceDescriptor, locale en_US The PDF is simple. There is only one graphic (repeated on every page header) and just text -- no SVG or anything. FOP tries to initialize parts of Batik nevertheless, unless you do a custom build without Batik. Well, perhaps it is sufficient to remove the SVG mappings from the config.xml file in the jar. It still ought to be either a classpath problem or a version clash. J.Pietschmann
Re: Tables in Inline Object
joseph berdat wrote: I would like to have 2 tables side by side on a single page. +---+---+ +---+---+ | | | | | | | T1 | | T2 | | | | | | | +---+---+ +---+---+ I try to do this by using fo:inline but it doesn't work? It shouldn't. You would have to use fo:inline-container but this isn't implemented in FOP yet. The generic answer is to put the tables into blind table: +-+ | +---+---+ +---+---+ | | | | | | | | | | | T1 | | T2 | | | | | | | | | | | +---+---+ +---+---+ | +-+ Don't set a border on the outer table, it's just there for demonstration. You can also try a two-column setup of the page, list-block and absolutely placed block containers, whatever fits best. J.Pietschmann
Re: step-by-step instructions how to print Chinese in PDF?
Argyn Kuketayev wrote: I have to print documents with Chinese (and other languages). I couldn't find a clear instruction how to do it. Find a font containing glyphs for your script. Configure it for use by FOP as describet in docs/html-docs/fonts.html Use an XML capable editor which allows you to input the characters directly and encodes the file as UTF-8 or UTF-16 or some ISO-8859-* (that's what you see in test_ja.fo), or use an ASCII-editor and use XML character references (something like #x2126;, which would give you an Ohm sign, the same glyph as greek upper case omega). The Unicode consortium http://www.unicode.org has character tables online. J.Pietschmann
Re: sup with fo
Hmmm.. I have tried baselin-shift to super. I think the problem is with my xml file :). Instead of having supertag in xml, I have the entity representation of the tag.. meaning I have lt;supergt;. So, by doing the search for the tag super does not help. Any advice Thanks J.Pietschmann Mathy J.Pietschmann wrote: Mathy V Arumugam wrote: Hello, I have 5*10sup5/sup in my xml file and trying to do a superscript using the following xsl lines. Unfortunately, this does nothing. Any clue??? xsl:template match=//sup fo:inline baseline-shift=sup font-size=3px Try baseline-shift=super, http://www.w3.org/TR/xsl/slice7.html#baseline-shift J.Pietschmann