|
From: Frank D. <Fra...@ci...> - 2011-12-20 16:31:12
|
Hi Jeremias, Many thanks for your reply and hope you had a great holiday. In the Cocoon application - I get no error message, just no barcode appears. I suppose I was wondering if any of the cocoon jar files could be interfering with the jars in the class path. However as you say you are no Cocoon expert so perhaps I should just persevere or direct this query elsewhere. Best regards, Frank -----Original Message----- From: Jeremias Maerki [mailto:de...@je...] Sent: 19 December 2011 15:21 To: bar...@li... Subject: Re: [Barcode4j-users] Barcode4J with Cocoon Hi Frank Sorry for the late reponse. I've been on a 3 week holiday. Your example works fine from the command-line so your stylesheet can't be the problem. Unfortunately, you don't say what exactly your problem is. So, I'm at a loss on how to help you any further. I'm also no specialist on Cocoon. On 08.12.2011 12:29:57 Frank Daly wrote: > Hi, > > > > I've got Barcode4J working from the command line but am having > difficulty getting it to work in Cocoon. The version of FOP that I'm > using is 0.25.5 so I've added barcode4J.jar, > barcode4J-fop-ext-0.20.5-complete.jar and the Avalon Framework jar > file to the classpath. Would someone mind looking at the files below > and tell me what I need to do to get the barcode to appear. > > > > Thanks, > > > > Frank > > > > Below is my xml file > > > > <?xml version="1.0"?> > > <example> > > <heading>Hello, barcode world!</heading> > > <barcode>123456789012</barcode> > > </example> > > > > And here is my stylesheet > > > > <?xml version="1.0"?> > > <xsl:stylesheet > > version="2.0" > > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > > xmlns:fo="http://www.w3.org/1999/XSL/Format" > > xmlns:barcode="http://barcode4j.krysalis.org/ns"> > > <xsl:template match="example"> > > <fo:root> > > <fo:layout-master-set> > > <fo:simple-page-master > > master-name="page"> > > <fo:region-body > > margin-top="0.5in" > > margin-bottom="1in" > > margin-left="0.5in" > > margin-right="0.5in" > > /> > > </fo:simple-page-master> > > </fo:layout-master-set> > > <fo:page-sequence master-reference="page"> > > <fo:flow flow-name="xsl-region-body"> > > > > <fo:block> > > <xsl:value-of select="heading"/> <xsl:value-of select="barcode"/> > > </fo:block> > > <fo:block> > > into block > > > > <fo:instream-foreign-object> > > <barcode:barcode > > > > message="my message"> > > <barcode:code128> > > <barcode:height>8mm</barcode:height> > > </barcode:code128> > > </barcode:barcode> > > </fo:instream-foreign-object> > > > > </fo:block> > > </fo:flow> > > </fo:page-sequence> > > </fo:root> > > </xsl:template> > > > > </xsl:stylesheet> > > > Jeremias Maerki |