Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5996443
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T00:06:14+00:00 2026-05-23T00:06:14+00:00

i have this XSLT and XML payload that i am wanting to transform. but

  • 0

i have this XSLT and XML payload that i am wanting to transform. but the output xml does not contain the attribute for element engine.

any help would be appreciated?

this is my xslt

    <?xml version="1.0" encoding="UTF-8" ?>
    <?oracle-xsl-mapper
    <!-- SPECIFICATION OF MAP SOURCES AND TARGETS, DO NOT MODIFY. -->
    <mapSources>
    <source type="WSDL">
    <schema location="../HTTPBinding.wsdl"/>
    <rootElement name="Envelope" namespace="http://HPES.org/"/>
    </source>
    </mapSources>
    <mapTargets>
    <target type="WSDL">
    <schema location="../Service1.wsdl"/>
    <rootElement name="Envelope" namespace="http://HPES.org/"/>
    </target>
    </mapTargets>
    <!-- GENERATED BY ORACLE XSL MAPPER 11.1.1.4.0(build 110106.1932.5682) AT [TUE JUN 07 11:17:07 CDT 2011]. -->
    ?>
    <xsl:stylesheet version="1.0"
    xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
    xmlns:inp2="http://HPES.org/"
    xmlns:mhdr="http://www.oracle.com/XSL/Transform/java/oracle.tip.mediator.service.common.functions.MediatorExtnFunction"
    xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
    xmlns:oraext="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:dvm="http://www.oracle.com/XSL/Transform/java/oracle.tip.dvm.LookupValue"
    xmlns:hwf="http://xmlns.oracle.com/bpel/workflow/xpath"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:med="http://schemas.oracle.com/mediator/xpath"
    xmlns:ids="http://xmlns.oracle.com/bpel/services/IdentityService/xpath"
    xmlns:bpm="http://xmlns.oracle.com/bpmn20/extensions"
    xmlns:xdk="http://schemas.oracle.com/bpel/extension/xpath/function/xdk"
    xmlns:xref="http://www.oracle.com/XSL/Transform/java/oracle.tip.xref.xpath.XRefXPathFunctions"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:inp1="http://tempuri.org/"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:ora="http://schemas.oracle.com/xpath/extension"
    xmlns:socket="http://www.oracle.com/XSL/Transform/java/oracle.tip.adapter.socket.ProtocolTranslator"
    xmlns:tns="http://oracle.com/sca/soapservice/Application1/Project1/Service1"
    xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap"
    exclude-result-prefixes="xsi xsl inp2 xsd inp1 wsdl tns bpws xp20 mhdr bpel oraext dvm hwf med ids bpm xdk xref ora socket ldap">
    <xsl:template match="/">
    <inp2:Envelope>
    <Body>
    <soapP1>
    <soapP2>
    <engine>
    <xsl:attribute name="value">
    <xsl:value-of select="/inp2:Envelope/Body/soapP1/soapP2/engine/@value"/>
    </xsl:attribute>
    <xsl:attribute name="txnElapsedTime">
    <xsl:value-of select="/inp2:Envelope/Body/soapP1/soapP2/engine/@txnElapsedTime"/>
    </xsl:attribute>
    <xsl:value-of select="/inp2:Envelope/Body/soapP1/soapP2/engine"/>
    </engine>
    </soapP2>
    </soapP1>
    </Body>
    </inp2:Envelope>
    </xsl:template>
    </xsl:stylesheet>

this is my input xml

    <soap:Envelope xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2000/10/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
    <soapP1>
    <soapP2>
    <engine value="1" txnElapsedTime="0.05"/>
    </soapP2>
    </soapP1>
    </soap:Body>
    </soap:Envelope>

this is my output where the attribute are lost…..

    <?xml version="1.0" encoding="utf-8"?>
    <inp2:Envelope xmlns:inp2="http://HPES.org/">
    <Body>
    <soapP1>
    <soapP2>
    <engine value="" txnElapsedTime="">
    </engine>
    </soapP2>
    </soapP1>
    </Body>
    </inp2:Envelope>         
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T00:06:15+00:00Added an answer on May 23, 2026 at 12:06 am

    Seems that what you need is this simple and short transformation:

    <xsl:stylesheet version="1.0"
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     xmlns:inp2="http://HPES.org/"
     exclude-result-prefixes="inp2">
     <xsl:output omit-xml-declaration="yes" indent="yes"/>
     <xsl:strip-space elements="*"/>
    
     <xsl:template match="engine">
      <inp2:Envelope>
        <Body>
            <soapP1>
                <soapP2>
                 <engine>
                  <xsl:copy-of select="@*|node()"/>
                 </engine>  
                </soapP2>
            </soapP1>
        </Body>
      </inp2:Envelope>
     </xsl:template>
    </xsl:stylesheet>
    

    when applied to the provided XML document:

    <soap:Envelope
     xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance"
     xmlns:xsd="http://www.w3.org/2000/10/XMLSchema"
     xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
        <soap:Body>
            <soapP1>
                <soapP2>
                    <engine value="1" txnElapsedTime="0.05"/>
                </soapP2>
            </soapP1>
        </soap:Body>
    </soap:Envelope>
    

    the wanted result is produced:

    <inp2:Envelope xmlns:inp2="http://HPES.org/">
       <Body>
          <soapP1>
             <soapP2>
                <engine value="1" txnElapsedTime="0.05"/>
             </soapP2>
          </soapP1>
       </Body>
    </inp2:Envelope>
    

    Explanation: Just one template, matching engine — with all necessary literal-result-elements as the simplest way to have them in the desired new namespaces and to get rid of the other namespace nodes that the original elements own.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this kinda interesting requirement. Typically you use XSLT to transform an XML
I have this XSLT stylesheet, where I'm trying to find nodes that contain an
I have this java program where I transform with TransformerFactory a XML string that
I have got an XSLT that looks like this: <xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform> <xsl:output method=xml
I have this XSLT: <xsl:strip-space elements=* /> <xsl:template match=math> <img class=math> <xsl:attribute name=src>http://latex.codecogs.com/gif.latex?<xsl:value-of select=text()
I have an XML document that needs to pass text inside an element with
Taking the XSLT and XML from this page as an example: http://www.w3schools.com/xsl/xsl_transformation.asp I have
Ok so I have this xml file <?xml version=1.0 encoding=us-ascii?> <?xml-stylesheet type=text/xsl href=logstyle.xslt?> <Events
Greetings, I'm no XSL/XSLT/XML shark, I have worked with some, though, but I've never
I have a listview that loads dynamic controls from xml/xslt <asp:ListView ID=DynamicFields runat=server DataSourceID=CustomFields

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.