I'm still learning XSL and I'm trying to change the value I'm getting from the XSL to another value. (I'm using an online website to convert my XML to another XML using XSL)
XML
<?xml version="1.0" encoding="UTF-8"?>
<Person>
<Student>
<Info Name="Jen" Age="20" Class="C" />
</Student>
<Student>
<Info Name="Sam" Age="21" Class="B" />
</Student>
</Person>
lets say there are many students(with same name even)
XSLT
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
<xsl:template match="Person">
<Person>
<lookuptable>
<name first="Jen" ori="Jenny" />
<name first="Sam" ori="Sammy" />
</lookuptable>
<xsl:for-each select="Student">
<Info Name="{Info/@Name}" Age="{Info/@Age}" Class="{Info/@Class}" />
</xsl:for-each>
</Person>
</xsl:template>
</xsl:stylesheet>
i created a lookuptable
the output is
<?xml version="1.0" encoding="UTF-8"?>
<Person>
<lookuptable>
<name ori="Jenny" first="Jen" />
<name ori="Sammy" first="Sam" />
</lookuptable>
<Info Class="C" Age="20" Name="Jen" />
<Info Class="B" Age="21" Name="Sam" />
</Person>
i want to change my output, meaning each time "Jen" appears i want it to be "Jenny" etc. using my lookuptable. how can i achieve this? or is it easier to create another XSL to convert output (the last XML) to the requirement i need? thanks in advance..