How to fill attribute of xslt from xml -


i trying add value of xml attribute of xslt. tried various solutions none working. refer below xml , corresponding xslt code.

xml:

    <root>     <orderno>123</orderno>     </root> 

xslt:

<xsl:stylesheet version="1.0"      xmlns:xsl="http://www.w3.org/1999/xsl/transform">   <xsl:output omit-xml-declaration="yes"/>     <xsl:template match="/">       <soapenv:envelope xmlns:read="http:/xxxxxx"            xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">         <soapenv:header/>         <soapenv:body>           <read:shipment              orderno="<xsl:select="/jsontoxml[@orderno]"/>"              shipnode="?">         </soapenv:body>       </soapenv:envelope>     </xsl:template>   </xsl:stylesheet> 

tried various solutions none working.

try avt...

<read:shipment orderno="{root/orderno}" shipnode="?"/> 

also notice xpath in avt has changed. there no jsontoxml element , orderno element, not attribute.


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -