I am attempting to transform the following SOAP response:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<GetSellerListResponse xmlns="urn:ebay:apis:eBLBaseComponents">
<Timestamp>2016-09-26T08:56:24.441Z</Timestamp>
<Ack>Success</Ack>
<Version>979</Version>
<Build>E979_CORE_API_18061413_R1</Build>
<PaginationResult>
<TotalNumberOfEntries>3</TotalNumberOfEntries>
</PaginationResult>
<ItemArray>
<Item>
<ItemID>110183939099</ItemID>
<ListingDetails>
<StartTime>2016-09-21T15:24:07.000Z</StartTime>
<EndTime>2016-09-28T15:24:07.000Z</EndTime>
</ListingDetails>
</Item>
<Item>
<ItemID>110183939198</ItemID>
<ListingDetails>
<StartTime>2016-09-21T15:29:50.000Z</StartTime>
<EndTime>2016-09-28T15:29:50.000Z</EndTime>
</ListingDetails>
</Item>
</ItemArray>
<ReturnedItemCountActual>3</ReturnedItemCountActual>
</GetSellerListResponse>
</soapenv:Body>
</soapenv:Envelope>
I have attempted to transform using the following XSLT:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="//ItemArray"><xsl:text>
</xsl:text>
<entries entity="Product" action="import"><xsl:text>
</xsl:text>
<xsl:for-each select="Item">
<entry externalReference="{ItemID}" thirdPartyReference="{ItemID}"/><xsl:text>
</xsl:text>
</xsl:for-each>
</entries>
</xsl:template>
</xsl:stylesheet>
This is what I want the result of the transform to be:
<?xml version="1.0" encoding="UTF-8"?>
<entries entity="Product" action="import">
<entry externalReference="110183876099" thirdPartyReference="110183876099"/>
<entry externalReference="110183876188" thirdPartyReference="110183876188"/>
</entries>
But currently it outputs like this:
<?xml version="1.0" encoding="UTF-8"?>
2016-09-26T08:56:24.441Z
Success
979
E979_CORE_API_18061413_R1
2
110183876099
2016-09-21T15:24:07.000Z
2016-09-28T15:24:07.000Z
110183876188
2016-09-21T15:29:50.000Z
2016-09-28T15:29:50.000Z
2
What am I doing wrong here in my XSLT formating to not get the desired output?