XSLTC XML/XSLT Java Translets

Discussion in 'Java' started by SG, Aug 15, 2007.

  1. SG

    SG Guest

    Translets "are precompiled XSL documents that are optimized and
    converted into simple Java classes. When you compile your application
    Java files, you compile your XSL files into Java class files. During
    runtime, you can load translets like any regular Java class and
    perform XSL transformations over and over again.

    The syntax checking and parsing of XSL documents are done when the XSL
    files are compiled. The transformation therefore takes only as long as
    the compiled code takes to execute, which improves performance
    multiple folds.

    The downside to using XSL is that "it can take a considerable amount
    of time and reduce performance. The time needed to parse XML and XSL
    documents is directly proportional to the size of the documents. Each
    transformation requires the XML and XSL documents to be loaded, syntax
    checked, and parsed." I recommends using translets for the following
    reasons.

    I had written an application (<a href="http://www.simplygites.com"
    title="www.simplygites.com">SimplyGites</a>) using standard XSL / XML
    transformation and experienced some very slow server-side
    transformation on the very complex screens with large amounts of xml.
    Timings showed these problem screens took 2-3 seconds to transform,
    which was totally unacceptable non-functional requirements.

    I considered rewriting these screens as JSP or PHP, then I discovered
    Translets. And wow what a discovery the timings for these pages now
    compiled as Translets(java classes) are amazing in comparison to the
    original timings ? I now have them transforming in 500ms (all now
    under 1 second).

    I would recommend anyone using XSL/XML transformation to use
    Translets, these have now been running tried and tested on the <a
    href="http://www.simplygites.com"
    title="www.simplygites.com">SimplyGites</a> for the past 6months.

    Technolgies used:
    IBM WebShpere
    Java
    JAXP 1.3

    Required Jars
    xsltc.jar
    runtime.jar
    BCEL.jar
    JLex.jar
    java_cup.jar
    regexp.jar
    xml-dtm.jar

    For more information see http://xml.apache.org/xalan-j/xsltc_usage.html

    I hope this helps anyone that has XML/XSLT performance issues.

    Mark
    MB Computer Ltd
    www.simplygites.com
     
    SG, Aug 15, 2007
    #1
    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. Richard
    Replies:
    3
    Views:
    1,785
    Richard
    Nov 22, 2005
  2. awebguynow

    XSLTC, when to expect XSLT 2.0 ?

    awebguynow, Dec 29, 2005, in forum: Java
    Replies:
    0
    Views:
    498
    awebguynow
    Dec 29, 2005
  3. Justine Hlista

    Basic XSLT/XSLTC question

    Justine Hlista, Mar 3, 2004, in forum: XML
    Replies:
    3
    Views:
    580
    Dimitre Novatchev [MVP XML]
    Mar 4, 2004
  4. Meikel
    Replies:
    0
    Views:
    511
    Meikel
    Jan 17, 2005
  5. SG
    Replies:
    2
    Views:
    860
    Mike Schilling
    Aug 15, 2007
Loading...

Share This Page