Edit this code so that the display of the month is in string. For example, Jan Feb Mar…
- User
Edit this code so that the display of the month is in string. For example, Jan Feb Mar Apr May Jun Jul. " <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml">
<xsl:output method="xml" indent="yes" encoding="UTF-8"/>
<xsl:template match="/forecast"> A2-T2G08-7893589,7894818(Law Tak Hong,Ng Zheng Dong table { table-layout: fixed; width: 75%; } <xsl:value-of select="@queryLocation" /> xsl:text [30/04/2023 11:30 PM]</xsl:text> <xsl:value-of select="@queryDate" />
<table border="1"> <tr bgcolor="#ffff00"> <th><b>Date</b></th> <th><b>Mon</b></th> <th><b>Tue</b></th> <th><b>Wed</b></th> <th><b>Thu</b></th> <th><b>Fri</b></th> <th><b>Sat</b></th> <th><b>Sun</b></th> </tr> <xsl:for-each select="weather"> <xsl:sort select="month" order="descending"/> <xsl:sort select="date" order="descending"/> <tr> <td bgcolor="#ffff00" align="center"> <xsl:value-of select="date"/> <xsl:text> / </xsl:text> <xsl:value-of select="month"/> </td> <td> </td> <td align="center"> <xsl:choose> <xsl:when test="@yyyymmdd='20220614'"> <xsl:value-of select="lowest"/> <xsl:text>°C - </xsl:text> <xsl:value-of select="highest"/> <xsl:text>°C</xsl:text> <div> <img style="float: top; margin-bottom: 5px;"> <xsl:attribute name="src"> <xsl:text>images/</xsl:text> <xsl:value-of select="overallCode"/> <xsl:text>.png</xsl:text> </xsl:attribute> <xsl:attribute name="width"> <xsl:text>50px</xsl:text> </xsl:attribute> </img> </div> <span style="color:orange"> <xsl:value-of select="overall"/> </span> </xsl:when> </xsl:choose> <xsl:choose> <xsl:when test="@yyyymmdd='20220412'"> <xsl:value-of select="lowest"/> <xsl:text>°C - </xsl:text> <xsl:value-of select="highest"/> <xsl:text>°C</xsl:text> <div> <img style="float: top; margin-bottom: 5px;"> <xsl:attribute name="src"> <xsl:text>images/</xsl:text> <xsl:value-of select="overallCode"/> <xsl:text>.png</xsl:text> </xsl:attribute> <xsl:attribute name="width"> <xsl:text>50px</xsl:text> </xsl:attribute> </img> </div> <span style="color:red"> <xsl:value-of select="overall"/> </span> </xsl:when> </xsl:choose> </td> <td align="center"> <xsl:choose> <xsl:when test="@yyyymmdd='20220608'"> <xsl:value-of select="lowest"/> <xsl:text>°C - </xsl:text> <xsl:value-of select="highest"/> <xsl:text>°C</xsl:text> <div> <img style="float: top; margin-bottom: 5px;"> <xsl:attribute name="src"> <xsl:text>images/</xsl:text> <xsl:value-of select="overallCode"/> <xsl:text>.png</xsl:text> </xsl:attribute> <xsl:attribute name="width"> <xsl:text>50px</xsl:text> </xsl:attribute> </img> </div> <span style="color:red"> <xsl:value-of select="overall"/> </span> </xsl:when> </xsl:choose> </td> <td align="center"> <xsl:choose> <xsl:when test="@yyyymmdd='20220505'"> <xsl:value-of select="lowest"/> <xsl:text>°C - </xsl:text> <xsl:value-of select="highest"/> <xsl:text>°C</xsl:text> <div> <img style="float: top; margin-bottom: 5px;"> <xsl:attribute name="src"> <xsl:text>images/</xsl:text> <xsl:value-of select="overallCode"/> <xsl:text>.png</xsl:text> </xsl:attribute> <xsl:attribute name="width"> <xsl:text>50px</xsl:text> </xsl:attribute> </img> </div> <span style="color:orange"> <xsl:value-of select="overall"/> </span> </xsl:when> </xsl:choose> </td> <td> </td> <td align="center"> <xsl:choose> <xsl:when test="@yyyymmdd='20220709'"> <xsl:value-of select="lowest"/> <xsl:text>°C - </xsl:text> <xsl:value-of select="highest"/> <xsl:text>°C</xsl:text> <div> <img style="float: top; margin-bottom: 5px;"> <xsl:attribute name="src"> <xsl:text>images/</xsl:text> <xsl:value-of select="overallCode"/> <xsl:text>.png</xsl:text> </xsl:attribute> <xsl:attribute name="width"> <xsl:text>50px</xsl:text> </xsl:attribute> </img> </div> <span style="color:orange"> <xsl:value-of select="overall"/> </span> </xsl:when> </xsl:choose> <xsl:choose> <xsl:when test="@yyyymmdd='20220611'"> <xsl:value-of select="lowest"/> <xsl:text>°C - </xsl:text> <xsl:value-of select="highest"/> <xsl:text>°C</xsl:text> <div> <img style="float: top; margin-bottom: 5px;"> <xsl:attribute name="src"> <xsl:text>images/</xsl:text> <xsl:value-of select="overallCode"/> <xsl:text>.png</xsl:text> </xsl:attribute> <xsl:attribute name="width"> <xsl:text>50px</xsl:text> </xsl:attribute> </img> </div> <span style="color:blue"> <xsl:value-of select="overall"/> </span> </xsl:when> </xsl:choose> </td> <td> </td> </tr> </xsl:for-each> </table> </body> </html> - Assistant
- User
print the full code after modification
- Assistant