on 02-09-2010 12:34 PM
Hi
In XSL mapping how do i check the existince of a field in the source node
For example we have 'exists' function in Message Mapping. How can we acheive this in XSL mapping
-keerthi
Hi Keerthi,
you can achieve that indirect:
<xsl:if select="string-length(//mySourceField) > 0">
<do>something</do>
</xsl:if>
Regards,
Udo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
I have a node like this
<Document_Numer> </Document_Number> to be filled buy XSL mapping
The pesedo code is
if Substring("some string value",5,2) is empty, then the <Document_Numbe> should be Substring("some string value",5,3)
if Substring("some string value",5,2) is not empty then <Document_Numbe> should be Substring("some string value",5,2)
How do i acheive this xslt. can anyone help me with the XSL code for this please
-Keerthi
Hi Keerthi,
Perhaps some variation of the following will help:
<Document_Number>
<xsl:choose>
<xsl:when test="normalize-space(substring(myNode, 5, 2)) = ''">
<xsl:value-of select="substring(myNode, 5, 3)"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="substring(myNode, 5, 2)"/>
</xsl:otherwise>
</xsl:choose>
</Document_Number>
-Russ
Hi,
You can also try this:
Create " B" at the target if "A" field is there at the source:
<xsl:if test="A">
<B> </B>
</xsl:if>
Thanks
Amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.