Situation:
The XSL keywords such as xml, xmlns as a field or attribute inside a node in Data Mapper is not supported in XSL direct or through custom XSL. When we try to use that the XSL becomes invalid and throws below error: “Invalid attribute name “error.
Example:
Xmlns Field:
<xsl:attribute name="xmlns">
<xsl:value-of select="'P'"/>
</xsl:attribute>
Error:
"Invalid attribute name: xmlns "
Note: This error does not occur with upper case such as ‘XMLNS' as it is case sensitive.
Reason:
This issue occurs as the XSL transformer treats it as the keyword and unable to parse it.
Solution:
There is a workaround using which we can achieve this but there is drawback that after using this approach, you have to follow same steps again in case you want to modify any mapping rule. Below are the steps:
- First of all perform required mapping on all elements and nodes at the target side.
- In our case we are trying to add xmls attribute in Claim node. For this, go to the Mapping XSL tab and copy the complete XSL for the Claim node. See screenshot below:
3. Create a ‘Custom XSL before’ at the Claim node and paste the copied rules in it. After pasting, write the attribute name with its value in node tag.
Example: < Claim xmlns = ‘P'>
4. Now, Filter the mapping rule at Claim node to avoid duplicacy by defining the following condition in the textual rule of Claim node.
IFF CONDITION{1=2} VALUE=[true]
Comments
0 comments
Article is closed for comments.