xml to html
hi list, I started xsl a couple of hours ago on a new project and my question may seem stupid. in java, can we convert xml to html using xslt and give it some format, such as making some parts bold ?-- Reza Ghaffaripourwww.rezaghp.com
Re: xml to html
On Jan 23, 2006, at 7:36 AM, Reza Ghaffaripour wrote: hi list, I started xsl a couple of hours ago on a new project and my question may seem stupid. in java, can we convert xml to html using xslt and give it some format, such as making some parts bold ? This is more of an XSL than an FOP-related question, but thie XML to HTML article is a good spot to start[1]. They have an example where this article/title element: article fname=19990101_xsl titleXML Style Sheets/title ... /article is converted w a pb... using: xsl:template match=article/title PBxsl:apply-templates//B/P /xsl:template I hope this helps! Web Maestro Clay p.s. [1] XML to HTML article http://www.webdevelopersjournal.com/articles/xml_to_html.htm [2] XSL FAQ http://www.dpawson.co.uk/xsl/sect2/sect21.html [3] XSL FAQ - HTML http://www.dpawson.co.uk/xsl/sect2/N4554.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: xml to html
Hi, Reza, Your question is off-topic for this list, but yes, you can. For answers to questions involving how to do it, you should subscribe to the Mulberry XSLT list. You'll need to use a Java-based XSLT processor that exposes an API that you can call from a Java application (or servlet or whatever). Saxonand Xalan-J are both possibilities. Jay Bryant Bryant Communication Services - Original Message - From: Reza Ghaffaripour To: fop-users@xmlgraphics.apache.org Sent: Monday, January 23, 2006 9:36 AM Subject: xml to html hi list,I started xsl a couple of hours ago on a new project and my question may seem stupid.in java, can we convert xml to html using xslt and give it some format, such as making some parts bold ?-- Reza Ghaffaripourwww.rezaghp.com
Re: fop 0.91: keep-with-previous
Hi, Thank's for the help, but i use keep-with-previous in other parts of my document which couldn't replaced easely with keep-with-next. So will keep-with-previous for table rows reimplemented in the next beta version? fop-users@xmlgraphics.apache.org schrieb am 17.01.06 23:01:12: That's a known issue documented in the release notes: http://xmlgraphics.apache.org/fop/relnotes.html#FOP+0.91+beta I can see that you're only using the table here because of the work-around for keeps in 0.20.5. You can actually remove that table for 0.91beta now because keeps work on normal blocks, even keep-with-previous. keep-with-previous just doesn't work inside tables and lists, yet. The other option is to use keep-with-next instead of keep-with-previous if possible. And it looks like it is possible in your case. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Servlet Error]-[]: java.lang.OutOfMemoryError
Hello all, I'm using FOP 0.20.5 on a Unix box. The code is embedded and the pdf is rendered as an InputStream and attached and sent thru e-mail. I'm getting a [Servlet Error]-[]: java.lang.OutOfMemoryError when creating the PDF files in Asian langs only. The English version of the file works fine. I've tried most the memory tips in the FOP site: 1) - Avoiding forward references 2) - Avoiding large images 3) - Used multiple page sequences. I haven't changed the -Xmx option, because that is the last thing the server guys want. I'm trying to do whatever is possible first. Is there any possibility of reducing memory usage when embedding fonts? This is the user config file I'm using: configuration fonts font metrics-file=/home/msgothic.xml embed-file=/home/msgothic.ttc kerning=yes font-triplet name=MS Gothic style=normal weight=normal/ font-triplet name=MS Gothic style=normal weight=bold/ font-triplet name=MS Gothic style=italic weight=normal/ font-triplet name=MS Gothic style=italic weight=bold/ /font font metrics-file=/home/mingliu.xml embed-file=/home/mingliu.ttc kerning=yes font-triplet name=MingLiU style=normal weight=normal/ font-triplet name=MingLiU style=normal weight=bold/ font-triplet name=MingLiU style=italic weight=normal/ font-triplet name=MingLiU style=italic weight=bold/ /font font metrics-file=/home/simsun.xml embed-file=/home/simsun.ttc kerning=yes font-triplet name=SimSun style=normal weight=normal/ font-triplet name=SimSun style=normal weight=bold/ font-triplet name=SimSun style=italic weight=normal/ font-triplet name=SimSun style=italic weight=bold/ /font font metrics-file=/home/gulim.xml embed-file=/home/gulim.ttc kerning=yes font-triplet name=Gulim style=normal weight=normal/ font-triplet name=Gulim style=normal weight=bold/ font-triplet name=Gulim style=italic weight=normal/ font-triplet name=Gulim style=italic weight=bold/ /font /fonts /configuration Regards, - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[fop-0.91beta] Double sided layout
Hi all! Currently I'm fooling around with fop-0.91 a bit. Now I was wondering if there was a simple way to do a double-sided layout, where the page numbers on all odd numbered pages are on the right, but on all even numbered pages are on the left. First thing I tried was to embed static-content into the region-after child of simple-page-master, which of course didn't work. Then I thought maybe the region-after element could inherit its properties (namely text-align) to the corresponding flow or static-content element. Which it did not. Further reading revealed that a not-that-simple page-master element which allows for more complex page templates is considered for inclusion into the next version of the XSL-FO standard, but I guess it would be too much to hope that someone implemented something like it as a fop extension, right? To sum up, is there a simple, fop-contained way to get alternating page number positions? If yes, is there an example somewhere? (If there is one shipped with the fop distro, please point your finger at me now and laugh. Thank you.) Bye, Andreas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Servlet Error]-[]: java.lang.OutOfMemoryError
Fabrizio Caldas wrote: I'm getting a [Servlet Error]-[]: java.lang.OutOfMemoryError when creating the PDF files in Asian langs only. Best guess: East Asian fonts tend to be large, and much of the data is held in memory - multiple times - while finishing the PDF. There is no easy way around this (except giving the JVM as much memory as possible - check the FAQ). Some more hints: - Serialize all FOP requests through a singleton. This avoids having two (or more) parallel threads both eating lots of memory, but may have an overall negative performance impact on your application. - If you know in advance that you use only a relatively small subset of all east asian characters, look for an appropriate font or create a custom font. J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: no runtime java--how to install
On Sun, Jan 22, 2006 at 10:58:26AM +0100, Dirk Bromberg wrote: From: Dirk Bromberg [EMAIL PROTECTED] To: fop-users@xmlgraphics.apache.org Date: Sun, 22 Jan 2006 10:58:26 +0100 Subject: Re: no runtime java--how to install User-Agent: Thunderbird 1.5 (Windows/20051201) Hi, yes, you can run java from CD. Like Glen said, you must copy the JRE directory from your java install dir to the CD and if you want to run fop you must call the java.exe direct (relative from your script). Would you have any idea where the JRE install directory is? I am not familiar with Windows. I cannot install the JRE directory *anywhere* because I don't have permission, and it occurred to me to just copy the JRE on the computers that have them. I sniffed around today on box at work and couldn't find anything. thanks Paul -- *Paul Tremblay * [EMAIL PROTECTED]* - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: no runtime java--how to install
Paul, It can be changed but the default is, eg: C:\Program Files\Java\jre1.5.0_04\ JDK install path is slightly different, but it's unlikely you'd have that. Cheers, Roland Paul Tremblay wrote: On Sun, Jan 22, 2006 at 10:58:26AM +0100, Dirk Bromberg wrote: From: Dirk Bromberg [EMAIL PROTECTED] To: fop-users@xmlgraphics.apache.org Date: Sun, 22 Jan 2006 10:58:26 +0100 Subject: Re: no runtime java--how to install User-Agent: Thunderbird 1.5 (Windows/20051201) Hi, yes, you can run java from CD. Like Glen said, you must copy the JRE directory from your java install dir to the CD and if you want to run fop you must call the java.exe direct (relative from your script). Would you have any idea where the JRE install directory is? I am not familiar with Windows. I cannot install the JRE directory *anywhere* because I don't have permission, and it occurred to me to just copy the JRE on the computers that have them. I sniffed around today on box at work and couldn't find anything. thanks Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
FOP Postscript layout portrait, should be landscape
Hello, I am currently using FOP on the AS400. It is working very will, and creates PDF documents. The problem I am having is that I cannot print PDF documents natively on the AS/400, but I can print PostScript (PS), I have proven this can work, and it works OK, until he document needs to be printed in landscape mode. The PS will always print in portrait mode, I have tried many things, in PCL it works in landscape, but the PCL margin formatting is not as good as the PS and not really functional, so I was hoping to use the PS. I have tried the same process on windows, and the PDF document prints landscape, but the PS document prints as portrait. This proves that the problem isnt platform specific. I also tried to use 0.91beta, and the problem is still there in both platforms. Is this an existing bug? Is there something in the XSL that I can change to direct it to print either landscape or portrait (besides the height width settings)? Is there some other method of allowing the PS to come out in portrait? The only other method I can in visage is to get the PDF document and change that to PS via some tool that will run on the as400, not really the way I was hoping to move forward. Any suggestions or assistance will be of immense help, Thank you.