Hello,
I am attempting to use the ION Graphical mapper to map SourceSystemJournalEntry to a custom BOD. With each line I need to grab the value of specific child nodes based on attributes. So far, I have not been able to get this working. Note, I can use a manually entered XSL and achieve this easily. I am trying to use the graphical mapper.
Using the user defined functions, how do I pass in attributes so a specific node from the list is selected?
Here is a sample of my input XML:

Here is the manually entered XSL I am trying to replicate:
<xsl:for-each select="/SyncSourceSystemJournalEntry/DataArea/SourceSystemJournalEntry/JournalEntryLine">
<Details>
<Cost_Center><xsl:value-of select="DimensionCodes/DimensionCode[
@sequence='1']"/></Cost_Center>
<Credit_or_Debit><xsl:value-of select="substring(DebitCreditFlag,1,1)"/></Credit_or_Debit>
<GL_Account_for_Debit><xsl:value-of select="DimensionCodes/DimensionCode[
@sequence='7']"/></GL_Account_for_Debit>
<Description><xsl:value-of select="UserArea/Property/NameValue[
@name='eam.GLReference1']"/></Description>
<Amount><xsl:value-of select="Amount"/></Amount>
</Details>
</xsl:for-each>
For the DimensionCodes/DimensionCode I can create a user defined function and grab either [1] or [7] from the input list and that works, but only if all 7 elements exist. If one is missing (i.e.
@sequence=6 is not in the XML) I get an empty output node. This makes sense because it is based on location in the array rather than the attribute value.
It seems in my user defined function I am only getting the values form the child nodes without their attributes.
Any input or pointers on how to achieve an [
@attribute=value] selection in a user defined function?
Thank you,
James Crow