
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:output method="xml" indent="yes"/>


	<xsl:template name="textToXML">
		<xsl:param name="thisString"/>

		<xsl:variable name="current" select="substring-before($thisString,  ';')"/>
		<xsl:if test="$current">
			<IDResponse QuestionID="{substring-before($current, '-')}" AnswerID="{substring-after($current, '-')}"/>
		</xsl:if>

		<xsl:variable name="following" select="substring-after($thisString,  ';')"/>
		<xsl:if test="$following">
			<xsl:call-template name="textToXML">
				<xsl:with-param name="thisString" select="$following"/>
			</xsl:call-template>
		</xsl:if>
	</xsl:template>



	<xsl:template match="/">
		<xsl:variable name="edQuestions" select="//variable[@name='lookupCourse']/text()"/>
		<xsl:variable name="genQuestions" select="//variable[@name='lookupGeneral']/text()"/>
		<EducationConnectionLeads>
			<LeadSubjectSelections>
				<Selection>
					<xsl:attribute name="InterestAreaID">
						<xsl:variable name="whatQuestion" select="'area of interest'"/>
						<xsl:value-of select="translate(substring-before(substring-after($edQuestions, $whatQuestion), ';'), '-','')"/>
						<!--<xsl:value-of select="user:getAnswer($edQuestions,'area of interest')"/>-->
					</xsl:attribute>
					<xsl:attribute name="SubjectCategoryID">
						<xsl:variable name="whatQuestion" select="'course'"/>
						<xsl:value-of select="translate(substring-before(substring-after($edQuestions, $whatQuestion), ';'), '-','')"/>
						<!--<xsl:value-of select="user:getAnswer($edQuestions,'course')"/>-->
					</xsl:attribute>
				</Selection>
			</LeadSubjectSelections>
			<LeadSurvey>
				<xsl:call-template name="textToXML">
					<xsl:with-param name="thisString" select="$genQuestions"/>
				</xsl:call-template>
				<!--<xsl:value-of select="user:makeXml($genQuestions)"/>-->
			</LeadSurvey>
		</EducationConnectionLeads>
	</xsl:template>
</xsl:stylesheet><!-- Stylus Studio meta-information - (c) 2004-2006. Progress Software Corporation. All rights reserved.
<metaInformation>
<scenarios ><scenario default="yes" name="Scenario1" userelativepaths="yes" externalpreview="no" url="samplexml.xml" htmlbaseurl="" outputurl="" processortype="msxmldotnet" useresolver="no" profilemode="0" profiledepth="" profilelength="" urlprofilexml="" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext="" validateoutput="no" validator="internal" customvalidator=""/></scenarios><MapperMetaTag><MapperInfo srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no" ><SourceSchema srcSchemaPath="edConnectCallXml.xml" srcSchemaRoot="call_data" AssociatedInstance="" loaderFunction="document" loaderFunctionUsesURI="no"/></MapperInfo><MapperBlockPosition><template match="/"></template></MapperBlockPosition><TemplateContext></TemplateContext><MapperFilter side="source"></MapperFilter></MapperMetaTag>
</metaInformation>
-->