I am trying to transform an xml from one xml to another by using xslt, but not able to get the error.
My input is :
<?xml version = "1.0"?>
<queryResponse xmlns="urn:sfobject.sfapi.successfactors.com" xmlns:ns2="urn:fault.sfapi.successfactors.com">
<result>
<sfobject>
<id>1791
</id>
<type>CompoundEmployee
</type>
<execution_timestamp>2016-11-08T06:38:48.000Z
</execution_timestamp>
<version_id>1611P0
</version_id>
</sfobject>
<sfobject>
<id>122
</id>
<type>Simple
</type>
<execution_timestamp>2016-11-08T08:32:18.000Z
</execution_timestamp>
<version_id>16120
</version_id>
</sfobject>
<numResults>1
</numResults>
<hasMore>true
</hasMore>
<querySessionId>5f619648-548a-43ec-8119-627094f927a5
</querySessionId>
</result>
</queryResponse>
and the XSLT is:
<?xml version = "1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xsl:template match="result">
<calls>
<xsl:for-each select = "sfobject">
<call>
<id>
<xsl:value-of select = "id"/>
</id>
<type>
<xsl:value-of select = "type"/>
</type>
</call>
</xsl:for-each>
</calls>
</xsl:template>
</xsl:stylesheet>
I am receiving the output as below:
1791 CompoundEmployee 2016-11-08T06:38:48.000Z 1611P0 122 Simple
2016-11-08T08:32:18.000Z 16120 1 true
5f619648-548a-43ec-8119-627094f927a5
Basically, I don't get the tags. I intend to get the output as follows:
<calls>
<call>
<id>123</id>
<type>CompoundEmployee</type>
</call>
</calls>