[Solved] How to create multiple target nodes from single input node (XSL)

Hello all,
I have identified what I think is a bug in the visual XSLT mapper (JDev 10.1.3.3). Here is the simplified scenario:
I have a source XML file that contains a bill-to address and a ship-to address, something like this:
<header>
<bill-to-name>My Customer Bill To</bill-to-name>
<bill-to-address>123 main street</bill-to-address>
<ship-to-name>My Customer Ship To</ship-to-name>
<ship-to-address>567 first avenue</ship-to-address>
</header>I want to translate it to a target XML file that looks like this:
<addresses>
<address>
<address-type>BILLTO</address-type>
<name>My Customer Bill To</name>
<street-address>123 main street</street-address>
</address>
<address>
<address-type>SHIPTO</address-type>
<name>My Customer Ship To</name>
<street-address>567 first avenue</street-address>
</address>
</addresses>Note that what I am trying to do is to create two nodes in the target (something like a for-each), but where there is no repeating node in the source.
I was able to do this quite simply with a map like this:
<xsl:template match="/">
  <ns2:addresses>
    </ns2:address>
      <ns2:address-type>
        <xsl:text disable-output-escaping="no">BILLTO</xsl:text>
      </ns2:address-type>
      <ns2:name>
        <xsl:value-of select="/ns1:header/bill_to_name"/>
      </ns2:name>
      <ns2:street-address>
        <xsl:value-of select="/ns1:header/bill_to_address"/>
      </ns2:name>
    </ns2:address>
    </ns2:address>
      <ns2:address-type>
        <xsl:text disable-output-escaping="no">SHIPTO</xsl:text>
      </ns2:address-type>
      <ns2:name>
        <xsl:value-of select="/ns1:header/ship_to_name"/>
      </ns2:name>
      <ns2:street-address>
        <xsl:value-of select="/ns1:header/ship_to_address"/>
      </ns2:name>
    </ns2:address>
  </ns2:addresses>
</xsl:template>As long as I only use the source view for the xsl file, this works fine and tests just fine. As soon as I switch over to the graphical (design view), the source gets mangled to:
<xsl:template match="/">
  <ns2:addresses>
    </ns2:address>
      <ns2:address-type>
        <xsl:text disable-output-escaping="no">BILLTOSHIPTO</xsl:text>
      </ns2:address-type>
      <ns2:name>
        <xsl:value-of select="/ns1:header/bill_to_name"/>
        <xsl:value-of select="/ns1:header/ship_to_name"/>
      </ns2:name>
      <ns2:street-address>
        <xsl:value-of select="/ns1:header/bill_to_address"/>
        <xsl:value-of select="/ns1:header/ship_to_address"/>
      </ns2:name>
    </ns2:address>
  </ns2:addresses>
</xsl:template>which obviously does not work.
So:
1). Should my original map work? If not, what is the correct way to do it?
2). If the map should work (it does), this looks like a bug in the design view.
3). If my map should work, is there a way to do this in the design view?
Kind regards,
John

John,
GUI has limited functionality and hence it does not support all the constructs. If you want to implement soln that is visible in gui follow this steps.
for-each(bill-to-name)
     create <address>tag
     map concat(BILLTO) to <address-type>
     map value of <bill-to-name> to <name>
     map value of <bill-to-address> to <street-address>
select the for-each you created - right click -> add xsl node ->clone for-each
     repeat similar steps for mapping <ship-to_name>...etc
If you still unsure send me the source & target xsd and I will send the xsl your way. You can email me at [email protected]
Dipal

Similar Messages

  • How to call multiple strus actions froma single jsp

    how to call multiple strus actions froma single jsp, and that actions should be automatically called pls help me
    Thanks in advance

    how to call multiple strus actions froma single jsp, and that actions should be automatically called pls help me
    Thanks in advance

  • Create multiple sales orders from single service notification?

    Is it possible to create multiple sales orders from a single notification (IW51)? 
    We currently create sales orders directly within transaction IW51 (Create Service Notification).  We kick off the sales order creation by pressing the "SALES ORD." button in the notification screen.  We're now interested in creating a 2nd Sales Order which would tie directly to the same Service Notification.  This is so that we can have the second order assigned to a different account assignment WBS (there are two different parties doing work on the service notification).
    I assume you would have to go to VA01 to create the Sales Order, but am not sure how to tie it directly to the service notification from here.  I treied to do a create with reference, but there is no ability to create with reference to a service notification.
    Do I have to create a second service notification for the 2nd Sales Order for this to work?  I want to avoid doing this if at all possible.
    I'm running SAP R/3 Enterprise
    Thanks for your help!

    Hi,
    go to vtaa- copy controls for sales document to sales document.
    select your combination of order and quotation go to item level. There select value 0(zero) in field positive/negative negative.
    No need to change update document flow.
    After setting zero in copy control that be told on above. create order with respective to the quotation.
    After saving the order.
    go to document flow to see the status in between quotation and order.
    If you placed setting right, then u certainly observe for quotation status will be open. so you can create no. of sales order with respect to that quotation..
    Have a good day..

  • How to generate multiple idoc's from single appl document

    All,
    Iam looking for a way to generate multiple idoc's from single appl document (sales order). Based on the plant details on line items in the sales order i have to generate multiple idocs, i.e., send one idoc to each plant entered in sales order line items. any help will be appreciated.
    Thanks

    Hi,
    You can create a Z-program and call Function Module  <b>MASTER_IDOC_DISTRIBUTE</b>.
    You can make a call to this FM to send the Idoc as many times as u have plants in your Sales Order.
    You can call FM <b>IDOC_OUTPUT_ORDRSP</b> to fill the IDoc structure.
    Then u can keep the materials of only that plant for which u want to pass on the information.
    Thanks,
    Utsah Garg.

  • How to create multiple WIP jobs from a single Sales Order Line

    Hi all,
    I want to know if there's a standard way to create multiple single unit wip jobs from a sales order line which has 2 or more units, i mean...
    I have a sales order line with item A with 3 units. If I progress the sales order, a single job is automatically created in WIP with 3 units to be created. What i want is to create 3 jobs with one unit each, all of them linked to the sales line order...
    Thanks in advance!
    Regards!

    Assuming simplest of scenarios....
    In case of changes to Sales order qty, an unplanned order will simply disappear.
    If a wip job has already been created, you will get a cancel message (in case the job is not needed) or a reschedule out message (if the quantity needs to be reduced).
    ASCP will give you a reschedule in /out message if the dates change.
    Sandeep Gandhi

  • [SOLVED] How to Create OGG Theora Video From an Audio Track + 1 image

    Does anyone know how to create an OGG Theora video (.ogv) from an audio track and one still image. I just want one video frame to repeat until the audio file is finished playing. Make sense? Any help would be appreciated, and if possible I'd love to do it with ffmpeg2theora. Thanks!
    Last edited by tony5429 (2009-11-30 03:14:54)

    http://lists.mplayerhq.hu/pipermail/ffm … 19761.html
    I've tested it w/ 'ffmpeg -loop_input -f image2 -i image.jpg -i sound.mp3 blah.avi' and the output works w/ mplayer but I had issues w/ .ogg and .ogv output.
    In case vlc and gstreamer won't do, check out http://v2v.cc/~j/ffmpeg2theora/
    Last edited by karol (2009-11-29 16:43:23)

  • How to create Multiple Address for a single customer

    Respected Members,
    In tcode Xd01 we create on customer but there we can maintain only one address but sometimes a scenario can be that single customer can have different address .
    How to do that.Any exit is available to create multiple address with creation of single customer.
    This provision is given while creating a Business Partner.Tcode is BP .In this Address Overview tab is there and you maintain multiple address to single Busines partner.
    Same thing can we do for the customer.
    Any solutions or suggestions,please give me your support.
    Thanks

    Hello Manish,
    Unfortunately Customers have only one address. However you can use contact persons to store different addresses, or (in the Sales view) you can assign other partner functions with different addresses (e.g. one customer acting as the Sold-to partner may have different Ship-to partners).
    If these options do not meet your requirements, you could extend the customer master data with your own functionality and enhance transaction XD01 with your own screens for holding alternate addresses.
    Regards,
    John.

  • How to use multiple tape drive from single client when I want to backup single filesystem?

    Hello All.
    I want to backup 1 filesystem using 4 tape drives for reducing backup time.
    In case of symantec veritas netbackup, they can user "NEW_STREAM" for multi-streaming backup.
    Please anybody let me know that how to do use multiple tape drive for single client.
    1. Backup Source server : Linux (1 client)
    2. Backup Soucre :      /data1  (500GB)
        -> Current directory structure doesn't have sub directory under /data1, just files present under /data1
    If direcotry struceture has a sub-direcotry like( /data1/aaa, /data1/bbb ), Is it availble to use multiple tape drives?
    3. Tape Drive with OSB : LTO6 * 4 drives
    Thank you.

    You would have to create a different dataset for each sub-folder. If you only have files at the top level folder then even the NEW_STREAM option couldn't be used to split the job.
    Organise it into folders and then create datasets in a client folder such as :
    /usr/local/oracle/backup/admin/config/dataset/Linux/data1_aaa
    /usr/local/oracle/backup/admin/config/dataset/Linux/data1_bbb
    Then in the schedule you just specify the Linux folder. In each dataset you list the hostname and the folder name, such as :
    include host Linux
    include path /data1/aaa
    Now it will create a new job for each dataset and therefore each folder.
    Thanks
    Rich

  • How to create multiple page PDF from multiple jpg images?

    I have three jpeg images with pixel dimensions 1008 x 1464. I wish to create a PDF file with one image per page. Apparently Preview previously performed this function, and this functionality was deliberately removed by the time of Mac OS X 10.6.
    I use Mac OS X 10.6.8. I have combined the images via Gimp into one jpeg image of size 1008 x 4392, but it would be better if I could create a PDF file. I have been unable to figure out how to do this via GraphicConverter, which trial version constantly displays the 30 second "buy me" window before loading -- annoying: I once accidentally opened it, and it would not let me close the application until the "buy me" window finished...
    I have been able to create a PDF file through the action of "printing" (cf. https://discussions.apple.com/message/12395021#12395021), but that reduces the image size and creates a white margin around the images (as if printing on a sheet of paper), which I wish to avoid.
    Thank you for your time and help!
    Message was edited by: ethereality -- added another "workaround" attempt

    I drag and dropped from Finder into TextEdit, and it only copied the file path as text. From what software would I drag the images into TextEdit?
    First, set the TextEdit document to Rich Text Format - you can do that via the Format menu in TextEdit. This will allow the inclusion of pictures.
    Then you can either -
    • Drag an image file into the TextEdit window, and a preview-sized image will be inserted. If this is too small for your purposes -
    • Open the image file in Preview (or an image editor, if you choose), size the image to your liking, press Command-A (Select All) and the press Command-C (Copy) - doing this will place a copy of the image on the Clipboard. Then switch focus to the TextEdit document and press Command-V (Paste). This will place a large-size image of the file.

  • How to create multiple editable PDFs from data merged Indesign file

    Hi
    This is quite complicated but I'm hoping someone can help me and hoping I can explain it too!
    I am working on a project for a client. She wants to send 150 people a 6 page PDF with fields to complete and return to her.
    She has an Excel spreadsheet with some of the fields completed already so these will be Data Merged into InDesign CS6.
    The short version of the question goes like this:
    Can you automate the process so that once all the data is in the InDesign file, it can then create a PDF every 6 pages all in one go?
    For those still interested, the long version of the question goes like this:
    I have created 3 pages in InDesign with fields to complete and used the 'Data Merge' facility to add the Excel info.
    I have created 3 more pages with blank fields to fill in.
    Then I have made all fields editable using the 'Buttons and Forms' facility in the Interactive menu.
    Then I have created an interactive PDF. Then I have opened that PDF in Adobe Acrobat X Pro and saved it as 'Reader Extended PDF' and 'Enable Additional Features'
    I now have an Editable PDF with half the fields filled in and half blank to be filled in and this can be saved and returned.
    Now, this would be great if it was only one or two. But I need to create 150 different versions and this is just for the Pilot study. If all goes well, this will go to 5,000 people and I can't be creating 5,000 seperate PDFS!!
    At this stage, I am just focussing on the 150. So again, going back to the original question, is there a script that could be written either to break up the 1st PDF every 6 pages into 150 different PDFS? Is there even a way of extending that script to Save as Reader Extended etc? Is there a simple idea that I'm missing? Are there any ways to do this? I can use 'Created Merged Documents' to make 150 x 6 pages in Indesign so can anything be done from there?
    Any advice greatly appreciated
    Thanks
    G

    Hi Akash,
    1) Pass the three header data in header table. 2) Pass all the item data in item table. here explain where you struck.
    Regards,
    Madhu.

  • How to create multiple pdf files from multiple batch processing

    I have several file folders of jpeg images that I need to convert to separate multi-page pdf files. To give a visual explanation:
    Folder 1 (contains 100 jpeg image files) converted to File 1 pdf (100 pages; 1 file)
    Folder 2 (contains 100 jpeg image files) converted to File 2 pdf (100 pages; 1 file)
    and so on.
    I know I can convert each folder's content as a batch process, but I can only figure out how to do so one folder at a time. Is it at all possible to convert multiple folders (containing jpegs) to multiple pdf files? Put differently, does anyone know how to process a batch of folders into multiple (corresponding) pdf files?
    Many thanks.

    There are two approaches to do this:
    - First convert all JPG files to PDF files using a "blank" batch process. Then combine all PDF files in the same folder using another batch process and a folder-level script (to do the actual combining). I have developed this tool in the past and it's available here:
    http://try67.blogspot.com/2010/10/acrobat-batch-combine-all-files-in.html
    - The othe option is to do everything in a single process, but that requires an application outside of Acrobat, which I'm currently developing.
    If you're interested in any of these tools, feel free to contact me personally.

  • [SOLVED] How to create array in bash from some lines in config file

    I have config file for small script and it looks like this:
    local_directory="$HOME/etc"
    excluded_directory="$HOME/etc1"
    excluded_directory2="$HOME/etc2"
    excluded_directory3="$HOME/etc3"
    I would like to place all "excluded_directoryXX" config options into array that can be parsed to program. This way i have to hardcode it and it is not practical at all.
    Can somebody help me out?
    Last edited by kuraku (2013-09-24 20:45:42)

    @jasonwryan
    Thank you, i was not aware of that builtin. At first i wanted to use this in combination with "grep --after-context=XX" and then i realized that i can use it this way:
    mapfile -s XX -t configs </etc; echo "${configs[@]}"
    Thank you very much.

  • How to parse multiple xml documents from single buffer

    Hello,
    I am trying to use jaxb 2.0 to parse a buffer which contains multiple xml documents. However, it seems that it is meant to only parse a single document at a time and throws an exception when it gets to the 2nd document.
    Is there a way I can tell jaxb to only parse the first complete document and not fetch the next one out of the buffer? Or what is the most efficient way to separate the buffer into two documents without parsing it manually. If I have to search the buffer for the next document root and then split the buffer, it seems like that defeats the purpose of using jaxb as the parser.
    I am using the Unmarshaller.unmarshall method and the exception I am getting is:
    org.xml.sax.SAXParseException: Illegal character at end of document, &#x3c;.]
         at javax.xml.bind.helpers.AbstractUnmarshallerImpl.createUnmarshalException(AbstractUnmarshallerImpl.java:315)
         at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.createUnmarshalException(UnmarshallerImpl.java:476)
         at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:198)
         at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:167)
         at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:137)
         at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:184)
    Thank you for your help

    It's just like any other XML parser, it's only designed to parse one XML document. If you have something that concatenates two XML documents together (that's what your "buffer" sounds like), then stop doing that.

  • How to use multiple tape drive for single filesystem on single client.

    Hello All.
    I want to backup single filesystem with multiple tape drive.
    Incase of Symantec veritas netbackup "NEW_STREAM" for multi-stream backup.
    Backup client has a  single backup filesystem like /data1  directory with 4 LTO6 drives.
    /data1 directory doesn't have a sub-direcotry, just present a files.
    If /data1 directory has a sub-directory like /data1/aaa, /data1/bbb, /data1/ccc , Is it possible to use multiple drives?
    Please anybody answer the questions.
    Thanks advanced.

    See how to use multiple tape drive from single client when I want to backup single filesystem?

  • How to create a pdf file from multiple images ?

    Dear All,
    I want to create a SINGLE page pdf file from two or more page size images that are combined to make a single page pdf. Again, this question is on pdfs that are made out of several, atleast  two color images and a black-and-white mask for one of them.
    I have such pdf files from an unknown source (the producer is edited out) whereby there are three tiff images, obtained using the well known pdfimages extractor.
    When I want to make a pdf out of tiff or png or other image formats, I right click and tell Adobe Acrobat to make a pdf.
    However, I dont know how I can give a command to select say,  three tif images and specify which is the mask for which and then join  them in a way that I get the pdf from the composite of the two color images and a mask for one of them.
    Please help me out.
    I am a little familiar with the pdf structure skeleton and when necessary, fixed xref tables in one of my favorite editors. A few years ago, I also wrote a bunch of javascripts to make some annotations and needed some automation and used some itext type libraries. However, I need your help in this problem as I am now rusty and forgot some of what I studied to solve my earlier problems. This is a new problem for me. Gentle hints from you would be very nice to help me in this problem. Please specify if necessary what manual and pages to read. in the pdfspec.
    Best Regards
    Disabled Veteran [physically handicapped]

    Hello Again.
    On Fri, May 11, 2012 at 12:20 PM, lrosenth <[email protected]> wrote:
    >
    > Re: How to create a pdf file from multiple images ?
    >
    > created by lrosenth in PDF Language and Specifications - View the full
    > discussion
    > ________________________________
    >
    > No clue who Irving is…
    >
    I was hoping to have your first name so its easy for me to address you.
    > I have no clue what OS platform, programming language, etc. you use so
    > can’t really narrow things down.
    I would gladly mention that I am working on windows platform, preferably XP.
    I can also work on linux for free products that come with it.
    >  Also, as this is an Adobe forum, we only
    > recommend Adobe products – so there may be other options that even my list
    > wouldn’t include.
    But adding other products, for the help of an adobe products user,
    even if it outside adobe, shall add greater prestige to your company
    and give impression of user-centeredness.
    > If you read ISO 32000-1:2008 (aka the PDF standard), you will find the
    > information about Images and Image Masks well described.  I didn’t think I
    > needed to repeat any of that information.
    Well, just add the few pdf stanzas since you are proficient on it and
    I am presently a little rusty as I mentioned. Just asking a little
    extra yard, not even to go an extra mile.
    > And, if you read that same document, you will see that there is NO SUCH
    > THING as a “text only PDF”.   All PDF documents are structured binary files.
    Well, ascii format or uncompressed format that is human readable. I
    know its a binary file, but human readable ascii version of it.
    I hope you can give me some stanza and various other approaches
    possible so I can select or combine things for myself. I see only a
    miniscule number of posts claiming to have written masks in this forum
    and then with no details.
    Regards
    Roger
    Message was edited by: dying veteran
    because the adobe posting system went crazy and truncated all except the first line ... dunno why

Maybe you are looking for

  • Long times charging xRPM Dashboard

    Hi, We have noticed that times charching xRPM Dashboard are increasing while more projects are created. Is there any way to avoid this problem? Thanks a lot, CAMILO URIBE

  • Run snow leopard AND mavericks

    Is there a way to have older OS's on a machine?  I just got a new iMac and it came with Mavericks.  Now none of my games work because it doesn't support "PowerPC" games.  On Snow Leopard they worked just fine. Not that I play them often but every now

  • Where can i find my old pictures?

    I have a 32gb ipod touch and it was water damaged. I just got my replacement one today and was syncing it to itunes when i realized that all of the pictures from my old ipod were no longer on the new one. The pictures i am missing are not ones that a

  • Only 0 EA of mat available

    my client would like to ............... Example -- if theres 1 material in stock and he has 10 sales orders...on diff dates in the past..........the stock avail is 1 he would like to be able to del it to any of the sales orders mentioend earlier ....

  • QuickTime problem or iMove problem?

    QuickTime or iMove problem? I have an iMac G5, 1,8 GHz, 1,25 GB RAM. Initially I had Tiger, now Leopard is installed. Playback from iMove is slow and the same applies any file played with QuickTime. There is a temporarily solution in iMovie: I connec