How can I map last of the repeating records into a single record?

I have a following input schema, I need to take only one of the <Student> records and map that to a single record in output. Doesn't matter if the first, second or last one of the records get mapped, I only need one in the output. Any idea how can
this be accomplished?
Input:
  <Students>
    <Student id="1">
        <Name>
          A
        </Name>
        <Roll>
          1
        </Roll>
    </Student>
      <Student id="2">
        <Name>
          A
        </Name>
        <Roll>
          1
        </Roll>
    </Student>
    <Student id="3">
        <Name>
          A
        </Name>
        <Roll>
          1
        </Roll>
    </Student>
  </Students>
Expected Output:
<Candidate>
  <Student>
    <Name>
       A
    </Name>
  </Student>
</Candidate>

Sounds rather complex for something that could be done very simple in custom XSLT like this:
<?xml version="1.0" encoding="utf-16"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="Students">
<Candidate>
<Student>
<Name>
<xsl:value-of select="Student/Name" />
</Name>
</Student>
</Candidate>
</xsl:template>
</xsl:stylesheet>
Morten la Cour

Similar Messages

  • Grouping the Records Into One Single Record

    Suggest me any function in sql or script which gives me following result.
    I have a table in which there are few columns and the data looks like below. I am only concerned about 3 columns
    C1 C2 C3
    A B Parent
    B A Child
    My requirement is to club and make it as
    C1 C2 C3 C4
    A B Parent Child
    I need to group in .. If we look into the first 2 records .. c1 of first record is equal to c2 of second record..

    Hi,
    Here's one way to do it:
    SELECT     p.c1
    ,     p.c2
    ,     p.c3
    ,     c.c3     AS c4
    FROM     table_x  p
    JOIN     table_x      c  ON   p.c2  = c.c1
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
    Point out where the query above is producing the wrong results and explain, using specific examples, how you get those results from the given data in those places.
    Always say which version of Oracle you're using.
    See the forum FAQ {message:id=9360002}

  • How can I get music off the ipod and into my library?

    I can't get the music off my ipod into my library... arg why won't it let me?

    You can't sync or drag your non iTMS music back directly from an iPod to iTunes, the transfer of music is designed by default to be one way from iTunes to iPod. However there is a manual method of accessing the iPod's hard drive and copying songs back to iTunes on Windows posted in this thread: MacMuse - iPod to iTunes
    If you prefer something more automated then there are a number of third party utilities that you can use to retrieve the music files and playlists from your iPod, this is just a selection. Have a look at the web pages and documentation for these, they are generally quite straightforward. As iTunes 7 is just out some of these may not work with it yet though I haven't experienced any problems with the Mac software I use.
    YamiPod Mac and Windows Versions
    iGadget Windows Only
    iPodCopy Mac and Windows Versions
    iPod Access Mac and Windows Versions
    PodUtil Mac and Windows Versions
    iPodCopy Mac and Windows Versions
    PodPlayer Windows Only
    There is a new function in iTunes 7 under File, "Transfer Purchases from iPod" which transfers iTMS purchases. A paragraph on it has been added to this article: How to use your iPod to move your music to a new computer

  • How can i map the SLD of BWSEM  and XI?

    hai pals,
         how can i map WAS OF the BWSEM system and Xi system.
    can u anybody help me out in this issue.
    with cheers rajesh.

    hi Rajesh,
    If you want to create BW and SEM inside XI
    you don't have to :
    cause they're defined as products:
    SAP BW     2.0B, 2.1C, 3.0A, 3.0B, 3.1 CONTENT
    SAP SEM     2.0B, 3.0A, 3.0B, 3.1A, 3.1B, 3.2, 3.5, 4.0
    you only have to define WAS fo those systems :
    you nedd to have WAS of SEM and BW
    (instances of those servers ) created as technical systems:
    if you need a technical system take a look at my weblog:
    /people/michal.krawczyk2/blog/2005/03/10/registering-a-new-technical-system-in-sld--abap-based
    you also nedd business systems for every Client (100,200 etc) mapped as business system
    business system creation
    http://help.sap.com/saphelp_nw04/helpdata/en/fe/39ae3d47afd652e10000000a114084/content.htm
    Regards,
    michal

  • Merging two records in a single record for the same matnr,werks and bwart.

    Hi I have a requirement to merge two records into one single record using the quantity field from MSEG table.
    I am selecting two records from the table MSEG. Now for these two records i have to add the quantity values into one variable.
    Then there should be only one record for the same matnr,werks,bwart.
    Any suggestion would be appreciated.
    Regards,
    Amit

    hi,
    You can COLLECT statement only if all non key fields are numeric.
    This statement Adds all such fields and give us a single record.
    Regards
    Sumit Agarwal

  • HT4623 How can update my iPhone to the last ios5. I dont want ios 6 as I want to keep google maps

    How can update my iPhone to the last ios5. I dont want ios 6 as I want to keep google maps?

    I disagree, Mr. WJ:
    If Matt had updated his iPhone via the Cloud and not by USB cable to his computer, the old IOS would still be on the computer and he would be able to "restore" to it. It would depend on what his backup settings were configured.
    For instance, I always backup to my computer at home. But, in the last few days I was notified that IOS 6.1 came out. So, if I wanted, I could install the update via WIFI from where I am at work. But, my old IOS would still be safe on my home computer that I can restore from if need be.
    And then you basically repeated what I stated about Google Maps being a app you can download now.
    Who loves ya, baby?

  • How can I map the composite_dn name with a composite in run time

    Hi All,
    I want to craete a report on number of total business and system faults with the help of Information Publisher in OEM 12c Cloud Control. I am fetching data from the table composite_instance_fault present in SOAINFRA schema. Below os my SQL statement:-
    select error_category,count(error_category) from prefix_SOAINFRA.composite_instance_fault where composite_dn=??EMIP_BIND_TARGET_GUID?? group by error_category
    Now I want to know that how can I map the composite_dn name with a composite in run time. When we fetch data from the repository we used to map target in rumtime by using ??EMIP_BIND_TARGET_GUID?? but here as I am not fetching data from repository, how can I map target in run time.
    On executing the above SQL statement its returing an empty table without any data.
    Please guide!!
    Thanks in Advance!!

    Hi,
    try something like this.
    Mike
    Attachments:
    Unbenannt 5_LV80.vi ‏12 KB

  • How can I get rid of the display of the last played music-title

    How can I get rid of the display of the last played music-title
    When playing a music-title the name of the title and it's progress is displayed in the box at the top of iTunes, even if the music is already stopped or ended. This display is impeding f.i. when copying music-albums to iPhones and watching the progress. Can anyone tell me please how to make the display of the last played music-title disappear?
    Thank you very much in advance.
    Hans M

    OK, thank you very much, fiend.
    However: Since yesterday afternoon my e-mail-acount is being flooded with 50+ e-mails every few hours which are not at all related to my question. I'm copying the properties of one e-mail as a sample. Could you please organize this flood to stop or tell me what to do?
    Thank you very much!
    Hans M
    Return-Path: <[email protected]>
    Delivered-To: [email protected]
    Received: (qmail 11232 invoked from network); 2 Jan 2014 21:38:42 -0000
    Received: from unknown ([172.18.1.109])
              by mailbox11.aon.at (qmail-ldap-1.03) with QMQP; 2 Jan 2014 21:38:42 -0000
    Delivered-To: CLUSTERHOST smarthub76.res.a1.net [email protected]
    Received: (qmail 9065 invoked from network); 2 Jan 2014 21:38:41 -0000
    X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on
    WARSBL504.highway.telekom.at
    X-Spam-Level:
    Received: from redstreak.apple.com (HELO bz.apple.com) ([17.151.62.54])
              (envelope-sender <[email protected]>)
              by smarthub76.res.a1.net (qmail-ldap-1.03) with RC4-MD5 encrypted SMTP
              for <[email protected]>; 2 Jan 2014 21:38:41 -0000
    X-A1Mail-Track-Id: 1388698720:8973:smarthub76:17.151.62.54:1
    Received: from nwk-jivep-lapp04.corp.apple.com ([17.34.26.3])
    by bz.apple.com (Oracle Communications Messaging Server 7u4-23.01(7.0.4.23.0)
    64bit (built Aug 10 2011)) with ESMTP id <[email protected]> for
    [email protected]; Thu, 02 Jan 2014 13:38:40 -0800 (PST)
    Date: Thu, 02 Jan 2014 13:38:39 -0800
    From: Apple Support Communities Updates <[email protected]>
    Reply-to: discussions-replies <[email protected]>
    To: Hans M <[email protected]>
    In-reply-to:
    <2-24330225-3-6714313-1388532858380-2-24354104-3-1039882-1388697859204.jivesbs.ji vemailuser@https://discussions.apple.com/>
    References:
    <2-24330225-3-6714313-1388532858380.jivesbs.jivemailuser@https://discussions.appl e.com/>
    <2-24330225-3-6714313-1388532858380-2-24353958-3-6714313-1388696827692.jivesbs.ji vemailuser@https://discussions.apple.com/>
    <2-24330225-3-6714313-1388532858380-2-24354104-3-1039882-1388697859204.jivesbs.ji vemailuser@https://discussions.apple.com/>
    Subject: [iTunes for Windows] - Re: Cannot follow these instructions
    "Where are my iTunes files located?" [7h40p2-20wvf-ehzw3]
    MIME-version: 1.0
    Content-type: multipart/mixed;
    boundary="----=_Part_577492_1482299802.1388698719437"
    Auto-submitted: yes
    Content-disposition: inline

  • HT1349 hi ,i just got a Parallels desktop 7 and i try to install it but the cd doesn't start when its inserted.how can i solve this? the macbook pro i just got it few days back so its the last version..thx

    hi ,i just got a Parallels desktop 7 and i try to install it but the cd doesn't start when its inserted.how can i solve this? the macbook pro i just got it few days back so its the last version..thx

    Hi,just now i open it with finder and it started downloading!!!
      Thank you,very new to mac:)

  • HT1212 If I never synced to itunes and I restore the device. Will I lose unstored data? How can I check to see the last time my phone was backed up if I forgot the passcode to my phone?

    If I never synced to itunes and I restore the device. Will I lose unstored data? How can I check to see the last time my phone was backed up if I forgot the passcode to my phone?

    If you can't remember your passcode, you'll need to restore your phone.  If you never synched to iTunes, all data on your phone will be erased.  No way around this.

  • I shot at a Live performance last weekend by using the 'capture now' button. Now, my FCP is only playing the first 6 frames - how can I access or recover the full hour I shot?

    I shot at a Live performance last weekend by using the 'capture now' button. Now, my FCP is only playing the first 6 frames - how can I access or recover the full hour I shot?

    FCP X?  Then you need to use a different forum...This is the FCP 7 and earlier forum:
    https://discussions.apple.com/community/professional_applications/final_cut_pro_ x
    FCP 7?  Did it look like it captured normally? Everything go smoothly?  Stop normal?  Did an error occur at any point?  Can you open the file in QT?
    In the future...do not rely on ONLY FCP for this task. Get a reputable recorder that can record to ProRes. AJA KiPro, KiPro Mini, Atmos Ninja, Decklink Recorder...lots of options.

  • I want to boot my new mini mac in OX 10.6.8 how can i do it with the last mini mac 2,3 Gh i7 ?

    i want to boot my new mini mac in OX 10.6.8 how can i do it with the last mini mac 2,3 Gh i7 ?

    Stef207 wrote:
    i want to boot my new mini mac in OX 10.6.8 how can i do it with the last mini mac 2,3 Gh i7 ?
    Those specifications are not for the "last" mac mini, but for the mid-2011 Mac Mini: Macmini5,2.
    While that model came with Lion and could not be downgraded to Snow Leopard out of the box, look for the work done by newfoundglory https://discussions.apple.com/people/newfoundglory in this thread on how to accomplish an install of Snow Leopard that will allow that model of Mac Mini to boot into Snow Leopard, if it is that important to you:
    https://discussions.apple.com/thread/3209335?start=0&tstart=0

  • How can we map a file in the recepents file in smtp server

    hai all,
    how can we map a file to teh recipents file in smtp server configuration.
    because i didnt hard code the email id there so i has to kept any file or any variable so can any one help me out.
    thanks,
    Rajesh

    Hi There
    You can try to use SSIS expressions in your DTSX package which reads the values from the file and then populates the recipient field. This would require some script tasks to read the data and then populate the variables used in the SSIS expression.
    [https://www.google.com/search?sclient=psy-ab&hl=en&safe=off&site=&source=hp&q=ssisexpressions&btnK=GoogleSearch#sclient=psy-ab&hl=en&safe=off&source=hp&q=sqlssisexpressions&oq=sqlssis+expressions&aq=f&aqi=&aql=&gs_sm=e&gs_upl=9137l9524l0l9847l4l3l0l0l0l1l522l522l5-1l1l0&bav=on.2,or.r_gc.r_pw.r_cp.,cf.osb&fp=67c17c5b88ef2530&biw=1440&bih=799]
    It could be easier to configure a distribution list on your exchange server or domino server, and then send an email to the distribution list email address. Then you could manage the recipients from the mail server.
    Another way to achieve this, is to put a prompt in the data manager package to pass the recipient email addresses, and then pass that value to script logic. In the script logic it would call a stored procedure with the dynamic input and send the mail.
    [http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/d01ce779-f1b2-2b10-07ba-da3734013245]
    You could use the SMTP relay functions from SQL server.
    There are various options available. each option has pro's and con's you will need to decide which is better and easier to manage. 
    I hope this helps.
    kind Regards
    Daniel

  • I purchased three albums last week and only two of them were charged.   How can I make sure that the third album gets charged in a timely fashion?

    I purchased three albums last week and only two of them were charged.   How can I make sure that the third album gets charged in a timely fashion?

    Well, thanks for feeling with me, patkosanke ... AND for your wise advice.
    I did followed your advice immediately and erased all the service number as well as S/Ns.
    Can you, however, give me any "direct number" through which I can get hold of someone and request for what you're suggesting?
    I believe I had talked with the person by the name of "Charlie" (I think... I hope I'm correct...) when I was having the same problem with the last device. He was very kind and helpful, though I ended up getting the device that brought the same problem.
    Charlie told me that if I had any more problems I should call him. But I forgot to take down his direct number.
    Or maybe I should call the main office and ask for him. But my memory is questionable as to his name, and besides I don't even know his last name either. There could be more than one "Charlies" in Palm.
    So, if you could somehow email me some direct number (other than the one that keeps on hooking me up with those people in the overseas who are answering the phone only to sympathize with & apologize to me but can only issue a false hope with the SRO#. More than once I was given the promise that the supervisor would call me back within an hour or two but I ended up calling back after I had been left hanging in the air all night long.) where I can talk to someone like I did with Charlie last time who can truly carry out the promise, I would truly appreciate it, patkosanke. ^^
    Thanks
    jcinlovewpalmTX
    Post relates to: Palm TX
    Post relates to: Palm TX
    Message Edited by jcinlovewpalmTX on 03-05-2009 06:36 PM
    Message Edited by jcinlovewpalmTX on 03-05-2009 06:36 PM

  • How can I do to install the apple store that I deleted from Maveriks?

    how can I do to install the apple store that I deleted from Maveriks?
    thanks you
    <Email Edited by Host>

    Continuing what I linked last time, this is an older thread that covered a similar problem.   Preview, Fontbook, Maps not working...: Apple Support Communities
    See the post by MacJack which was awarded solved.

Maybe you are looking for

  • HELP!!!  iTunes 8.1 won't work on my computer.

    ever since i've downloaded the most recent version of itunes, every time i open it it shows me an error message that says "windows - no disk," and it says "exception processing message" followed by a bunch of numbers. i've already tried restarting my

  • How to integrate DRM with third party tool for loading metadata in SQL table

    Experts, I am new to DRM and I have a requirement in which we want to integrate DRM with third party tool(lets say SQL table) as target and load metadata from DRM (Parent node, name , alias etc) to SQL table (same column name) Is there any way we can

  • Problem with fscommand exec

    Hi everyone ;) im creating a Flash Projector to use in a interactive cd. I need to open .doc files i try this: on (release) { fscommand ("exec", "test.doc"); i put the test.doc in a subfolder named fscommand on the root of the projector. i try to put

  • JComboBox question

    i am using a JComboBox in a JPanel all goes well and it is doing exactly want iwant it to do, there is one little thing that is bad though, when the JComboBox closes itselft after a selection has been made, the surface that was beneath the expended J

  • COMPARE DATES IN A CLAUSE 'WHERE'

    CREATE TABLE POS.PRODUCTS PRODUCT_ID NUMBER(9,0), PRODUCT_NAME VARCHAR2(50), PRODUCTO_DATE DATE PRIMARY KEY ( PRODUCTO_ID ) ENABLE NOVALIDATE I HAVE THIS TABLE, IN WHICH I HAVE A CALL FIELD +(PRODUCT_DATE)+ HERE I AM TRYING TO MAKE A +(SELECT)+, WHER