I am facing issue while trying to get the node value of "streetNumber" which is inside namespaced XML. Below is my XML:
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702" xmlns:tns="http://xsd.hometrack.com.au/pih/" xmlns:vms="http://www.sandstone-vms.com.au/schema/vms/1.0" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xs="http://wsdl.hometrack.com.au/pih/">
<soap:Body>
<xs:getPropertyResponse xmlns="http://wsdl.hometrack.com.au/pih/" xmlns:xs="http://wsdl.hometrack.com.au/pih/">
<pih xmlns="http://xsd.hometrack.com.au/pih/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<propertyResponse>
<property>
<address>
<streetNumber>32</streetNumber>
<streetName>SPARKLE</streetName>
</address>
</property>
</propertyResponse>
</pih>
</xs:getPropertyResponse>
</soap:Body>
</soap:Envelope>
And my XSLT for this is:
<xsl:template match="/soapenv:Envelope/soapenv:Body">
<xsl:element name="response">
<xsl:element name="output">
<xsl:attribute name="streetNumber"><xsl:value-of select="xs:getPropertyResponse/pih/propertyResponse/property/address/streetNumber" /></xsl:attribute>
</xsl:element>
</xsl:element>
</xsl:template>
Below is the result where I am not getting value for "StreetNumber"
<?xml version="1.0" encoding="UTF-8"?>
<response><output streetNumber=""/>
</response>
Any help on this will be helpful for me. Many thanks in advance!