<?xml version='1.0'?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:a="http://jackhenry.com/jxchange/TPG/2008" xmlns:s="http://www.w3.org/2003/05/soap-envelope">
<xsl:output method="xml" encoding="UTF-8"/>

 <xsl:template match="/">

<WorkflowTranslatedResponse>
   <VariableMap>
 
     <ActivityMapVariable>
     <VariableName>AccountList</VariableName>
     <Value>
       <xsl:for-each select="s:Envelope/s:Body/a:AcctSrchResponse/a:AcctSrchRecArray/a:AcctSrchRec">
  <xsl:value-of select="a:ProdCode"/><xsl:text>&#32;</xsl:text>
  <xsl:value-of select="a:ProdDesc"/><xsl:text>&#32;</xsl:text>
  <xsl:value-of select="a:AccountId/a:AcctType"/><xsl:text>&#32;</xsl:text>
  <xsl:value-of select="a:AccountId/a:AcctId"/><xsl:text>&#10;</xsl:text>
  </xsl:for-each>
     </Value>
  <DefaultValue>No Accounts Found</DefaultValue>
     </ActivityMapVariable>

     <ActivityMapVariable>
     <VariableName>PayrollAccountArray</VariableName>
  <Value>
   <xsl:for-each select="s:Envelope/s:Body/a:AcctSrchResponse/a:AcctSrchRecArray/a:AcctSrchRec[a:AcctStat='1'][a:AccountId/a:AcctType='D' or a:AccountId/a:AcctType='S']">
   <xsl:value-of select="a:ProdDesc"/><xsl:text>&#32;</xsl:text>
   <xsl:value-of select="a:AccountId/a:AcctType"/><xsl:text>&#32;</xsl:text>
   <xsl:value-of select="a:AccountId/a:AcctId"/><xsl:text>:±~</xsl:text>
   </xsl:for-each>
  </Value>
  <DefaultValue>No Accounts Found</DefaultValue>
  </ActivityMapVariable>

  <ActivityMapVariable>
  <VariableName>PayrollAccountList</VariableName>
   <Value>
    <xsl:for-each select="s:Envelope/s:Body/a:AcctSrchResponse/a:AcctSrchRecArray/a:AcctSrchRec[a:AcctStat='1'][a:AccountId/a:AcctType='D' or a:AccountId/a:AcctType='S']">
    <xsl:value-of select="a:ProdDesc"/><xsl:text>&#32;</xsl:text>
    <xsl:value-of select="a:AccountId/a:AcctType"/><xsl:text>&#32;</xsl:text>
    <xsl:value-of select="a:AccountId/a:AcctId"/><xsl:text>&#10;</xsl:text>
    </xsl:for-each>
  </Value>
  <DefaultValue>No Accounts Found</DefaultValue>
  </ActivityMapVariable>

  <ActivityMapVariable>
  <VariableName>DebitCardList</VariableName>
  <Value>
   <xsl:for-each select="s:Envelope/s:Body/a:AcctSrchResponse/a:AcctSrchRecArray/a:AcctSrchRec[a:AccountId/a:AcctType='F' or a:AccountId/a:AcctType='I' or a:AccountId/a:AcctType='J' or a:AccountId/a:AcctType='U']">
   <xsl:value-of select="a:ProdDesc"/><xsl:text>&#32;</xsl:text>
   <xsl:value-of select="a:AccountId/a:AcctType"/><xsl:text>&#32;</xsl:text>
   <xsl:value-of select="a:AccountId/a:AcctId"/><xsl:text>&#10;</xsl:text>
   </xsl:for-each>
  </Value>
  <DefaultValue>No Cards Found</DefaultValue>
  </ActivityMapVariable>

  <ActivityMapVariable>
  <VariableName>SDBArray</VariableName>
  <Value>
   <xsl:for-each select="s:Envelope/s:Body/a:AcctSrchResponse/a:AcctSrchRecArray/a:AcctSrchRec[a:AccountId/a:AcctType='B']">
   <xsl:value-of select="a:ProdCode"/><xsl:text>&#32;</xsl:text>
   <xsl:value-of select="a:ProdDesc"/><xsl:text>&#32;</xsl:text>
   <xsl:value-of select="a:AcctStatDesc"/><xsl:text>&#32;</xsl:text>
   <xsl:value-of select="a:AccountId/a:AcctId"/><xsl:text>:±~</xsl:text>
   </xsl:for-each>
  </Value>
  <DefaultValue>No Safe Deposit Box Found</DefaultValue>
  </ActivityMapVariable>

  <ActivityMapVariable>
  <VariableName>LoanAccountArray</VariableName>
  <Value>
   <xsl:for-each select="s:Envelope/s:Body/a:AcctSrchResponse/a:AcctSrchRecArray/a:AcctSrchRec[a:AcctStat='1'][a:AccountId/a:AcctType='L' or a:AccountId/a:AcctType='O'][a:ProdCode='EN' or a:ProdCode='HE' or a:ProdCode='20' or a:ProdCode='52' or a:ProdCode='53' or a:ProdCode='54' or a:ProdCode='60' or a:ProdCode='25'or a:ProdCode='9M' or a:ProdCode='9K']">
   <xsl:value-of select="a:ProdCode"/><xsl:text>&#32;</xsl:text>
   <xsl:value-of select="a:ProdDesc"/><xsl:text>&#32;</xsl:text>
   <xsl:value-of select="a:AccountId/a:AcctType"/><xsl:text>&#32;</xsl:text>
   <xsl:value-of select="a:AccountId/a:AcctId"/><xsl:text>:±~</xsl:text>
   </xsl:for-each>
  </Value>
  <DefaultValue>No Loan Accounts Found</DefaultValue>
  </ActivityMapVariable>

 <ActivityMapVariable>
  <VariableName>SentRec</VariableName>
  <Value>
   <xsl:for-each select="s:Envelope/s:Body/a:AcctSrchResponse/a:SrchMsgRsHdr">
    <xsl:value-of select="a:SentRec"/><xsl:text></xsl:text>
   </xsl:for-each>
  </Value>
  <DefaultValue>0</DefaultValue>
 </ActivityMapVariable>
  
<ActivityMapVariable>
 <VariableName>WarningDetails</VariableName>
 <Value>
  <xsl:for-each select="s:Envelope/s:Body/*/a:MsgRsHdr/a:MsgRecInfoArray/a:MsgRec">Response Received:
   Code: <xsl:value-of select="a:ErrCode"/>
   Cat: <xsl:value-of select="a:ErrCat"/>
   Desc: <xsl:value-of select="a:ErrDesc"/>
   Elem: <xsl:value-of select="a:ErrElem"/>
   ElemVal: <xsl:value-of select="a:ErrElemVal"/>
   Loc: <xsl:value-of select="a:ErrLoc"/>
  <xsl:if test="position()!=last()"><xsl:text>&#10;&#10;</xsl:text></xsl:if>
  </xsl:for-each>
 </Value>
</ActivityMapVariable>      

<xsl:if test="not(/s:Envelope/s:Body/s:Fault/s:Detail/a:HdrFault/a:FaultRecInfoArray)">
<ActivityMapVariable>
 <VariableName>FaultDetails</VariableName>
 <Value>
  <xsl:text></xsl:text>
 </Value>
 </ActivityMapVariable>
 </xsl:if>
 </VariableMap>

</WorkflowTranslatedResponse> 
</xsl:template>
</xsl:stylesheet><!-- Stylus Studio meta-information - (c) 2004-2009. Progress Software Corporation. All rights reserved.

<metaInformation>
	<scenarios>
		<scenario default="no" name="Scenario1" userelativepaths="yes" externalpreview="no" url="LoanAccountsSource.xml" htmlbaseurl="" outputurl="" processortype="saxon8" useresolver="no" profilemode="0" profiledepth="" profilelength="" urlprofilexml=""
		          commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext="" validateoutput="no" validator="internal" customvalidator="">
			<advancedProp name="bSchemaAware" value="false"/>
			<advancedProp name="xsltVersion" value="2.0"/>
			<advancedProp name="bUseDTD" value="false"/>
			<advancedProp name="bXml11" value="false"/>
			<advancedProp name="bWarnings" value="true"/>
			<advancedProp name="iWhitespace" value="0"/>
			<advancedProp name="schemaCache" value="||"/>
			<advancedProp name="bXsltOneIsOkay" value="true"/>
			<advancedProp name="bTinyTree" value="true"/>
			<advancedProp name="bGenerateByteCode" value="true"/>
			<advancedProp name="iValidation" value="0"/>
			<advancedProp name="bExtensions" value="true"/>
			<advancedProp name="sInitialMode" value=""/>
			<advancedProp name="sInitialTemplate" value=""/>
			<advancedProp name="iErrorHandling" value="fatal"/>
		</scenario>
		<scenario default="yes" name="Cleaned XML File" userelativepaths="yes" externalpreview="no" url="LoanAccountsSourceClean.xml" htmlbaseurl="" outputurl="" processortype="msxmldotnet" useresolver="no" profilemode="0" profiledepth="" profilelength=""
		          urlprofilexml="" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext="" validateoutput="no" validator="internal"
		          customvalidator="">
			<advancedProp name="schemaCache" value="||"/>
		</scenario>
	</scenarios>
	<MapperMetaTag>
		<MapperInfo srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no">
			<SourceSchema srcSchemaPath="LoanAccountsSourceClean.xml" srcSchemaRoot="s:Envelope" AssociatedInstance="" loaderFunction="document" loaderFunctionUsesURI="no"/>
		</MapperInfo>
		<MapperBlockPosition>
			<template match="/">
				<block path="WorkflowTranslatedResponse/VariableMap/ActivityMapVariable/Value/xsl:for-each" x="510" y="60"/>
				<block path="WorkflowTranslatedResponse/VariableMap/ActivityMapVariable/Value/xsl:for-each/xsl:value-of" x="460" y="90"/>
				<block path="" x="460" y="123"/>
				<block path="WorkflowTranslatedResponse/VariableMap/ActivityMapVariable/Value/xsl:for-each/xsl:value-of[1]" x="380" y="90"/>
				<block path="WorkflowTranslatedResponse/VariableMap/ActivityMapVariable/Value/xsl:for-each/xsl:value-of[2]" x="300" y="90"/>
				<block path="WorkflowTranslatedResponse/VariableMap/ActivityMapVariable/Value/xsl:for-each/xsl:value-of[3]" x="220" y="90"/>
				<block path="WorkflowTranslatedResponse/VariableMap/ActivityMapVariable[1]/Value/xsl:for-each" x="510" y="132"/>
				<block path="WorkflowTranslatedResponse/VariableMap/ActivityMapVariable[1]/Value/xsl:for-each/xsl:value-of" x="460" y="162"/>
				<block path="WorkflowTranslatedResponse/VariableMap/ActivityMapVariable[1]/Value/xsl:for-each/xsl:value-of[1]" x="380" y="162"/>
				<block path="WorkflowTranslatedResponse/VariableMap/ActivityMapVariable[1]/Value/xsl:for-each/xsl:value-of[2]" x="300" y="162"/>
				<block path="WorkflowTranslatedResponse/VariableMap/ActivityMapVariable[2]/Value/xsl:for-each" x="510" y="93"/>
				<block path="WorkflowTranslatedResponse/VariableMap/ActivityMapVariable[2]/Value/xsl:for-each/xsl:value-of" x="420" y="123"/>
				<block path="WorkflowTranslatedResponse/VariableMap/ActivityMapVariable[2]/Value/xsl:for-each/xsl:value-of[1]" x="340" y="123"/>
				<block path="WorkflowTranslatedResponse/VariableMap/ActivityMapVariable[2]/Value/xsl:for-each/xsl:value-of[2]" x="260" y="123"/>
				<block path="WorkflowTranslatedResponse/VariableMap/ActivityMapVariable[3]/Value/xsl:for-each" x="110" y="93"/>
				<block path="WorkflowTranslatedResponse/VariableMap/ActivityMapVariable[3]/Value/xsl:for-each/xsl:value-of" x="180" y="123"/>
				<block path="WorkflowTranslatedResponse/VariableMap/ActivityMapVariable[3]/Value/xsl:for-each/xsl:value-of[1]" x="20" y="123"/>
				<block path="WorkflowTranslatedResponse/VariableMap/ActivityMapVariable[3]/Value/xsl:for-each/xsl:value-of[2]" x="20" y="83"/>
				<block path="WorkflowTranslatedResponse/VariableMap/ActivityMapVariable[4]/Value/xsl:for-each" x="350" y="53"/>
				<block path="WorkflowTranslatedResponse/VariableMap/ActivityMapVariable[4]/Value/xsl:for-each/xsl:value-of" x="420" y="43"/>
				<block path="WorkflowTranslatedResponse/VariableMap/ActivityMapVariable[4]/Value/xsl:for-each/xsl:value-of[1]" x="260" y="43"/>
				<block path="WorkflowTranslatedResponse/VariableMap/ActivityMapVariable[4]/Value/xsl:for-each/xsl:value-of[2]" x="180" y="43"/>
				<block path="WorkflowTranslatedResponse/VariableMap/ActivityMapVariable[4]/Value/xsl:for-each/xsl:value-of[3]" x="100" y="43"/>
				<block path="WorkflowTranslatedResponse/VariableMap/ActivityMapVariable[5]/Value/xsl:for-each" x="510" y="13"/>
				<block path="WorkflowTranslatedResponse/VariableMap/ActivityMapVariable[5]/Value/xsl:for-each/xsl:value-of" x="20" y="43"/>
				<block path="WorkflowTranslatedResponse/VariableMap/ActivityMapVariable[5]/Value/xsl:for-each/xsl:value-of[1]" x="180" y="163"/>
				<block path="WorkflowTranslatedResponse/VariableMap/ActivityMapVariable[5]/Value/xsl:for-each/xsl:value-of[2]" x="100" y="163"/>
				<block path="WorkflowTranslatedResponse/VariableMap/ActivityMapVariable[5]/Value/xsl:for-each/xsl:value-of[3]" x="20" y="163"/>
				<block path="WorkflowTranslatedResponse/VariableMap/ActivityMapVariable[6]/Value/xsl:for-each" x="350" y="13"/>
				<block path="WorkflowTranslatedResponse/VariableMap/ActivityMapVariable[6]/Value/xsl:for-each/xsl:value-of" x="500" y="203"/>
				<block path="WorkflowTranslatedResponse/VariableMap/ActivityMapVariable[7]/Value/xsl:for-each" x="310" y="213"/>
				<block path="WorkflowTranslatedResponse/VariableMap/ActivityMapVariable[7]/Value/xsl:for-each/xsl:value-of" x="260" y="203"/>
				<block path="WorkflowTranslatedResponse/VariableMap/ActivityMapVariable[7]/Value/xsl:for-each/xsl:value-of[1]" x="180" y="203"/>
				<block path="WorkflowTranslatedResponse/VariableMap/ActivityMapVariable[7]/Value/xsl:for-each/xsl:value-of[2]" x="100" y="203"/>
				<block path="WorkflowTranslatedResponse/VariableMap/ActivityMapVariable[7]/Value/xsl:for-each/xsl:value-of[3]" x="20" y="203"/>
				<block path="WorkflowTranslatedResponse/VariableMap/ActivityMapVariable[7]/Value/xsl:for-each/xsl:value-of[4]" x="460" y="123"/>
				<block path="WorkflowTranslatedResponse/VariableMap/ActivityMapVariable[7]/Value/xsl:for-each/xsl:value-of[5]" x="460" y="123"/>
				<block path="WorkflowTranslatedResponse/VariableMap/ActivityMapVariable[7]/Value/xsl:for-each/xsl:if" x="430" y="93"/>
				<block path="WorkflowTranslatedResponse/VariableMap/xsl:if" x="460" y="123"/>
			</template>
		</MapperBlockPosition>
		<TemplateContext></TemplateContext>
		<MapperFilter side="source"></MapperFilter>
	</MapperMetaTag>
</metaInformation>
-->