Important Update: Archer Community Scheduled Maintenance on November 23–24 - New Community Launching Soon! Learn More..
000030602
Method 2: Add a customized XML transform to the Data Feed.
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl" xmlns="http://www.archer-tech.com/">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="NewDataSet">
<ArcherRecords>
<xsl:apply-templates select="Table"/>
</ArcherRecords>
</xsl:template>
<xsl:template match="*">
<xsl:element name="{local-name()}">
<xsl:copy-of select="@*"/>
<xsl:apply-templates/>
</xsl:element>
</xsl:template>
<xsl:template match="NewDataSet/Table/FIELDNAME">
<xsl:call-template name="outputValues">
<xsl:with-param name="ename" select="local-name()"/>
<xsl:with-param name="list" select="."/>
<xsl:with-param name="del">;</xsl:with-param>
</xsl:call-template>
</xsl:template>
<xsl:template name="outputValues">
<xsl:param name="list"/>
<xsl:param name="del"/>
<xsl:param name="ename"/>
<!-- GET EVERYTHING IN FRONT OF THE FIRST DELIMETER -->
<xsl:variable name="first" select="substring-before($list,$del)"></xsl:variable>
<!-- STORE ANYTHING LEFT IN ANOTHER VARIABLE -->
<xsl:variable name="remaining" select="substring-after($list,$del)"></xsl:variable>
<xsl:choose>
<xsl:when test="$first != ''">
<xsl:element name="{$ename}">
<item>
<xsl:value-of select="$first"/>
</item>
</xsl:element>
<!-- CHECK TO SEE IF ANYTHING IS LEFT -->
<xsl:if test="$remaining">
<!-- CALL THE TEMPLATE AGAIN USING THE NEW VARIABLEFOR THE PARAMETER -->
<xsl:call-template name="outputValues">
<xsl:with-param name="list" select="$remaining"></xsl:with-param>
<xsl:with-param name="del">;</xsl:with-param>
<xsl:with-param name="ename" select="$ename"></xsl:with-param>
</xsl:call-template>
</xsl:if>
</xsl:when>
<xsl:otherwise>
<xsl:element name="{$ename}">
<item>
<xsl:value-of select="$list"/>
</item>
</xsl:element>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>