Hello,
What i am trying to do is take the variable $courseID frmo the below xslt sheet and explode it on _. So far i have not had any luck, does anyone have any suggestions? Thanks!
What i am trying to do is take the variable $courseID frmo the below xslt sheet and explode it on _. So far i have not had any luck, does anyone have any suggestions? Thanks!
Code:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="[URL unfurl="true"]http://www.w3.org/1999/XSL/Transform">[/URL]
<xsl:template match="/">
<instrcourses>
<xsl:for-each select="//membership">
<course>
<xsl:attribute name="id">
<xsl:value-of select="sourcedid/id" />
</xsl:attribute>
<xsl:variable name="courseID">
<xsl:value-of select="sourcedid/id" />
</xsl:variable>
<courseid>
<xsl:value-of select="sourcedid/id" />
</courseid>
<xsl:for-each select="member">
<user>
<courseid><xsl:value-of select="$courseID" /></courseid>
<idnumber><xsl:value-of select="sourcedid/id" /></idnumber>
<role><xsl:value-of select="role/@roletype" /></role>
</user>
</xsl:for-each>
</course>
</xsl:for-each>
</instrcourses>
</xsl:template>
</xsl:stylesheet>