I want to continue to check for other if statements if the first one is met. From what I read, Choose statement does not have this functionality like other languages do. One post suggested to just run multiple if statements but this is not working. After the first if statement is met it stops there, I want it to keep running.
How can I achieve this? This is my code:
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output indent="yes" omit-xml-declaration="yes"/>
<xsl:template match="root">
{
"entityList":
[
<xsl:for-each select="//entityList">
{
"notes":"<xsl:call-template name="replace">
<xsl:with-param name="text" select="./Notes"/>
</xsl:call-template>",
} <xsl:if test="position() != last()">,</xsl:if>
</xsl:for-each>
]
}
</xsl:template>
<xsl:template name="replace">
<xsl:param name="text"/>
<xsl:param name="searchString">"</xsl:param>
<xsl:param name="replaceString">\"</xsl:param>
<xsl:param name="searchStringSpace">	</xsl:param>
<xsl:param name="searchStringBackslash">\</xsl:param>
<xsl:if test="contains($text,$searchString)">
<xsl:value-of select="replace(./Notes,'"','\\"')"/>
</xsl:if>
<xsl:if test="contains($text,$searchStringSpace)">
<xsl:value-of select="replace(./Notes,'	','\\t')"/>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
<root>
<totalRecords>429</totalRecords>
<offset>0</offset>
<entityList>
<Notes>Dear Deans, Chairs and "Directors,There was a 	ANDOR question about scheduling Mac Hall Auditorium,for regular classes and policy/procedure around it.,Mac Hall Auditorium was intended to be available as a,regular classroom. That is why the seats have built-in mini,desks.,Your programs are welcome to schedule classes in,Mac Auditorium - you can request it when submitting your,course schedules for the Semester or through the Schedule,Change Request Form.,There are, however, some conditions:,1)faculty members who teach in Mac Auditorium should,anticipate that their class may be displaced if the,University-wide function (president?s address, a conference,,etc.) is scheduled at the time of their class. It would be,up to the faculty to either reschedule that,class meeting for a different time, find another room/space,or substitute the class meeting with an alternative activity,There is no easy way to inform faculty about the upcoming,events, so they would have to watch University Calendar to,determine when their classes might be affected.,2)Mac Hall will be unavailable for scheduling regular,courses during evening hours (6-10 pm) ? that time will be,set aside for Pegasus Players practices.,Natalia F. Blank, Ph.D. 2/17/21</Notes>
</entityList>
<totalPages>1</totalPages>
<page>0</page>
<status>success</status>
</root>