XSLT Mapping to convert u201C.CSVu201D file into XML Structure.

Hi All,
I wanted to know can we use XSLT Mapping to convert u201C.CSVu201D file into XML Structure.
I am communicating between two XI Systems. First XI system is going to give u201C.CSVu201D file as main document. I need to post IDOC Corresponding to this. So what I want to do is read this u201C.CSVu201D file (Main document in payload) and first convet it into XML and then use second mapping which will convert XML to IDOC.
I know this is possible with JAVA Mapping but just wanted to confirm can we do this with XSLT mapping as well?
Regards,
Gouri

Hi Amit,
I know this way it shd work as i am able see other XSLT files. But this particular file is not visible.
I am copying following code only in sample.xslt file.
<xsl:stylesheet
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:fn="fn"
  xmlns:xs="http://www.w3.org/2001/XMLSchema"
  version="2.0" exclude-result-prefixes="xs fn">
<xsl:output indent="yes" encoding="US-ASCII" />
<xsl:param name="pathToCSV" select="'file:///c:/csv.csv'" />
<xsl:function name="fn:getTokens" as="xs:string+">
    <xsl:param name="str" as="xs:string" />
    <xsl:analyze-string select="concat($str, ',')" regex='(("["]*")+|[,]*),'>
        <xsl:matching-substring>
        <xsl:sequence select='replace(regex-group(1), "^""|""$|("")""", "$1")' />
        </xsl:matching-substring>
    </xsl:analyze-string>
</xsl:function>
<xsl:template match="/" name="main">
    <xsl:choose>
    <xsl:when test="unparsed-text-available($pathToCSV)">
        <xsl:variable name="csv" select="unparsed-text($pathToCSV)" />
        <xsl:variable name="lines" select="tokenize($csv, ' ')" as="xs:string+" />
        <xsl:variable name="elemNames" select="fn:getTokens($lines[1])" as="xs:string+" />
        <root>
        <xsl:for-each select="$lines[position() &gt; 1]">
            <row>
            <xsl:variable name="lineItems" select="fn:getTokens(.)" as="xs:string+" />
            <xsl:for-each select="$elemNames">
                <xsl:variable name="pos" select="position()" />
                <elem name="{.}">
                <xsl:value-of select="$lineItems[$pos]" />
                </elem>
            </xsl:for-each>
            </row>
        </xsl:for-each>
        </root>
    </xsl:when>
    <xsl:otherwise>
        <xsl:text>Cannot locate : </xsl:text><xsl:value-of select="$pathToCSV" />
    </xsl:otherwise>
    </xsl:choose>
</xsl:template>
</xsl:stylesheet>
Is this correct?
-Gouri

Similar Messages

  • I want to convert a pdf file into xml.Which programme should I use and how do I access it?

    I want to convert a pdf file into xml.Which programme should I use and how do I access it?I am based in India.

    Hello,
    if you create your doc files by the help of WORD, you could use a Microsoft add on (it depends of your WORD Version).
    Hans-Günter

  • How to convert a .class file into .java file without .jad using DeJDecompil

    Hi all,
    I am using DeJDecompiler and working with swing applications.If I try to convert a .class file into .java file,it is converting into .jad file only.Fine but if I try to save that file into .java file,It is giving lot of errors in that program.When I went into that program the total style of the program is changed and TRY-CATCH block is not recognised by the dejdecompiler,hence If I try to include some methods in the existing .java file thus got,I could not do.Kindly help me.
    If I get the .java file without error then I can process the rest of the functionality.
    Thanks in advance
    With kind Regs
    Satheesh.K

    Not so urgent today then!
    http://forum.java.sun.com/thread.jsp?thread=553576&forum=31&message=2709757
    I'm still not going to help you to steal someone�s code.

  • How do I convert an ASP file into a PDF?

    How do I convert an ASP file into a PDF?

    None of the free Adobe Reader products (Adobe Reader Touch, Adobe Reader for iOS/Android, Adobe Reader XI for desktop) provide the support for converting ASP to PDF.
    Acrobat XI Pro and Standard (which are not free) can convert an ASP page into PDF.
    Please note that Acrobat XI Pro, Standard, and Reader XI are not compatible with the Windows RT operating system.

  • How do I convert an Excel file into a pdf?

    how do I convert an Excel file into a pdf?

    Hi tomduffey,
    You can either use Create pdf service or Adobe Acrobat software for the purpose.
    Please refer -
    Using Create PDF service : https://www.acrobat.com/createpdf/en_GB/convert-excel-to-pdf-converter.html
    Using Adobe Acrobat : http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/products/acrobat/pdfs/adobe- acrobat-xi-create-pdf-files-tutorial-ue.pdf

  • How do I convert an Adobe file into a word document?

    How do I convert an Adobe file into a word document?

    What type of Adobe document are you trying to convert?  Which Adobe software or service are you utilizing?

  • Can i convert AIFF audio file into an MP3 file please?

    Can i convert AIFF audio file into an MP3 file please? I will be doing this on an imac 2008 model. thank you for help!

    Since this is the Logic forum and you may be working in Logic, you dont even need iTunes. To convert Aiff to MP3:
    1 - Go to the Bin>Audio Files
    2 - Select the Audio File you want to convert ( and not a region or edit of it)
    3 - Go to Audio File next to the Link icon ( Audio - Edit - View ) and down the menu to Copy/Convert.. gives lots of options
    HTAH
    (hope that also helps)
    MS

  • How do I convert an InDesign file into a PDF file, it won't let me do it when I 'Save As'. Help??

    I need help with converting an InDesign file into a PDF file.
    I've tried looking into the program and seeing if i can do it, but it is not giving me the option.
    I need to be able to do this for work purposes.
    Please help.

    Try Exporting. There are also number of useful Export PDF presets that come with design.
    What do you want to do with the PDF?

  • How to convert a pdf file into RTF format or Doc Format

    Hello
    I need to convert a pdf file into a rtf file or doc file.
    But i need to do this with a command line or with the api of acrobat.
    My version is adobe acrobat 9 standard.
    Is it possible to do this?
    So i see there's a convert pdf online.
    Is it possible to use this whith a web service?
    The final file (RTF or doc) must be analyse into an application
    Best regards

    Look at the doc.saveAs JavaScript method: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.524.html
    You can save to other formats when you include the corresponding cConvID parameter. It can be used in a batch sequence, but you'll need the Pro version for that.

  • I would like to convert a matlab file into a .dll and use it in LabVIEW. However, when I run the .dll in LabVIEW I get an error stating "... Procedure not found". What could this be? Can anyone help me...

    I wish to convert my Matlab files into .dll's so that I can use them in LabVIEW. I am using 'mcc' and 'mbuild' of Matlab to convert my .m files into .c and .dll.
    When I try to run the .dll's in LabVIEW, I get an error message in a modal window stating some required .dll or procedure is not found.
    How should I resolve this issue. Should I add any other Matlab .dll's in course of making my .dll?
    Please help in solving this issue... Thankyou very much.

    KJV wrote in message news:<[email protected]>...
    > When I run the matlab generated dll, it is stating 'matllb.dll not
    > found'. Is it that I should set the path for matlab\bin to include
    > all the dll's before I compile? When I make dll from C, it works fine
    > in LabVIEW. The problem is from .m to .dll. The problem also arises
    > when I convert my .m to .exe. The same error of 'matllb.dll not
    > found' comes over. Should I change my matlab compiler options or
    > something else? Please help me?
    I have the same question,I don't know how to use the matlab DLL file in labview,
    I hope someone can descripe the procedure in detail.

  • I've become increasingly frustrated with the ipad adobe app. I've subscribed to be able to convert my pdf files into word documents and it has yet to work I've paid for a service that does not work which in turn makes me a disgruntled customer to say the

    I've become increasingly frustrated with the ipad adobe app. I've subscribed to be able to convert my pdf files into word documents and it has yet to work I've paid for a service that does not work which in turn makes me a disgruntled customer to say the least very disappointed with such horrible service

    Which service did you subscribe to?  Adobe PDF Pack?
    Once I know the service that you subscribed to, I can move this post to the right forum so that you can get in touch with the folks who can assist you.

  • How do i convert a pdf file into a editable word

    how do i convert a pdf file into a editable word

    Converting a PDF to Word requires Acrobat, or the ExportPDF service.

  • I have Adobe PDF Pack. How do I convert a pdf file into word or Docx?

    I have Adobe PDF Pack. How do I convert a pdf file into word or Docx?

    Use Tools in Adobe Reader, or sign in directly at https://cloud.acrobat.com/convertpdf
    [topic moved to PDF Pack forum]

  • How do I convert a prel file into..

    How do I convert a prel file into a mp3, avi, etc. I am needing to upload the video onto youtube and the file is not compatible as a prel. I am using adobe premier elements 12.

    mgroce
    Given you have Premiere Elements 12/12.1. (limit...2 GB 15 minutes, even if you have an extended time account at YouTube...the extended time account applies only to file uploaded to YouTube at the YouTube web site)
    If your goal is to get a Premiere Elements 12 Timeline uploaded to YouTube, you have two possible routes....
    a. Publish+Share/Social Websites/YouTube and your selection of the preset that matches your Timeline properties
    or
    b. Publish+Share/Computer/AVCHD with one of the .mp4 preset to export the Timeline content to a file saved to the computer hard drive from where you upload it to YouTube at the YouTube Web site.
    For best results, I would suggest an AVCHD.mp4 file instead of the "avi" that you mentioned. What is the video compression that goes with that "avi" wrapper?
    As for .mp3, that is a audio file extension, what is your intent on that....an upload to YouTube with just music and with a black video display? YouTube strictly enforces any copyright issues, so please assure that there are none associated with these .mp3 otherwise YouTube will remove them.
    Please review and consider, and then let us know if you have the information that you sought.
    Thank you.
    ATR

  • How can I convert a pdf file into a usable xcel file

    how can I convert a pdf file into a xcel file. the pdf file file is layed out in colums, justified and separated in various types - i need to be able to set colum limits manualy,  thanks for your input/

    Without further information, I would suggest using either Acrobat or the Export PDF service.

Maybe you are looking for

  • I had to get a new computer and i cant move my new music to my ipod because it says can only be synced to one library. what can i do?

    I had to get a new computer and I can not move my new music to my ipod because it says I can only have one itunes library. I would have to erase my ipod to use this new itunes library. Any ideas?

  • Can dreamweaver (CS3) play the middleware between flash AIR as 3.0 and MSSQL

    I have developed a Flash AIR AS3 form, 7 input text fields, one submit button. I know that Flash can't communicate with a server unless a PHP script is in the middle. Sadly, I am on microsoft sql server 2008 not mySQL. Does anybody out there, know of

  • Video Freezing Issues

    Graphics Card ATI Radeon HD 5450 Latest version of the Driver Operating System Windows 7 64 bit Issue Explained Whenever I try to start any Video Outside Google Chrome my Graphics Freeze (no cursor movement, no alt crtl delete, no commands) and I hav

  • REST and PDF Generation

    Hi All, I am new to LiveCycle.We are running 7.2 on JBoss. The developing_applications.pdf file has a section on Developing a REST application and also mentions that the sample code can be found and downloaded from http://partners.adobe.com/public/de

  • Email subject filter

    I'm having trouble getting the email subject filter to work.  I am currently using redirector on my work laptop to push email to my Blackberry handset.  I am trying to build a subject filter that looks for one word in the subject line and does not fo