Last Name First Record appear in destination schema

I have source schema like 
<ns0:EmployeeDetails xmlns:ns0="http://NameValidation.Employee">
<Employee>
  <Name>Kiran</Name>
  <Country>Country_0</Country>
  </Employee>
<Employee>
  <Name>Naresh_Kumar</Name>
  <Country>Country_0</Country>
  </Employee>
<Employee>
  <Name>Kapil_Kumar</Name>
  <Country>Country_0</Country>
  </Employee>
 </ns0:EmployeeDetails>
the destination should be only the first last name record(the "_" is differenating last name in the name eleement )
   Destination schema :
<Employee>
  <Name>Naresh_Kumar/Name>
  <Country>Country_0</Country>
 </Employee>
the Naresh_Kumar is the first last name contains one record does not have last name and one more record is last record 

Try this XSLT:
<?xml version="1.0" encoding="utf-16"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:source="http://NameValidation.Employee" exclude-result-prefixes="source">
<xsl:template match="source:EmployeeDetails">
<Employee>
<Name>
<xsl:value-of select="Employee[contains(Name,'_')][1]/Name" />
</Name>
<Country>
<xsl:value-of select="Employee[contains(Name,'_')][1]/Country" />
</Country>
</Employee>
</xsl:template>
</xsl:stylesheet>
Morten la Cour

Similar Messages

  • How to replce the ename with last name & first name in this program

    Hi all,
    The below include program is with the reference of std report CATSSHOW.
    in which ename is the field to fetch the employee name, but now we want the emloyee name like last name & first name i.e in two separte column.
    how i implement this change in this include program.
    ENAME IS Define like that
    ename LIKE pernr_list_structure-ename,
    If u whant to refer the report put u can execute the std repot CATSSHOW.
    Pls help on this.
    Send me the code.
    pls find the include prgram ZHNO_INCLUDE_CATSDATA from where they declare the ename.
    4.6B
    QWKP99K050532 13081999 note 167550
    4.6A
    XQIALRK154280 19.11.98 key date on selection screen
    4.0C
    YIKALRK098973     30.03.1998  F4 Hilfe für Objektid
      INCLUDE CATSDATA                                                   *
    db-tabellen
    TABLES:
      prps,
        catsdb,
        catsdb_ext.
    Remarked by LuX 11 Dec. 1998
       crhd.                                                 "YIK
    dd-structuren
    TABLES:
        gdstr,
        gdset,
        catsd,                             "dialogstruktur
        sscrfields,
        t77mt,                             "modulübergreifende texte
        objec.
    Remarked by LuX 19981210 - CATS decoupling (seems not used)
      rcr01.
    "arbeitsplatz aus sicht pläne
    Added by Jerlece on 04/04/2002 - SIR 2836
    TABLES:
        pa0001,           "HR Master Record: Infotype 0001 (Org. Assignment)
         hrp1000.          "Infotype DB table : 1000
    *End of addition
    type-pool enthält feldkatalogstruktur
    TYPE-POOLS:
        kkblo.
    konstanten
    CONSTANTS:
      DATENULL20          TYPE D             VALUE ' ',      QWKP99K050532
        datenull20          TYPE d             VALUE '        ',
        datenull30          TYPE d             VALUE '00000000',
        no                  TYPE c             VALUE 'N',
        off                 TYPE c             VALUE '0',
        yes                 TYPE c             VALUE 'Y'.
    Added by Jerlece on 10/04/2002 - SIR 2836
    DATA: BEGIN OF i_objid OCCURS 0,
             objid(100),
           END OF i_objid.
    End of addition
    DATA:
        gt_sp_groups TYPE kkblo_t_sp_group WITH HEADER LINE.
    DATA for REFRESH of PCHSOBID
    DATA : old_otype LIKE wplog-otype VALUE 'O'.
    DATA: BEGIN OF i77eo_key,
             mandt LIKE t77eo-mandt,
             otype LIKE t77eo-otype,
           END   OF i77eo_key.
    DATA: BEGIN OF i77eo OCCURS 2.
             INCLUDE STRUCTURE t77eo.
    DATA: END OF   i77eo.
    DATA: BEGIN OF i778l OCCURS 5.
          INCLUDE STRUCTURE T778L.
    DATA:   langu LIKE t778l-langu.
    DATA: END OF   i778l.
    DATA   allowed_pernr_index       LIKE sy-tabix.
    DATA    flag_save                 TYPE c.
    DATA:  selcheck_save_struk_index LIKE sy-tabix.
    felder
    DATA:
        flag           TYPE c,             "Drucktastenbelegung
        saveflag       TYPE c,
        saveflag_esa   TYPE c,
        f_stich        TYPE c VALUE yes,   "1. X sichtag
        daynumber      TYPE c,             "Wochentagnummer 1-7
        pchobjid_count TYPE i,
        i778l_count    TYPE i,
        i77eo_count    TYPE i,
        txtid          LIKE t77mt-txtid,   "Wochentagtext
        exist_werk     TYPE c,             "werk eingegeben
        week           LIKE scal-week,     "Wochen zum Tag
        no_selection   TYPE c.             "YIKALRK167448
    DATA: BEGIN OF icatsdb OCCURS 0.
             INCLUDE STRUCTURE catsdb.
           include structure cats_exten.
    *data: checkbox(1) type c,
         lights(1)   type c,
    DATA:  END OF icatsdb.
    DATA: BEGIN OF selcheck OCCURS 0,
             fielname  LIKE dbindfld-field,
             flag(1)       TYPE c,
           END OF selcheck.
    DATA: BEGIN OF selcheck_save_struk OCCURS 0,
           FIELNAME(10)  TYPE C,                               NOTE 167550
             fielname      LIKE dbindfld-field,                 "note 167550
             flag(1)       TYPE c,
           END OF selcheck_save_struk.
    DATA: BEGIN OF selcheck_save OCCURS 0,
           FIELNAME(10)  TYPE C,                               NOTE 167550
             fielname      LIKE dbindfld-field,                 "note 167550
           END OF selcheck_save.
    DATA : BEGIN OF maco_objects OCCURS 5,
              plvar LIKE plog-plvar,
              otype LIKE plog-otype,
              objid LIKE plog-objid,
            END   OF maco_objects.
    RANGES so_datum_save FOR catsdb-workdate.
    INCLUDE .
    datendeklarationen für CATSSTRC                                     *
    TYPE-POOLS: kkblo, capp.
    TYPES: tabix LIKE sy-tabix OCCURS 0.
    TYPES: BEGIN OF icatsdb_lst_type.
             INCLUDE STRUCTURE catsdb.
    TYPES:   checkbox(1) TYPE c,
              lights(1) TYPE c,
              ename LIKE pernr_list_structure-ename,
           END   OF icatsdb_lst_type.
    TYPES: icatsdb_lst_type_table TYPE icatsdb_lst_type OCCURS 0.
    TYPES: BEGIN OF allowed_pernr_type,
             pernr LIKE catsdb-pernr,
             ename LIKE pernr_list_structure-ename,
             begda LIKE catsdb-workdate,
             endda LIKE catsdb-workdate,
           END   OF allowed_pernr_type.
    TYPES: allowed_pernr_table TYPE allowed_pernr_type OCCURS 0.
    DATA: allowed_pernr TYPE allowed_pernr_table WITH HEADER LINE.
    DATA: yx TYPE c VALUE 'X'.
    DATA: is_variant LIKE disvariant.
    DATA: es_variant LIKE disvariant.
    DATA: fcode(4).
    DATA: subrc LIKE sy-subrc.
    DATA: approve TYPE c.
    rhx-f4-objid-data.                    "YIKALRK098973
    INCLUDE rhodat00.
    Added by Lu Xiaozhou for CATS decoupling 10 Dec. 1998
    DATA: sys_type LIKE tcesyst-devtype.
    DATA: posid TYPE ps_posid.
    *added by anand on 8/21/02 TD 1480 ========>D20K908220
    *ranges for date to build & then put in selection criteria
    RANGES r_datum FOR sy-datum.
    *end of addition on 8/21/02 TD 1480=======>D20K908220
    *added by anand on 9/10/02 TD 1513 =======> D20K908525
    *New internal table to get the begin & end date also with ENum
    DATA: BEGIN OF it_pers OCCURS 0,
            pernr LIKE pa0001-pernr,
            begda LIKE pa0001-begda,
            endda LIKE pa0001-endda,
           END OF it_pers.
    *end of addition on 9/10/02 TD 1513 ======>D20K908525
    begin of anc01
    DATA: BEGIN OF i_pernr OCCURS 0,
           pernr LIKE pa0003-pernr,
           END OF i_pernr.
    DATA: BEGIN OF i_persa OCCURS 0,
           persa LIKE t500p-persa,
           END OF i_persa,
           BEGIN OF i_persk OCCURS 0,
           persk LIKE t503k-persk,
           END OF i_persk.
    DATA: BEGIN OF i_orgeh OCCURS 0,
           orgeh LIKE t527x-orgeh,
           END OF i_orgeh.
    DATA: BEGIN OF i_pa0105 OCCURS 0,
           pernr LIKE pa0105-pernr,
           usrid LIKE pa0105-usrid,
           END OF i_pa0105.
    end of anc01
    begin of TD 4107 Anand
    store sub org units
    DATA: BEGIN OF i_sobid OCCURS 0,
           sobid LIKE hrp1001-sobid,
           END OF i_sobid.
    store user entered org units
    RANGES: r_orgeh FOR pa0001-orgeh.
    end of TD 4107 Anand
    *Added by Ketan Joglekar, SIR6599 05/08/2006  D20K921585
    DATA: ws_mandt LIKE sy-mandt. "#EC NEEDED
    *Added by Ketan Joglekar, SIR6599 05/31/2006  D20K921851
    DATA: BEGIN OF wa_catsco_temp,
           counter LIKE catsco-counter,
           belnr LIKE catsco-belnr,
           trans_no LIKE catsco-belnr,
           docnr LIKE catsco-belnr,
           END OF wa_catsco_temp.
    *End of changes Ketan Joglekar, SIR6599 05/31/2006  D20K921851
    DATA: BEGIN OF i_cobk OCCURS 0,
          counter LIKE catsco-counter,
          docnr LIKE catsco-belnr,
          budat LIKE cobk-budat,
          END OF i_cobk.
    DATA: ws_week LIKE scal-week.
    *End of Changes.
    -> D10K919801
    DATA: w_aut_zhr15  type c,
           w_aut_zhr17  type c.
    -> D10K919801

    Completely support!
    I yesterday switched from I-mate PDA2K and got over 200 contacts from Outlook to my 6820 in format of first name space father name space second name. Terrible!
    My phone fails to search by the last name - search is useless in fact. And last names are almost invisible because of long first and father names in Russian.
    It's a nightmare. Could anybody help please? How to sync with Outlook to have last name first???
    Best Regards,
    Vladimir.

  • Birthday calendar on iCloud sort by last name first name like my contacts

    birthday calendar on iCloud sort by last name first name like my contacts

    Curiously, the most recently inputted entries do sort properly, as do all company entries.
    Does that mean "most recently inputted" AFTER you upgraded to Snow Leopard?
    If that is true, it would mean that something about your existing records before the upgrade, for the records that are people contacts (with first and last names) instead of business contacts, do not agree with Snow Leopard and/or Snow Leopard's version of Address Book.
    This may not be feasible, but if you exported the records with this problems and then imported them, maybe they will be re-inputted so that are properly sorted.
    If you use Time Machine, maybe you can use the +flying through space+ interface to restore one of the records with this problem to see if the restore process makes the record sort properly.

  • How do I force Mail to show messages from me addressed last name, first?

    I'm relatively new to Mac and to Mail. I'm finding that when colleagues send mail, their names are listed in the "from" column as Last Name, First. However, my name appears to others as First Name Last (no comma). How do I correct this?
    I send mail through an exchange server, if that helps.

    Have you tried Mail Preferences?
    Go to Preferences (under Mail menu) and select accounts. Then click on the account in question. Enter your name as you wish it to appear at the "Full Name" label.

  • HT2486 My mail account is linked to my address book. The address book shows First Name, Last Name. When I try to insert a name into an email, the order is reversed...Last Name, First Name.  How can I make the email read in the same order...First Name, Las

    My Mail Account in linked to my address book. The address book shows First Name, Last Name. When I start an email in Mail, the name does appear but the order is reversed...Last Name, First Name. I must have changed a setting somewhere but I don't know where. Does anyone know how to correct it?

    I don't have any problem with my system. My guess is there is something there you aren't quite getting. I'd recommend a visit to your Apple Store, AASP or to contact AppleCare so they can coach you personally.
    You can also play with the Address Book Preferences. However to see how changing a Preference affects the Address Book drag the Preferences window off of the Address Book so you can see both the Preferences window and Address Book Windows. Then toggle a Preference and you will see it instantly changes in the Address Book. 

  • How to display last name first and then first name last from one name column?

    I am trying to write a code which will display the last Name first then second name at last. For example;
    If the value of table column is: "John Decker Revora"
    I want to display "Revora, John Decker".
    I think I will first look for the gap in between the name and from last gap i will pick up the value and then concathenate with rest of the name.
    If u have any advice please reply ASAP with some examples.
    Thanks

    You need to do this in the query, using the instr and substr functions. Search the documentation for info on these functions. As a startpoint, I'll copy here an example from Kevin Loney's Oracle 8i The Complete Reference that does the opposite... you can adjust this to your needs:
    select Author, SUBSTR(Author, INSTR(Author,',')+2) &#0124; &#0124;' '&#0124; &#0124; SUBSTR(Author, INSTR(Author,',')-1) ByFirstName
    from Magazine

  • Mail AND entourage showing contacts in the order last name, first name?

    hi, I want to use mail and entourage parallel. mail can display the name in the "correct" order last name, first name. using entourage I cannot find this option. it´s always a mess, sorted by last name, but in the order: first name last name.
    Does somebody know the solution how to tell entourage to behave like mail in this matter ?

    Templeton's suggestion is best if needing help with Microsoft Entourage. Since I know the answer is "not possible" I can at least steer you toward an AppleScript that will give you a workaround. Have a look here <http://www.barryw.net/weblog/files/category-5.html>.
    Further questions about this script should be directed either to its author or to Microsoft's Entourage newsgroup <http://groups.google.com/group/microsoft.public.mac.office.entourage>.
    Hope this helps! bill
    1 GHz Powerbook G4   Mac OS X (10.4.9)  

  • Sort Address Book search dialog box by last name, first name

    When I am entering an email, and I click on the To: field to bring up the Address Book dialog box, by default the names are ordered according to the
    Name field in First Name, Last name format.
    Is there any way to have this column display the names in Last Name, First Name format?

    Is there any way to have this column display the names in Last Name, First Name format?
    The only way would be to change the display order of the AB to use <FileAs> which in turn requires that the default order for the <FileAs> field is configured to be <Last, First>.
    Way to change the AB display order is by going into Account Settings (you don't mention which version of Outlook is in use) or with Outlook closed, use the Control Panel <Mail> app to open the profile
    - click on the <AddressBooks> tab
    - highlight Outlook AddressBook
    - click <Change> and select the appropriate <Show Names> option
    Note: if your current default FileAs setting is not configured to be <Last, First> - you will need to <bulk> change all existing contact items since any change to the FileAs default setting only applies to newly created contacts.
    Karl Timmermans [Outlook MVP] "Outlook Contact Import/Export/Data Mgmt" http://www.contactgenie.com

  • Next,previous,last, and first record

    dear all masters
    plz help me my code dont work
    i used button when button pressed and code below
    First_Record;
    execute_query;
    last_record;
    execute_query;
    previous_record;
    execute_query;
    next_record;
    execute_query;
    but all wont work it wont goto the next, previous,last and first records.. master plz help me..
    micababe

    How do I navigate to the last_record after a query has fetched all my records. I jnow it existed the POST-FETCH trigger, but now how can I make this possible?
    My problem is simple. I am trying to navigate to the last record of a block after the query has fetched all the records.
    Thanks,
    Lucian

  • Bell on last or first record

    I have a last record button and a previous record button and I want when the user reaches the last or first record that a beep occurs. Is there a way to do this cause I put the bell before or after the last_record statement and it didn't work.
    Any suggestions?

    Hi...
    Try This.
    --- On The First Record Button---
    First_Record;
    Bell;
    --- On The Last Record Button---
    Last_Record;
    Bell;
    Bye

  • I have my contacts sorted and displayed last name, first name - however when I access my contact list via message they display first name, last name - WHY????

    Contacts sorted and dispalyed last name, first name - why when I access contacts via messaging do they display first name, last name?

    Hi
    It is when I tap on the +....
    My husbands display with first name first but grouped by surname alphabetically.
    Thanks
    Cat

  • Nokia E61 - Showing last name first in inbox

    I just got the E61 - and I'm loving it.
    However, there's one thing that bothers me. When I got the phone it came (by default) showing the last name first on all my contacts - I quickly changed it to "First Name Last Name". So far, so good.
    But my inbox doesn't seem to follow this setting. I'm still getting Last Name First Name. But, in my Sent Items, it will actually show First Name Last Name *if* I started the "conversation" - meaning that all the SMS messages that I have sent are shown as First Name Last Name, but all replied messages are shown as Last Name First Name (just like the inbox).
    Any ideas, or is this just a bug - or even a "feature"?

     just got the 5800 Express Music - and I'm loving it.
    However, there's one thing that bothers me. When I got the phone it came (by default) showing the last name first on all my contacts - I quickly changed it to "First Name Last Name". So far, so good.
    But my inbox doesn't seem to follow this setting. I'm still getting Last Name First Name. But, in my Sent Items, it will actually show First Name Last Name *if* I started the "conversation" - meaning that all the SMS messages that I have sent are shown as First Name Last Name, but all replied messages are shown as Last Name First Name (just like the inbox).
    Any ideas, or is this just a bug - or even a "feature"?

  • Imported contacts have last name/first name reversed

    When I had my old Samsung dumb phone, I listed all my contacts by last name.  (There was a single name field in the old phone, so I listed everybody as "Smith, Bob.")  But when I had my contacts list imported into my new iphone 5c, it read all the last names as first names and vice versa.  (It put "Smith," in the first name field and "Bob" in the last name field.)  I know I can choose to sort contacts by last name or first name.  But when I choose "Last, First" it lists all my contacts by first name.  So now when I enter a new contact directly into the iphone, it's backwards from everything else. 
    What am I supposed to do here?  Am I just supposed to keep entering contacts backwards for as long as I have this phone?  Or is there some sort of app or setting to fix this? 

    Hello X4r7s
    Friend if possible also sort your comets.
    Enter application Contacts
    Slide your finger from the top down
    Two options appear and Configuration Help
    Enter settings
    Sort contacts tab deployed by:
    Here choose the method you want:
    Name
    LasName.
    Company
    In your case option 2
    Regards...
    Kudos ** Do not forget to give those people who help and advise you regarding your questions ** Can
    Accept as Solution to ** Comments **
    @gutijose14
    BBM Channels  PIN: C0007093A
    Do not forget to give LIKE    Those people who help you and advise you about your doubts.  if the review has been SOLVED** # 4LL  #ÉliteRoad  Make a backup of your BlackBerry
    BlackBerry Protect and  BlackBerry Link constantly.  #ichooseBlackBerry10 Gutijose14 Forums Veteran I

  • Displaying by last name first screws up the middle name

    Argh. Why couldn't I find any page to submit this as a clear, reproduceable bug?
    If display is set to "First Last" then I see "First Middle Last" and that makes sense. If it's set to "Last, First" I see "Last, Middle First" which makes NO sense. Everybody (but Apple) knows that when you list people in an address book or phone book you list them "Last, First Middle."

    I figured out the solution for this.. If a user doesn't record a 'recorded name' when configuring their Unity account.. they cannot be searched for by name in the directory.. So have any users that are reporting the issue with their account log into their personal unity settings and record their name.. You can tell be looking at their Unity account profile.. If the option to press the play button for Recoded Voice is grayed out, they have no recorded name.. Hope this helps!
    -n

  • Not able to view users in F4 with Last Name, First name with tcode-PA20

    When we go to PA20 tcode and input personel id the details are shown for person.
    But When I select F4 at the Personel Number and enter  Last Name and First Name - It shows No Values selected
    Which authorizations are required for populating F4 data in tcode PA20.
    Warm Regards,
    Rajesh

    HI
    You can check the authorization , after u execute  PA20 , search as u described.
    Come out of that tcode , run SU53 , u will get exact missing objects in the Auth,
    Regards
    sameer

Maybe you are looking for

  • External Usb Audio Card Popping and Cracking sound with Satellite L500

    Greetings, My name is Boyan and I am from Bulgaria and about an year ago I've bought a satellite laptop from the l500 series ( i can not state which exactly is the model at the moment because my computer is not currently with me and on my user manual

  • Upgrade from windows to mac

    I have CS4, Design Standard. Can I upgrade it Mac version?

  • Hiding songs in playlists

    Is there any way to have a song remain on a playlist but have it not show up anywhere else? ie. I want to be able to play songs in a playlist but I don't want to see them in artist or album view since they are the only song I have of that artist/albu

  • Client connection exception

    Hi, I am trying to connect to a website for getting data. I am using weblogic 8.1 and my internet connection is thru proxy server. but it is getting the following exception. java.net.ConnectException: Tried all: '1' addresses, but could not connect o

  • Obiee 11g query

    There are two colums 1.No Of Arrivals 2.No.Of Departure Now need to design if the 2.No.Of Departure is greater that the 1.No Of Arrivals corresponding cell will be highlighted. How to do it in OBIEE 11G ? Please explain with detailed steps.