Re: [barcode4j] question / issue with Barcode / FOP
Jeremias Maerki <[email protected]>
| Newsgroups | gmane.comp.krysalis.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello Daniel
On 19.07.2004 20:05:42 Daniel Greene wrote:
> I'm trying to use Barcode with FOP. Sounds simple enough, as the example xsl seems to work.
> However, I cannot substiture variable values in for the barcode message:
>
> <xsl:variable name="testit" select="FIELD_FROM_XML" />
>
> <barcode:barcode xmlns:barcode="http://www.krysalis.org/barcode/ns" msg="$testit" >
> .....
> </barcode>
>
> what I get is a barcode with literally "$testit" as the text.
Yes, because you forgot the enclosing curly braces: msg="{$testit}"
(See http://www.w3.org/TR/xslt#attribute-value-templates)
An alternative is to do this:
<barcode:barcode xmlns:barcode="http://www.krysalis.org/barcode/ns">
<xsl:attribute name="msg">
<xsl:value-of select="$testit"/>
</xsl:attribute>
> I tried the other way of generating them shown in the example section, with the
>
> <xsl:variable name="block">
> <barcode>
> <ean-13/>
> </barcode>
> </xsl:variable>
>
> and later with
> <xsl:copy-of select="barcode:generate($block,'test')" />
>
>
> I get a 'Function not supported' error....
Here, you probably forgot to declare the barcode: namespace prefix.
Check the instructions here:
http://barcode4j.krysalis.org/xalan-ext.html#Using+the+barcode+extension+for+Apache+Xalan
I hope this helps.
Jeremias Maerki
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click