Use of transformer XSLT

What is the use of XSLT.....
I want to ask if the tree of the xml file has changed( such as remove a node from the tree), and then use the transformer to display the changed tree .........
does it mean that we don't need to rewrite the xml file to save the changed tree?

Well. XSLT specification just defines how to transform a source document into another .. the other can be palin text, another XML or HTML or whatever one wants.. n it really doesn't make ne change in the source tree..

Similar Messages

  • Bridge Output Module: Use Custom Transformer.xslt?

    Hello,
    I've been poking around the Adobe Output Module in CS4 to determine if we might be able to use it instead of the old Web Photo Gallery plug-in for Photoshop. I can understand the reasoning behind using XSLT / XML to generate HTML gallery pages, but I'm baffled by what appears to be a complete inability to specify a custom "transformer.xslt" which would be specific to a media gallery template. Is there any way to tell Bridge's Output Module to use a custom transformer.xslt so I don't have to edit or replace the default one?
    Many thanks for any help.

    SERIOUSLY.  And how about all of the other things missing from the old Contact Sheet:
    1. How many pdf pages will be generated?  ***MAY BE USEFUL when calculating the images per colum/row
    2. the ability to output directly to Photoshop.  Is it that hard?  Do you really believe people didn't use that?
    3. fix the stupid zoom.  It's a POINTER FINGER, but when you click it zooms.  And God forbid you keep anything consistent with any of your other software - ZOOM OUT IS *SHIFT*, not Command.  Even then, the cursor stays a stupid finger.

  • Call transformation XSLT and long note string in XML

    Hi
    Using call transformation (XSLT scheme) to convert XML file to html the problem is that line breaks in xml are ignored when passing the call tranformation.
    <b>Note in xml look like:</b>
    <com:Note><![CDATA[
    Serie 87% 0,000000
    Amount in this period 01-01-2006 - 01-07-2006 - 180 days
    Currency 16.267.117,38 DKK
    Loan DKK 14.332.700,00
    Debt 7.358.534,23
    Indexsfactor 226,230
    ]]></com:Note>
    <b>When HTML displayed in sap, - note is just a long string which continue out of the screen. Note looks like:</b>
    Serie 87% 0,000000Amount in this period 01-01-2006 - 01-07-2006 - 180 daysCurrency 16.267.117,38 DKKDebt 7.358.534,23Indexsfactor 226,230
    <i>What to do ? Any ideas ?</i>

    Hi Jon,
    What is the XSLT program that you're using to transform the XML?
    Can you try modifying the XSLT stylesheet and add or modify the following attribute.
    <xsl:output indent="yes"/>
    Regards,
    Erwin

  • XSLT-ABAP using Call Transformation

    Hello Friends,
    I am new to this XSLT-ABAP transformation. I went through the blogs and forums and got a fair bit of idea on this. Now, i am trying to create a simple program/ xslt transformation to test the scenario. Once this is successfull i need to implement this in our project.
    I am not sure, where and what i am doing wrong. Kindly check the below given XSLT/ XML/ ABAP Program and correct me.
    My XML File looks as given below:
      <?xml version="1.0" encoding="utf-8" ?>
    - <List>
    - <ITEM>
      <ITEMQUALF>ITEM1</ITEMQUALF>
      <MATERIAL>MAT1</MATERIAL>
      </ITEM>
    - <ITEM>
      <ITEMQUALF>ITEM2</ITEMQUALF>
      <MATERIAL>MAT2</MATERIAL>
      </ITEM>
    - <ITEM>
      <ITEMQUALF>ITEM3</ITEMQUALF>
      <MATERIAL>MAT3</MATERIAL>
      </ITEM>
      </List>
    My XSLT Transformation looks as given below:
    <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sap="http://www.sap.com/sapxsl" version="1.0">
      <xsl:strip-space elements="*"/>
      <xsl:template match="*">
        <List>
          <xsl:for-each select="ITEM">
            <xsl:element name="ITEM">
              <xsl:element name="ITEMQUALF">
                <xsl:value-of select="ITEMQUALF"/>
              </xsl:element>
              <xsl:element name="MATERIAL">
                <xsl:value-of select="MATERIAL"/>
              </xsl:element>
            </xsl:element>
          </xsl:for-each>
        </List>
      </xsl:template>
    </xsl:transform>
    My ABAP program looks as below:
    REPORT  ztest_ram.
    TYPES:
      BEGIN OF ty_test,
        itemqualf TYPE char10,
        material  TYPE char10,
      END OF ty_test,
      ty_t_test TYPE STANDARD TABLE OF ty_test.
    DATA:
      l_xml       TYPE REF TO cl_xml_document,
      t_test      TYPE ty_t_test,
      wa_person   TYPE LINE OF ty_t_test,
      t_xml_out   TYPE string,
      v_retcode   TYPE sy-subrc,
      v_totalsize TYPE i.
    DATA: gs_rif_ex     TYPE REF TO cx_root,
          gs_var_text   TYPE string.
    * Create object
    CREATE OBJECT l_xml.
    * Call method to import data from file
    CALL METHOD l_xml->import_from_file
      EXPORTING
        filename = 'C:\xml\xml_test.xml'
      RECEIVING
        retcode  = v_retcode.
    * Call method to Render into string
    CALL METHOD l_xml->render_2_string
      IMPORTING
        retcode = v_retcode
        stream  = t_xml_out
        size    = v_totalsize.
    * Call Transformation
    TRY.
        CALL TRANSFORMATION (`ZXSLT_RAM`)
                SOURCE XML t_xml_out
                RESULT     outtab = t_test.
      CATCH cx_root INTO gs_rif_ex.
        gs_var_text = gs_rif_ex->get_text( ).
        MESSAGE gs_var_text TYPE 'E'.
    ENDTRY.
    When i run this ABAP program to fetch the data from XML in to Internal table, i get the error message:
    Incorrect element List for XML-ABAP transformation
    I am really not sure how to proceed further. Could any one help me on this?
    Note: Please do not paste the same links, as i have gone through most of them.
    Thank you.
    Best Regards,
    Ram.

    UPDATE, works now.
    ABAP:
    method IF_HTTP_EXTENSION~HANDLE_REQUEST.
    *THIS METHOD IS AN HTTP INTERFACE FOR A
    *SICF WEB SERVICE HANDLER. IT RECEIVES AN XML PAYLOAD,
    *READS IT INTO AN XSTRING, THEN TRANSFORMS THE
    *XSTRING INTO ABAP DATA USING AN ABAP XSLT
    *TRANSFORMATION PROGRAM
    *Process incoming xml Request
         data: lxs_request TYPE xstring.
         lxs_request = server->request->get_data( ).
    *BUILD DATA TYPES
    TYPES: BEGIN OF ccw_line,
       field11 TYPE STRING,
       field22 TYPE STRING,
       END OF ccw_line.
    TYPES: BEGIN OF ccw_head,
       field1 TYPE STRING,
       field2 TYPE STRING,
       lines TYPE STANDARD TABLE OF ccw_line WITH DEFAULT KEY,
       END OF ccw_head.
    DATA: ccw_heads type STANDARD TABLE OF ccw_head,
           xccw_heads TYPE ccw_head.
    DATA: ccw_lines TYPE STANDARD TABLE OF ccw_line,
           zccw_lines TYPE ccw_line.
    DATA: lr_transformation_error TYPE REF TO cx_transformation_error.
    DATA: err_text TYPE string.
    *CALL TRANSFORMATION
    TRY.
       CALL TRANSFORMATION zccwpayload_prg
       SOURCE XML lxs_request
       RESULT OUTPUT = ccw_heads.   "RESULT PARAMETER ("OUTPUT") NAME MUST EQUAL TRANSFORMED XML ROOT eg <OUTPUT>XML DATA...</OUTPUT>
    * RESULT XML my_xml_result.    "THIS CAN BE USED IF YOU WANT TO RETURN XML INSTEAD OF ABAP DATA
       CATCH cx_xslt_exception INTO lr_transformation_error.
       err_text = lr_transformation_error->get_text( ).
       server->response->set_cdata( err_text ).
    ENDTRY.
    *SAVE TO DATABASE
    *BUILD RESPONSE
    call METHOD server->response->set_cdata
         EXPORTING
             DATA = err_text.
    endmethod.
    XML SOURCE:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <HEADS> <!--MATCH ON THIS IN XSLT!!!-->
          <HEAD><!-- FOR-EACH ON THIS-->
                <headval1>myHeader</headval1>
                <LINES>
                      <Line>
                            <lineval1>myLine</lineval1>
                      </Line>
                      <Line>
                            <lineval1>myLine</lineval1>
                      </Line>
                      <Line>
                            <lineval1>myLine</lineval1>
                      </Line>
                      <Line>
                            <lineval1>myLine</lineval1>
                      </Line>
                </LINES>
          </HEAD>
          <HEAD>
                <headval1>myHeader</headval1>
                <LINES>
                      <Line>
                            <lineval1>myLine</lineval1>
                      </Line>
                      <Line>
                            <lineval1>myLine</lineval1>
                      </Line>
                      <Line>
                            <lineval1>myLine</lineval1>
                      </Line>
                </LINES>
          </HEAD>
          <HEAD>
                <headval1>myHeader</headval1>
                <LINES>
                      <Line>
                            <lineval1>myLine</lineval1>
                      </Line>
                      <Line>
                            <lineval1>myLine</lineval1>
                      </Line>
                </LINES>
          </HEAD>
    </HEADS>
    XSLT PROGRAM:
    <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sap="http://www.sap.com/sapxsl" version="1.0">
       <xsl:output encoding="UTF-8" indent="yes" method="xml"/>
       <xsl:template match="/HEADS"><!--This should be the root name of your source XML eg <HEADS>xml data...</HEADS> if you don't have a single root match on "/" -->
         <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
           <asx:values>
             <OUTPUT><!--MUST be all caps, MUST match CALL TRANSFORMATION RESULTS parameter name (RESULTS OUTPUT = myABAPDataStructure), and MUST not contain an underscore!!!-->
               <xsl:for-each select="HEAD">
                 <HEAD>            <!--ALL CAPS!!!-->
                   <FIELD1>
                     <xsl:value-of select="headval1"/>
                   </FIELD1>
                   <FIELD2>
                     <xsl:value-of select="headval1"/>
                   </FIELD2>
                   <LINES>
                     <xsl:for-each select="LINES/Line">
                       <LINE>
                         <FIELD11>
                           <xsl:value-of select="lineval1"/>
                         </FIELD11>
                         <FIELD22>
                           <xsl:value-of select="lineval1"/>
                         </FIELD22>
                       </LINE>
                     </xsl:for-each>
                   </LINES>
                 </HEAD>
               </xsl:for-each>
             </OUTPUT>
           </asx:values>
         </asx:abap>
       </xsl:template>
    </xsl:transform>
    SAMPLE OF TRANSFORMED XML (MATCHES ABAP DATA STRUCTURE):
    IF YOU TEST () YOUR TRANSFORMATION (IN XSLT_TOOL) WITH THE SAMPLE FILE AND IT DOESN'T LOOK LIKE THIS, YOUR TRANSFORMATION WILL FAIL. TAGS MUST BE ALL CAPS!!!!
    <?xml version="1.0" encoding="UTF-8"?>
    <asx:abap version = "1.0" xmlns:asx = "http://www.sap.com/abapxml">
          <asx:values>
                <OUTPUT>
                      <HEAD>
                            <FIELD1>myHeader</FIELD1>
                            <FIELD2>myHeader</FIELD2>
                            <LINES>
                                  <LINE>
                                        <FIELD11>myLine</FIELD11>
                                        <FIELD22>myLine</FIELD22>
                                  </LINE>
                                  <LINE>
                                        <FIELD11>myLine</FIELD11>
                                        <FIELD22>myLine</FIELD22>
                                  </LINE>
                                  <LINE>
                                        <FIELD11>myLine</FIELD11>
                                        <FIELD22>myLine</FIELD22>
                                  </LINE>
                                  <LINE>
                                        <FIELD11>myLine</FIELD11>
                                        <FIELD22>myLine</FIELD22>
                                  </LINE>
                            </LINES>
                      </HEAD>
                      <HEAD>
                            <FIELD1>myHeader</FIELD1>
                            <FIELD2>myHeader</FIELD2>
                            <LINES>
                                  <LINE>
                                        <FIELD11>myLine</FIELD11>
                                        <FIELD22>myLine</FIELD22>
                                  </LINE>
                                  <LINE>
                                        <FIELD11>myLine</FIELD11>
                                        <FIELD22>myLine</FIELD22>
                                  </LINE>
                                  <LINE>
                                        <FIELD11>myLine</FIELD11>
                                        <FIELD22>myLine</FIELD22>
                                  </LINE>
                            </LINES>
                      </HEAD>
                      <HEAD>
                            <FIELD1>myHeader</FIELD1>
                            <FIELD2>myHeader</FIELD2>
                            <LINES>
                                  <LINE>
                                        <FIELD11>myLine</FIELD11>
                                        <FIELD22>myLine</FIELD22>
                                  </LINE>
                                  <LINE>
                                        <FIELD11>myLine</FIELD11>
                                        <FIELD22>myLine</FIELD22>
                                  </LINE>
                            </LINES>
                      </HEAD>
                </OUTPUT>
          </asx:values>
    </asx:abap>

  • Problem in Call transformation - xslt program

    Hi Experts,
    For the below XML file i have declared the XSLT Program  as described.
    i am not able to get the data into Internal table.
    Could you pls help me in where am i going wrong?
    Is it XSLT declaration or what?
    Data declarations
    TYPES: BEGIN OF TY_BH,
            RECORDTYPE(02), " Record Type
            DOCTYPE(02),      " Document type
            REFERENCE(16),      " Reference Document Number
            DOCUMENTDATE(08),      " Document Date in Document
            POSTINGDATE(08),      " Posting Date in the Document
            COMPANYCODE(04),      " Company Code
            CURRENCY(03),      " Currency Key
            EXCHANGERATE(08),      " Exchange rate
            PARK(01),  " Park document
            ITEMNUMBER(03), " Number of line item
           END OF TY_BH,
           BEGIN OF TY_HH,
             RECORDTYPE(02), " Record Type
             SOURCE(04),
             DESTINATION(04),
             TIMESTAMP(14),
           END OF TY_HH,
           BEGIN OF TY_TT,
             RECORDTYPE(02),
             TOTALRECORDS(10) TYPE N,
             TOTALVALUE(16),
           END OF TY_TT.
    TYPES: BEGIN OF TY_BL,
             RECORDTYPE(02),
             REFERENCE(16),
             REFLINEITEM(03),
             ACCTTYPE(01),
             DRCRINDICATOR(01),
             ACCOUNT(10),
             AMOUNT(13),
             VENDORNAME1(40),
             VENDORNAME2(40),
             VENDORNAME3(40),
             VENDORNAME4(40),
             STREET(40),
             CITY(40),
             POSTALCODE(10),
             COUNTRY(02),
             CONTACTPERSON(10),
             ALTERNATEPAYEECODE(10),
             ALTERNATEPAYEENAME1(40),
             ALTERNATEPAYEENAME2(40),
             ALTERNATEPAYEENAME3(40),
             PAYMENTTERMS(04),
             BASELINEDATE(08),
             PAYMENTMETHODS(01),
             ALLOCATION(18),
             LINEITEMTEXT(50),
             TAXCODE(02),
             TAXAMOUNT(13),
             WHTAXCODE(02),
             WHTAXBASE(13),
             FUND(10),
             FUNDCENTER(16),
             COSTCENTER(10),
             INTERNALORDER(12),
             TAXAUTOMATICALLY(01),
             SPECIALGLINDICATOR(01),
           END OF TY_BL.
    DATA: GT_BH     TYPE STANDARD TABLE OF TY_BH,
          GS_BH     TYPE TY_BH,
          GT_BL     TYPE STANDARD TABLE OF TY_BL,
          GS_BL     TYPE TY_BL,
          GT_HH     TYPE STANDARD TABLE OF TY_HH,
          GS_HH     TYPE TY_HH,
          GT_TT     TYPE STANDARD TABLE OF TY_TT,
          GS_TT     TYPE TY_TT.
    DATA: GT_RESULT_XML5 TYPE ABAP_TRANS_RESBIND_TAB,
          GS_RESULT_XML5 TYPE ABAP_TRANS_RESBIND.
    DATA: GS_RIF_EX     TYPE REF TO CX_ROOT,
          GS_VAR_TEXT   TYPE STRING.
    DATA: BEGIN OF GT_XML,
             HH TYPE TY_HH,
             BH LIKE TABLE OF GT_BH,
             BL LIKE TABLE OF GT_BL,
             TT TYPE TY_TT,
           END OF GT_XML.
    DATA: GT_ITAB       TYPE STANDARD TABLE OF CHAR2048,
          GS_ITAB TYPE CHAR2048.
    I have the below file read into internal table GT_ITAB.
    XML File
    <?xml version="1.0" encoding="utf-8"?>
    <ABCInbound xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="C:\XYZSchema\ABCInbound.xsd">
    <HH>
    <RecordType>HH</RecordType>
    <Source>ABC</Source>
    <Destination>XYZ</Destination>
    <TimeStamp>20050909220546</TimeStamp>
    </HH>
    <BH>
    <RecordType>BH</RecordType>
    <DocType>AB</DocType>
    <Reference>2205516125</Reference>
    <DocumentDate>20080909</DocumentDate>
    <PostingDate></PostingDate>
    <CompanyCode>ABC</CompanyCode>
    <Currency>INR</Currency>
    <ExchangeRate>1.0000</ExchangeRate>
    <Park></Park>
    <ItemNumber>2</ItemNumber>
    </BH>
    <BL>
    <RecordType>BL</RecordType>
    <Reference>2205516125</Reference>
    <RefLineItem>1</RefLineItem>
    <AcctType>K</AcctType>
    <DrCrIndicator>H</DrCrIndicator>
    <Account>01000003</Account>
    <Amount>364.00</Amount>
    <VendorName-1>TOM &amp; JERRY IS MY</VendorName-1>
    <VendorName-2> NAME TO BE PAID</VendorName-2>
    <VendorName-3>1987566Z</VendorName-3>
    <VendorName-4>22</VendorName-4>
    <Street>UCX STREET</Street>
    <City>ROAD 4</City>
    <PostalCode>515004</PostalCode>
    <Country>IND</Country>
    <ContactPerson></ContactPerson>
    <AlternatePayeeCode></AlternatePayeeCode>
    <AlternatePayeeName-1></AlternatePayeeName-1>
    <AlternatePayeeName-2></AlternatePayeeName-2>
    <AlternatePayeeName-3></AlternatePayeeName-3>
    <PaymentTerms></PaymentTerms>
    <BaselineDate></BaselineDate>
    <PaymentMethods></PaymentMethods>
    <Allocation></Allocation>
    <LineItemText>item text</LineItemText>
    <TaxCode></TaxCode>
    <TaxAmount>0.00</TaxAmount>
    <WHTaxCode></WHTaxCode>
    <WHTaxbase>0.00</WHTaxbase>
    <Fund></Fund>
    <FundCenter></FundCenter>
    <CostCenter></CostCenter>
    <InternalOrder></InternalOrder>
    <TaxAutomatically></TaxAutomatically>
    <SpecialGLIndicator></SpecialGLIndicator>
    </BL>
    <TT>
    <RecordType>TT</RecordType>
    <TotalRecords>1</TotalRecords>
    <TotalValue>222</TotalValue>
    </TT>
    </ABCInbound>
    Call transformation as below
    GET REFERENCE OF GT_XML INTO GS_RESULT_XML5-VALUE.
    GS_RESULT_XML5-NAME = 'IABC'.
    APPEND GS_RESULT_XML5 TO GT_RESULT_XML5.
    TRY.
        CALL TRANSFORMATION Z_XML_TO_ABAP5
        SOURCE XML GT_ITAB
        RESULT (GT_RESULT_XML5).
      CATCH CX_ROOT INTO GS_RIF_EX.
        GS_VAR_TEXT = GS_RIF_EX->GET_TEXT( ).
        MESSAGE GS_VAR_TEXT TYPE 'E'.
    ENDTRY.
    WHEN I CHECK GT_XML its initial.
    XSLT Program Z_XML_TO_ABAP5 is like below.
    Pls let me know if my xslt declaration is wrong.
    <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="/">
        <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
          <asx:values>
            <IABC>
              <xsl:apply-templates select="//ABCInbound"/>
            </IABC>
          </asx:values>
        </asx:abap>
      </xsl:template>
      <xsl:template match="ABCINBOUND">
        <item>
          <RECORDTYPE>
            <xsl:value-of select="RecordType"/>
          </RECORDTYPE>
          <SOURCE>
            <xsl:value-of select="Source"/>
          </SOURCE>
          <DESTINATION>
            <xsl:value-of select="Destination"/>
          </DESTINATION>
          <TIMESTAMP>
            <xsl:value-of select="TimeStamp"/>
          </TIMESTAMP>
          <RECORDTYPE>
            <xsl:value-of select="RecordType"/>
          </RECORDTYPE>
          <DOCTYPE>
            <xsl:value-of select="DocType"/>
          </DOCTYPE>
          <REFERENCE>
            <xsl:value-of select="Reference"/>
          </REFERENCE>
          <DOCUMENTDATE>
            <xsl:value-of select="DocumentDate"/>
          </DOCUMENTDATE>
          <POSTINGDATE>
            <xsl:value-of select="PostingDate"/>
          </POSTINGDATE>
          <COMPANYCODE>
            <xsl:value-of select="CompanyCode"/>
          </COMPANYCODE>
          <CURRENCY>
            <xsl:value-of select="Currency"/>
          </CURRENCY>
          <EXCHANGERATE>
            <xsl:value-of select="ExchangeRate"/>
          </EXCHANGERATE>
          <PARK>
            <xsl:value-of select="Park"/>
          </PARK>
          <ITEMNUMBER>
            <xsl:value-of select="ItemNumber"/>
          </ITEMNUMBER>
          <RECORDTYPE>
            <xsl:value-of select="RecordType"/>
          </RECORDTYPE>
          <REFERENCE>
            <xsl:value-of select="Reference"/>
          </REFERENCE>
          <REFLINEITEM>
            <xsl:value-of select="RefLineItem"/>
          </REFLINEITEM>
          <ACCTTYPE>
            <xsl:value-of select="AcctType"/>
          </ACCTTYPE>
          <DRCRINDICATOR>
            <xsl:value-of select="DrCrIndicator"/>
          </DRCRINDICATOR>
          <ACCOUNT>
            <xsl:value-of select="Account"/>
          </ACCOUNT>
          <AMOUNT>
            <xsl:value-of select="Amount"/>
          </AMOUNT>
          <VENDORNAME1>
            <xsl:value-of select="VendorName-1"/>
          </VENDORNAME1>
          <VENDORNAME2>
            <xsl:value-of select="VendorName-2"/>
          </VENDORNAME2>
          <VENDORNAME3>
            <xsl:value-of select="VendorName-3"/>
          </VENDORNAME3>
          <VENDORNAME4>
            <xsl:value-of select="VendorName-4"/>
          </VENDORNAME4>
          <STREET>
            <xsl:value-of select="Street"/>
          </STREET>
          <CITY>
            <xsl:value-of select="City"/>
          </CITY>
          <POSTALCODE>
            <xsl:value-of select="PostalCode"/>
          </POSTALCODE>
          <COUNTRY>
            <xsl:value-of select="Country"/>
          </COUNTRY>
          <CONTACTPERSON>
            <xsl:value-of select="ContactPerson"/>
          </CONTACTPERSON>
          <ALTERNATEPAYEECODE>
            <xsl:value-of select="AlternatePayeeCode"/>
          </ALTERNATEPAYEECODE>
          <ALTERNATEPAYEENAME1>
            <xsl:value-of select="AlternatePayeeName1"/>
          </ALTERNATEPAYEENAME1>
          <ALTERNATEPAYEENAME2>
            <xsl:value-of select="AlternatePayeeName2"/>
          </ALTERNATEPAYEENAME2>
          <ALTERNATEPAYEENAME3>
            <xsl:value-of select="AlternatePayeeName3"/>
          </ALTERNATEPAYEENAME3>
          <PAYMENTTERMS>
            <xsl:value-of select="PaymentTerms"/>
          </PAYMENTTERMS>
          <BASELINEDATE>
            <xsl:value-of select="BaselineDate"/>
          </BASELINEDATE>
          <PAYMENTMETHODS>
            <xsl:value-of select="PaymentMethods"/>
          </PAYMENTMETHODS>
          <ALLOCATION>
            <xsl:value-of select="Allocation"/>
          </ALLOCATION>
          <LINEITEMTEXT>
            <xsl:value-of select="LineItemText"/>
          </LINEITEMTEXT>
          <TAXCODE>
            <xsl:value-of select="TaxCode"/>
          </TAXCODE>
          <TAXAMOUNT>
            <xsl:value-of select="TaxAmount"/>
          </TAXAMOUNT>
          <WHTAXCODE>
            <xsl:value-of select="WHTaxCode"/>
          </WHTAXCODE>
          <WHTAXBASE>
            <xsl:value-of select="WHTaxbase"/>
          </WHTAXBASE>
          <FUND>
            <xsl:value-of select="Fund"/>
          </FUND>
          <FUNDCENTER>
            <xsl:value-of select="FundCenter"/>
          </FUNDCENTER>
          <COSTCENTER>
            <xsl:value-of select="CostCenter"/>
          </COSTCENTER>
          <INTERNALORDER>
            <xsl:value-of select="InternalOrder"/>
          </INTERNALORDER>
          <TAXAUTOMATICALLY>
            <xsl:value-of select="TaxAutomatically"/>
          </TAXAUTOMATICALLY>
          <SPECIALGLINDICATOR>
            <xsl:value-of select="SpecialGLIndicator"/>
          </SPECIALGLINDICATOR>
          <RECORDTYPE>
            <xsl:value-of select="RecordType"/>
          </RECORDTYPE>
          <TOTALRECORDS>
            <xsl:value-of select="TotalRecords"/>
          </TOTALRECORDS>
          <TOTALVALUE>
            <xsl:value-of select="TotalValue"/>
          </TOTALVALUE>
        </item>
      </xsl:template>
    </xsl:transform>
    I able to get if declare only for BL and BH in separate xslt transformations.
    Regards,
    Simha

    Hello Mithun,
    when you use the call transformation statement you have to specifiy the xslt transformation used. As a first step you usually use the transformation with the name ID. This is a special transformation for making the asXML representation of abap data. Unfortunately if you look into this transformation you find the following:
    <xsl:transform version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    >
    <xsl:strip-space elements="*"/>
    <xsl:template match="/">
      <xsl:copy-of select="."/>
    </xsl:template>
    </xsl:transform>
    If I remember correctly when you use another transformation this will first call the ID transformation and after this the specified one. So it should not be possible to just copy ID transformation and remove the line. I'll have to think again how to avoid the behaviour.
    Best Regards
    Roman

  • Error while transforming XSLT by calling function with Reflection API

    Hi,
    I'm new to Reflection API. I want to call function from the jar file which is not in my application context. So I have loaded that jar ( say XXX.jar) file at runtime with URLClassLoader and call the function say [ *myTransform(Document document)* ]. Problem is that when I want to transform any XSLT file in that function it throws exception 'Could not compile stylesheet'. All required classes are in XXX.jar.
    If I call 'myTransform' function directly without reflection API then it transformation successfully completed.
    Following is code of reflection to invoke function
            ClassLoader contextCL = Thread.currentThread().getContextClassLoader();
            URLClassLoader loader = new URLClassLoader(jarURLs, contextCL);
            Class c = loader.loadClass(fullClasspath);
            Constructor constructor = c.getDeclaredConstructor(constructorParamsClasses);
            Object instance = constructor.newInstance(constructorParams);
            Method method = c.getDeclaredMethod("myTransform", methodParamsClasses);
            Object object = method.invoke(instance, methodParams);Following is function to be called with reflection API.
    public Document myTransform ( Document document ) {
    // Reference of Document (DOM NODE) used to hold the result of transformation.
                Document doc = null ;
                // DocumentBuilderFactory instance which is used to initialize DocumentBuilder to create newDocumentBuilder.
                DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance () ;
                // Reference of DocumentBuilder used to create new Document (DOM NODE).
                DocumentBuilder builder;
                try {
                      // Initialize DocumentBuilder by using DocumentBuilderFactory instance.
                      builder = factory.newDocumentBuilder ();
                      // Initialize new document instance by using DocumentBuilder instance.
                      doc = builder.newDocument () ;
                      // Creates new DOMSource by using document (DOM NODE) which is coming through current transform() method parameter.
                      DOMSource domsource = new DOMSource ( document ) ;
                      // Creates new instance of TransformerFactory.
                      TransformerFactory transformerfactory = TransformerFactory.newInstance () ;
                      // Creates new Transformer instance by using TransformerFactory which holds XSLT file.
                      Transformer transformer = null;
    ********* exception is thrown from here onward ******************
                      transformer = transformerfactory.newTransformer (new StreamSource (xsltFile));
                      // Transform XSLT on document (DOM NODE) and store result in doc (DOM NODE).
                      transformer.transform ( domsource , new DOMResult ( doc ) ) ;
                } catch (ParserConfigurationException ex) {
                      ex.printStackTrace();
                } catch (TransformerConfigurationException ex) {
                      ex.printStackTrace();
                } catch (TransformerException ex) {
                     ex.printStackTrace();
                } catch (Exception ex) {
                     ex.printStackTrace();
                //holds result of transformation.
                return doc ;
    }Following is full exception stacktrace
    ERROR:  'The first argument to the non-static Java function 'myBeanMethod' is not a valid object reference.'
    FATAL ERROR:  'Could not compile stylesheet'
    javax.xml.transform.TransformerConfigurationException: Could not compile stylesheet
            at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:829)
            at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:623)
            at com.actl.dxchange.utilities.Transformation.transform(Transformation.java:83)
            at com.actl.dxchange.base.BaseConnector.transform(BaseConnector.java:330)
            at com.actl.dxchange.connectors.KuoniConnector.doRequestProcess(KuoniConnector.java:388)
            at com.actl.dxchange.connectors.KuoniConnector.hotelAvail(KuoniConnector.java:241)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:585)
            ...........

    Hi,
    Thanks for response.
    Following is code for setting 'methodParamsClasses' array object. I do ensure that Document is not null and valid. My application is web application.
    Document requestObj = /* my code for generating Document object*/
    Object[] methodParams = new Object[]{requestObj}
    Class[] methodParamsClasses = new Class[]{};
                if (methodParams != null) {
                    methodParamsClasses = new Class[methodParams.length];
                    for (int i = 0; i < methodParams.length; i++) {
                        if (methodParams[i] instanceof Document) {
    /************** if parameter is instance of Document then I set class type as "Document.class" ***********/
                            methodParamsClasses[i] = Document.class;
                        } else {
                            methodParamsClasses[i] = methodParams.getClass();

  • XML to Nested Itab using Simple Transformation

    Hi there is there any experts there who can show me an example of Transforming a XML to a Nested Internal Table using Simple Transformation?
    I have tried this the program from the blog by
    Tobias Trapp
    <a href="/people/tobias.trapp/blog/2005/05/04/xml-processing-in-abap-part-1:///people/tobias.trapp/blog/2005/05/04/xml-processing-in-abap-part-1
    but I have encountered this error
    Runtime Errors         ST_REF_ACCESS   
    Exception              CX_ST_REF_ACCESS
       1 <?sap.transform simple?>                                    
       2 <tt:transform template="temp1"                              
       3     xmlns:tt="http://www.sap.com/transformation-templates"> 
       4     <tt:root name="ROOT"/>                                  
       5     <tt:template name="temp1">                              
    >>>>       <tt:loop ref=".ROOT" name="a">                        
       7         <A>                                                 
       8            <name>                                           
       9              <tt:value ref="$a.name" />                     
      10            </name>                                          
      11            <ZLS>                                            
      12              <tt:loop ref="$a.zls" name="z">                
      13                <Z>                                          
      14                  <tt:value ref="$z.nummer" />               
      15                </Z>                                         
      16             </tt:loop>                                      
      17           </ZLS>                                            
      18         </A>                                                
      19       </tt:loop>                                            
      20     </tt:template>                                          
      21 </tt:transform>                                             
    Anyone knows whats wrong?

    I had to pass an XSLT program in the transformation statement.

  • CALL TRANSFORMATION - XSLT encoding not settable?

    Hello fellow ABAPer,
    I have a problem creating an XML file from an simple itab, using XSLT transformation (CALL TRANSFORMATION).
    Here's what I'm doing: I have a simple itab it_person type tt_person:
    TYPES: BEGIN OF tt_person,
      id(4) TYPE n,
      firstname(20) TYPE c,
      lastname(20)  TYPE c,
    END OF tt_person.
    I'm filling it_person with test-data:
    gs_person-id   = '1'.
    gs_person-firstname = 'John'.
    gs_person-lastname  = 'Smith'.
    APPEND wa_person TO it_person.
    Now I'm getting the reference of my itab for the CALL TRANSFORMATION command and I'm finally doing the actual transformation like this:
    CALL TRANSFORMATION z_test_transformation
        SOURCE (it_source_tab)
        RESULT XML it_xml.
    The Transformation (XSLT Program) looks like this:
    http://uploading.com/files/775c1d31/trans.txt/
    (sorry, I tried to post the transformation's code here, but that's not working, it screws the whole formating of this posting, that's why I had to upload it)
    When I'm gui_downloading the XML file it looks like this:
    <?xml version="1.0" encoding="iso-8859-1"?>
    <CUSTOMERS>
      <item>
        <id>1</id>
        <first_name>John</first_name>
        <last_name>Smith</last_name>
      </item>
    </CUSTOMERS>
    So everything is fine, until now: I need a different encoding, the other system's parser is not able to read ISO-8859-1 encoded files. So I need the first line of my XML to look like this:
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    ... and this is where I'm stuck right now, I can't get that to work.
    I can change the line in my transformation to:
    <xsl:output encoding="uft-8" indent="yes" method="xml" version="1.0" standalone="no"/>
    but the resulting XML file is still ISO-8859-1. The "standalone" tag, that I need as well, doesn't work either.
    So, what am I doing wrong? Is it not possible to create other XMLs than ISO-8859-1 with the XSLT-Transformation?
    Thanks alot, any help would be highly appreciated.
    AJ

    I guess it_xml is an internal table cotaining chars?
    i'm using
    xxml                    TYPE xstring,
    and
    CALL TRANSFORMATION z_abap_to_xml_root
          PARAMETERS mestyp = c_mestyp nsuri = c_namespace
          SOURCE filename = fname table = it_out
          RESULT XML xxml.
    and i'm getting the xml encoding like
    <?xml version="1.0" encoding="utf-8" ?>
    Directly after your transformation insert the following call if your report can run interactively:
    CALL FUNCTION 'DISPLAY_XML_STRING'
          EXPORTING
            xml_string            = xxml
    *         TITLE                 =
    *         STARTING_X            = 5
    *         STARTING_Y            = 5
          EXCEPTIONS
            no_xml_document       = 1
            OTHERS                = 2.
    This displays the XML so you can check the encoding to be sure that the data is not tempered elsewhere.
    Downloading the XML String even if its xstring should be no problem.

  • Creating an XML From a Deep Structure  using XSL Transformation

    Hi ABAPers,
    I have a requirement to use XSL Transformations on an ABAP deep type structure.
    Currently i have an API that fills in this deep structure and by using CALL TRANSFORMATION ID.... i will get the BIG XML having having 100s of nodes . But actualy form the deep structure i need only some NODES (say 50)... So i tried writing an XSLT
    in the transaction STRANS.. but on using this TRANSFORMATION which i wrote i am getting an error messgae like INVALID XML...
    Am i going in right track or is there a good solution...
    My sample transformation is as below...
    <xsl:transform version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:strip-space elements="*"/>
    <xsl:template match="/">
    <xsl:value-of select="DATA/NODE_ELEMENTS/UUID_KEY/UUID"/>
    <xsl:value-of select="DATA/NODE_ELEMENTS/SEMANTICAL_NAME"/>
    <xsl:value-of select="DATA/NODE_ELEMENTS/STRUCT_CAT"/>
    <xsl:value-of select="DATA/NODE_ELEMENTS/USAGE_CAT"/>
    <xsl:value-of select="DATA/NODE_ELEMENTS/RESTRICTED_IND"/>
    <xsl:value-of select="VALUES/DATA/NODE_ID"/>.
    </xsl:template>
    </xsl:transform>
    Please help me in solving this issue....
    Thanks,
    Linda.

    Hi Linda,
        I am replying based on your sample code.
       Try the below following suggestions.
       here 'GRPHDR' is the node where I am selecting the data.
               IGRPHDR is the name of the reference.
    First calling the transformation in you program.
    TYPES: BEGIN OF tl_hdr,
               msgid(20)    TYPE c,
                 END OF tl_hdr.
    DATA : t_hdr           TYPE STANDARD TABLE OF tl_hdr.
      GET REFERENCE OF t_hdr INTO l_result_xml-value.
        l_result_xml-name = 'IGRPHDR'.
        APPEND l_result_xml TO t_result_xml.
       TRY.
            CALL TRANSFORMATION yfi_xml_read
            SOURCE XML it_xml_data
            RESULT (t_result_xml).
          CATCH cx_root INTO l_rif_ex.
            l_var_text = l_rif_ex->get_text( ).
            l_bapiret-type = 'E'.
            l_bapiret-message = l_var_text.
            APPEND l_bapiret TO errormsgs.
            EXIT.
        ENDTRY.
    in XSL transformation
       First write a block of statement to specify from which node you are taking the data.
       No matter it is a node or sub-node.
    <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="/">
          <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
          <asx:values>
            <IGRPHDR>  " reference name of internal table
              <xsl:apply-templates select="//GrpHdr"/>
            </IGRPHDR>
      </asx:values>
        </asx:abap>
    </xsl:template>
    Next select the data from the nodes under the nodes specified in the transformation.
    here msgid is the field i am selecting for value.
    <xsl:template match="GrpHdr">
        <item>
          <MSGID>  " field in the internal table t_hdr where data has to go
            <xsl:value-of select="MsgId"/>
          </MSGID>
        </item>
      </xsl:template>
    reply back if further clarification is needed.
    Thanks and regards,
    Kannan N

  • How to use an external XSLT engine for Oracle BPEL Process Manager

    Hi,
    is there a way to use an external XSLT engine instead of the build in provided in Oracle BPEL Process Manager?
    The reason is to perform some XSL Transformations that use an OWL Query language.
    Thanks!

    Yes. you can write your own xpath function which can connect to external xslt engine and pass-in your document:
    <copy>
    <from expression="my:myxslt-processor(bpws:getVariableData('var1','part'))"/>
    <to variable="v2" part="payload/>
    </copy>
    The following Thread discusses about how to create an extension xpath function:
    http://forums.oracle.com/forums/thread.jspa?forumID=212&threadID=305548

  • How to use the transformation matrix in Placed Suite.

    I am in trouble how to use the transformation matrix Placed Art (PlacedSuite ). 
           AIRealMatrix rasterMatrix;
    AIRealMatrix placedMatrix;
    if (artType == kRasterArt {
         error = sAIRaster-> GetRasterMatrix (art, & rasterMatrix);
    } else if ((artType == kPlacedArt) {
         error = sAIPlaced-> GetPlacedMatrix (art, & placedMatrix);
    When I converted to using the transformation matrix of PlacedArt, the target art could not be converted to expect.
    I could convert in case of the RasterArt. (The reference point of the transformation matrix of RasterArt is (0,0).) 
    In the PlacedArt, preference point is not (0,0)?
    The tx/ty of the transformation matrix of PlacedArt is not correct? 
    In the transformation matrix of RasterArt and Placed Art, how are those two different?

    The short answer is "no", (0, 0) is not the origin of placed art (unlike kRasterArt). Off the top of my head, I believe when you place art, its original state is upside-down and flipped horizontally in the upper-right of the artboard. If you want to see where it starts, simply create an identity matrix and apply that as the matrix for the kPlacedArt and you'll see how it starts. Yes, its pretty crazy.
    minimum99 posted some code that might help. I haven't tried it (I rolled my own years ago) but I'd give it a whirl:
    http://forums.adobe.com/message/3195790#3195790

  • Using "Image/Transform/Perspective" on a layer?

    Hi,
    I'm new at this.  I have a shot of a big room with empty art frames on the walls.  I have rectangular layers that are shots of paintings that I want to drop into the frames, but of course the paintings layers have to be skewed to show the perspective angle (trapezoid) that matches the room.  Problem is, it seems that I can only use Image/transform/perspective on the painting files before they become layers.  This means guessing the perspective, then moving them into the background, which is trial&error at best.  It's very hard to guess the appropriate perspective when the file isn't a layer. It seems that once the painting files become layers, the "perspective" option is no longer available.  I can use "skew," or "free transform," but not "perspective."    "Skew" doesn't work, because while it will allow changing the rectangle into a paralellogram, it won't allow me to change the rectangle into a trapezoid. "Free Transform" doesn't work for the same reason.  So, How do you apply the "perspective" function to a layer?
    If I knew how to change the rectangle by grabbing one of a selection's corner anchor boxes and fixing it place, that would help because I could create my own trapezoid, but I don't know how to do that.  Does anyone?
    Thanks!

    I've no idea why all the transform options aren't available; they are here.
    Anyway, try this:
    Drag or copy/paste the painting in. It will come in as a new layer.
    Convert that layer to a smart object (Layer > Smart Object > Convert..). Reduce the smart object opacity to 50%.
    Choose Transform > Distort and move the corners individually into place.
    When you're happy, set opacity back to 100% and rasterize the smart object.
    The beauty of the smart object in this case is that you can transform repeatedly without any additional quality loss; it will be rendered only once when you rasterize.

  • Creating XML file Using Call Transformation

    Hello Friends,
          I have searched before posting thread, couldnt find anything.
          I am creating an XML file using Call Transformation. My internal table has 3 date fields and some other fields.  For some records I dont have values for the date fields. In that case my XML file is giving the date value as 0000-00-00 since I declared it as Date type.  This value 0000-00-00  is not accepted by the middle ware as the valid date.  I can not change it as String type as per the suggestion.
    In that case I am advised to skip printing the date field tag if it doesnt have value.
         Is there any way to skip the date field if it is empty. Any Suggestions please ?.
    Thanks
    Lakshmi.

    Hi,
    I had exactly the same problem before. When you call a transformation there is an option called initial_components. According to SAP if you use initial_components = 'SUPRESS' the empty fields should not being generated on the XML.
    Now, this didn't work for me and I have seen some people with the same problem. Here is how I solved this (maybe not the best way but it worked):
    First: My fields are all CHAR in my table
    Second: In the transformation, you can use conditional transformation to not display a tag if field is empty, here a piece of my transformation (I am using simple transformations):
       <tt:root name="ROOT"/>
         <tt:cond s-check="not-initial(ref('ROOT.L1_NM')) or not-initial(ref('ROOT.L2_NM'))">
              <TRNMTR_NM>
                <tt:cond s-check="not-initial(ref('ROOT.L1_NM'))">
                  <l1_nm>
                    <tt:value ref="ROOT.L1_NM"/>
                  </l1_nm>
                </tt:cond>
                <tt:cond s-check="not-initial(ref('ROOT.L2_NM'))">
                  <l2_nm>
                    <tt:value ref="ROOT.L2_NM"/>
                  </l2_nm>
                </tt:cond>
              </TRNMTR_NM>
            </tt:cond>
    As you can see, I first check if the fields have values.
    Hope it helps
    Edited by: carlosrv on Oct 4, 2011 8:22 PM

  • Convertion of String to XML node using Xquery transformation in OSB

    How to convert string to XML node elementusing a built in function using Xquery transformation in OSB?

    check this out - http://www.javamonamour.org/2011/06/fn-beainlinedxml.html
    if in SOA (BPEL & Mediator) you can use oraext:parseXML.
    you should thoroughly analyse where to implement your requirement as some good practices advise to implement more complex logic in SOA and leave OSB to only connect to the services' endpoints.
    Hope this helps,
    A.

  • Unable to change reference point location while using the Transform Functions in Photoshop Elements 6.0.

    Unable to change reference point location while using the Transform Functions in Photoshop Elements 6.0.

    Which operating system are you using?
    In photoshop elements 6, as far as i know, you can only change the Reference Point Location for transforms using the small grid in the left hand corner of the tool options bar with Transform enabled.

Maybe you are looking for

  • Dropped my iphone in bleach water

    Hi guys, few days ago i accidentally dropped my iphone into a pail of bleach water and i pick it up within a sec, I left it to dry for 2 days, after that i went to a iphone repair shop to take look at it, only 2 of the water damage sensors turns pink

  • Internet/MSN Messenger Problems

    Ok, so for the past few weeks I've been having some problems with my msn and the internet. I use my city's cable internet and I'm on an imac OS 10.4.6 800MHz PowerPC G4. When I log onto the internet in any browser, it works just fine. But, when I log

  • Sender proxy

    I have couple of questions.   1) How to handle sender proxys across different systems (DEV , QA , PROD)       do we need to create proxys in each systems or is there any way to        transport  them across different systems.   2) Is it good to have

  • How to upgrade old flash installs

    I have several instances of flash.ocx and NPSWF32.dll in several places that are now old, insecure versions. Can I upgrade them to the laster version of flash, and if so, how? They're installed at: C:\Program Files\Macromedia\Dreamweaver MX 2004\Conf

  • Flex4 ant task command line

    Buongiorno, ho necessità di eseguire un template html all'interno di un pc senza la rete. Se compilo un semplice file prova.mxml, con il flex command line, ottengo un file prova.swf, che cerca di connettersi all'url http://fpdownload.adobe.com/pub/sw