I need a help on XQuery where I am receiving a XML SOAP envelop body from external system and now I have to route the data based on namespace in XML.
like below
<v1:EmployeeResponse xmlns:v1="http://test.service.net/com/v1">
<v1:Reference>SequenceTime="2019-03-07 12.15.01.970236"</v1:Reference>
<v1:Details>
<v1:Name>
<v1:FirstName>Alex</v1:FirstName>
</v1:Name>
</v1:Details>
</v1:EmployeeResponse>
here say I am getting namesace as http://test.service.net/com/v1 then i should update a temp variable says v1 and if this is http://test.service.net/com/v2, the variable should be v2.
I am more curious to know how i can read a namespace from the XML document using Xquery or XSLT.
namespace-urifunction defined in XPath and therefore also XSLT/XQuery that allows you to read out the namespace of a node in an XML document: w3.org/TR/xpath-functions/#func-namespace-uri. I am not sure what you consider a "temp variable" in XSLT or XQuery.