Trim XML output with xsl

I have an xml element <day>SUN</day> that I am parsing with asp and outputting to a wireless app that I need to trim so that the output is 'SU'
maulerAsked:
Who is Participating?
 
Geert BormansInformation ArchitectCommented:
Hi mauler,

if you just need the first two characters, it is pretty simple

    <xsl:template match="day">
        <xsl:value-of select="substring(.,1,2)"/>
    </xsl:template>

if you need a specific mapping, individually for each day,
it requires a bit more work,
let me know if that is the case

Cheers!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.