#60 Probleme with embed using

closed-works-for-me
barcode (4)
5
2004-05-11
2004-05-10
chekroun
No

hi,
i am experiencing difficulties with using barcode, with
embed client, i try with command line and it s working
fine, now
i want to integrate it in my embed client make on the
model of fop embed client, and it doesn t work ,
it seems that it doesn t take the extension in count:

[INFO] building formatting object tree

[INFO] setting up fonts

[ERROR] Unsupported element encountered: barcode
(Namespace:
xmlns:barcode=http://barcode4j.krysalis.org/ns). Source
context: unavailable

[ERROR] Expected XSL-FO (root, page-sequence, etc.),
SVG (svg, rect, etc.) or elements from another
supported language.

[ERROR] Unsupported element encountered: code128
(Namespace:
xmlns:barcode=http://barcode4j.krysalis.org/ns). Source
context: unavailable

[ERROR] Unsupported element encountered: height
(Namespace:
xmlns:barcode=http://barcode4j.krysalis.org/ns). Source
context: unavailable

[INFO] [1]

[ERROR] no handler defined for
xmlns:barcode=http://barcode4j.krysalis.org/ns:barcode
foreign xml

[INFO] Parsing of document complete, stopping renderer

Have you test it in this particular functioning mode, and
may you have an example.

thanks for helps

Discussion

  • Logged In: YES
    user_id=225352

    You're using the barcode4j namespaces. Since I haven't been
    able to do a release under the new name, yet, I must ask you
    if you are really using Barcode4J downloaded from
    SourceForge's CVS or if you are using the older Krysalis
    Barcode 0.9 release. If it's the latter then you need to
    use "http://www.krysalis.org/barcode/ns" instead.

    In any other case I suppose it's some weird classpath
    problem. The FOP extension should work in most cases but I
    have heard that in certain complicated application server
    environments problems may appear due to a complex class
    loader setup. You may have to make sure that Barcode4J is
    loaded by the same class loader as fop.jar so FOP can detect
    Barcode4J.

    If this doesn't help you may have to be a bit more verbose
    about your environment (classpath, what sort of client etc.).

    Jeremias Maerki

     
  • chekroun
    chekroun
    2004-05-11

    Logged In: YES
    user_id=1038870

    It doesnt work,
    i am using this client:
    http://cvs.apache.org/viewcvs.cgi/xml-
    fop/examples/embedding/java/embedding/ExampleXML2PDF.jav
    a?rev=HEAD

    with Jbuilder for the moment, and all is in the classpath:
    D:\App_server\jdk1.3.1_08\bin\javaw -classpath "
    D:\produits\demonfop\classes;
    D:\produits\demonfop\lib\krysalis-barcode-fop-ext-0.20.5-
    complete.jar;
    D:\produits\demonfop\lib\xml-apis.jar;
    D:\produits\demonfop\lib\xalan-2.4.1.jar;
    D:\produits\demonfop\lib\batik.jar;
    D:\produits\demonfop\lib\xercesImpl-2.2.1.jar;
    D:\produits\demonfop\lib\fop-0.20.5rc3a.jar;
    D:\produits\demonfop\lib\avalon-framework-4.1.4.jar;
    D:\produits\demonfop\lib\log4j-1.2.8.jar;
    D:\App_server\jdk1.3.1_08\demo\jfc\Java2D\Java2Demo.jar;
    D:\App_server\jdk1.3.1_08\docs\guide\imf\spi-
    sample\CityIM.jar;
    D:\App_server\jdk1.3.1_08\jre\lib\i18n.jar;
    D:\App_server\jdk1.3.1_08\jre\lib\jaws.jar;
    D:\App_server\jdk1.3.1_08\jre\lib\rt.jar;
    D:\App_server\jdk1.3.1_08\jre\lib\sunrsasign.jar;
    D:\App_server\jdk1.3.1_08\lib\dt.jar;
    D:\App_server\jdk1.3.1_08\lib\htmlconverter.jar;
    D:\App_server\jdk1.3.1_08\lib\tools.jar"

    is there a way to verifie that class are loaded ?

     
  • chekroun
    chekroun
    2004-05-11

    Logged In: YES
    user_id=1038870

    And this is my xsl file, maybe i made a mistake
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.1"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:fo="http://www.w3.org/1999/XSL/Format"
    xmlns:common="http://exslt.org/common"
    xmlns:xalan="http://xml.apache.org" >
    <xsl:output method="xml" version="1.0" omit-xml-
    declaration="no" indent="yes"/>
    <!--
    ==============================================
    ==============================================
    ================================= -->
    <xsl:template match="barcodes">
    <fo:root font-family="sans-serif" font-size="10pt">
    <fo:layout-master-set>
    <fo:simple-page-master master-name="simpleA4" page-
    height="29.7cm" page-width="21cm" margin-top="2cm" margin-
    bottom="1cm" margin-left="2cm" margin-right="2cm">
    <fo:region-body margin-bottom="1.1cm"/>
    <fo:region-after extent="1cm"/>
    </fo:simple-page-master>
    </fo:layout-master-set>
    <fo:page-sequence master-reference="simpleA4"
    language="de_CH">
    <fo:static-content flow-name="xsl-region-after">
    </fo:static-content>
    <fo:flow flow-name="xsl-region-body">
    <fo:block space-before="2mm">
    <fo:instream-foreign-object>
    <barcode:barcode
    xmlns:barcode="xmlns:barcode=http://www.krysalis.org/barco
    de/ns" msg="my message">
    <barcode:code128>

    &lt;barcode:height&gt;8mm&lt;/barcode:height&gt;
                &lt;/barcode:code128&gt;
                &lt;/barcode:barcode&gt;
            &lt;/fo:instream-foreign-object&gt;
    &lt;/fo:block&gt;
    

    </fo:flow>
    </fo:page-sequence>
    </fo:root>
    </xsl:template>

    </xsl:stylesheet>

     
  • chekroun
    chekroun
    2004-05-11

    Logged In: YES
    user_id=1038870

    sorry there is no more pb it was my fault, i modifie a little the
    code.
    with the original client i have no problem
    thanks for the time you give to me

     
    • status: open --> closed-works-for-me
     
  • Logged In: YES
    user_id=225352

    I'm glad it worked.