This is another issue in my never-ending saga of trying to create a Process.CustomerPartyMaster BOD from a CSV file. I created another file mapping for this particular part of the project because the previous one I created was getting an error to the tune of, "Reason: An attribute node (type) cannot be created after a child of the containing element. Most recent element start tag was output at line 651 of module." I tried some of the fixes Mike responded with, but they didn't seem to want to work. So i figured I'd start from scratch and see where it led me.
I re-created the File Mapping for the CSV to Process.CustomerPartyMaster and I used some of the information provided in the post "Cross_Reference Table in ION Desk Mapping", specifically the post about adding the custom defined function and the XSLT code to do the cross-referencing I need. After all of this has been completed, I sent through the CSV file to see what would happen.
The process failed and generated an error BOD, and it seems pretty generic: "com.infor.ion.container.common.exception.ServiceContainerException: Transformer could not transform message. Reason: There is no context item." I've done some searching to find out what would cause this, but I haven't found anything that would help. I'm guessing I need to add something to the code in the custom defined function?
Here is the code in the custom defined function:
<xsl:choose>
<xsl:when test="$question_2='TX'">1</xsl:when>
<xsl:when test="$question_2='SD'">1</xsl:when>
<xsl:when test="$question_2='NY'">1</xsl:when>
<xsl:when test="$question_2='ND'">1</xsl:when>
<xsl:when test="$question_2='MS'">1</xsl:when>
<xsl:when test="$question_2='MN'">1</xsl:when>
<xsl:when test="$question_2='WI'">2</xsl:when>
<xsl:when test="$question_2='VT'">2</xsl:when>
<xsl:when test="$question_2='VA'">2</xsl:when>
<xsl:when test="$question_2='TN'">2</xsl:when>
<xsl:when test="$question_2='SC'">2</xsl:when>
<xsl:when test="$question_2='RI'">2</xsl:when>
<xsl:when test="$question_2='PA'">2</xsl:when>
<xsl:when test="$question_2='OH'">2</xsl:when>
<xsl:when test="$question_2='NJ'">2</xsl:when>
<xsl:when test="$question_2='NH'">2</xsl:when>
<xsl:when test="$question_2='NC'">2</xsl:when>
<xsl:when test="$question_2='MI'">2</xsl:when>
<xsl:when test="$question_2='ME'">2</xsl:when>
<xsl:when test="$question_2='MA'">2</xsl:when>
<xsl:when test="$question_2='IL'">2</xsl:when>
<xsl:when test="$question_2='GA'">2</xsl:when>
<xsl:when test="$question_2='FL'">2</xsl:when>
<xsl:when test="$question_2='DE'">2</xsl:when>
<xsl:when test="$question_2='NE'">3</xsl:when>
<xsl:when test="$question_2='IA'">3</xsl:when>
<xsl:when test="$question_2='WY'">4</xsl:when>
<xsl:when test="$question_2='NM'">4</xsl:when>
<xsl:when test="$question_2='MT'">4</xsl:when>
<xsl:when test="$question_2='CO'">4</xsl:when>
<xsl:when test="$question_2='OK'">5</xsl:when>
<xsl:when test="$question_2='MO'">5</xsl:when>
<xsl:when test="$question_2='LA'">5</xsl:when>
<xsl:when test="$question_2='KS'">5</xsl:when>
<xsl:when test="$question_2='AR'">5</xsl:when>
<xsl:when test="$question_2='UT'">6</xsl:when>
<xsl:when test="$question_2='NV'">7</xsl:when>
<xsl:when test="$question_2='CA'">7</xsl:when>
<xsl:when test="$question_2='AZ'">7</xsl:when>
<xsl:when test="$question_2='AL'">7</xsl:when>
<xsl:when test="$question_2='WA'">8</xsl:when>
<xsl:when test="$question_2='HI'">8</xsl:when>
<xsl:when test="$question_2='AK'">8</xsl:when>
<xsl:when test="$question_2='OR'">9</xsl:when>
<xsl:when test="$question_2='ID'">9</xsl:when>
<xsl:when test="$question_2='WV'">13</xsl:when>
<xsl:when test="$question_2='MD'">13</xsl:when>
<xsl:when test="$question_2='KY'">13</xsl:when>
<xsl:when test="$question_2='IN'">13</xsl:when>
<xsl:when test="$question_2='CT'">13</xsl:when>
<xsl:otherwise>Default Value</xsl:otherwise>
</xsl:choose>
Thank you,
Trevor Bensen