collision between xalan and xerces

Discussion in 'Java' started by Elhanan, May 11, 2006.

  1. Elhanan

    Elhanan Guest

    hi..


    i've been trying to use xalan for transformations and and xercest for
    parsing xml.

    i got my transformation to work.


    when i first tried xerces 2.5.0 i got
    java.lang.NoSuchMethodError:
    javax.xml.parsers.DocumentBuilderFactory.getSchema()Ljavax/xml/validation/Schema;

    i've read that it uses jaxp-api and not java's own xml interface, and i
    saw that you needed to set -Djava.endorsed.dirs to a lib that had
    jaxp-api in it, so i did that, and added dom, and xalan jars
    (otherwise i would get problems with xpath, and dom).


    but now my transformations fell apart with an error of:
    ERROR: 'An attribute whose value must be a QName had the value '''

    (but it worked before!!!!)

    (so that's going on?)
    Elhanan, May 11, 2006
    #1
    1. Advertising

  2. Elhanan

    Elhanan Guest

    i think i got it now..

    to all you gurus who are smiling to one another, go away :(

    it would appear that in code the default xslt processor is changed to
    xsltc, which is rather unreliable. in order to go back to using the
    default xalan implentation

    http://java.sun.com/webservices/docs/1.4/jaxp/ReleaseNotes.html

    do this:
    javax.xml.transform.TransformerFactory=

    com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl

    if you ever consdider using xsltc, be warn, it's crap!!, no matter
    faster you get, it's unstable, i'm writing this with the blood of the
    dead in 1:30 am, weekend, you have been told, stay away from xsltc!!!!
    Elhanan, May 11, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. sp

    xerces and xalan

    sp, Sep 18, 2004, in forum: Java
    Replies:
    2
    Views:
    6,655
    Mike Schilling
    Sep 18, 2004
  2. Alex

    xalan and Xerces?

    Alex, Oct 24, 2003, in forum: XML
    Replies:
    1
    Views:
    453
    Bob Foster
    Oct 25, 2003
  3. Francesc Guim Bernat
    Replies:
    0
    Views:
    646
    Francesc Guim Bernat
    Apr 30, 2004
  4. Janice
    Replies:
    0
    Views:
    425
    Janice
    Oct 12, 2004
  5. cvissy
    Replies:
    0
    Views:
    601
    cvissy
    Nov 16, 2004
Loading...

Share This Page