XSLT from altova stylevision with barcode

Help
Manlon
2013-06-26
2013-06-26
  • Manlon
    Manlon
    2013-06-26

    Hello,

    The goal of my java API is to generate a pdf from an altova stylevision XSLT-FO.

    I can generate a pdf with saxon and fop when there is no barcode.

    When I insert a barcode, I have this error on saxon compilation :

    Error at xsl:variable on line 773 column 268 of fc-f1.xslt:
    XPST0017 XPath syntax error at char 76 on line 773 near {...nvert-length-to-mm('1px')) ...}:
    Cannot find a matching 2-argument function named
    {java:com.altova.extensions.barcode.BarcodePropertyWrapper}new(). For diagnostics on calls
    to Java methods, use the -TJ command line option or set the Configuration property
    FeatureKeys.TRACE_EXTERNAL_FUNCTIONS

    Is it possible to use Saxon with barcode implement by Altova Stylevision?

    Thanks a lot.

     
  • Michael Kay
    Michael Kay
    2013-06-26

    First, please use the forums at http://saxonica.plan.io in preference.

    Second: the error message is clear. Your stylesheet is calling an Altova extension function, which of course is not available when you run under Saxon. Certainly it's not available under Saxon-HE, which does not support calls on "reflexive" extension functions.

    It MAY be possible to call this extension function if you have a licensed version of Saxon-PE; it depends on the exact specification of the method, and you MAY need to change the way you are calling it. Alternatively, the Altova interface appears to be a wrapper around methods in the open-source library barcode4j, and it should be possible to call them directly.