Xslt code to replace a node name to include ns0 prefix

Hi,
Is there some easy xslt code to change the following: (I want the ns0 tag and namespace introduced in the root node so that my mapping works. I have created the mapping using externally provided wsdl, but the input message expects the prefix ns0 whereas the message coming to me from third party does not have the prefix. So in order to force it through the mapping I am thinking of using xslt to translate <createOrUpdateJobsResponse> to <ns0:createOrUpdateJobsResponse xmlns:ns0="http://service.webservice.xxxxxxxx.com"> and the closing tag </createOrUpdateJobsResponse> to </ns0:createOrUpdateJobsResponse>.
Source:
<?xml version="1.0" encoding="UTF-8"?>
<createOrUpdateJobsResponse>
   <createOrUpdateJobsReturn>
      <errorCode/>
      <errorMessage/>
      <goodResult/>
      <jobReferenceNumber/>
   </createOrUpdateJobsReturn>
</createOrUpdateJobsResponse>
Target:
<?xml version="1.0" encoding="UTF-8"?>
<ns0:createOrUpdateJobsResponse xmlns:ns0="http://service.webservice.xxxxxxxx.com">
   <createOrUpdateJobsReturn>
      <errorCode/>
      <errorMessage/>
      <goodResult/>
      <jobReferenceNumber/>
   </createOrUpdateJobsReturn>
</ns0:createOrUpdateJobsResponse>

Hi James,
You could give a try with this :
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns0="http://service.webservice.xxxxxxxx.com" version="1.0">
     <xsl:output indent="yes" omit-xml-declaration="no"/>
     <xsl:template match="/">
          <ns0:createOrUpdateJobsResponse>
               <xsl:apply-templates/>
          </ns0:createOrUpdateJobsResponse>
     </xsl:template>
     <xsl:template match="createOrUpdateJobsReturn">
          <xsl:copy-of select="."/>
     </xsl:template>
</xsl:stylesheet>
It should recreate the same msg structure with a ns0 namespace for the output document
Rgds
Chris

Similar Messages

  • Node names of siblings in xslt

    I have following xslt code
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsl:stylesheet version="1.0"
         xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
         <xsl:template match="*">
              <root>
                   <xsl:for-each select="*/*">
                        <xsl:variable name="mainNode" select="name()" />
                        <xsl:if
                             test="starts-with($mainNode,'Add_1') and contains($mainNode,'street1')">
                             <Add>
                                  <xsl:value-of select="." />
    <!-- I want something that goes in here that allows me to select next node name of "mainNode" and its next node-- i.e. Node names of next two siblings of mainNode -->
                             </Add>
                        </xsl:if>
                   </xsl:for-each>
              </root>
         </xsl:template>
    </xsl:stylesheet>As mentioned in the code, I want to find node names of next two siblings of mainNode
    Any suggestions?
    Thanks...

    I tried something like this:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsl:stylesheet version="1.0"
         xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
         <xsl:template match="*">
              <root>
                   <xsl:for-each select="*/*">
                        <xsl:variable name="nodeName" select="name()" />
                        <xsl:if
                             test="starts-with($nodeName,'Add_1') and contains($nodeName,'street1')">
                             <Add>
                                  <xsl:value-of select="." />
                                  <xsl:value-of select="following-sibling::nodeName[1]" />  <!-- This is what I added-->
                             </Add>
                        </xsl:if>
                   </xsl:for-each>
              </root>
         </xsl:template>
    </xsl:stylesheet>My input XML file is as below:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <root>
         <person>
              <id>1 </id>
              <Add_1_street1>happy street</Add_1_street1>
              <Add_1_street2>A Road</Add_1_street2>
              <Add_1_city>City1</Add_1_city>
         </person>
         <person>
              <id>2</id>
              <Add_1_street1>sad street</Add_1_street1>
              <Add_1_street2>B Road</Add_1_street2>
              <Add_1_city>City2</Add_1_city>
              <Add_2_street1>Bore street</Add_2_street1>
              <Add_2_street2>C Road</Add_2_street2>
              <Add_2_city>City1</Add_2_city>
         </person>
    </root>It does not give me any compiler issue but it does not print the value of next sibling. Can't figure out why. Any pointers?
    Thanks!

  • XSLT mapping code to replace ns1: tag as plm: in XML file in PI mapping

    Hi
    I am sending XML file to HTTP server as below format
    <?xml version="1.0" encoding="UTF-8" ?>
       - <ns1:Responses xmlns:ns1="http://">
    -    <ns1:Response Application="SAP">
        <ns1:field1>12345</ns1:field1>
        <ns1:field2>abc</ns1:field2>
       - <ns1:Items>
        <ns1:doc></ns1:doc>
      </ns1:Items>
      </ns1:Response>
      </ns1:Responses>
    i hve to replace <ns1: as <plm:, i could able to delete <ns1: tag uisng XSLT mapping(in sdn), but i dont know how to add tag with <plm:
    Hi XSLT experts/if any has come across this requirment, please send XSLT code to add tag in XML.
    Regards,
    Rajesh

    No need for XSLT, just use the XMLAnonymizerBean module in your receiver communication channel.
    http://help.sap.com/saphelp_nw70/helpdata/EN/45/d169186a29570ae10000000a114a6b/frameset.htm
    /people/stefan.grube/blog/2007/02/02/remove-namespace-prefix-or-change-xml-encoding-with-the-xmlanonymizerbean
    If your receiver CC cannot process modules (ABAP receiver, for example), in your XSLT just define the target namespace with the desired prefix.
    Regards,
    Henrique.

  • How to rename element (node) names in an XMLType column?

    I have a source table with a xml data stored in an XMLType column.
    The xml contains elements/nodes identified by numbers. I need to replace the numbers with the appropriate names.
    The plsql below does this, but has two issues:
    i. It selects the data into a clob and does a text replace on the elements in a loop. This works, but is super slow for 3500+ xml rows (about 500 node pairs per row).
    ii. Once the data has had the element numbers replaced with the names, it inserts the new xml (clob wrapped in xmltype function) into the table with the XMLType attribute.
    The problem with the latter action is that it is failing due to nls client vs server settings, or so it appears from what I could dig up. The actual error message:
    ORA-19202: Error occurred in XML processing
    LPX-00242: invalid use of ampersand ('&') character (use &amp;)
    Error at line 3
    There are come entities in the original xml like "&#61616;" (the degree symbol).
    My question is two-fold:
    a). Can I replace the element names without straying from the xmltype datatype? If so, how?
    b). If I cannot do "a.)", then what must I do ensure that the clob gets converted correctly to xmltype and inserted into the table?
    SQL> select <some rows> from nls_database_parameters ;
    PARAMETER VALUE
    NLS_LANGUAGE AMERICAN
    NLS_TERRITORY AMERICA
    NLS_CHARACTERSET WE8ISO8859P1
    NLS_NCHAR_CHARACTERSET AL16UTF16
    NLS_RDBMS_VERSION 10.2.0.1.0
    SQL> SELECT * FROM NLS_SESSION_PARAMETERS;
    PARAMETER VALUE
    NLS_LANGUAGE AMERICAN
    NLS_TERRITORY AMERICA
    ----code below-----
    (note, this is a stripped down version of the original, so there may be typos)
    declare
    l_xmlclob CLOB;
    l_newxml XMLType;
    v_record_uid NUMBER(20);
    CURSOR my_cur IS
    select a.elementname,b.tagname
    from t_elements a, t_tags b
    where (a.element_uid = b.element_uid)
    begin
    select br.xml_data.getClobVal() xml_data into l_xmlclob from t_elements;
    FOR my_rec IN my_cur LOOP
    l_xmlclob := replace(l_xmlclob,my_cur.elementname,my_cur.maptag_name);
    END LOOP;
    l_newxml := XMLType(l_xmlclob);
    insert into test_translated_xml (xml_data) values (l_newxml);
    end;
    (hopefully I haven't missed anything)
    Any tips or hints would be much appreciated.
    Thanks!

    Hello again,
    Take a look at html entity codes: http://www.w3schools.com/tags/ref_entities.asp.
    You can use this:
    insert into t values (xmltype('<test>'||dbms_xmlgen.convert('this is a test &')||'deg;</test>'));
    or
    insert into t values (xmltype('<test>'||dbms_xmlgen.convert('this is a test &')||'#176;</test>'));
    see this: &deg; (& deg;) or this: &#176; (& #176;)
    SQL*Plus will not display degree character. But this is valid enitity code, and when you generate HTML out of this, it should be displayed properly in web browser.
    HTML is in fact XML, that is validated by specific DTD (Document Type Definition).
    Paweł

  • 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!

  • XSLT Code not working

    Hi All,
    I am doing on XSLT Mapping. It is having a lookup. Lookup is working fine and I am getting data back in one variable say 'Var1'.
    Now in my mapping all the field are mapped one to one from source to target except one field say "lookup' and I am mapping responce of RFC 'Var1' variable to this node.
    My XSLT code is as follows:
    <TargetNode>
    <Field1><xsl:value of select="/Isourcenode/Field1"/></Field1>
    <Field2><xsl:value of select="/Isourcenode/Field2"/></Field2>
    <Lookup><xsl:value of select="$Var1"/></Lookup>
    <Field3><xsl:value of select="/Isourcenode/Field3"/></Field3>
    <Field4><xsl:value of select="/Isourcenode/Field4"/>/<Field4>
    </TargetNode>
    Now here I get value of Variable Var1 in Lookup field whereas all the fields after that node like Field3,Field4 are not getting mapped value.
    Do I need to do anything special to access the nodes values in xpath once i access variables using $    ?
    Thanks and Regards,
    Atul

    Hi,
    You can use CALL TRANSFORMATION <NAME> to meet your requirement
    For an example, refer:
    Re: help in Xml to abap
    Thanks,
    Aabhas

  • XSLT code - If Condition

    Hello,
    Can someone help me to give an XSLT code for the following condition?
    Source Message:
    /Order/Ident/ReceiverID = 203
    Condition:
    If the value of Source ReceiverID is 203, then, make it to the value to 456.
    I've tried this code, but seems to be many error validations.
    <xsl:template match="/Order/Ident/ReceiverID">
          <xsl:choose>
            <xsl:when test="203">
              <xsl:attribute name="203">
                   <xsl:value-of select="456"/>
                </xsl:attribute>
             </xsl:when>
            <xsl:otherwise>
              <xsl:attribute name="203">unknown</xsl:attribute>
            </xsl:otherwise>
          </xsl:choose>
        </xsl:template>
    Should you have helpful links, please let me know. I will greatly appreciate it.
    Thanks in advance!
    Gerberto

    Gerberto,
    Try this -
    <xsl:choose>
         <xsl:when test="*[local-name()='ReceiverID']='203' ">
              <ns:YourField>
                   <xsl:value-of select="456"/>
              </ns:YourField>
         </xsl:when>
         <xsl:otherwise>
              <ns:YourField>
                   <xsl:value-of select="203"/>
              </ns:YourField>
         </xsl:otherwise>
    </xsl:choose>
    Let me know if this works for you.
    Regards,
    Neetesh

  • How to Display Detailed navigation passing Top level navigation node name

    Hi All,
    I have prepared a DLN par file but unfortunatly my requirement is such that I need to pass one of the toplevel node name as input parameter and that should display the corresponding DLN which is from 3rd level.
    I have checked in sdn for passing a value to the navigation tag lib which will consider it as a selectednode but could find none.
    Can some body suggest me how to acheive this.
    Thanks in Advance.
    Sai Krishna. K

    Hi Kiran,
    Thanks for your Reply..
    Following is my Scenario:
    I use 2 same versions of portals connected via federated portal concept.
    I have my detailed navigation par file in portal2 and was calling it from portal1 from a iview.
    Since I am not physically navigating in portal2(which mean there is no selected node to iterate ), when I call that iview in portal1 it is picking up only 1st node in top level navigation.
    So i need to pass "My reports" (as 1st level) & "India" (as 2nd level) as parameters such that it gets only its DTN at all times from 3rd level.
    Hope you understand my scenario, below is my iteration code logic.
    <div id="myslidemenu" class="jqueryslidemenu">
    <ul>
         <nav:iterateSelectedNavNodesLevel level="<%=START_LEVEL%>">
         <%-- the 'currentDepth' attribute provides the byte value of the current level --%>
        <nav:recurseNavNodeChildren currentDepth="depth">
             <% current = start + depth.intValue() - 1; %>
             <%=writeClosingTags(last - current)%>
             <%
            last = current;
            %>
            <%-- we want to distinguish between folder and leaf nodes so we can use different graphics --%>
              <%-- complete the html syntax for the 'class' attribute pass it as an anchor attribute--%>
              <li><nav:navNodeAnchor navigationMethod="byURL" />
              <%-- checks for additional navigation level and the appropriate html tags to accomodate them --%>
            <nav:ifNextRecursionDepthWillIncrease>
                <ul>
            </nav:ifNextRecursionDepthWillIncrease>
            <nav:ifNextRecursionDepthWillNotChange>
                </li>
            </nav:ifNextRecursionDepthWillNotChange>
        </nav:recurseNavNodeChildren>
        <%=writeClosingTags(last - start)%>
        <% last = start; %>
    </nav:iterateSelectedNavNodesLevel>
    </ul>
    </div>
    As per the passing parameter concept please explain me a bit more clear with step by step procedure.
    <b>Here if not passing parameters, providing static values will also do for my requirement.</b>
    Many Thanks,
    Sai Krishna.
    Edited by: Konchada Sai Krishna on Feb 14, 2009 9:42 PM

  • Mapping node name and value

    Hi,
    I have source strcture as
    ID
    Code
    Dept
    City
    My target structure is
    Name
    Value
    After mapping i need my target xml file to be
    <Object>
    <Name>ID</Name>
    <Value>001</Value>
    <Name>Code</Name>
    <Value>XYZ</Value>
    <Name>Dept</Name>
    <Value>SAP</Value>
    <Name>City</Name>
    <Value>NY</Value>
    </Object>
    Any input?

    let me explain my scenario more clearly...
    My source message is Idoc whose structure is as follows
    IDOC        1..1
    - E1AFKOL   1..1
       Dept
       Code
    -- E1AFKOL  0..99999
    E1AFVOL 0..99999
    E1RESBL 0..99999
          Charg
    Now my otarget strcuture is
    ObjectCollection 1..1
    -Object          0..99999
    --Field          0..99999
       Name
       Value
    Now what i want is, for each occurance of Segment E1AFVOL, Object node should get repeated and for each occurance of segment E1RESBL (child of segment E1AFVOL) 'Field' node should be repeated.
    e.g. Input is
    IDOC        1..1
    - E1AFKOL   1..1
       Dept     SAP
       Code     001 
    -- E1AFKOL  0..99999
    E1AFVOL 0..99999
    E1RESBL 0..99999
          Charg  A1
    E1RESBL 0..99999
          Charg  A2
    E1AFVOL 0..99999
    E1RESBL 0..99999
          Charg  A1
    Therefor output would be
    ObjectCollection
    -<Object>        
    --<Field>        
       Name  CHARG
       Value A1
       Name  Dept
       Value SAP
       Name  Code
       Value 001
    --</Field>
    --<Field>        
       Name  CHARG
       Value A2
       Name  Dept
       Value SAP
       Name  Code
       Value 001
    --</Field>
    -</Object>
    -<Object>        
    --<Field>        
       Name  CHARG
       Value A1
       Name  Dept
       Value SAP
       Name  Code
       Value 001
    --</Field>  
    -</Object>
    i am not sure if this can be achieved by graphical mapping.
    If not please explain me how XKST mapping would be used in this case?

  • 30EA2 - Search Source Code results - Go To package name problem

    As mentioned here 2.1 RC1 - Search Source Code results -> Go To <package name> doesn't work , Reports -> Data Dictionary -> PLSQL -> Search Source Code -> right-click -> Go To doesn't go to the specific line: can this be fixed?
    Alessandro

    Sorry Vadim, but the procedure to reproduce the bug is different:
    1) Open the Reports tab
    2) Expand Data Dictionary node
    3) Expand PLSQL node
    4) Click on Search Source Code
    5) Select a Connection
    6) Click on Text Search, enter a string to search and click Apply
    7) On the results page, right-click any line and select Go To <package name>
    8) The package opens on line 1, not the line shown on step 7
    While we're at it, do you think it would be possible to make the above process more user-friendly? Like, for example, right-clicking on a Connection and have the Search Source Code option there (that would take me directly to step 6)?
    Regards.
    Alessandro

  • Need XSLT code for comparing 2 fields and looping the repatitive attirbute filed to destination schema

    Need an Custom XSLT code... where i need to compare 2 attribute fields( Name and Start Date) fromInputMessagePart_0 with the 2 fields ( Name and Start Date) from InputMessagePart_1 and need to map the repetitive attribute field ( phoneno) from InputMessagePart_1
    to attribute field( PhoneNo of Destination schema.
    this will look like this
    Source Schema                                           
    Destination Schema
    InputMessagePart_0                                                 Item
    Record
          - Name                                                                     
    -Name
          - StartDate                                                                
    - StartDate
          - Addres                                                                   
    - PhoneNo
    InputMessagePart_1
         -Name
         -StartDate
         -PhoneNo
    Final output should look like by
    Details
    Name
    StartDate
    PhoneNo
    Details
    Name
    StartDate
    PhoneNo
    Details
    Name
    StartDate
    PhoneNo
    Details
    Name
    StartDate
    PhoneNo
    Need urgent assistance
    Thank you in advance
    BizTalkLearner

    could you also post your sample input instance and expected output instance
    Please mark the post as answer if this answers your question. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • How to transform node name in XML data source for SSIS

    I have the following xml file; I want to change the node name of Emp.location to Emp_location, Edu.location to Edu_location, Addr.location to Addr_location as it was not supported by SSIS. I have multiple files like that. I  am thinking to use SSIS XML
    task with  XLST file to transform it. Can anybody help it?
    Thank you
    <?xml version="1.0" encoding="utf-8"?>
    <Resumes>
    <Resume>
      <Name>
        <Name.Prefix />
        <Name.First>Shai</Name.First>
        <Name.Middle />
        <Name.Last>Bassli</Name.Last>
        <Name.Suffix />
      </Name>
      <Skills>
        I am an experienced and versatile machinist who can operate a range of machinery personally
    as well as supervise the work of other machinists. I specialize in diagnostics and precision inspection, have expertise in reading blueprints, and am able to call on strong interpersonal and communication skills to guide the work of other production machinists
    whose work I am called upon to inspect.
        My degree in mechanical engineering affords me a better theoretical understanding and mathematical
    background than many other candidates in the machinist trade.
      </Skills>
      <Employment>
        <Emp.StartDate>2000-06-01Z</Emp.StartDate>
        <Emp.EndDate>2002-09-30Z</Emp.EndDate>
        <Emp.OrgName>Wingtip Toys</Emp.OrgName>
        <Emp.JobTitle>Lead Machinist</Emp.JobTitle>
        <Emp.Responsibility>
          Supervised work of staff of four machinists. Coordinated all complex assembly and tooling
    activities, including production of tricycles and wagons.
          Developed parts fabrication from sample parts, drawings and verbal orders.Worked with
    ISO9000 implementation.
        </Emp.Responsibility>
        <Emp.FunctionCategory>Production</Emp.FunctionCategory>
        <Emp.IndustryCategory>Manufacturing</Emp.IndustryCategory>
        <Emp.Location>
          <Location>
            <Loc.CountryRegion>US </Loc.CountryRegion>
            <Loc.State>MI </Loc.State>
            <Loc.City>Saginaw</Loc.City>
          </Location>
        </Emp.Location>
      </Employment>
      <Employment>
        <Emp.StartDate>1996-11-15Z</Emp.StartDate>
        <Emp.EndDate>2000-05-01Z</Emp.EndDate>
        <Emp.OrgName>Blue Yonder Airlines</Emp.OrgName>
        <Emp.JobTitle>Machinist</Emp.JobTitle>
        <Emp.Responsibility>
          Repaired and maintained a variety of production and fabrication machine tools.
          Set up and operated machines to close tolerances. Used and wrote CNC machine programs.
    Trained extensively in computer-aided manufacturing.
        </Emp.Responsibility>
        <Emp.FunctionCategory>Production</Emp.FunctionCategory>
        <Emp.IndustryCategory>Manufacturing</Emp.IndustryCategory>
        <Emp.Location>
          <Location>
            <Loc.CountryRegion>US </Loc.CountryRegion>
            <Loc.State>IL </Loc.State>
            <Loc.City>Chicago</Loc.City>
          </Location>
        </Emp.Location>
      </Employment>
      <Employment>
        <Emp.StartDate>1994-06-10Z</Emp.StartDate>
        <Emp.EndDate>1996-07-22Z</Emp.EndDate>
        <Emp.OrgName>City Power and Light</Emp.OrgName>
        <Emp.JobTitle>Assistant Machinist</Emp.JobTitle>
        <Emp.Responsibility>
          Performed centerless grinding. Received training in manual mill and lathe machines,
    as well as micrometers and calipers.
          Owned complete toolset.Worked extensive overtime on request.
        </Emp.Responsibility>
        <Emp.FunctionCategory>Production</Emp.FunctionCategory>
        <Emp.IndustryCategory>Manufacturing</Emp.IndustryCategory>
        <Emp.Location>
          <Location>
            <Loc.CountryRegion>US </Loc.CountryRegion>
            <Loc.State>IA </Loc.State>
            <Loc.City>Des Moines</Loc.City>
          </Location>
        </Emp.Location>
      </Employment>
      <Education>
        <Edu.Level>Bachelor</Edu.Level>
        <Edu.StartDate>1990-09-15Z</Edu.StartDate>
        <Edu.EndDate>1994-05-10Z</Edu.EndDate>
        <Edu.Degree>Bachelor of Science</Edu.Degree>
        <Edu.Major>Mechanical Engineering</Edu.Major>
        <Edu.Minor />
        <Edu.GPA>3.2</Edu.GPA>
        <Edu.GPAScale>4</Edu.GPAScale>
        <Edu.School>Midwest State University</Edu.School>
        <Edu.Location>
          <Location>
            <Loc.CountryRegion>US </Loc.CountryRegion>
            <Loc.State>IA </Loc.State>
            <Loc.City>Ames</Loc.City>
          </Location>
        </Edu.Location>
      </Education>
      <Address>
        <Addr.Type>Home</Addr.Type>
        <Addr.Street>567 3rd Ave</Addr.Street>
        <Addr.Location>
          <Location>
            <Loc.CountryRegion>US </Loc.CountryRegion>
            <Loc.State>MI </Loc.State>
            <Loc.City>Saginaw</Loc.City>
          </Location>
        </Addr.Location>
        <Addr.PostalCode>53900</Addr.PostalCode>
        <Addr.Telephone>
          <Telephone>
            <Tel.Type>Voice</Tel.Type>
            <Tel.IntlCode>1</Tel.IntlCode>
            <Tel.AreaCode>276</Tel.AreaCode>
            <Tel.Number>555-0114</Tel.Number>
          </Telephone>
          <Telephone>
            <Tel.Type>Fax</Tel.Type>
            <Tel.IntlCode>1</Tel.IntlCode>
            <Tel.AreaCode>276</Tel.AreaCode>
            <Tel.Number>555-0132</Tel.Number>
          </Telephone>
        </Addr.Telephone>
      </Address>
      <EMail>[email protected]</EMail>
      <WebSite />
    </Resume>
    </Resumes>

    See if these posts help: http://blogs.msdn.com/b/mattm/archive/2007/12/15/xml-source-making-things-easier-with-xslt.aspx
    http://simonlv.blogspot.ca/2012/08/ssis-step-by-step-6-use-xslt-to.html
    Arthur My Blog

  • Anyone can check my xslt code ?

    i've tried to use JAXP to transform xml by using xslt. the java program has been written and compiled, but when i tried to run it, it come out the errors:
    error: 'unknown protocol: c'
    fatal error: 'could not compile stylesheet'
    i was suspecting my xslt code might be wrong, could anyone check for me ? i'm quite new to xslt, probably will make lots of silly mistakes.
    xml file: http://www.bbc.co.uk/travelnews/tpeg/en/local/rtm/rtm_tpeg.xml
    xslt file:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="/">
    <xsl:for-each select="tpeg_document/tpeg_message">
    <xsl:value-of select="summary"><xsl:text>;<\xsl:text>
    </xsl:for-each>
    </xsl:template>
    </xsl:stylesheet>
    any suggestions will be appreciated,
    cheers,

    i'm not sure whether it'll be the case, but you migt be right. i posted my java source code here:
    public class FileDownload {
    public static void download(String address, String localFileName){
    OutputStream out = null;
    URLConnection conn = null;
    InputStream in = null;
    StringBuffer xmlContentBuffer = new StringBuffer();
    String temp = new String();
    String xmlContent;
    try {
    URL url = new URL(address);
    out = new BufferedOutputStream(
    new FileOutputStream(localFileName));
    conn = url.openConnection();
    in = conn.getInputStream();
    byte[] buffer = new byte[1024];
    int numRead;
    long numWritten = 0;
    System.out.println (in.toString ());
    while ((numRead = in.read(buffer)) != -1) {
    out.write(buffer, 0, numRead);
    numWritten += numRead;
    temp = new String(buffer);
    xmlContentBuffer.append(temp);
    System.out.println(localFileName + "\t" + numWritten);
    xmlContent = xmlContentBuffer.toString();
    String xsltString;
    FileInputStream xslt= new FileInputStream ("Tpeg.xslt");
    int x= xslt.available();
                        byte b[]= new byte[x];
                        xslt.read(b);
    xsltString = new String(b);
                        String htmlString = XmlUtil.applyXslt(xmlContent, xsltString);
                        System.out.println(htmlString);
    } catch (Exception exception) {
    exception.printStackTrace();
    } finally {
    try {
    if (in != null) {
    in.close();
    if (out != null) {
    out.close();
    } catch (IOException ioe) {
         public static void download(String address) {
              int lastSlashIndex = address.lastIndexOf('/');
              if (lastSlashIndex >= 0 &&
              lastSlashIndex < address.length() - 1) {
                   download(address, address.substring(lastSlashIndex + 1));
              } else {
                   System.err.println("Could not figure out local file name for " + address);
         public static void main(String[] args) {
              for (int i = 0; i < args.length; i++) {
                   download(args);

  • Invalid node name in Sun Cluster 3.1 installation

    Dear all,
    I need your advice in Sun Cluster 3.1 8/05 installation.
    My colleague was installing Sun Cluster 3.1 8/05 on 2 servers Sun Netra 440 that given hostname 01-in-01 and 01-in-02. But when he want to configuring the cluster, the problem occured.
    The error message is:
    running scinstall: invalid node name
    And when we changed the host name to in-01 and in-02, the cluster can be configured well.
    Why did this problem happened?
    Is it related with the given hostname that using numeric in the beginning? If yes, can you give the documentation that state about that?
    Or maybe you have another explanation?
    Thank you for your help.
    regards,
    Henry

    A bug is being logged against this. (though obviously you could manually fix the shell script yourself if you were in a hurry).
    The problem partly stems from the restriction on hostnames being relaxed by RFC 1123 which relaxed RFC 952's limitation of the first character to only alpha characters.). See man hosts for more info. I guess our code didn't catch up :-)
    Tim
    ---

  • XSLT code giving emplty output

    Hi ,
    i am a beginer in XSLT.  when i execute the code  i am getting emplty structure.
    Can anyone point out what is missing in my code, are the xpath expressions correct??
    input Xml  will look as below
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_XSLT_Source xmlns:ns0="http://XYZ.com/gen">
         <Person>
              <FirstName>James</FirstName>
              <LastName>Bond</LastName>
              <Gender>Male</Gender>
              <Address>
                   <Street>6B</Street>
                   <Houseno>bbbb</Houseno>
                   <City>AAAA</City>
              </Address>
         </Person>
    </ns0:MT_XSLT_Source>
    my output should be...
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_XSLT_Target xmlns:ns0="http://XYZ.com/Gen">
          <Title>Male</Title>
         <Name> James Bond</Name>
          <Street> 6B bbbb</Street>
          <City>AAA</City>
    </ns0:MT_XSLT_Target>
    my XSLT code is  as below .. (  i think the xpath's are not executing)
    <?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">
         <xsl:template match="/">
              <ns0:MT_XSLT_Target>
                   <Title>
                        <xsl:value-of select="/ns0:MT_XSLT_Source/Person/FirstName"/>
    ( i doubt issue is in xpath??)
                   </Title>
                   <Name>
                        <xsl:value-of select="concat(concat(ns0:MT_XSLT_Source/Person/FirstName,' '),
                         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>
              </ns0:MT_XSLT_Target>
         </xsl:template>
    </xsl:stylesheet>
    Edited by: sam kumar on Aug 31, 2010 2:37 PM

    Hi, take this 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">
         <xsl:template match="/">
              <ns0:MT_XSLT_Target>
                   <Title>
                        <xsl:value-of select="ns0:MT_XSLT_Source/Person/FirstName"/>
                   </Title>
                   <Name>
                        <xsl:value-of select="concat(concat(ns0:MT_XSLT_Source/Person/FirstName,' '),
                         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>
              </ns0:MT_XSLT_Target>
         </xsl:template>
    </xsl:stylesheet>
    I Just change the xmlns:ns0="http://XYZ.com/Gen" to xmlns:ns0="http://XYZ.com/gen"
    Regards,
    Edson Thomaz

Maybe you are looking for