Problems with XSLT Structure

Hi,
I'm doing some XSLT mapping to transform the input XML which is coming to XI from a non-SAP application which do not have any namespace prefix. All I'm doing in the transformation is adding the namespace prefix to the xml so that XI can understand the incoming xml message. my incoming xml is in this format
<?xml version="1.0" standalone="yes" ?>
<response xmlns="http://www.test.com/it">
  <request_id>UNKNOWN-TEST-1181313012309</request_id>
  <request_type>CREATE_TICKET</request_type>
  <result>APPROVED</result>
  <service_provider>VERIZON</service_provider>
  <extra>
    <extra_ReqAck_AckComment>A trouble ticket has already been
                            created for this circuit</extra_ReqAck_AckComment>
    <extra_ReqAck_ackType>Request_Completed</extra_ReqAck_ackType>
    <extra_ReqAck_date>2007-06-08</extra_ReqAck_date>
    <extra_ReqAck_time>10:29:17</extra_ReqAck_time>
  </extra>
  <vendor>
    <ticket_id>CARC349201</ticket_id>
  </vendor>
</response>
And my output xml should be in the following format
  <?xml version="1.0" standalone="yes" ?>
<ns1:response xmlns:ns1="http://www.test.com/it">
  <request_id>UNKNOWN-TEST-1181313012309</request_id>
  <request_type>CREATE_TICKET</request_type>
  <result>APPROVED</result>
  <service_provider>VERIZON</service_provider>
  <vendor>
    <ticket_id>CARC349201</ticket_id>
  </vendor>
</ns1:response>
Here is my xsl file to
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes"/>
   <xsl:template match="*">
<ns1:response xmlns:ns1="http://www.test.com/it">
        <request_type>
          <xsl:value-of select="request_type"/>
        </request_type>
        <service_provider>
          <xsl:value-of select="service_provider"/>
        </service_provider>
         <vendor>
           <ticket_id>
             <xsl:value-of select="ticket_id"/>
           </ticket_id>
           <ticket_status>
             <xsl:value-of select="ticket_status"/>
           </ticket_status>
         </vendor>
    </ns1:response>
    </xsl:template>
</xsl:stylesheet>
When I use this stylesheet. I'm getting this response this is not adding the values to the nodes.
<?xml version="1.0" encoding="utf-8"?>
<ns1:response xmlns:ns1="http://www.test.com/it">
  <request_type/>
  <service_provider/>
  <vendor>
    <ticket_id/>
    <ticket_status/>
  </vendor>
</ns1:response>
I would really appreciate if anyone had ever came across this problem or had found solution.
Thanks,
Joe.P

Hi Udo,
Here is the problem as long as I do have namespace in my input xml that's coming from non sap application the XSLT transformation is failing. I did what you have suggested and here is the style sheet.
<?xml version="1.0" encoding="utf-8" ?>
<xsl:stylesheet  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
  xmlns:ns1="http://www.test.com/it/app" >
     <xsl:output method="xml" version="2.0"  indent="yes"/>
     <xsl:template match="/">
     <ns1:response>
         <request_type>
          <xsl:value-of select="//request_type"/>
         </request_type>
          <result>
           <xsl:value-of select="//result" />
           </result>
           <result_reason>
           <xsl:value-of select="//result_reason"/>
           </result_reason>
           <service_provider>
          <xsl:value-of select="//service_provider"/>
           </service_provider>
         <vendor>
            <ticket_id>
             <xsl:value-of select="//ticket_id"/>
             </ticket_id>
             <ticket_status>
             <xsl:value-of select="//ticket_status"/>
             </ticket_status>
         </vendor>
      </ns1:response>
    </xsl:template>
</xsl:stylesheet>
and as I mention in the initial posting the input xml does have a name space in the response node. so what I tried is I removed the namespace from the input xml from the response node and that works. But I can't remove the namespace from the input xml since that's coming from non sap application.
Thanks,
Joe.P

Similar Messages

  • Using techtool pro found problem with "volume structure".  What to do?

    Using techtool pro found problem with "volume structure" and this was not fixed by TECHTOOL PRO.  What do you suggest I do?

    I would boot from my gray install disk (put the disk in the drive and restart holding down the C key). Then choose Utilities and run Disk Utility and click Repair Disk. As always, be sure you have a back up of your data first.

  • Problem with recordset structure sequence

    Hi,
    I have a problem with my file cotent conversion.
    When i specify my recordstructure sequence as R1,1,R2,*
    the file is picked up but cannot be seen in MONI.
    but when i specify as R1,1,R2,2(OR 3 OR 4)
    The file is processed and seen in MONI.
    But when i give * to any of the records processing in XI fails..
    Please let me know wht must be going wrong
    Regards
    Venkat

    Venkat,
    I tried with your file and i am receiving the xml after conversion in sxmb_moni without any problem (no matter the file size )
    Can you try the following for your file,
    Recordset name : Details
    Recordset str. : Header,1,Body,*
    Key field name : field2
    Content conversion
    Header.fieldFixedLengths     3,2,10,27,8,8,8
    Header.fieldNames     field1,field2,field3,field4,field5,field6,field7
    Header.keyFieldValue     01
    Body.fieldFixedLengths     3,2,40,110,15,2
    Body.fieldNames     field1,field2,field3,field4,field5,field6
    Body.keyFieldValue     02
    ignoreRecordsetName     true
    ~ShaBZ~

  • Problem with ChemDraw structures when converting word doc to pdf

    I am trying to convert a word document with ChemDraw structures in it to a pdf.  When it converts, I doesn't hold the chemical structures together.  Is there a quick solution?

    Bill@VT wrote:
    I realize that many word processors have an option to turn off the printer metric use. I finally found it in OFFICE 2007 and it is indeed off. It is not off in OFFICE 2003. Though it is available to folks, it is far from an obvious option in WORD. In the word processor I use it is NOT an option and there is actually a warning in the help about the printer metrics. The fact that there may be a switch in a package is not a given and the information I provide is not incorrect, though adding a comment about a switch option is reasonable.
    Yes it's on in prior versions that wasn't ny uncertainity. I wasn't positive it was off in Office 2007. Why do you make a strawman argument over something that isn't the point of contention ? <sigh>
    You were incorrect. Printer Metrics is the only answer because it's a global switch. You're not helping by telling people to use a solution that's not permanent. It's a clumsy hack.

  • Problem with XSLT Transformation on BPM

    Hi there,
    I have a 1:N File --> Idocs Scenario with BPM, Inside the BPM i have an XSLT Transformation that has a problem i cant figure out, basically this XSLT Groups the file structure like this:
    <File>                                                *                  <Shipments>
       <Route>                                         *                     <Route>
          <Id>1</Id>                                   *                         <Id>1</Id>
          <delivery>1</delivery>               *                         <delivery>1</delivery>
       </Route>                                        *                         <delivery>2</delivery>
      <Route>                                          *                     </Route>
          <Id>1</Id>                                   *                     <Route>
          <delivery>2</delivery>               *                         <Id>2</Id>
       </Route>                                        *                         <delivery>3</delivery>
      <Route>                                          *                         <delivery>4</delivery>
          <Id>2</Id>                                   *                      </Route>
          <delivery>3</delivery>               *                   </Shipments>
       </Route>                                        *
       <Route>                                         *
          <Id>2</Id>                                   *
          <delivery>4</delivery>               *
       </Route>                                        *
    </File>                                               *
    It's supposed to generate 1 Route Segment for each disctint Route Id on the Source file, it has always worked fine as we ran several tests before going into production system, but now, sometimes it misses a few routes for example the output will be 25 different Routes for a source file that 28, or 2 routes from a file that as 3.
    I have tested the XSLT on the repository and it works fine all the time, same thing when using xml spy, i always download the payload i get from the file adapter, i got a source file from PRD that has 28 routes and i ran the whole scenario on QAS and it generated 12 routes only, im about to open an OSS message but first i wanted to know if anyone has seen something like this, thanks in advance for all the help you guys can provide.
    Best Regards,
    Roberto.
    p.s. i can send the XSL if needed or anything just ask for it.

    Hi,
    Basically because i  have to do 2 transformations, first i run the XSLT to group all the deliveries and such, and then i do a graphic mapping to split it into single Shipment Idocs, i dont know how to group by id on graphical mapping..., anyway i don't think the fact that im using BPM would finally alter the xslt result,
    Regards,
    Roberto.

  • Problem with deep structure in Adobe Forms

    Hi ,
    I am converting smartform into adobe forms. While converting the program code in the code initialization of the smart forms also get transformed to adobe forms the problem is my internal table is of type deep structure while passing it through the tables parameter i am getting error in adobe forms .But while passing the internal table through import parameter its not giving error.The same code works fine with smartforms. I dont know why its not taking the structure of internal table in adobe forms properly .It happens only for deep strucure formal normal tables it works fine in table parameters .If any one has come across this scenario please share your ideas.
    Best Regards,
    Sreeram

    If I were you, I would never do this through any program. The only secure, reliable way is to rewrite everything by your own hands. Even if we could argue, your way works as well (and could be faster at the beginning), at the firt moment you will be asked to perform any tiny change in this "imported" thing, you will cry your eyes out (and understand why it is the only useful way to rewrite everything manually).
    regards Otto

  • Problem with XSLT: xsl:copy

    xsl:copy let us copy a node from the source to the result of a XSLT transformation.
    My problem is that each element is copied without its attributes !
    For example a template:
    <xsl:template match="myelement">
    <xsl:copy>
    <xsl:apply-templates/>
    </xsl:copy>
    </xsl:template>
    on a element:
    <myelement myattribute="value">text</myelement>
    will transform this element in the new element <myelement>text</myelement>. The attribute has desappeared.
    How Can I do copy my element exactly as it is, with all its attributes ?
    thank's.

    Yes, but copy-of copies child elements too. And I don't want to do so. What I want is for example that my template generate an element
    <myelement myattribute="value">
    <myaddedelement>
    </myelement>
    with an element
    <myelement myattribute="value"/>
    in the source.

  • Problem with 2 structure in Lsmw

    Hello experts,
            I am using lsmw using batch input session. I have two structure one for vendor and other for vendor details. I am not able to assign both the structures at a time.
    So I am having problem in mapping the fields.
      I refered to other sites they have example with only one structure.

    You can use two structures in a LSMW object  . Make sure both the structures have a common field
    ( unique field to link the two structures )
    Re: LSMW loading multiple structured records..
    All the best
    Regards
    Vivek

  • Problem with append structure

    Hi all,
    I have appended  two fields in structure VBKRED.
    The two fields are now maintaining in VMK1 screen.
    From that screen, Im generating a report.
    The problem is the fileds are dispaying in the output, but the values are not printing.
    can anyone pls let me know, whether  I need to adjust the Structure. If so, how?
    Regards,
    Priya

    Hi Priya
      You must check if screen fields contain exactly same name as fields in the structure, and if during screen load process, the structure has been filled with needed information.
    Kind regards

  • Problem with Queries Structures in Bex Query Designer and Universe Designer

    Hi everyone,
    I have a problem when i try to do a Universe from a Bex Query Designer.
    When I use a Characteristic Restrictions in a Structure, the universe only show me the structure without the objects inside it.
    EJ:
    1) Bex Query Designer
    Colunms
    (Structure) ZSRT_123
                          - (Characteristic Restrictions) Reg Guayana
    >          (InfoObject)     0Product = 'XXX'
    >          (InfoObject)     0Country = 'YYY'
         - (Characteristic Restrictions) Reg Caracas
    >          (InfoObject)     0Product = 'AAA'
    >          (InfoObject)     0Country = 'BBB'
    Rows
    (Structure) ZSRT_456
                   (Key Figure)     Net Sales
    2) Universe designer
    (Class) ZSRT_456
    >(Measure)      Net Sale
    (Class)     ZSRT_123
    >(Dimension)      ZSRT_123
    The universe dont translate the two Characteristic Restrictions in the structure ZSRT_123.
    Any information would be much appreciated. Thank you.

    Hi,
    I assume that you are using BOE XI 3.1 SP2.
    We have added an option in SP2 to generate or not the L00 level.
    Unfortunately this option applies not only on characteristics but also on hierarchies, hierarchies variables and structures: that's the reason why you have no elements belonging to the structure generated.
    I recommend to always generate L00 in order to have your structure generated correctly.
    This issue will be fixed in SP3.
    Regards,
    Didier

  • Mapping problem with source structures in LSMW thru idoc

    Hello,
            I am using crmxif for bp saving. I have flat file with one line. But it has many segments. do i need to mapp all segments with different source structures.
    Even for any other transactions with crm xifs, how to fill the segments .  do i need to create source  structures for all the segments.
    do i need to create different flat files for all the segments filling.   plz suggest with flat file, and source sturctures.
    thanks
    ram

    Hi RAM,
    Please refer notes 554635 and see if this helps.
    regards,
    Muralidhar Prasad Chatna

  • Problem with XSLT

    Dear all,
    I am facing the following problem: I have an XML file, which is used to store information. An XSL stylesheet transformation is used to grab certain information and display it in a webbrowser, based on category and language of the content in the XML file (categories are marked up with ordinary XML tags, language is specified with the xml:lang attribute). At present there are 8 combinations of category and language.
    I am looking for a way to dynamically assign the stylesheet to be used, based on where the user on the website is coming from. That is, the user clicks on a link and the XML doc is opened with a certain stylesheet, which displays data from a certain category in a certain language.
    Can this be done at all? It is important that only one XML doc is the basis for this functionality. Preferably, it should only be one XSL also, but I guess that's not possible.
    Cheers,
    N
    PS: I realise this has nothing to do with Java, I hope you can forgive me posting this question here. I found that there are many very knwoledgable and helpful people here in the Java forums.

    What is your context? If it is the root element, then that test will return true (because there IS a /message/commission element whose type is not 'Initial'), and then the xsl:copy-of will copy the two /message/commission elements under the root.
    If you want to handle each of the commission elements differently, then you need a template that handles each of them. This template can then look directly at the type attribute, and xsl:copy-of itself if the attribute is not 'Initial'.

  • GP - Sequential Block Problem with input structure

    Hi all
    My scenario is as follows:
    I have three Actions A1 , A2, A3
    every action has collable object of type WebDynproComponent : CO1 CO2 CO3
    CO1 has only output parameters that i have mapped to input parameters of CO2 . 
    Output parameters of CO2 are apped to input parameters of CO3 . 
    I have created sequential block with Actions A1 , A2, A3.where target of A1 is A2 and that of A2 is A3
    I have created IVIEW of this GP process .
    when i open iview , ideally it should directly open the webdynpro comp of collable object CO1.
    *But my problem is its before instantiation asking me to fill values for  input parameters of CO2 which is in sequence to CO1.*
    *Is there any setting that i have missed while creating block?*
    Regards,
    Sheetal

    Hi,
    If you expose parameters at the process level, it will ask you to provide values while instaniation.
    If it is not a mandatory parameter, you can proceed with out providing values.
    The best way is don't expose paramters, if is not required at process level.
    You have to expose a parameter at process level, only if you want to use that parameter in other processes.
    by default, it will be exposed. You have to uncheck it, If you don't want to expose it.
    thanks

  • Problems with folder structure

    I have a mess in Lightroom 3 as far as folders (and on my hard drive).  I want to reorganize everything into a single main folder, subdivided by date, and rely on keywords and collections for sorting.  I know everyone does it different but I am wanting to go the Scott Kelby route, "You can have as many sub-folders inside that one main folder as you want, but if you want to have peace, calm, and order in your Lightroom, the key is not to import photos from all over your computer. Choose one main folder and put all your photos inside that folder. THEN import them into Lightroom."
    My question is, since I already have photos in many places on my computer and a lot of folders in Lightroom, how do I go to this format.  I am tempted to move all of my photos on my computer out of their current folders and into one giant folder (/Photos) and reimport everything into a new catalogue by date.  My concern is I will lose the existing "lightroom data" associated with those photos (flags, picks, ratings, key words, develop settings...).  Hoep that makes sense and someone can help me out.
    Thanks

    I think (I haven't read the book so I don't know) that the Scott Kelby quote may be applying to a different situation where the files do not already exist within Lightroom. In that circumstance Scott's method seems entirely sensible to me. In the situation you are in - files already present within Lr - it would be the wrong approach.
    Lr has the tools you need to move files around and rename files & folders, so there is no need to do this outside of Lightroom and, for all the reasons mentioned above, doing so would be a bad idea.
    There are many different options for file structures, but whichever one you choose it makes sense to migrate your existing files to that structure too. Personally as a wedding & portrait photographer I do maybe 100 shoots per year, rarely more than one per day. I don't favour the Bin method as it makes backups easy to create but difficult to locate when you need them. My file structure is Year then Shoot Name then Raw / JPEG / Client / Etc as appropriate. My shoot name is based on the shoot date in reverse, so I use YYMMDD. This number - YYMMDD - is also my job number and appears on all the client paperwork and in all the filenames related to that client. My Raw files are renamed on import by adding the shoot name to the file name, so I get 101223_DSC1234.NEF. My finished files are renamed with a sequence, ie 101223001.JPG, 101223.002.JPG. Other factors like client details (for a repeat client), location, type of shoot are dealt with in keywords. By using a logical structure like this my files are easily accessible using any software, and should I ever (perish the thought) move away from Lightroom then the structure will migrate easily.
    This is not necessarily the best structure for everyone, but it work for me. Whichever method you choose Lr will help you to migrate and manage your files well.

  • Problem with deep structure in OO Context

    Dear All
    As we know deep structures with occurs 0 cannot be declared in Object Oriented context (will give a syntax error). Can some1 please suggest a workaround. I need to declare the following structure in a BADI implementation. But it is a deep structure & gives a syntax error.
    BEGIN OF WI
    OCCURS 0,
    MINDX LIKE SY-INDEX, "Index Merkmal
    WINDX LIKE SY-INDEX, "Index in Datentabelle
    WSELE TYPE C, "Kz. selektiert
    WOHNE TYPE C, "Kz. ohne Wertedefinition
    WWERT TYPE C, "Kz. weitere Werte vorhanden
    ATSON TYPE C, "Kz. Sonderwerte erlaubt
    ESWRT TYPE C, "Kz. Eingeschränkter Wertebereich
    SSTRG TYPE C, "Kz. Stringsuche
    STATU TYPE C, "Status
    ATWRT LIKE CAWN-ATWRT, "Wert sprachneutral
    ATFLV LIKE CAWN-ATFLV, "intern von
    ATFLB LIKE CAWN-ATFLB, "intern bis
    ATAWE LIKE CAWN-ATAWE, "abw. Einheit
    ATAW1 LIKE CAWN-ATAW1, "abw. Einheit bis
    ATCOD LIKE CAWN-ATCOD, "Operator-Ident.
    ATTLV LIKE CAWN-ATTLV, "Toleranz von
    X TYPE C,
    ATTLB LIKE CAWN-ATTLB, "Toleranz bis
    ATPRZ LIKE CAWN-ATPRZ, "Angabe in %
    ATINC LIKE CAWN-ATINC, "Schrittweite
    ATAUT LIKE AUSP-ATAUT, "Author
    WSDEF LIKE CAWN-ATSTD, "Kz. Std.-Wert
    ATZHL LIKE AUSP-ATZHL, "Zähler AUSP
    TXTNR LIKE CAWN-TXTNR, "Text-Nr.
    WTZHL LIKE CAWN-ATZHL, "Zähler CAWN
    AENNR LIKE CAWN-AENNR, "Änderungsnr.
    DATUV LIKE CAWN-DATUV, "Datum von aus Änderungsnr.
    ATZHH LIKE CAWN-ATZHH, "Hierarchie: ATZHL des Parent
    ATWHI LIKE CAWN-ATWHI, "Hierarchie: ATZHL ist Parent
    ATVPL LIKE CAWN-ATVPL, "Kz. Vorplanung
    NATWRT LIKE CAWN-ATWRT, "Sprachneutraler Wert
    CATWRT LIKE CAWN-ATWRT, "CHAR-Wert in DDB
    CATFLV LIKE CAWN-ATFLV, "NONCHAR-Wert in DDB
    KNOBJ LIKE CAWN-KNOBJ, "Beziehungswissen
    KNPRE TYPE C, "KNART: Precondition
    KNACT TYPE C, "KNART: Action
    KNPRO TYPE C, "KNART: Procedure
    VL TYPE VALUE_DESCRIPTION OCCURS 5,
        est_atwrt like ausp-atwrt,      "Eingabestring    (für EH&S) 4.0c
    END   OF WI.
    Help needed urgently!!
    Regards
    Sudhir

    Declare TYPES statement.
    types: BEGIN OF WI,
    MINDX LIKE SY-INDEX, "Index Merkmal
    WINDX LIKE SY-INDEX, "Index in Datentabelle
    WSELE TYPE C, "Kz. selektiert
    WOHNE TYPE C, "Kz. ohne Wertedefinition
    WWERT TYPE C, "Kz. weitere Werte vorhanden
    ATSON TYPE C, "Kz. Sonderwerte erlaubt
    ESWRT TYPE C, "Kz. Eingeschränkter Wertebereich
    SSTRG TYPE C, "Kz. Stringsuche
    STATU TYPE C, "Status
    ATWRT LIKE CAWN-ATWRT, "Wert sprachneutral
    ATFLV LIKE CAWN-ATFLV, "intern von
    ATFLB LIKE CAWN-ATFLB, "intern bis
    ATAWE LIKE CAWN-ATAWE, "abw. Einheit
    ATAW1 LIKE CAWN-ATAW1, "abw. Einheit bis
    ATCOD LIKE CAWN-ATCOD, "Operator-Ident.
    ATTLV LIKE CAWN-ATTLV, "Toleranz von
    X TYPE C,
    ATTLB LIKE CAWN-ATTLB, "Toleranz bis
    ATPRZ LIKE CAWN-ATPRZ, "Angabe in %
    ATINC LIKE CAWN-ATINC, "Schrittweite
    ATAUT LIKE AUSP-ATAUT, "Author
    WSDEF LIKE CAWN-ATSTD, "Kz. Std.-Wert
    ATZHL LIKE AUSP-ATZHL, "Zähler AUSP
    TXTNR LIKE CAWN-TXTNR, "Text-Nr.
    WTZHL LIKE CAWN-ATZHL, "Zähler CAWN
    AENNR LIKE CAWN-AENNR, "Änderungsnr.
    DATUV LIKE CAWN-DATUV, "Datum von aus Änderungsnr.
    ATZHH LIKE CAWN-ATZHH, "Hierarchie: ATZHL des Parent
    ATWHI LIKE CAWN-ATWHI, "Hierarchie: ATZHL ist Parent
    ATVPL LIKE CAWN-ATVPL, "Kz. Vorplanung
    NATWRT LIKE CAWN-ATWRT, "Sprachneutraler Wert
    CATWRT LIKE CAWN-ATWRT, "CHAR-Wert in DDB
    CATFLV LIKE CAWN-ATFLV, "NONCHAR-Wert in DDB
    KNOBJ LIKE CAWN-KNOBJ, "Beziehungswissen
    KNPRE TYPE C, "KNART: Precondition
    KNACT TYPE C, "KNART: Action
    KNPRO TYPE C, "KNART: Procedure
    VL TYPE table of VALUE_DESCRIPTION,est_atwrt like ausp-atwrt, "Eingabestring (für EH&S) 4.0c
    END OF WI.
    types: t_wi type standard table of wi.
    data: wa type wi,
            t_itab type t_wi.

Maybe you are looking for

  • Won't display colors properly

    I know that you read that and said "Well then you should calibrate your display".  i've tried doing that and it doesn't help.  All the lighter colors (green, gray, light blue...) are washed out and all the darker colors are more or less black.  When

  • Mac Mini vs Sony KDL46W3000

    Similar issue to what I've seen with some other users with an interesting twist - TV has HDMI input so I've got a DVI to HDMI cable. Hook up the TV to the Mini and no picture. If I hook up a monitor open up displays and set the mouse on 'detect displ

  • Printing options for ipad2 to hp oj 100 mobile

    How can the iPad 2 connect to my Hp oj 100 via bluetooth

  • Stuck in coding

    Hi in my scenario have to code with this logic 1. If the field TXJCD is blank in the idoc and if the tax code of the invoice item and in the refered PO item are same, then can fill E_RBKPV-TXJCD_BNK from the PO item in the user exit. 2. If the tax co

  • Log changes in /SAPAPO/MAT1 - Product

    Hello, anyone knows if there is a modification log for product master data in SCM for changes done in /SAPAPO/MAT1 - Product ? We have CIF to create and update product master data from R3 to scm but we have field Forward Consumption Periodo changed a