Comparing two elements in XSLT
-
I have two elements in a XSLT
"/glcim:lcim/glcim:applicant-details/glcim:applicant-reference"
and
"/glcim:lcim/glcim:applicant-details/glcim:applicant-reference_new"
I want to compare the value of these two elements and if they differ in value
i want to populate the value of glcim:applicant-reference_new into ApplicationId fieldcan i get an XSLT code for it please
Right now I have
"RefId":" ",
which populates the RefId with the value of /glcim:lcim/glcim:applicant-details/glcim:applicant-reference
But I would like to populate RefId with "/glcim:lcim/glcim:applicant-details/glcim:applicant-reference_new"
only if the values of glcim:applicant-reference_new differ from glcim:applicant-reference else Skip populating the RefidANy XSLT code would be greatly appreciated
-
I have two elements in a XSLT
"/glcim:lcim/glcim:applicant-details/glcim:applicant-reference"
and
"/glcim:lcim/glcim:applicant-details/glcim:applicant-reference_new"
I want to compare the value of these two elements and if they differ in value
i want to populate the value of glcim:applicant-reference_new into ApplicationId fieldcan i get an XSLT code for it please
Right now I have
"RefId":" ",
which populates the RefId with the value of /glcim:lcim/glcim:applicant-details/glcim:applicant-reference
But I would like to populate RefId with "/glcim:lcim/glcim:applicant-details/glcim:applicant-reference_new"
only if the values of glcim:applicant-reference_new differ from glcim:applicant-reference else Skip populating the RefidANy XSLT code would be greatly appreciated
Try:
<xsl:if test="/glcim:lcim/glcim:applicant-details/glcim:applicant-reference != /glcim:lcim/glcim:applicant-details/glcim:applicant-reference_new">
xsl:text"RefId":"</xsl:text>
<xsl:value-of select="/glcim:lcim/glcim:applicant-details/glcim:applicant-reference_new" />
xsl:text",</xsl:text>
</xsl:if>xsl:if Element | Microsoft Docs[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
-
Try:
<xsl:if test="/glcim:lcim/glcim:applicant-details/glcim:applicant-reference != /glcim:lcim/glcim:applicant-details/glcim:applicant-reference_new">
xsl:text"RefId":"</xsl:text>
<xsl:value-of select="/glcim:lcim/glcim:applicant-details/glcim:applicant-reference_new" />
xsl:text",</xsl:text>
</xsl:if>xsl:if Element | Microsoft Docs[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
But I would like to populate RefId with "/glcim:lcim/glcim:applicant-details/glcim:applicant-reference_new"
https://et20slam.net/aa-vs-wf-live-score-super-smash-2020-21/