Page 1 of 1

How do I display all the date of birth from a node?

Posted: Thu Nov 13, 2014 8:57 pm
by winkimjr2
How do I change my xslt code so that the 3 date of birth I have in my xml document are show in the output like this:

I want my output to look like this

Code: Select all


<ext:PersonBirthDate ext:approximateDateIndicator="false" ext:currentIndicator="true">1956-05-21</ext:PersonBirthDate>
<ext:PersonBirthDate ext:approximateDateIndicator="true" ext:currentIndicator="false">1956-03-04</ext:PersonBirthDate>
<ext:PersonBirthDate ext:approximateDateIndicator="false" ext:currentIndicator="false">1956-04-21</ext:PersonBirthDate>
My xml document

Code: Select all


<Party ID="76" InternalPartyID="18">
<Gender Word="F ">Female</Gender>
<ApproximateDOB>03/4/1956</ApproximateDOB>
<DateOfBirth Current="true">05/21/1956</DateOfBirth>
<DateOfBirth>04/21/1956</DateOfBirth>
</Party>
My xslt code. I need help to change or add to this code in order to get the output I want shown here above.

Code: Select all


<ext:PersonBirthDate>
<xsl:choose>
<xsl:when test="DateOfBirth[@Current='true']">
<xsl:attribute name="ext:approximateDateIndicator">false</xsl:attribute>
<xsl:attribute name="ext:currentIndicator">true</xsl:attribute>
<xsl:value-of select="mscef:formatDate(string(DateOfBirth[@Current='true']))"/>
</xsl:when>
<xsl:when test="ApproximateDOB">
<xsl:attribute name="ext:approximateDateIndicator">true</xsl:attribute>
<xsl:attribute name="ext:currentIndicator">true</xsl:attribute>
<xsl:value-of select="mscef:formatDate(string(ApproximateDOB))"/>
</xsl:when>
</xsl:choose>
</ext:PersonBirthDate>

Re: How do I display all the date of birth from a node?

Posted: Fri Nov 14, 2014 5:37 pm
by winkimjr2
I was able to resolve this one.