xslt library
Hallo XSLT-experts, I am looking for some kind of XSLT Library, which provides a set of standard components (HTML) for web applications, e.g. menus, form stuff, ... Substantially I would like to have somtething like Java Server Faces, but in XSLT. Does anybody know some project providing such thing? Kind regards, Peter Menzel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
xml schema question
Hi all, i am working on a xml schema and have the following problem, maybe somebody can help me. i would like to have the follwoing elment with content: element aa/ cc/ bb/ /element The elements aa and bb are required to be there and they may occur just one time. Other sub elements of element can occur many times. Especially the order of the elements is random, so i may not use xsd:sequence. My xml schema snippet for this element: xsd:element name='element' xsd:complexType xsd:choice xsd:element ref='dd' minOccurs='0' maxOccurs='unbounded'/ xsd:element ref='cc' minOccurs='0' maxOccurs='unbounded'/ xsd:element ref='aa' minOccurs='1' maxOccurs=1/ xsd:element ref='bb' minOccurs='1' maxOccurs=1/ /xsd:choice /xsd:complexType /xsd:element Unfortunately this wont work. xmllint says that the above xml document is not valid. Has anybody any idea concerning this problem? Is it generally possible to mix elements in a complexType with different minOccurs/maxOccurs ? Greetings, Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to get ALL parts of a large SVG document in a single PDF page
Hi, I ran into nearly the same problem some time ago. I had a svg with arbitrary height and width and I wanted to fit the image to a single page (A4). But my image is directly embedded in fo code, that is given to FOP for pdf output. fo:instream-foreign-object svg:svg /svg:svg /fo:instream-foreign-object And like you, I just got a clip of the whole image. My solution to fit this image to a single page was to find out, how many px fit in one page and then scale my image to this size. Actually all fo code is produced with xslt: xsl:variable name=max_width select=510/ xsl:variable name=max_height select=680/ !-- Scaling Factor -- xsl:variable name=scale xsl:choose xsl:when test=$max_height lt; $height or $max_width lt; $width xsl:choose xsl:when test=$max_height div $height lt; $max_width div $width xsl:value-of select=$max_height div $height/ /xsl:when xsl:otherwise xsl:value-of select=$max_width div $width/ /xsl:otherwise /xsl:choose /xsl:when xsl:otherwise xsl:value-of select=1/ /xsl:otherwise /xsl:choose /xsl:variable $height and $width are the effective dimensions of the image. then just put everything in svg:g : svg:g id=printarea transform={concat('scale(',$scale,')')} ... /svg:g and your svg will fit everytime.. Hope that helps, Peter -- [EMAIL PROTECTED] Institut für Medizinische Informatik, Statistik und Epidemiologie (IMISE) Universität Leipzig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
fit table in table-cell
Hi all fop users, I have a problem fitting a table in a table-cell. my table looks like: ++-- ... --+---+ |a text with | +___X___+ |a line break| | | ++-- ... --+---+ what the picture says, is that in one table-row I have one or more table-cells with lot of text in them, that causes a line break oder more. In the last table cell, I have a nested table with just one row of text. What happens is, that my nested table doesn't fill the entire last table-cell of the sourrounding table, which causes this bottom line to be shown in the middle of my last table cell. in FO the last cell with the nested table, looks like: fo:table-cell number-columns-spanned=2 fo:block fo:table table-layout=fixed width=100% fo:table-column column-width=proportional-column-width(1)/ fo:table-body fo:table-row fo:table-cell fo:block X /fo:block /fo:table-cell /fo:table-row /fo:table-body /fo:table /fo:block /fo:table-cell I cannot specify an explicit width of the cells, nor height. So when I set the height of the inner table to 100%, that doesnt work.. but thats exactly what I want, the inner table should have the same height as the table-cell it lies in. Has somebody an idea about this? Greetings, Peter -- [EMAIL PROTECTED] Institut für Medizinische Informatik, Statistik und Epidemiologie (IMISE) Universität Leipzig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
space between table-rows
Hi How can I force a space between the rows of a table in fop 0.20.4 ? fo:table-row padding-after=5mm does not work.. Greetings, Peter -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
table-row +border
Hi I try to use fo:table-row border-style=solid border-width=1pt border-color=black to achieve row separating lines in my tale, but it does not work. When I put the border.. attributes in table-cell, it works. Is the border stuff not implementd for table-row ? I'm using FOP 0.20.4. Peter -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
userconfig.xml in servlet
Hi everybody! I want to set FOPs userconfig.xml in the servlet, using these lines: File userConfigFile = new File(getServletContext().getResource(/WEB-INF/userconfig.xml).toExternalForm() ); Otions options = new Options(userConfigFile); this code compiles, but when running the servlet, I get an error: [ERROR] Could not load user configuration file jndi:\localhost\ow\WEB-INF\userco nfig.xml - error: C:\Programme\Apache Group\Tomcat 4.1\jndi:\localhost\ow\WEB-IN F\userconfig.xml (Syntax is wrong..) What can I do? Another question: I need the userconfig.xml, because I want to load an additional font into FOP, which I created from an TTF file, and use these lines in the userconfig.xml: ... fonts font metrics-file=mtcorsiva.xml kerning=yes font-triplet name=MTCORSIVA style=normal weight=normal /font ... I put the fonts xml file in the same dir as userconfig.xml. Is the correct? Nice greetings, Peter/ -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: userconfig.xml in servlet
Thanks, but it still does not work. I use File userConfigFile = new File(getServletContext().getRealPath(/WEB-INF/userconfig.xml)); to set the userconfig file, and this works fine. but all efforts to set the baseDir didn't work: I tried: String pathToFile = getServletContext().getRealPath(/WEB-INF); (I thought this must work, because the one above works fine) or String pathToFile = file://+getServletContext().getRealPath(/WEB-INF); or even String pathToFile = file://w:/projekte/owservlet/build/WEB-INF/; with the following org.apache.fop.configuration.Configuration.put(baseDir, pathToFile ); but the fop tells me [ERROR] Failed to read font metrics file /projekte/owservlet/build/WEB-INF/mtcorsiva.xml : null whats happening to the file://w: part of the path ? Peter -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Driver API
Hi Where can I find a (javadoc) API for the fop Driver class ? Peter -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Driver in Servlet
Hi fop users! I have a servlet, which gets data from a sql database, puts it in xml and then i transform the xml to xsl:fo and use the fop Driver to transform it to pdf and send the pdf to the browser, using the following code snippet: public void doGet(HttpServletRequest request, HttpServletResponse response) { Transformer transformer; Document myxml; ... Driver driver = new Driver(); driver.setOutputStream(response.getOutputStream()); driver.setRenderer(Driver.RENDER_PDF); response.setContentType(application/pdf); transformer.transform(new DOMSource(myxml),new SAXResult(driver.getContentHandler())); } The transformer is equipped with the xml-xsl:fo stylesheet. So all works fine, but I thought about speed issues: in every doGet(..) call a new driver is created, and I think that is to slow for a large number of users accessing the servlet. But when i put the driver as a global variable in the servlet or maybe servlet-context, what happens when two or more users want to access the driver? bye, Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]