XSLT Mapping Help Needed

Hi,
I have a XSD file with multiple references in my external definition. I am trying to build a schema validation functionality for a xml based on the multiple XSD's.
Is it possible to do a schema validation using xslt mapping?
I am using Altova mapforce to generate XSLT mapping but somehow it is not working. It gives me an error "XML Not well Formed".
Please help!!

Hi Jyanth
yes you can do this
i advice you to use XML Schema Tools like stylus studio or spy for editing, mapping, converting, validating, generating, binding and documenting any XML data model
few  links for you how you can do in XML
validating XML using XSLT
http://www.ldodds.com/papers/schematron_xsltuk.html
http://www.w3.org/TR/xslt20/
http://www.stylusstudio.com/xsd_to_xsd.html
https://www.xsltstudio.com/xml_schema.html
regards
Sandeep
If helpful kindly reward points

Similar Messages

  • XSLT mapping Help Required.

    XSLT mapping Help Required.
    Hi Experts,
    I am New to XSLT Mapping. I am practising the below Example:
    InputXML File:
    <?xml version="1.0" encoding="UTF-8"?>
    <?xml-stylesheet type="text/xsl" href="Persons111.xsl"?>
    <ns0:MT_XSLT_Source xmlns:ns0="http://XYZ.com/gen">
    <Person>
    <FirstName>Anshul</FirstName>
    <LastName>Chowdhary</LastName>
    <Gender>Male</Gender>
    <Address>
    <Street>2nd Main</Street>
    <Houseno>83/b</Houseno>
    <City>Mysore</City>
    </Address> </Person>
    </ns0:MT_XSLT_Source>
    XSL StyleSheet File:
    <?xml version='1.0' encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns0="http://XYZ.com/Gen"
    Xmlns:ns1=”http://XYZ.com/Test”>
    <xsl:template match="/">
    <ns1:MT_XSLT_Target>
    <Title> <xsl:value-of select="ns0:MT_XSLT_Source/Person/Gender"/> </Title>
    <Name> <xsl:value-of select="concat(concat(ns0:MT_XSLT_Source/Person/FirstName,' '), ns0:MT_XSLT_Source/Person/LastName)"/>
    </Name>
    <Street> <xsl:value-of select="concat(concat(ns0:Mt_XSLT_Source/Person/Address/Houseno,' '),
    ns0:Mt_XSLT_Source/Person/Address/Street)"/> </Street>
    <City> <xsl:value-of select="ns0:Mt_XSLT_Source/Person/Address/City"/> </City>
    </ns1:MT_XSLT_Target>
    </xsl:template>
    </xsl:stylesheet>
    The Desired Output shuold be:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns1:MT_XSLT_Target xmlns:ns1="http://XYZ.com/Test">
    <Title>Male</Title>
    <Name>Anshul Chowdhary</Name>
    <Street>83/b 2nd Main</Street>
    <City>Mysore</City>
    </ns1:MT_XSLT_Target>
    I have refered the xsl in xml and i am getting the below Oupt in a Single line like this:
    Anshul Chowdhary Male 2nd Main 83/b Mysore
    I am Unable to display in Target XML Fomrat as shown above. Please check and do the needful.
    Regards,
    GIRIDHAR

    Hi,
    I have used below for testing.
    Input xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <?xml-stylesheet type="text/xsl" href="Persons111.xsl"?>
    <ns0:MT_XSLT_Source xmlns:ns0="http://XYZ.com/gen">
    <Person>
    <FirstName>Anshul</FirstName>
    <LastName>Chowdhary</LastName>
    <Gender>Male</Gender>
    <Address>
    <Street>2nd Main</Street>
    <Houseno>83/b</Houseno>
    <City>Mysore</City>
    </Address> </Person>
    </ns0:MT_XSLT_Source>
    xsl code:
    <?xml version='1.0' encoding="UTF-8"?> 
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns0="http://XYZ.com/gen" 
        xmlns:ns1="http://XYZ.com/Test"> 
        <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/> 
        <xsl:template match="/"> 
            <ns1:MT_XSLT_Target> 
                <Title> <xsl:value-of select="ns0:MT_XSLT_Source/Person/Gender"/> </Title> 
                <Name> <xsl:value-of select="concat(concat(ns0:MT_XSLT_Source/Person/FirstName,' '), ns0:MT_XSLT_Source/Person/LastName)"/> 
                </Name> 
                <Street> <xsl:value-of select="concat(concat(/ns0:MT_XSLT_Source/Person/Address/Houseno,' '), 
                    /ns0:MT_XSLT_Source/Person/Address/Street)"/> </Street> 
                <City> <xsl:value-of select="/ns0:MT_XSLT_Source/Person/Address/City"/> </City> 
            </ns1:MT_XSLT_Target> 
        </xsl:template> 
    </xsl:stylesheet>
    For testing in PI ,change the extension from .txt to .xsl and zip it and upload into PI as an imported archive .
    Regards
    Venkat

  • XSLT Mapping - help

    Hi All,
    I am new to XSLT mapping.
    My requirement is: file to XML file with CDATA, for this I am planning to use the XSLT Mapping.
    I downloaded the Stylus studio, then what next, Please help meu2026
    In source flat file I have 5 fileds, and target I need to generate the XML file with CDATA set for 5 fields.
    Thanks,
    ANU-

    Hi Anu,
      Is your requirement is sending 5 fields into one string on target side ,If yes
      this code might help you for CDATA section
         <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="xml" encoding="UTF-8" indent="yes"/>
    <xsl:template match="/">
    <MT_TARGET>
    <String>
    <xsl:text disable-output-escaping="yes"><![CDATA[<![CDATA[?xml version=\"1.0\"
    encoding=\"ISO-8859-1\"?>]]]]></xsl:text>
    <xsl:copy-of select="*"/>
    <xsl:text disable-output-escaping="yes"><!CDATA[]]]></xsl:text>
    <xsl:text disable-output-escaping="yes"><![CDATA>]></xsl:text>
    </String>
    </MT_TARGET>
    </xsl:template>
    </xsl:Stylesheet>
    //if you use " * " then entire source structure will go into target StringUsers node
    Regards,
    Sandeep

  • Message mapping help needed

    I am trying to map target based on a condition. Meaning I want to map E1EDKA2(1..99999) of DESAD01 Idoc to ShipTo(0..1) node if E1EDKA2-PARVW = WE.
    I tried all the variations with creatIf and formatByExample but I couldn't able to get it working.
    Here is the target XML structure
    <Delivery>
       <Header>
           <ShipmentNumber>1234</ShipmentNumber>
           <BOLNumber>ABDC</BOLNumber>
           <ShipTo>
                <Name>XYZ</Name>
           </ShipTo>
           <SoldTo>
                <Name>XYZ</Name>
           </SoldTo>
       </Header>
       <LineItems>
        </LineItems>
    </Delivery> 
    Thanks
    Suman

    Hi Sarvesh,
    I don't know what is the significance of checking 1 = 1. Anyway I could able to resolve the issue by my self. Thank you very much for taking time to help me.
    /ns0:MT_XML_Delivery/Delivery/Header/ShipmentNumber=/DESADV01/IDOC/E1EDK07/VBELN
    /ns0:MT_XML_Delivery/Delivery/Header/BOLNumber=/DESADV01/IDOC/E1EDK07/BOLNR
    /ns0:MT_XML_Delivery/Delivery/Header/ShipTo=createIf(stringEquals(/DESADV01/IDOC/*E1EDK08*/E1EDKA2/PARVW, const(value=WE)))
    /ns0:MT_XML_Delivery/Delivery/Header/ShipTo/Name=replaceString(/DESADV01/IDOC/E1EDK08/E1EDKA2/PARVW, /DESADV01/IDOC/E1EDK08/E1EDKA2/PARVW, /DESADV01/IDOC/E1EDK08/E1EDKA2/NAME1)
    /ns0:MT_XML_Delivery/Delivery/Header/ShipTo/AccountNumber=/DESADV01/IDOC/E1EDK08/E1EDKA2/PARTN
    XI/PI is really strange. It needs to have that PRVW in the first field mapping, even though it is not being used. I just replaced PARVW with the NAME1 and mapped to name. For the ShipTo, I set E1EDK08 (next higher level structure) as the context.
    I think it will take time for me to learn this, as I come from webMethods and XSLT background.
    Thanks
    Suman

  • Mapping Help Needed

    Hello Gurus,
      I need help in message mapping. I have a requirement as below.
    E1EDP01 segment contains many E1EDP19 segments
    E1EDP19 segment contains QUALF, KTEXT and many other fields.
    in the output field, for every QUALF = "002", I need the value of KTEXT of the same E1EDP19.
    the output group is repeated per E1EDP01 (this is working fine)
    The problem is that KTEXT segment is not coming in every E1EDP19, so the result is erratic.
    the present code looks like
      Qualf (context E1EDP01)--
                                Equals  -- 
                   const-002 --           IF   --Outputfield
               KTEXT(context E1EDP01)--
    I tried many other things as well, but result is not as expected
    pls help.
    Thanks
    KQ

    Hi,
    I am not sure why it is not working in your case. I developed same mapping and it is giving correct result.
    Source Payload:
    <E1EDP19 SEGMENT="">
                <QUALF>002</QUALF>
                <IDTNR/>
                <KTEXT>A</KTEXT>
      </E1EDP19>
      <E1EDP19 SEGMENT="">
                <QUALF>003</QUALF>
                <IDTNR/>
      </E1EDP19>
      <E1EDP19 SEGMENT="">
                <QUALF>003</QUALF>
      </E1EDP19>
    <E1EDP19 SEGMENT="">
                <QUALF>002</QUALF>
                <IDTNR/>
                <KTEXT>SDN</KTEXT>
      </E1EDP19>
    Target field gets value as "SDN".
    Is this your requirement?
    Answers to your questions:
    1) the context cannot be E1EDP19, cos there are multiple P19 segments in P01 and it should be done on P01, as the output is based on per P01.
    Even if you are creating target based on line item level (E1EDP01), every E1EDP01 segment will have E1EDP19 and KTEXT with QUALF = 002. Also KTEXT of same E1EDP01 should go to target. Hence in your mapping context should be at E1EDP19 level.
    2) the Qualf comes more number of times than KTEXT, so they are not "matching" at context level.
    Map with default function will take care of this.
    -Gouri

  • Graphical mess-mapping help needed: select single segment from many

    Hi All,
    I am sending a standard PO IDOC from R/3  and converting it into a file before sending to 3rd party.
    The IDOC used is ORDERS.
    In this IDOC segment E1EDK14 gets repeated in R/3 and I want to use the value of 009th occurance (E1EDK14 009) to map my values.
    When I look at XML, it looks as follows
    <E1EDK14 SEGMENT="1">
             <QUALF>014</QUALF>
             <ORGID>AB1</ORGID>
          </E1EDK14>
          <E1EDK14 SEGMENT="1">
             <QUALF>009</QUALF>
             <ORGID>CD1</ORGID>
          </E1EDK14>
          <E1EDK14 SEGMENT="1">
             <QUALF>013</QUALF>
             <ORGID>AA</ORGID>
          </E1EDK14>
          <E1EDK14 SEGMENT="1">
             <QUALF>011</QUALF>
             <ORGID>GDE</ORGID>
          </E1EDK14>
    I need to get the ORGID value of 009th segment( i.e when QUALF (above) has value '009'.
    I tried to put a simple if condition in mapping (if qualf = 009-->then get ORGID), but it does not work.
    Can you help.
    Many thanks
    Shirin

    Thanks Prakasu,
    I tried it again, but it is picking the first segment value and not the 009th one.
    Many thanks
    Shirin
    Edited by: Shirin K on Oct 24, 2008 10:56 AM
    Edited by: Shirin K on Oct 24, 2008 11:00 AM

  • ABAP MAPPING:Help needed

    Hi Friends,
    I have a scenario where I need to pick up  Idocs out of a packet of Idocs .The Idocs will be picked by checking for a certain condition for the Idoc Segement and of all the Idocs the Idocs which satisfy a particular condition should only be output and for this I have been asked to achieve this using ABAP Mapping.So any info in this regard would be of great help for me.
    Packet of Idocs----
    >  Idocs satisfying the cond.
      (sender)*********(Check for a condition)*****(Receiver)
    Please do provide with me a sample coding if possible.Please take up this with some priority.
    Thanks & Regards,
    Pradeep.

    Hi All,
    The output from the ABAP class needs to be transformed into a different message using Graphical Mapping .
    Please provide me some inputs for creating this ABAP mapping.
    Thanks & Regards,
    Pradeep.

  • Value Mapping -- Help needed.

    Hi experts,
    I have a scenario ,
    I have 2 fields in my source structure and based on these two fields,i need to fetch 8 field values from a table to map into idoc control record.
    The table might be in SAP or in Legacy
    If it is a Ztable in SAP, how can I achieve this?
    If it is in Legacay , how can I achieve this?
    My client told us to do this through Value mapping?
    Please help me in acheiving this.
    Thanks in advance.
    Regards
    Krupa.

    Hi,
    Use the RFC Lookup API to call an RFC from the mapping and get the values from the Table in the R3 system . Look into this document by Michal to understand RFC lookup,
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a03e7b02-eea4-2910-089f-8214c6d1b439
    Else, use value mapping as shown in this blog,
    /people/community.user/blog/2007/01/08/valuemapping-using-the-graphical-mapping-tool
    Regards
    Bhavesh

  • XML to IDOC : Hierarchy mapping help needed

    Hi All,
    I am trying to complete graphical mapping for an XML to IDOC structure. Both structures are EXACTLY same, but data is not populating in IDOC as desired.
    My incoming XML structure and IDOC structure is
    Header
    Data_header  (1 -- 999)
      |_Data_item (1 -- 3)
    Trailer
    If I have only 1 header, then IDOC data is populated correctly.
    But when I have multiple headers and theer items, the Headers are getting populated, but items do not get populated correctly.
    *Example  My Input is:*
    Header
    Data_header
      |_Item_1
      |_item_2
    Data_header
      |_item_3
    Trailer
    My output is (IDOC)
    Header
    Data_header
      |_Item_1
    Data_header
      |_Item_2
    Trailer
    As seen above Item3 of Data_header2 has gone missing._
    For Data Header, I am using REMOVE_CONTEXT function and for ITEM I am using SPLITBYVALUE. Thought this should have helped, but am struggling.
    Any tips, help, greatly appreciated.
    Many thanks
    Shirin

    Hello,
    Have you done one to one mapping, as u mentiong they are exactly same..
    if that's the case, then mapping test should be successful.
    If there is any diffrence in occurences of target structure or any other difference and let me know.
    If possible send me the target structure...
    Regards,
    Sreenivas.

  • PP Scenario Mapping help Needed

    Hi Guys
    Can anyone please help to map the following scenario?
    <b>Scenario:</b> SAP PP
    <b>Product:</b> Ingot
    <b>Size:</b> Ingot 100 X 100, Ingot 125 X 125, Ingot 160 X160
    <b>Grade:</b> A, B, C,……
    <b>Saleable Item:</b> Ingot100 X100 Grade A, Ingot100 X100 Grade B, Ingot160 X160 Grade C etc. (i.e. combination of Grade & Size will determine the saleable items.)
    <b>Characteristics to determine Grades:</b> Carbon%, Phos%, Mn%,………
    <b>Requirement:</b>
    1.     Planning scenario make to Stock and stock will be maintained size and grade basis(e.g. Ingot100 X100 Grade A = 110 TO, Ingot 100X100 Grade B = 124 TO etc.).
    2.     Planning will be done at Ingot level.
    3.     Batch no will be used to track the heat number during GR of Billet.
    4.     There will be a BOM & Routing to produce Billet.
    5.     Size and grade will be determined during quality Inspection i.e. as per MIC (Carbon%, Phos%, Mn%,………etc) value.
    <b>SAP requirement:</b>
    1.     Planning Strategy for Ingot.
    2.     In which Stage production confirmation will be carried out.
    3.     Process mapping for saleable items.(Whether it’s necessary to open individual material code for each saleable items. If yes what will be the planning strategy for saleable items. But if no what will be the mapping)
    4.     Costing basis (at Ingot level or at saleable item level? If at saleable item level then what will be the cost components in between Ingot and saleable item level)
    Looking forward for any valuable suggestion.
    With Best Regards
    Soumya Das
    SAP PP-PS Consultant
    Kolkata
    Hello: +919755138074

    Basically I am FI/CO consultant and worked on CO implementation project. So based on my costing view ,I can give you some  rough Idea.
    1) As your planning is make to stock  , but still  does your production planning flows from your sales planning or not. In SAP you can  create your production planning either directly or from your sales planning.
    2) You can Plan your material down the bill of material also i.e
    at the raw material level level also. Technically each of your finished product might have standard BOM quantity and standard tak time (cycle time ) for each process which is defined in routing.So when BOM is exploded at the time of demand creation ,it explodes both your bill of material as well as your routing.Inshort if your FG  is made up of  X quantity of A and Y quanitity of B plus it goes machining activity of 5 minutes for each quantity produced . So If my production planning is of 1000 unit . Then after explosion it will plan
    1000X of A and 1000Y of B plus 5000 minutes machine time will ple planned.And based on production lead time,procurement lead time and available stock,and available capacity for production,it will schedule the production.
    3) Confirmation will be done again based on the requirement.If you want calculate WIP stock at each stage .Then it has to be confirmed at each stage to know the WIP stages. Plus at what process you do the quality inspection.In that case you have to confirm the process and then make the qc and then you have to start the new operation.
    4) Yes you have to open the seperate material code for the saleable material as well as semifinished material.Your SFG will also contain the BOM and routing
    5) Costing will be basically your raw material cost(which will come from bom),material overhead(come from costing sheet), Process cost(come from routing),manufacturing obverhead(come from costing sheet),administrative overhead(come from costing sheet) and sales and distribution overhead(come from costing sheet) depending on the costing requirement.
    Regards
    Sameer Kumar

  • Time mapping help needed

    I have used the time mapping feature to speed up/fast-forward a segment of my video. It looks just the way that I want it to. However, after the fast-forward segment is over, the audio does not work for the normal-speed section afterwards. Any suggestions?

    reed721
    The audio is going to need special considerations in this Time Remapping workflow. This is one way to get around certain feature limitations to cooridinate audio with the video clip to which fast motion has been applied to a portion of it.
    Remember, in the fast motion area of the video clip, frames have been removed by the technique in order to apply the fast motion effect, and duration is shortened in the process. So, when you are finished in the Time Remapping workspace and returned to the Premiere Elements Expert workspace, that fast motion video is going to have a shorter duration than the original. And, your audio track will be at the original duration of the file.
    1. In the Premiere Elements Expert workspace, unlink the audio from the video (to do that, right click the file on the Timeline and select Unlink Audio and Video).
    2. Identify the segment of the video to which fast motion is to be applied with Time Remapping. Note the times, example, segment 00;00;24;22 to 00;00;45;07.
    3. With the Scissors Tool (using tab on Timeline Indicator stem or shortcut Ctrl+K), cut the audio at 00;00;24;22 and at 00;00;45;07, giving you 3 audio segments.
    4. Select the Timeline video, go to Tools Menu/Time Remapping, and open the Time Remapping workspace.
    5. In the Time Remapping workspace, establish your Fast Motion Time Zone using the times of 00;00;24;22 to 00;00;45;07 for the Time Zone. Click Done when finished.
    6. When you are back in the Premiere Elements Expert workpace
    a. You will work on your 3 segments of audio.
    b. Leave the first audio where it is. Move the second audio down from Audio 1 to Narration or Soundtrack, just to get it out of the way.
    c. Take the third audio and move it to the left so that its end matches up with the end of the fast motion video clip above it.
    d. Then adjust the duration of the second clip which has been out of the way on another audio track.
    Two different effects can be produced here...the second audio will be placed on Audio 1 directly below the fast motion portion of the video clip AFTER its duration has been decreased while it is still in its "out of the way" location.
    One way...with the mouse cursor drag the end of the audio to the left to decrease its duration to fit the gap between first and third audio. Move the duration shortened second audio up to fit the gap between the first and third audio on Audio 1.
    Second way...determine the duration of the gap between the first and third audio, and use Time Stretch to decrease the duration of the second clip so that it fits the gap between the first and third audio. Move the duration shortened second audio up to fit the gap between the first and third audio on Audio 1.
    Please check out the details and see if any of that works for you. I have road tested it. Please let me know if you need clarification on the details. I will provide screenshots if necessary.
    Thanks.
    ATR

  • XSLT Fragment - Help Needed

    Hi,
    I am trying to display data on a webpage from an RSS feed using a XSLT Fragment.
    I have managed to get it to work and display all the results, what I need to know is there any way I can limit the number of results shown on a page and add paging?
    Thanks

    Apologies, but, it seems i did not indicate the complete message structure for the document I am testing.
    Order (root)
    OrderHeader (1st parent segment)
    OrderNumber (child fields - 1st)
    Order.. (child fields - 2nd)
    Order...(child fields - 2nd)
    OrderDetail (1st parent segment)
    <fields under this segment were already mentioned from previous threads>
    OrderSummary (1st parent segment)
    NumOfLines (child fields - 1st)
    TotalAmount (child fields - 1st)
    Under Order, there are also OrderHeader and OrderSummary parent segment, other than OrderDetail, in which we focus our code.
    I've tried your code, but, the segments OrderHeader and OrderSummary and child fields under it were not appearing on my output.
    But it seems, I've already generated the correct code.
    Here it is,
    <?xml version="1.0" encoding="utf-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
         <xsl:output method="xml" version="1.0" media-type="xml" encoding="UTF-8" indent="yes"/>
         <xsl:template match="@*|node()">
              <xsl:copy>
                   <xsl:apply-templates select="@*|node()"/>
              </xsl:copy>
         <xsl:template match="/Order/OrderDetail/ListOfItemDetail/ItemDetail/BaseItemDetail/ItemIdentifiers/PartNumbers/BuyerPartNumber">
              <xsl:for-each select=".">
                   <BuyerPartNumber>
                        <PartNum>
                             <PartID>
                                  <xsl:value-of select="../ManufacturerPartNumber/PartID"/>
                             </PartID>
                        </PartNum>
                   </BuyerPartNumber>
              </xsl:for-each>
         </xsl:template>
    </xsl:stylesheet>
    I believe, the code you've suggested last time will accomodate only OrderDetail parent segment. Is this correct?
    Thanks!

  • Xslt code help needed

    Dear SAP experts,
    Would you be able to help me in configuring the right xslt code to accomodate the looping logic?
    Source Document:
    School  (occur only once)
    - Name (can occur multiple times)
          - Nickname (occur only once)
          - Desired name (occur only once)
    Target Document:
    School
    - Name
         - Nickname (the value for this should be obtained from 'Desired name field')
         - Desired name
    I have this code, but seems not working in looping logic. (to accomodate the multiple Names):
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="xml" version="1.0" media-type="xml" encoding="UTF-8" indent="yes"/>
    <xsl:template match="@*|node()">
    <xsl:copy>
        <xsl:apply-templates select="@*|node()"/>
    </xsl:copy>
    </xsl:template>
    <xsl:template match="Order/OrderDetail/ListOfItemDetail/ItemDetail/BaseItemDetail/ItemIdentifiers/PartNumbers/BuyerPartNumber">
      <BuyerPartNumber>
         <PartNum>
            <PartID>
                <xsl:value-of select ="/Order/OrderDetail/ListOfItemDetail/ItemDetail/BaseItemDetail/ItemIdentifiers/PartNumbers/ManufacturerPartNumber/PartID"/>
            </PartID>
        </PartNum>
    </BuyerPartNumber>
    </xsl:template>
    </xsl:stylesheet>
    What happened is that the value was taken ONLY on the 1st line item. (1st Name occurence)
    The succeeding Name field just copied the value of Nicknames from the 1st Name field.
    Kindly advise how to handle the context (loop logic) in the xslt code.
    Thanks!

    Apologies, but, it seems i did not indicate the complete message structure for the document I am testing.
    Order (root)
    OrderHeader (1st parent segment)
    OrderNumber (child fields - 1st)
    Order.. (child fields - 2nd)
    Order...(child fields - 2nd)
    OrderDetail (1st parent segment)
    <fields under this segment were already mentioned from previous threads>
    OrderSummary (1st parent segment)
    NumOfLines (child fields - 1st)
    TotalAmount (child fields - 1st)
    Under Order, there are also OrderHeader and OrderSummary parent segment, other than OrderDetail, in which we focus our code.
    I've tried your code, but, the segments OrderHeader and OrderSummary and child fields under it were not appearing on my output.
    But it seems, I've already generated the correct code.
    Here it is,
    <?xml version="1.0" encoding="utf-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
         <xsl:output method="xml" version="1.0" media-type="xml" encoding="UTF-8" indent="yes"/>
         <xsl:template match="@*|node()">
              <xsl:copy>
                   <xsl:apply-templates select="@*|node()"/>
              </xsl:copy>
         <xsl:template match="/Order/OrderDetail/ListOfItemDetail/ItemDetail/BaseItemDetail/ItemIdentifiers/PartNumbers/BuyerPartNumber">
              <xsl:for-each select=".">
                   <BuyerPartNumber>
                        <PartNum>
                             <PartID>
                                  <xsl:value-of select="../ManufacturerPartNumber/PartID"/>
                             </PartID>
                        </PartNum>
                   </BuyerPartNumber>
              </xsl:for-each>
         </xsl:template>
    </xsl:stylesheet>
    I believe, the code you've suggested last time will accomodate only OrderDetail parent segment. Is this correct?
    Thanks!

  • Mobile maps help needed!

    I'm trying to design and develop an application which uses Location Based Services and basicaly shows an interactive map of the current location.
    I would like to ask if anyone knows where to start, I know more or less how to use JSR-179. Let's say I have current coordinates and then I want to display the map, the point is I would like to know which way to go from here.
    The Google Maps API is fairly easy if you use Java Script and a web browser, does anyone know how to get the map from google or maybe yahoo and display it in the midlet without the browser?
    There is a midlet available straight from google (mobile goolge maps http://www.google.com/gmm ) which is just great, I have no idea how it is implemented, If anyone knows, please send me some suggestions.
    I would like to accompish all the processing of the retrived images(possible from the google maps server) with Java EE and then retrive them and display them on the mobile (maybe as an XML file - SVGt image). Anyway, I hope I have described the idea, as I said I don't know where to go, and if there is someone with some experience with that kind of staff please help, this is my final year project and I'm not asking for the solution, just for some directions and the proper way of implementing those things.
    Thanks a lot in advance!

    You can use the Yahoo Maps API. It has a REST interface.
    http://developer.yahoo.com/maps/rest/V1/mapImage.html
    You can parse response and download the image.
    Alternatively you can use a server as an intermediary. For example, you can send your server the coords and options, then your server would talk to Google or Yahoo and retrieve the map image.
    I created an example app some time ago that will use the Yahoo Maps image. The project page is http://gallery.yahoo.com/apps/10685 and the source code is available on http://hostj2me.com/appdetails.html?id=2875
    It takes up to minute to initialize and retrieve the initial coords. But here is how it works.
    1) get GPS coods
    2) send cords (http get) to Yahoo
    3) parse XML response and retrieve image URL
    4) download and display image from URL

  • Idoc field mapping help needed

    Hi xperts,
    Am doing some simple mapping, but, facing context issues,
    Source                                                       Target
    (level 1)-FIDCC2X                                                (level 1)-ACC_DOCUMENT03
    (level 2)--IDOC                                                  (level 2)--IDOC
    (level 3)---EDI_DC40                                             (level 3)---EDI_DC40 
    (level 3)---E1FIKPF                                              (level 3)---E1BPACCR09 
    (level 4)----E1FISET                                             (field    )----AMT_BASE
    (field    )-----H2BAS( should be mapped to AMT_BASE, when
                                       an CR09 segment is cerated)
    Tried alternative options with remove_contexts & splitbyvalue.
    CR09 segment is being created, But, field is not being mapped.
    Any ideas, what is the correct mapping steps.....
    -santosh.

    Hi vkjoat,
    it seems quite simple, but causing problems due to context issue.
    CR09 segment is created in my test case, but value from E1FISET-H2BAS is not being populated in E1BPACCR09-AMT_BASE.
    Unable to figure out the context issue.....
    Cardinality of   mapping is 1:1 .
    -thx.

Maybe you are looking for