Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#34 saxon9he use Barcode4J to FO File

open
nobody
None
5
2014-08-22
2011-04-13
陈 永东
No

I'm use saxon9he to FO File,In XLST v2, I do not know how to achieve XLST v1 use Barcodw4j as follows:
<fo:instream-foreign-object>
<fo:block>
<fo:instream-foreign-object content-height="93%" content-width="93%">
<!--条码大小缩放-->
<xsl:variable name="bc" select="barcode:generate($barcode-cfg, SERIAL_NUM)"/>
<svg:svg xmlns:svg="http://www.w3.org/2000/svg">
<xsl:attribute name="width">
<xsl:value-of select="$bc/svg:svg/@width"/>
</xsl:attribute>
<xsl:attribute name="height">
<xsl:value-of select="$bc/svg:svg/@height"/>
</xsl:attribute>
<svg:rect x="0mm" y="0mm" fill="white">
<xsl:attribute name="width">
<xsl:value-of select="$bc/svg:svg/@width"/>
</xsl:attribute>
<xsl:attribute name="height">
<xsl:value-of select="$bc/svg:svg/@height"/>
</xsl:attribute>
</svg:rect>
<xsl:copy-of select="$bc"/>
</svg:svg>
<!--xsl:copy-of select="barcode:generate(., msg)"/-->
</fo:instream-foreign-object>
</fo:block>
</fo:instream-foreign-object>

Discussion

  • 陈 永东
    陈 永东
    2011-04-13

    barcode:generate:In this way, there are ways in saxon9he use it?

     
  • I no longer support the Saxon XSLT plug-ins. Saxon is a moving target concerning the extension API. It changes incompatibly even between minor versions. There are currently two Saxon plug-ins, one for Saxon 6 and one for Saxon 8/9.1. If you're using Apache FOP as your XSL-FO formatter, it is better to switch to the Apache FOP plug-in. Otherwise, you may need to adjust the Saxon plug-in yourself.

     
  • 陈 永东
    陈 永东
    2011-04-13

    I'm use Saxon XSLT v2 to fo file,Thanks.