As suspected... Unfortunately I'm having some problems setting up my templates, and I can't find any good examples.
I keep getting an exception 'element xsl:template not allowed in this position', but as soon as I move it, I get an exception saying element fo: is not bound. I'm trying to create several templates which each build a <fo:table> an put these inside a main template. Below is the .fo I'm trying to build. Can anyone tell me what its supposed to look like?? Thanks /Johan <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:decimal-format name="standard" decimal-separator="," grouping-separator="." infinity="INFINITY" minus-sign="-" NaN="ogiltigt nummer" percent="%" per-mille="m" zero-digit="0" digit="#" pattern-separator=";"/> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> <fo:layout-master-set> <fo:simple-page-master master-name="content" margin-right="5mm" margin-left="5mm" margin-bottom="5mm" margin-top="5mm" page-width="210mm" page-height="297mm"> <fo:region-body margin-top="20mm" margin-bottom="20mm"/> <fo:region-before extent="20mm"/> <fo:region-after extent="20mm"/> </fo:simple-page-master> </fo:layout-master-set> <fo:page-sequence master-reference="content"> <fo:flow flow-name="xsl-region-body"> <xsl:template match="/"> <fo:table table-layout="fixed" inline-progression-dimension.optimum="200mm" font-size="10px"> <fo:table-column column-width="200mm" column-number="1" /> <fo:table-body start-indent="0px" text-align="start"> <fo:table-row> <fo:table-cell> <xsl:apply-templates select="tableTemplate" mode="blind"/> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> </xsl:template> <xsl:template match="tableTemplate" mode="blind"> <fo:table table-layout="fixed" width="100%"> <fo:table-column column-width="proportional-column-width(1)"/> <fo:table-body> <fo:table-row padding-bottom="0.5mm"> <fo:table-cell> <fo:block font-family="Times Roman" font-style="italic" font-size="8pt"> TEST </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row keep-with-previous="always"> <fo:table-cell> <fo:block> TEMPLATE </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> </xsl:template> </fo:flow> </fo:page-sequence> </fo:root> </xsl:stylesheet> -----Original Message----- From: Henry Zongaro [mailto:[EMAIL PROTECTED] Sent: den 5 december 2005 11:15 To: Elmström Johan Cc: news; xalan-j-users@xml.apache.org Subject: Re: Translet class format error Hi, Johan. news <[EMAIL PROTECTED]> wrote on 2005-12-05 03:19:07 AM: > I'm running into some problems when I'm trying to parse my xsl (xsl:fo to be > precise). Has anyone encountered this before ? How would I get around it? > I hope extracting some elements into templates might do the trick, but I'm not > optimistic... (maybe the translet is compiled differently then) ... > Exception in thread "main" java.lang.ClassFormatError: translet_out (Code of a > method longer than 65535 bytes) The JVM specification restricts methods in classes to fewer than 65536 bytes in length. When XSLTC generates translet classes, it sometimes creates methods that surpass that limit, which results in the ClassFormatError you see when the JVM attempts to load the class. This is a known problem. Until we have a fix for it (which I'm hoping will be this month) your only recourse is to try to restructure your stylesheet by making some of the templates smaller - "extracting some elements into templates," as you guessed. Thanks, Henry ------------------------------------------------------------------ Henry Zongaro Xalan development IBM SWS Toronto Lab T/L 969-6044; Phone +1 905 413-6044 mailto:[EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]