Performance of XSLT

We have an HTML page which user will use to get information. At the click of submit information is queried from 2 systems which is in XML format. This information is then merged into one before sending it back to the client.
Couple of questions:
1. My question, is it advisable to use XSLT for such kind of real time environment. I am not sure of the performance, if it's going to overload CPU, memory etc.
2. What are the basic guidelines for writing efficient XSLT transformation.
3. Is merging using XSLT slower than directly doing it in JAXB?

In my experience, the decision to use Java code vs. XSLT is based on a couple of factors:
1) Is what you want to do something that can be done in XSLT? XSLT is a very powerful tool but it is very quirky. It is very different from any other programming language I've used (and I have used a lot of them). So, the first test is "Can what I want to do be done easily in XSLT?"
2) Next, who will make changes? If this is code to be shipped to a client and they will need to make minor changes over a period of time, and you don't want them to change the Java code, or the person who will be responsible for making those changes is not a Java programmer, then XSLT may be a better way than having the transformative code in Java. Also, changes might be done by an administrator with some training in XSLT more easily than having to teach them Java + XML + WebServices + database + + + .
3) I've never heard of situations where XSLT caused stack overflows, or lengthy delays. That is not to say that you can be sloppy and XSLT will save you. XSLT does not have some "simple" constructs like mutable variables, or loops as in most for or while loops, one fallback is to use recursion. This can eat memory if not controlled and tested.
4) Any work to fine tune the speed of this operation will probably be overshadowed by bad code in other parts of the application.
I cannot think of anything that can be done in XSLT that cannot be done in Java code. There are many things that cannot be done in XSLT, however, that can be done in Java. Writing and debugging XSLT, especially the first 100,000 or so times is not simple for anything more complex than a textbook or tutorial exercise.
So, there are no hard and fast rules on which is better. Each is the right choice for a set of problems. You have not given us enough information to make that decision. I've tried to help with your decision.

Similar Messages

  • How to perform an xslt transformation on an xml document dynamically ?

    Hi all,
    I'd like to perform an xslt tranformation on a dynamically generated xml code. I'm looking for a tag which can by useful for it. The tag should take both xml code and xslt code, passed as String arguments (not as names of xml and xslt files). I tried to use xtags library and jstl:transform tag but it did not work. It worked only with plain xml code passed to x-tag. When I try to perform a transformation on a tag body containing an output text tag, the transformation formats only this tag, not its content.
    For example:
    <xtags:style xslt="xslName.xsl">
    <h:outputText value="#{beanName.stringPropertyName}"/>
    </xtags:style>
    Thanks in advance
    Message was edited by:
    opad

    The issue is in the logic f your XSL mapping.
    Use the same source XML and use it with XML Spy to debug why it is not working as you want it to.
    Regards
    Bhavesh

  • Poor performance of XSLT-transformation

    Hi, everyone
    I`ve got report in BI-publisher based on xsl-template.
    This template transforms flat xml-file in Excel file and displays the data in the likeness of a cross-tab.
    Everything looks fine, but when the input file is larger than 1 MB, then the output file is formed about 10-15 minutes.
    However, when the input file is less than 1 MB, I got the output file is less than 1 minute.
    How i can see where is the "bottleneck"?
    What i can do to improve performance of xslt-transformation?
    Thanks

    Hi,
    Sorry that did not respond sooner.
    We have gave the process of 1024 MB memory.
    It`s about 4100+ records in result xml.
    BIP version is 10.1.3.4 and java - 1.6.
    Xsl-template and Xml you can download here
    Thank you for reply =)

  • How to perform an XSLT Mapping Test

    Hi,
    I have defined an XSLT Mapping in XI and it seems to work, but when I perform a test in my Interface Mapping the source fields are not written on respective target fields. What is the problem?
    Thanks!

    The issue is in the logic f your XSL mapping.
    Use the same source XML and use it with XML Spy to debug why it is not working as you want it to.
    Regards
    Bhavesh

  • Performance of XSLT transformation

    Hello everybody,
    I´m trying to do some in-database XML transformations from one XML format to another with a rather complex xsl stylesheet of about 9000 lines of code which performs this transformation. At first I tested the XDK XSLT functionality by simply doing a Transformation over the JAXP API outside the Database. It performed not bad, altough the memory consumption was a little bit higher then Saxon or Xalan. After that I read about the possibilities of in-database transformation, which should consume less memory because of oracle´s xml features like scalable DOM, XML Indexing and Query Rewriting when using object relational or binary storage. So we loaded our testdata into the db (we are using 11gR2 on a test system with Intel Core2Duo @ 3GhZ and 3GB RAM), in different XML storage options (XMLTYPE CLOB, Binary, OR) and tried to do a XSLT transformation on the columns. But it isn´t working.
    The db seems not to be able to cope with the transformation although the parser and processor should be the same as the off-database transformation that was working well (or am I wrong?). After half an hour we aborted because the db hadn´t finished the transformation yet (the off-db transformation of this 100KB XML took less then a second). We tried indexing the columns with XMLIndex, didn´t work out, we tried both XMLTYPE´s XMLtransform() and dbms_xslprocessor.processxsl(), same problem, the DB is working and working with no result, after some time we have to terminate. With a simple teststylesheet the transformation is doing fine but our complex stylesheet seems to be the problem.
    My question is, why is the xslt performance so poorly with the complex stylesheet and why can I use the XDK Parser and Processor in an off-db transformation very efficiently but when doing the same transformation in the db it´s not working.
    Hope you can help me out a little bit I´m really running out of ideas.
    Greetz dirac

    Hi,
    The db seems not to be able to cope with the transformation although the parser and processor should be the same as the off-database transformation that was working well (or am I wrong?). No, the database built-in XSLT processor (C-based) is not the same as the XDK's Java implementation.
    There's also a C XSLT processor available for external transformation and working with compiled stylesheets, it should outperform the Java implementation.
    See : http://docs.oracle.com/cd/E11882_01/appdev.112/e23582/adx_c_xslt.htm#i1020191
    We tried indexing the columns with XMLIndex, didn´t work out, we tried both XMLTYPE´s XMLtransform() and dbms_xslprocessor.processxsl(), same problem, the DB is working and working with no result, after some time we have to terminate. With a simple teststylesheet the transformation is doing fine but our complex stylesheet seems to be the problem.XMLIndexes won't help at all in this situation.
    In my experience so far with the built-in engine, I've seen the best result when the XML document we want transform is stored as binary XML.
    I don't know about the scalable DOM (or "lazy" DOM loading) feature described in the documentation, seems it doesn't support complex transformations, much like functional vs. streaming evaluation for XQuery.
    Hope you can help me out a little bit I´m really running out of ideas.I'd be interested in a test case if you have the possibility (stylesheet + sample input XML). You can mail me at this address : mb[dot]perso[at]wanadoo[dot]fr
    If you can't, could you describe what kind of transformation you're performing and how can I reproduce that behaviour?
    Thanks.
    Marc.

  • Perform XSLT on XML as data source?

    Crystal Reports 2008 (12.0.0.549) can use XSLT when exporting an XML document.
    Can the XML driver, however, be configured to perform a XSLT on an XML document that will result in a document that will be used as a data source? 
    When I attempted to do so, I got an error--I was using an XSL document as the data source.

    Jamie-
    Thanks for the response.
    I'm trying to represent my résumé in XML format, then use Crystal Reports to generate a formatted, PDF document: craibuc/crystal-xmlresume · GitHub
    I'm hoping to avoid too much pre-processing, hence the desire to keep the data source in XML.  As such, exporting to CSV isn't an option.
    If this isn't possible, it would be a nice enhancement to the XML driver.

  • Mapping preferences between ABAP, JAVA, XSLT...?

    Hi,
    How do i choose between,
    ABAP Mapping
    Java Mapping
    XSLT Mapping..?
    Any pointers welcome..
    --DJ

    HI,
    JAVA Mapping :If you have complex mapping in your scenarios and also some times if you have more than 100 field tomap then better to choose the JAVA MApping.
    XSLT Mapping : Simple and if you have large size of messages then choose this type of XSLT mapping.
    ABAP Mapping : If your scenario is deals with ABAP / R3 related transactions , then choose ABAP Mapping ..
    Performance wise XSLT ,JAVA, ABAP order..
    Please see the below links , it may helps you
    Java Mapping
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-i
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-ii
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-iii
    XSLT Mapping
    /people/prasadbabu.nemalikanti3/blog/2006/03/30/xpath-functions-in-xslt-mapping
    /people/sreekanth.babu2/blog/2005/01/05/design-time-value-mappings-in-xslt
    /people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping
    XSLT Mapping with java enhancement
    /people/pooja.pandey/blog/2005/06/27/xslt-mapping-with-java-enhancement-for-beginners
    Abap mapping test - /people/sameer.shadab/blog/2005/09/29/testing-abap-mapping
    Regards
    Chilla..
    <i>Points rewarded if it is usefull..</i>

  • File to RFC - XSLT Mapping after RFC structure has changed

    Hi
    I'm an XI beginner, and am looking at a File to RFC scenario which has been implemented in our 7.0 system.
    We have a requirement to add a new field to the RFC (which has already been done by the ABAPer) and I need to make the necessary changes in XI. So I have re-imported the RFC and added a field in Data Type (we had file content conversion and we have manually defined the Data Types).
    For mapping - is there a way to utilise the existing XSLT mapping without having to re-do the entire mapping in Stylus Studio? Is there an easy way to just add one additional field in Stylus Studio? or do I have to edit the xsl manually?
    Thanks
    Manoj

    Manoj,
    Let me explain you....
    1.Take the old XSL file into anote pad
    2.now import your newly modified source and target XSD and import into SS
    3.Perform the xslt mapping for the newly added source and target field
    4.generate the XSL for this mapping
    5.Now take the lines which mapped (Do not take all the lines in the generated XSL) and copy these few lines mapped
    6.Now go to the old XSL in the notepad and add the lines copied from the new XSL
    Now try to paste the entire XSL in SS then you would be able to see all the fields mapped in SS IF yes then you are done with XSLT mapping.
    Regards,
    Naveen.

  • Xslt ecc6  ISO-8859-1 problem when download xml file

    Hello,
    i create an ABAP test program:
    *& Report Z_ABAP_TO_XML                                             *
    *& Write the data from an internal ABAP table into an XML document, *
    *& and write it onto your frontend computer                         *
    REPORT z_abap_to_xml.
    TYPE-POOLS: abap.
    CONSTANTS gs_file TYPE string VALUE 'C:\Users\Marco Consultant\Desktop\test.xml'.
    * This is the structure for the data to go into the XML file
    TYPES: BEGIN OF ts_person,
      cust_id(4)    TYPE n,
      firstname(20) TYPE c,
      lastname(20)  TYPE c,
    END OF ts_person.
    * Table for the XML content
    DATA: gt_itab        TYPE STANDARD TABLE OF char2048.
    * Table and work area for the data to fill the XML file with
    DATA: gt_person      TYPE STANDARD TABLE OF ts_person,
          gs_person      TYPE ts_person.
    * Source table that contains references
    * of the internal tables that go into the XML file
    DATA: gt_source_itab TYPE abap_trans_srcbind_tab,
          gs_source_wa   TYPE abap_trans_resbind.
    * For error handling
    DATA: gs_rif_ex      TYPE REF TO cx_root,
          gs_var_text    TYPE string.
    * Fill the internal table
    gs_person-cust_id   = '3'.
    gs_person-firstname = 'Bill'.
    gs_person-lastname  = 'Gates'.
    APPEND gs_person TO gt_person.
    gs_person-cust_id   = '4'.
    gs_person-firstname = 'Frodo'.
    gs_person-lastname  = 'Baggins'.
    APPEND gs_person TO gt_person.
    * Fill the source table with a reference to the data table.
    * Within the XSLT stylesheet, the data table can be accessed with
    * "IPERSON".
    GET REFERENCE OF gt_person INTO gs_source_wa-value.
    gs_source_wa-name = 'IPERSON'.
    APPEND gs_source_wa TO gt_source_itab.
    * Perform the XSLT stylesheet
    TRY.
        CALL TRANSFORMATION z_abap_to_xml
        SOURCE (gt_source_itab)
        RESULT XML gt_itab.
      CATCH cx_root INTO gs_rif_ex.
        gs_var_text = gs_rif_ex->get_text( ).
        gs_var_text = gs_rif_ex->get_text( ).
        MESSAGE gs_var_text TYPE 'E'.
    ENDTRY.
    * Download the XML file to your client
    CALL METHOD cl_gui_frontend_services=>gui_download
      EXPORTING
        filename                = gs_file
      CHANGING
        data_tab                = gt_itab
      EXCEPTIONS
        file_write_error        = 1
        no_batch                = 2
        gui_refuse_filetransfer = 3
        invalid_type            = 4
        no_authority            = 5
        unknown_error           = 6
        header_not_allowed      = 7
        separator_not_allowed   = 8
        filesize_not_allowed    = 9
        header_too_long         = 10
        dp_error_create         = 11
        dp_error_send           = 12
        dp_error_write          = 13
        unknown_dp_error        = 14
        access_denied           = 15
        dp_out_of_memory        = 16
        disk_full               = 17
        dp_timeout              = 18
        file_not_found          = 19
        dataprovider_exception  = 20
        control_flush_error     = 21
        not_supported_by_gui    = 22
        error_no_gui            = 23
        OTHERS                  = 24.
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
      WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    and i created XSLT test conversion:
    <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
      <xsl:output encoding="iso-8859-1" indent="yes" method="xml" version="1.0"/>
      <xsl:strip-space elements="*"/>
      <xsl:template match="/">
        <CUSTOMERS>
          <xsl:apply-templates select="//IPERSON/item"/>
        </CUSTOMERS>
      </xsl:template>
      <xsl:template match="IPERSON/item">
        <item>
          <customer_id>
            <xsl:value-of select="CUST_ID"/>
          </customer_id>
          <first_name>
            <xsl:value-of select="FIRSTNAME"/>
          </first_name>
          <last_name>
            <xsl:value-of select="LASTNAME"/>
          </last_name>
        </item>
      </xsl:template>
    </xsl:transform>
    Seem all correct infact the program download  a file XML but the file have the encoding="UTF-16" also if i have specified "iso-8859-1" and if i tried to opend the xml file the file appears not correct because is generated with as first character "#", why?
    Below the xml generated..
    What i have to do to generate a correct XML without errors?
    #<?xml version="1.0" encoding="utf-16"?>
    <CUSTOMERS>
      <item>
        <customer_id>0003</customer_id>
        <first_name>Bill</first_name>
        <last_name>Gates</last_name>
      </item>
      <item>
        <customer_id>0004</customer_id>
        <first_name>Frodo</first_name>
        <last_name>Baggins</last_name>
      </item>
    </CUSTOMERS>

    hello all!
    i resolve the problem using:
    * Perform the XSLT stylesheet
      g_ixml = cl_ixml=>create( ).
      g_stream_factory = g_ixml->CREATE_STREAM_FACTORY( ).
      g_encoding = g_ixml->create_encoding( character_set = 'utf-16' "unicode
        byte_order = 0 ).
      resstream = g_stream_factory->CREATE_OSTREAM_ITABLE( table = gt_xml_itab ).
      call method resstream->set_encoding
        exporting encoding = g_encoding.
    I think it's the right way, i put all my ABAP program updated:
    *& Report Z_ABAP_TO_XML                                             *
    *& Write the data from an internal ABAP table into an XML document, *
    *& and write it onto your frontend computer                         *
    REPORT z_abap_to_xml.
    TYPE-POOLS: abap.
    CONSTANTS gs_file TYPE string VALUE 'C:UsersMarco ConsultantDesktop     est.xml'.
    data:  g_ixml type ref to if_ixml.
    data:  g_stream_factory type ref to IF_IXML_STREAM_FACTORY.
    data:  resstream type ref to if_ixml_ostream.
    data:  g_encoding type ref to if_ixml_encoding.
    * This is the structure for the data to go into the XML file
    TYPES: BEGIN OF ts_person,
      cust_id(4)    TYPE n,
      firstname(20) TYPE c,
      lastname(20)  TYPE c,
    END OF ts_person.
    * Table for the XML content
    DATA: gt_xml_itab        TYPE STANDARD TABLE OF char2048.
    * Table and work area for the data to fill the XML file with
    DATA: gt_person      TYPE STANDARD TABLE OF ts_person,
          gs_person      TYPE ts_person.
    * Source table that contains references
    * of the internal tables that go into the XML file
    DATA: gt_source_itab TYPE abap_trans_srcbind_tab,
          gs_source_wa   TYPE abap_trans_resbind.
    * For error handling
    DATA: gs_rif_ex      TYPE REF TO cx_root,
          gs_var_text    TYPE string.
    * Fill the internal table
    gs_person-cust_id   = '3'.
    gs_person-firstname = 'Bill'.
    gs_person-lastname  = 'Gates'.
    APPEND gs_person TO gt_person.
    gs_person-cust_id   = '4'.
    gs_person-firstname = 'Frodo'.
    gs_person-lastname  = 'Baggins'.
    APPEND gs_person TO gt_person.
    gs_person-cust_id   = '5'.
    gs_person-firstname = 'Frodo'.
    gs_person-lastname  = 'Baggins'.
    APPEND gs_person TO gt_person.
    gs_person-cust_id   = '6'.
    gs_person-firstname = 'Frodo'.
    gs_person-lastname  = 'Baggins'.
    APPEND gs_person TO gt_person.
    gs_person-cust_id   = '7'.
    gs_person-firstname = 'Frodo'.
    gs_person-lastname  = 'Baggins'.
    APPEND gs_person TO gt_person.
    gs_person-cust_id   = '8'.
    gs_person-firstname = 'Frodo'.
    gs_person-lastname  = 'Baggins'.
    APPEND gs_person TO gt_person.
    gs_person-cust_id   = '9'.
    gs_person-firstname = 'Frodo'.
    gs_person-lastname  = 'Baggins'.
    APPEND gs_person TO gt_person.
    gs_person-cust_id   = '10'.
    gs_person-firstname = 'Frodo'.
    gs_person-lastname  = 'Baggins'.
    APPEND gs_person TO gt_person.
    gs_person-cust_id   = '11'.
    gs_person-firstname = 'Frodoèé'.
    gs_person-lastname  = 'Baggins~¦Üu0192'.
    APPEND gs_person TO gt_person.
    gs_person-cust_id   = '11'.
    gs_person-firstname = 'Frodoèé'.
    gs_person-lastname  = 'Baggins~¦Üu0192'.
    APPEND gs_person TO gt_person.
    gs_person-cust_id   = '11'.
    gs_person-firstname = 'Frodoèé'.
    gs_person-lastname  = 'Baggins~¦Üu0192'.
    APPEND gs_person TO gt_person.
    gs_person-cust_id   = '11'.
    gs_person-firstname = 'Frodoèé'.
    gs_person-lastname  = 'Baggins~¦Üu0192'.
    APPEND gs_person TO gt_person.
    gs_person-cust_id   = '11'.
    gs_person-firstname = 'Frodoèé'.
    gs_person-lastname  = 'Baggins~¦Üu0192'.
    APPEND gs_person TO gt_person.
    gs_person-cust_id   = '11'.
    gs_person-firstname = 'Frodoèé'.
    gs_person-lastname  = 'Baggins~¦Üu0192'.
    APPEND gs_person TO gt_person.
    gs_person-cust_id   = '11'.
    gs_person-firstname = 'Frodoèé'.
    gs_person-lastname  = 'Baggins~¦Üu0192'.
    APPEND gs_person TO gt_person.
    gs_person-cust_id   = '11'.
    gs_person-firstname = 'Frodoèé'.
    gs_person-lastname  = 'Baggins~¦Üu0192'.
    APPEND gs_person TO gt_person.
    gs_person-cust_id   = '11'.
    gs_person-firstname = 'Frodoèé'.
    gs_person-lastname  = 'Baggins~¦Üu0192'.
    APPEND gs_person TO gt_person.
    gs_person-cust_id   = '11'.
    gs_person-firstname = 'Frodoèé'.
    gs_person-lastname  = 'Baggins~¦Üu0192'.
    APPEND gs_person TO gt_person.
    gs_person-cust_id   = '88'.
    gs_person-firstname = 'Frodoèé'.
    gs_person-lastname  = 'Baggins~¦Üu0192'.
    APPEND gs_person TO gt_person.
    * Fill the source table with a reference to the data table.
    * Within the XSLT stylesheet, the data table can be accessed with
    * "IPERSON".
    GET REFERENCE OF gt_person INTO gs_source_wa-value.
    gs_source_wa-name = 'IPERSON'.
    APPEND gs_source_wa TO gt_source_itab.
    * Perform the XSLT stylesheet
      g_ixml = cl_ixml=>create( ).
      g_stream_factory = g_ixml->CREATE_STREAM_FACTORY( ).
      g_encoding = g_ixml->create_encoding( character_set = 'utf-16' "unicode
        byte_order = 0 ).
      resstream = g_stream_factory->CREATE_OSTREAM_ITABLE( table = gt_xml_itab ).
      call method resstream->set_encoding
        exporting encoding = g_encoding.
    TRY.
        CALL TRANSFORMATION z_abap_to_xml
        SOURCE (gt_source_itab)
        RESULT XML gt_xml_itab.
      CATCH cx_root INTO gs_rif_ex.
        gs_var_text = gs_rif_ex->get_text( ).
        gs_var_text = gs_rif_ex->get_text( ).
        MESSAGE gs_var_text TYPE 'E'.
    ENDTRY.
    * Download the XML file to your client
    CALL METHOD cl_gui_frontend_services=>gui_download
      EXPORTING
        filename                = gs_file
        FILETYPE                  = 'BIN'
      CHANGING
        data_tab                = gt_xml_itab
      EXCEPTIONS
        file_write_error        = 1
        no_batch                = 2
        gui_refuse_filetransfer = 3
        invalid_type            = 4
        no_authority            = 5
        unknown_error           = 6
        header_not_allowed      = 7
        separator_not_allowed   = 8
        filesize_not_allowed    = 9
        header_too_long         = 10
        dp_error_create         = 11
        dp_error_send           = 12
        dp_error_write          = 13
        unknown_dp_error        = 14
        access_denied           = 15
        dp_out_of_memory        = 16
        disk_full               = 17
        dp_timeout              = 18
        file_not_found          = 19
        dataprovider_exception  = 20
        control_flush_error     = 21
        not_supported_by_gui    = 22
        error_no_gui            = 23
        OTHERS                  = 24.
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
      WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    *-- we don't need the stream any more, so let's close it...
    CALL METHOD resstream->CLOSE( ).
    CLEAR resstream.

  • Mapping Techniques determines Runtime Performance

    What mapping technique offers the best performance at runtime (i.e. graphical, ABAP, Java, XSLT)?  I have the ability to use anyone of these techniques, but I want to ensure I am using the one that offers the best performance at runtime, not the quickest/easiest to implement at design time.

    Hi..
    imo mapping performance does only partially depend on technique used, another important influence is the developer himself. You can develop highly performant graphical mappings, java mappings and also XSLT mappings but you have to focus on performance, know the concepts and maybe have someone else look at the mapping after it is finished I'm not sure about ABAP mapping, but i would say graphical and custom java have the same performance. XSLT is indeed slower, but there are some problems which can not be solved in graphical mapping (e.g. recursion) which can be solved rather easily in XSLT. Also SAP uses XSLT extensively in their standard content (e.g. MDM 3.0) where we have not encountered serious performance problems so far.
    best regards
    Christine

  • PL/SQL XSLT transformation problem

    I am trying to perform an XSLT transformation inside a PL/SQL procedure using dbms_xslprocessor.processxsl() but I am getting the following error 'LPX-00411: unknown function name encountered'
    The transformation XSL contains a java extension to preform some encoding of data and with the template containing the reference to the extension removed the transformation works fine. Does this mean that DBMS_XMLPARSER does not support java extensions in XSL or is it possible I'm just calling the function incorrectly?
    I have been testing up to now using oraxsl on the command line which seemed to work fine.
    Thanks,
    Alan

    Alan,
    Are you using the right namespace for the class you want to use?

  • How to run the ASDoc XSLT transformation manually?

    Hello there,
    I am combining the XML (toplevel.xml and toplevel_classes.xml) output of several actionscript projects into
    a one central XML file. I do this by first running the asdoc tool on the separate projects with the keep-xml and
    skip-xsl switches set to true. I then run my own XSLT script that combines the toplevel XML files and
    toplevel_classes XML files into two main files.
    After that I'd like to run the actual HTML generation, as far as I know its not possible to run asdoc with certain
    switches that tell it to skip the XML generation and just perform the XSLT transform immediately for a specified
    toplevel.xml and toplevel_classes.xml.
    Therefore I guess I have to run the XSLT tranforms from the 'templates' directory myself.
    So, thus my question is, what is the exact order of XSLT transforms and for which files?
    i.e. do I call class-list.xsl with toplevel_classes.xml, etc?
    thanx a lot in advance,
    Roland

    Hey there,
    yes, I understood what you meant, but even just the physical copying of the files will take a fair amount of time that I prefer to avoid
    I'm getting down with ANT as we speak Its a load of trial and error, but I'll report back if I have things working.
    Cheers,
    Roland

  • Configuring the XSLT transformation service

    I need to use XSL-T 2.0 in a service. The documentation for XSLT Transformation says that an alternate service provider can be used. It says I need to supply a string value that represents the fully qualified name of the Java class to use for performing the XSLT transformation, such as org.apache.xalan.xslt.XSLTProcessor. The Java class used must extend javax.xml.transform.TransformerFactory and must be available to the class loader of the LiveCycle ES server.
    The Saxon XSL-T engine supports the required interface, but I have not been able to install it successfully. In theory, it is a component that can be installed from the Components panel, but when I try that I receive the message "An error occurred. Please check the Eclipse error log for details". I have not been able to locate the error log.
    Any assistance greatly appreciated.
    --RKW

    Thanks for the assistance. That turns out to be the right advice. If you want to use the Saxon processor, you need to put the following jars in the server\all\lib folder:
    saxon8.jar
    saxon8-dom.jar
    --RKW

  • Automatic insert of xmlns:xsl during XSLT transformation

    I am using the xmlparserv2.jar of dated "12/10/00" to perform a XSLT transformation. I need to insert a xml:space="preserve" attribute to a generated tag. However, there is an addition attribute added : xmlns:xml="http://www.w3/org/XML/1998/namespace". How can I suppress the generation of this attribute ?
    Here is my XML :
    <?xml version = '1.0' standalone = 'no'?>
    <COLDdoc>
    <Page template="bkgnd1" num="1">
    <Line num="1"> CN011A021C 1A021</Line>
    <Line num="2"> 1954.90 7713.36</Line>
    </Page>
    </COLDdoc>
    My XSL is :
    <?xml version = '1.0' standalone = 'yes'?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:output method="xml" indent="no" doctype-system="svg-20000303-stylable.dtd"/>
    <xsl:template match="Line">
    <text>
    <xsl:attribute name="x">0</xsl:attribute>
    <xsl:attribute name="y">
    <xsl:value-of select="@num*10"/>
    </xsl:attribute>
    <xsl:attribute name="xml:space">preserve</xsl:attribute>
    <xsl:value-of select="."/>
    </text>
    </xsl:template>
    </xsl:stylesheet>
    The result XSLT Transformation :
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <!DOCTYPE text SYSTEM "svg-20000303-stylable.dtd">
    <text x="0" y="10" xmlns:xml="http://www.w3/org/XML/1998/namespace" xml:space="preserve"> CN011A021C 1A021</text>
    <text x="0" y="20" xmlns:xml="http://www.w3/org/XML/1998/namespace" xml:space="preserve"> "> 1954.90 7713.36</text>
    Regards.
    Jeffrey
    null

    Hi Greg,
    please try it with the following (just slightly) modified transformation (works fine for me):
    <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                   xmlns:asx="http://www.sap.com/abapxml"
                   xmlns:sap="http://www.sap.com/sapxsl"
                   version="1.0">
      <xsl:strip-space elements="*"/>
      <xsl:template match="/PEXR2002/IDOC">
        <asx:abap version="1.0">
          <asx:values>
            <HEADER_DATA>
              <SNDPRN>
                <xsl:value-of select="EDI_DC40/SNDPRN"/>
              </SNDPRN>
              <BGMREF>
                <xsl:value-of select="E1IDKU1/BGMREF"/>
              </BGMREF>
              <MOABETR>
                <xsl:value-of select="E1IDKU5/MOABETR"/>
              </MOABETR>
              <CREDAT>
                <xsl:value-of select="EDI_DC40/CREDAT"/>
              </CREDAT>
              <DATUM>
                <xsl:value-of select="E1EDK03/DATUM"/>
              </DATUM>
            </HEADER_DATA>
          </asx:values>
        </asx:abap>
      </xsl:template>
    </xsl:transform>
    I recommend to test all transformations that you define on a sample source and check the output. If you apply your original transformation you would see that it basically doesn't select anything and therefore you just get an XML document with the field names but no values.
    Cheers, harald

  • JEditorPane + XML + XSLT

    Hello, i have a little problem with a JEditorPane. Well, i have a XML file with XSLT and i want to put it in a JEditorPane. The problem is that i can see the XML but without the Stylesheet. I can't understand what is wrong.
    Please if you have any idea update me.
    Thanks, Ioannis.

    yep: kill the temp file, perform the XSLT in RAM only (for ex, output the XSLT result in a StringWriter or a ByteArrayOutputStream) and directly feed the result to the JTextArea or whatever...

Maybe you are looking for

  • Triggering E-mail for failed outbound idoc (Without using workflow)

    Hi Experts, In my secnario Idoc to file, where any failures of Idoc( Inbound/Outbound ) at SAP R/3 side will generate and send Emails to the required group. How to do this without using Work flow. If anybody knws please help me out its very urget. Re

  • Import/Export of XMI models to/from the EMFStore

    Hi, Is there a way to import/export the EMF model in XMI format into/from the EMFStore? Appreciate any response! Thank you!

  • Mail Trigger

    hi, i came across a scenario where in if the user is doing wrong confirmation, not only the system should throw an error at the same time it has to trigger a mail to the power user concerned( ie ... Lotus mail) How to configure it?

  • Java mail proxy question

    Hi people, I am trying to build a spam filter program which I found the best way to connect this program and the e-mail programs is to build a proxy mail server between the mail server and the e-mail program. I know that there is a program called Jam

  • Expose bpel process

    Hi all, I have a bpel process in weblogic server and it function ok. Now I want expose this process as web services. I have web server Apache / Tomcat with Spring and I will continue to have this architecture. How do it? Thanks, Dario I have try with