Message mapping - need Enlightening

Hi Guys,
I was actually looking into the message mapping blog of sravya.Link below:
[http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3414800)ID0086183650DB11663053995735659636End?blog=/pub/wlg/2792]
Was just reading the blog and a lot of questions came through my mind.In the end I figured out that first, I have to understand how the parsing works.
So for example,If we have 2 message structures(source & target).At run time the dom or sax parser parses through the source xml document.
If we do a source to target mapping
as in the example
Matgroup --> RemoveContext -->MatGroup.
So my question is what does the parser do in the above example.
Does it read the source xml,change the source XML AND start to build the target xml from scratch by adding nodes.
How does the parsing work & internally what are the steps the parser do to create the target XML.
[2]
In her example,She mapps the item node to the header target node.
what happends then or what does the parser do & what are the elements which will be coming under the target header node.
What are the conditions for mapping 2 fields or nodes(Both should have same level & occurance - Is that so?)
Iam confused.Please Enlighten me...:)
Thanks
P
Edited by: pazzuzu on Oct 17, 2009 2:40 PM

Hi ,
  Parsing is the mechanism to trasform the structure in to other format,Nomally PI uses Dom parsing mechanism to process.
  Suppose if you working one message mapping source is on XML Structure and you want to map this structure to the Taget structre,most of cases taget structre is not same as Source.
You used some mapping function provided by SAP,every Graphical  standard function has some source java code inside it.
the functions also uses parcing mechnism like reading doucmnet and changing structure.If youw ant to know more about parcers google it.
every parcer has some predrefind methodsto read the documents child elemnts too..
Regards,
Raj

Similar Messages

  • Weblogs for different message mapping needed

    Hi,
    I want to do scenarios using XSLT mapping, ABAP mapping, Java mapping.
    Can you suggest me some weblogs...
    Thanks,
    Ram

    Hi Ram,
    thought i will start of from scratch.Mapping is basically done to convert one form of xml into another form. This can be done using either of them mentioned below.
    - Graphical mapping
    - XSLT mapping
    - JAVA mapping
    - ABAP mapping
    To know more about each of them please go thru the following links. And if you ask me your which is better, it depends basically on the scenario you implementing and the complexity involved. Anyways please go thru the following links:
    Graphical mapping
    /people/bhanu.thirumala/blog/2006/02/02/graphical-message-mapping-150-text-preview
    http://www.sapgenie.com/netweaver/xi/mapping1.htm
    /people/alessandro.guarneri/blog/2006/01/26/throwing-smart-exceptions-in-xi-graphical-mapping
    XSLT mapping
    http://help.sap.com/saphelp_nw04/helpdata/en/73/f61eea1741453eb8f794e150067930/content.htm
    JAVA mapping
    http://help.sap.com/saphelp_nw04/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/content.htm
    ABAP mapping
    /people/r.eijpe/blog
    To know more about the value mapping tools for the SAP Exchange Infrastructure (XI), please go thru the following link:
    http://www.applicon.dk/fileadmin/filer/XI_Tools/ValueMappingTool.pdf
    To get an idea as to what value mapping is, please go thru the following links:
    http://help.sap.com/saphelp_nw04/helpdata/en/13/ba20dd7beb14438bc7b04b5b6ca300/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/f2/dfae3d47afd652e10000000a114084/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/2a/9d2891cc976549a9ad9f81e9b8db25/content.htm
    most of the links that I have provided also helps you get the step by step procedure of doing the same. And also involves the procedure to implement certain advanced features.
    Hope this clears your doubt fully.
    Also go through this threads...
    Re: Different types of Mapping in XI
    Regards,
    Abhy

  • Problem in Graphical message mapping.Need UDF to add array based on some co

    Hi All,
    I have been struck in message mapping.Below i am explaining it,
    I have two input array,
    one array lets call  X [24]
                                    [25]
                                     [26]
                                     [24]
                                    [25]
    other array is Y [10]
                           [11]
                           [12]
                           [13]
                           [14] .length of both the array will be same .
    Now I want the output as: if there is any same value in first array i.e array X then corresponding value of second array should be added.i.e in array X if 24 is coming as twice (1st and 4th) then 1st and 4th value of array Y will be added.So here there will be only three output as Z[23]
                                                      [25]
                                                      [12]
    Please guide me if posiible .I tried to use the for loop but  its not working as the value of X is repeating.
    Regards,
    Saurabh

    Hi,
    Tru this..
    public void test(String[] a,String[] b,ResultList result,Container container){
    int flaga,flagb;
    for(int i=0;i<a.length;i++)
         flaga =0;
         for(int j=i+1;j<a.length;j++)
              int p =  Integer.parseInt(a<i>);
              int q =  Integer.parseInt(a[j]);
              if(p==q)
                   flaga =1;
                   int c = Integer.parseInt(b<i>)+Integer.parseInt(b[j]);
                   String d = new Integer(c).toString();
                   result.addValue (d);
    if (flaga ==0)
    flagb=0;
    for(int q =i-1; q>=0;q--)
         if(Integer.parseInt(a<i>) == Integer.parseInt(a[q]))
              flagb = 1;
    if (flagb == 0) result.addValue((b<i>));
    I have tested with the same input... it is working for me
    http://www.flickr.com/photos/28929439@N06/2721471681/
    Thanks
    SaNv...

  • Need Clarification on Looping in Message Mapping.

    Hi All,
      I'm trying to implement the Dynamic emailing as explained in the Michals blog.
    /people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address
    I have this partially working for the scenario I have.
    XI will be receiving a ORDRSP IDoc from an external system and XI needs to do the following.
    1) Check the value of <b> E1EDP01-ABGRU </b> equals to Z2. If any of the E1EDP01-ABGRU has a value of Z2, it should do the following
             a) Get the email address from the E1EDKA1-ILNNR and map it to the TO field as shown in the blog.
              b) Get the values of BELNR-E1EDK01, MENEE, VPREI, POSEX, PEINH, ABGRT from the E1EDP01 segment and concatenate them all and map it to the Content tag as explained in Michals blog.
      I have this process partially working. The XI interface is only mapping for the first occurrence of E1EDP01 and not the subsequent occurrences of E1EDP01 which matches the criteria ( E1EDP01-ABGRU = Z2)
    Any help in getting fixing this problem??
    Thanks

    Make sure to define multiple target messages in your message and interface mappings, for the mail package message definition (occurrence = 0...unbounded).
    Also, in the logic of your message mapping, you need to create a new mail package message only if  E1EDP01-ABGRU = 'Z2'. Use it like this:
    ABGRU   ---   EqualS   ---   createIf   ---   Mail
    Constant[Z2]
    Regards,
    Henrique.

  • A little help needed in message mapping

    a little help needed in message mapping
    I have to map one of the idoc header segments as many times as it occurs to each Idoc when using the split message funcionality
    let us say we have the segment seg1 and there is a QUALF in it
    <seg1>
    <qualf>001</qualf>
    </seg1>
    <seg1>
    <qualf>002</qualf>
    </seg1>
    then we use the vbeln to split the idoc into 2.
    so if we have
    <vbeln> 1 </vbeln>
    and
    <vbeln>2 </vbeln>
    then 2 Idocs should be created like this
    <Idoc>
    <vbeln> 1 </vbeln>
    <seg1>
    <qualf>001</qualf>
    </seg1>
    <seg1>
    <qualf>002</qualf>
    </seg1>
    </Idoc>
    <Idoc>
    <vbeln> 2 </vbeln>
    <seg1>
    <qualf>001</qualf>
    </seg1>
    <seg1>
    <qualf>002</qualf>
    </seg1>
    </Idoc>
    it is easy to create the segment by using createif with the QUALF field but my problem how to map the qualf twice for each idoc
    Thanks.

    UseOneAsMany is the function you need to use.
    It takes three parameters:
    1 --- The node you want to duplicated
    2 --- How many times you want to duplicated
    3 --- The context you want to place for it.
    Regards
    Liang

  • Need Help with Message Mapping in PI 7.1 - JDBC to IDOC

    I have an outgoing SQL function that sends multiple rows of data for use in creating an IDOC in ECC. I am trying to key the creation of new IDOCs (already did the maxOccurs trick to the IDOC definition) based on a field in the JDBC return data...
    JDBC Message Format...
    SEGNAM - TRANS_ID - MATERIAL - VKORG...ETC
    MARA -  00001 - 1234 - <space> - ...
    MARC -  00001 - 1234 - VK01 - ...
    MARA - 00002 - 9876 - <space> - ...
    MAKT - 00002 - 9876 - <space> - material description - ...
    Each time there is a new TRANS_ID, I need to indicate a new IDOC in the message mapping. I have tried all kinds of combinations of TRANS_ID --> dropContext --> splitValue and TRANS_ID --> collapseContext --> splitValue, but nothing has worked.
    Has anyone done this kind of message map (without any BPM please)?
    Thanks,
    Nathan

    Hello Nathan,
    For this one, you have to play with contexts.
    row 1 SEGNAM = MARA, TRANS_ID = 1, MATNR = 123...
    row 2 SEGNAM = MARC, TRANS_ID = 1, MATNR = 123, WERKS = PL01...
    row 3 SEGNAM = MARA, TRANS_ID = 2, MATNR = 987
    This also depends on the occurrence of the parent node. example, if I want MATNR to be populated, the logic would be like
    ex:
    IDOC1..unbounded) (The logic is the already provided in an earlier response)
    -->MATNR (1..1)
    MATNR --------> removeContext ----------------> FormatByExample --> MATNR
    TRANS_ID --> removeContext --> splitByValue:ValueChange --> /
    If the rows are not in order of trans_id, then you need to incorporate sorting into the logic above.
    Hope this helps,
    Mark

  • Need help on message mapping screen

    Hi folks,
    I am working on file to idoc scenario.   I Imported the IDOC to my scenario. In Messaga Mapping IDOC structure displaying fields as a documention. but i need techincal names of those fields.
    for Example:   In my IDOC 1 field is showing companycode but I want to see that field as a BUKRS.
    How to see the technical names of IDOC fields in Message Mapping.
    Your help is highly apprecia

    Hi,
    I dont think we would be able to see the data element names of the IDOC in XI. Even the imported XSD of Idoc doesnot contain data element name.
    We would be only dealing with the field names/ structure of the IDOC for field message mappings. The field names are internally mapped to the data element names in SAP R3 system.
    To view the internal mapping between field names and data element names of the Idoc fields, you can go to the transaction 'WE30'. Give the basic type of the Idoc and go to the segment editor. You can find the data element names for each field name  there.
    Thank you.
    Regards,
    Subbu

  • Need user define function for the message  mapping structure

    Hi All
    I am new to XI.I need the java code for Udf for the following structure.
    i have two input and one out put as error.
    order_nos----
    user define function-------error message
    order_details----
    num of orders---- i.e. 10
    order_details------ i.e. whole order records details
    1.i have to compare the 1st  input with 2nd one means if the ist input contain 10 means there are 10 orders in 2nd input.if not then i have to give error message .
    2.then i have to check the fields in 2nd input has no null values.if no values the output will be error message.
    Edited by: Rohit Kumar on Dec 18, 2008 4:43 PM

    Hi Sudhir
    thanks for your continues help.i need some help so that i can fulfill my requirmrnt
    this is my message mapping xml.
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:methodCall_MT xmlns:ns0="http://www.dfdsf">
      <num_orders>10</num_orders>
      <test_mode />
    - <order_x>                        ( which is order details)
      <order_id>t78tyu8t</order_id>
      <order_date />
      <mfg_id />
      <catalog_id />
      <first_name />
      <last_name />
      <recipient />
      <message />
      <address1 />
      <address2 />
      <address3 />
      <city />
      <state />
      <zip />
      <country />
      <country_code />
      <phone />
      <subtotal />
      <tax />
      <shipping />
      <total />
      <shopatron_total />
      <fulfiller_total />
      <shipment_id />
    - <additional_info>
      <in_store_pickup />
    - <express_shipping>
      <express_shipping_flag />
      <express_shipping_text />
      <express_shipping_arrival />
      </express_shipping>
      </additional_info>
    - <discount>
      <discount_description />
      <discount_percentage />
      <discount_total />
      </discount>
      <lang_id />
      <currency_id />
      <packing_list />
      <num_items />
    - <items>
      <item_id />
      <quantity />
      <price />
      <part_number />
      <fulfiller_total />
      <shopatron_total />
    - <options>
      <option_x />
      </options>
      </items>
      </order_x>
      </ns0:methodCall_MT>
    this my mapping where under one element number elements are there.when i am excuting the code to check the null value its always giving the there is null val but i have filled evrything.its due to first its checking the order_x and which will be always null.uder this all data will be filled.please suggest what to change in the udf.the code  given by u is working fine but its failing in this scenario because it getting the parent filed is null.

  • Message mapping problem / experts needed / UDF?

    Hello experts,
    I have the following problem in a message mapping:
    Source structure is as follows:
    - Node a (min 1, max 999)
      - Subnode b (min 0, max 999)
      - Each Subnode b has the element "number" (1,1)
    This structure must be mapped to the following target structure:
    - Node c (1,999)
       - Subnode d (0,999)
       - Each subnode d has the following elements:
           - e1
           - e2
           - e3
           - e11
    1 Source node a should create 1 target node c.
    All numbers in all subnodes b of one source node a should be mapped to the e1, e2,...e11 elements of the target structure. As one target node d can only contain up to eleven numbers, there must be several d nodes.
    I have already tried to create a UDF, but it does not work.
    Any experts who would like to share their knowledge?
    Thanks in advance.
    CHRISTOPH
    Edited by: Christoph G. on Apr 23, 2008 10:46 PM

    Hello again,
    meanwhile I have worked hard on it and I have found the solution (just one UDF (queue function) which gets the article numbers as well as constant(targetField). So the UDF covers the creation of the "groups" as well as the mapping of the article numbers.
    It was really interesting and it made me ambitious to find the solution myself I do not have access to the system today, but I will post my solution as far as I have access again. Maybe you still want to search for a solution? It really may be fun, just like some kind of a puzzle game.
    In order to make it more clear, here comes the source and target structure with an example. Let me once more explain it: In the source, there are positions, each with unlimited article numbers. Each position will create a targetPosition. The node "targetPosition" has the subNode "articlenrs" (unbounded). Articlenrs has 11 differnet elements, calles a1, a2, a3, ..., a11. That means, all article numbers from a source postion should be mapped to "groups of 11 target article numbers". Please be aware the there are 11 differnet target fields for article numbers: a1, a2, ... a11.
    I think that' why the solution of  Liang Ji and Rohit Kalugade will not work...
    SOURCE
    <position>
         <articlenr> 123   </articlenr>
         <articlenr> 456   </articlenr>
         <articlenr> 4783 </articlenr>
         <articlenr> 123   </articlenr>
         <articlenr> 456   </articlenr>
         <articlenr> 4783 </articlenr>
         <articlenr> 123   </articlenr>
         <articlenr> 456   </articlenr>
         <articlenr> 4783 </articlenr>
         <articlenr> 123   </articlenr>
         <articlenr> 496   </articlenr>
         <articlenr> 4783 </articlenr>
             . (unbounded)
    </positon>
    <position>
         <articlenr> 543  </articlenr>
         <articlenr> 865  </articlenr>
         <articlenr> 643  </articlenr>
    </positon>
    TARGET
    <targetPosition>
      <articlenrs>
           <a1> 123  </a1>
           <a2> 456  </a2>
           <a3> 4783 </a3>
           <a11> 496 </a11>
      <articlenrs>
      <articlenrs>
           <a1>4783 </a1>
      </articlenrs>
    </targetPosition>
    <targetPosition>
         <articlenrs>
         <a1> 543 </a1>
         <a2> 865 </a2>
         <a3> 643 </a3>
            </articlenrs>
    </targetPosition>
    Thanks,
    Christoph
    Edited by: Christoph G. on Apr 30, 2008 10:20 AM

  • I need to sort the incoming file contents before message mapping

    Hi All,
      I have requirement like i have to sort the file contents before message mapping in Xi. is there any option please suggest me with your value information.i dont want to sort in message mapping before that i want file contents to be sorted order.waiting for your quick reply.
    Thanks,
    seshagiri

    Hi,
    You can do this in one scenario.
    Lets say you have MT_Source and MT_Target as two message types.
    Now your MM1 will be between MT_Source & MT_Source, that is same message type. Here you built your sorting logic.
    Now create MM2, between MT_Source & MT_Target. Here your actual mapping logic will be implemented. The input payload for MM2 will be sorted data.
    Now in operation mapping, first call MM1 and then call MM2 (You have a plus + sign to add multiple mapping programs). Due to this sequence, at run time first MM1 will be executed and after that its oupt will be given to MM2 as source payload.
    Hope its clear. Plz let me know if you have any doubts.
    -Gouri

  • How to use the variables used in the message mapping

    Hi ,
    In the message mapping we can declare variables in the JAVA section , these variables could be used across the mapping .
    I have tried using it but I am unable to retrieve the values assigned to the variables in one UDF into the another UDF .
    Please guide me how to use the variables declared in the JAVA section in the message mapping .
    Thanks
    Anita Yadav

    Anita,
    I have worked on the Global variables and i found no issues. Make sure that the variable is declared in the Declaration Section and then initlaized in the Initialization section.
    If you declare a variable in the Declaration Section ,
    int i;
    then in any udf you can use if directly. No need to re declare  the variable in the UDF. If you do this, then it becomes a local variable.
    Regards,
    Bhavesh

  • Message Mapping error in UDF

    I am receiving errors when trying to activate my MM.  I believe the issues are in one of two UDF's.  These UDF's do work in another MM without error.  Below are the error's and UDF's.
    ERRORS:
    Activation of the change list canceled Check result for Message Mapping MM_WPDBBY_WPDBBY01_TO_POS_WAWAFILE | http://wawa.com/xi/erp/pos:  Starting compilation  Source code has syntax error:  /usr/sap/XID/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Map5420e070cabe11dcab4b00306ef38da9/source/com/sap/xi/tf/_MM_WPDBBY_WPDBBY01_TO_POS_WAWAFILE_.java:3291: cannot resolve symbol symbol : variable container location: class com.sap.xi.tf._MM_WPDBBY_WPDBBY01_TO_POS_WAWAFILE_ map = container.getTransformationParameters(); ^ /usr/sap/XID/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Map5420e070cabe11dcab4b00306ef38da9/source/com/sap/xi/tf/_MM_WPDBBY_WPDBBY01_TO_POS_WAWAFILE_.java:3293: cannot return a value from method whose result type is void return constant; ^ 2 errors
    UDF's:
    public String getSender(Container container){
    String constant;
    java.util.Map map;
    // get constant map
    map = container.getTransformationParameters();
    constant = (String) map.get (StreamTransformationConstants.SENDER_SERVICE);
    return constant;
    IMPORTS:  com.sap.xi.mapping.parse.dom.;javax.xml.parsers.;java.io.;com.sap.aii.mapping.lookup.;org.w3c.dom.*;
    public String getSeqNum(String fileType,String objNum,String Sender,Container container){
    String request = "<ns0:ZRFC_NUMBER_GET_NEXT xmlns:ns0=\"urn:sap-com:document:sap:rfc:functions\"><NR_RANGE_NR>" + fileType + "</NR_RANGE_NR><OBJECT>" + objNum + "</OBJECT><QUANTITY/></ns0:ZRFC_NUMBER_GET_NEXT>";
    InputStream isRequest = new ByteArrayInputStream(request.getBytes());
    SystemAccessor accessor = null;
    String num  = null;
    try{
         // 1. Determine a channel.
         Channel channel = LookupService.getChannel(Sender, "R_RFC_ERP");
         // 2. Get a system accessor for the channel.
         accessor = LookupService.getSystemAccessor(channel);
         // 3. Create a payload according to the data type which the adapter expects.
         //    Use service.getBinaryPayload() for binary payload,
         //    and service.getTextPayload() for text payloads.
         Payload payload = LookupService.getXmlPayload(isRequest);
         // 4. Execute lookup.
         Payload response = accessor.call(payload);
         //Parse response
         DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
         DocumentBuilder builder = factory.newDocumentBuilder();
         InputStream resStream = response.getContent();
         Document doc = builder.parse(resStream);
         Element sequence = doc.getDocumentElement();
         NodeList number = sequence.getElementsByTagName("NUMBER");
         //Extract Number
         num = DOMUtil.getSimpleElementText((Element) number.item(0));
    } catch (Exception e) {
         return e.getMessage();
    } finally {
         try {
              if (accessor != null) accessor.close();
         } catch (Exception e) {
              return e.getMessage();
    GlobalContainer gc = container.getGlobalContainer();
    gc.setParameter("Num", num);
    return num;
    Any help is appreciated.
    Regards,
    Darrell

    Fauver,
    Just to narrow down the problem first remove the first udf and only use the 2nd user defined function. Also in the 2nd udf you have to change this line:
    try{
    // 1. Determine a channel.
    Channel channel = LookupService.getChannel(Sender, "R_RFC_ERP");
    In the above line instead of Sender you use the business service or business system where R_RFC_ERP RFC communication channel is created in Integration Directory. So you are hardcoding it first.
    Once you have done this changes do save and test it once again. If this works then you can change back to original and your first udf needs to be checked.
    Regards,
    ---Satish

  • Error When Save Message Mapping

    Hi evreybody,
    I try to save my mapping. I did the test to check to know if everything is ok. The test is executed succesfully but when I try to save, I receive the following error message:
    Internal error: Unable to transfer changes for object Message Mapping MM_Order_Idoc | http://accenture.com/PI01/Idoc to change list "Standard Change List" (348cd3a0-f384-11dd-c70e-003005989c0a) since object still in change list "Standard Change List" (faa66160-f699-11dd-8a1b-003005989c0a)
    Thank you for your support,
    Mohamed.

    Release the lock by going to XI Admin page and check Integration repository and lock tab where you can see the objects locked ,release the lock and you can do the needed.
    Rajesh

  • Creation of CDATA with message mapping

    Hello all,
    Is everyone absolutely sure that a cdata string cannot be created in the middle of an xml file using message mapping? 
    I have tried doing the XSL map in other blogs I even tried writing a whole XSL map in xml spy - yet xi complains about not finding this class file and that class file.  I'm having a hard time believing that this is so hard to do in XI - especially when Microsoft web service implementation seem to long for data crammed into a string ( in my experience ).
    Any help is GREATLY appreciated.
    Thank you!!!
    Scott

    Hi Scott,
             Pls follow the following steps to insert XML string into a single element:
    Create a xsl file with the following data:
    <?xml version='1.0' ?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" <i><b>NSpace</b></i>>
    <xsl:template match="/">
    <namespace:name1>
    <xsl:text disable-output-escaping="yes"><![CDATA[<![CDATA[]]></xsl:text><xsl:copy-of select="<b>//namespace:name</b>"/><xsl:text disable-output-escaping="yes"><![CDATA[]]]]></xsl:text><xsl:text disable-output-escaping="yes"><![CDATA[>]]></xsl:text>
    </namespace:name1>
    </xsl:template>
    </xsl:stylesheet>
    In the above code I have removed xmlns:p2="http://frik.bcc.com.pl" which is not needed.
    Also you have to put '<b>//</b>' before the target element from where you want to start creating XML string over here it is <b>name</b>. And <b>name1</b> is the element you want to store the XML string in.
    So anything in the element <b>name</b> will be stored in <b>name1</b>
    Regarding the <b>namespace:</b> To find out the namespace test your message mapping between the source and the target without adding XSLT mapping. After testing click on <b>'SCR'</b> tab present on top of the target window. There you will see <b>ns1: or ns2:</b> attached to each element. Replace <b>namespace</b> in the above code with <b>ns1: or ns2:</b>.  And replace <b>NSpace</b> in the above XSL Header with the namespace in the SCR of test map.
    So the final XSL file will look like that:
    <?xml version='1.0' ?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" <i><b>xmlns:ns1="http://sap.com/xi/HR"</b></i>>
    <xsl:template match="/">
    <<b>ns1:</b>name1>
    <xsl:text disable-output-escaping="yes"><![CDATA[<![CDATA[]]></xsl:text><xsl:copy-of select="<b>//ns1:name</b>"/><xsl:text disable-output-escaping="yes"><![CDATA[]]]]></xsl:text><xsl:text disable-output-escaping="yes"><![CDATA[>]]></xsl:text>
    </<b>ns1:</b>name1>
    </xsl:template>
    </xsl:stylesheet>
    Dont forget to put '//' before the target element.
    This should work. Or pls put the source and target xml struct and we will assist you further.
    Regards,
    Ashish

  • Disk Utility - Partition map needs repair because a data partition needs loader space.

    I just finished setting up both my OSX and Windows installs from scratch after fitting an SSD, which in-turn was right before my logic board died and Apple replaced it, now it looks like I have some sort of hard drive issue brewing.
    This was my plan for the SSD, and how it currently displays in Disk Utility although that wasn't the case earlier:
    And in Terminal:
    My intention was to have two boot partitions for each OS, 'Macintosh HD' and 'Win 7 Pro' and a third shared data partition 'Projects' on the SSD, which I made in Drive Genius after installing Boot Camp. I don't want Macintosh HD accessible from Windows because I'll be using Paragon HFS+ or MacDrive to give write access and don't want OSs stomping on other OSs turf, hence needing three partitions. Everything looked fine until I just checked Disk Management under windows and realised it couldn't see the Projects volume. Even though it's fine in OS X, it was just marked black/unallocated space.
    So I booted back into OSX, all my files look fine so I ran Disk Utility and the Partition tab looked really odd - unfortunately I didn't get a screenshot. All volumes reported their size correctly but visually, Macintosh HD took up most of the drive. I could see 'Windows 7 Pro' under this, but the Partition Layout section had a scrollbar, which if I scrolled down showed 'Projects' squished into a tiny gap at the bottom. I ran a Verify, which reported no problems, and at some time since the Partition Layout has reverted to how it should look (as in the screenshot above), with 'Projects' book-ended by "Macintosh HD' and 'Windows 7 Pro'.
    Now when I run a Verify on Macintosh HD or Projects volumes, it says there's no problem, but if I run one on the drive, I get this message:
    Volume Macintosh HD on disk0s2 has 0 bytes of trailing loader space and it needs 134217728 bytes
    Problems were found with the partition map which might prevent booting
    Error: Partition map needs repair because a data partition needs loader space.
    I've only managed to find one other mention of this error here, but the fix is not relevant to me because I don't have Sophos installed. I've tried Single User/Safe Mode but it just boots into normal mode, so I can't do a fsck -fy.
    ** /dev/rdisk0s2 (NO WRITE)
    Can't open /dev/rdisk0s2: Permission denied
    That value in bytes is exactly 128mb, so I suspect the problem lies with one of the invisible partitions that show up in iPartition and Disk Management under Windows, but not in Disk Utility. I have backups and I suspect the root of the problem is partitioning in iPartition after installing Boot Camp, but I've never had issues with this approach in the past so I'm wary of just giving up and reinstalling Windows again will be massive hassle because I no longer have a SuperDrive and last time it refused to install from USB.
    Anyone have any idea what's going on? It seems like the sort of issue Disk Utility should just handle, at least in Recovery mode, but it's not playing ball. It also doesn't seem like a massive problem since my files all look fine and performance is OK, so I'm reluctant to do anything major.
    I'll update with a shot of the drive in Disk Management from Windows in a few minutes, in case that sheds light on anything. Thanks!

    Similar issue here. I manually partitioned my hard disk for triple boot (using Gparted on Linux), then everything was just fine until I ran bootcamp, to do something as simple as create a boot USB.
    I get the same error as a result and have to work my way into booting, by resorting first to a Linux live USB, then restarting from the live USB, to finally reach my rEFInd boot manager, or whichever boot manager should be initialized at startup.
    I suppose that the cause in my case is that some operation "scratched" the protective MBR. See this:
    http://www.mactech.com/articles/mactech/Vol.23/23.03/APMtoGPT/index.html
    I am hoping to fix it using an external Yosemite installation media: see this guide -
    http://www.macworld.com/article/2367748/how-to-make-a-bootable-os-x-10-10-yosemi te-install-drive.html
    And as a last resort to reinstall.
    I'll admit I am negatively surprised. I need this computer for professional reasons, and for the sake of "preserving the integrity of OSX", measures defined by Apple instead tend to make partitions far easier to damage. And this problem seems to affect a number of users.
    As for what I have to go through to fix it: a 5GB download, during which I have to register my credit card to the Apple Store. "Pay first, get your free software next."
    IF Disk Utility can fix it, from the external media, then fair enough. The hassle is unpleasant but it files as "a choice".
    Otherwise you can file it safely under software design calamity.

Maybe you are looking for