<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" encoding="UTF-16"/>
	<xsl:template name="lov_lookup" match="*">
		<xsl:copy>
		<xsl:choose>
			<xsl:when test="starts-with(name(),'LOV_')">
			<xsl:variable name="LOV_Value" select="."/>
			<xsl:variable name="value-pick" select="document('d:/oexml/test_lov/eai_value_map.xml')/root"/>
			<xsl:variable name="Interface_Direction" select="'Siebel Inbound'"/>
			<xsl:variable name="LOV_String" select="name()"/>
			<xsl:variable name="LOV_Field" select="substring-after($LOV_String,'__')"/>
			<xsl:variable name="LOV_Type" select="substring($LOV_String,5,string-length($LOV_String) - 4 - string-length($LOV_Field)-2)"/>
			<xsl:value-of select="$value-pick/row[Direction = $Interface_Direction and Type = $LOV_Type and External_System_Value = $LOV_Value]/Siebel_Value"/>
	  		</xsl:when>
		</xsl:choose>
		</xsl:copy>
	</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="no" externalpreview="no" url="file:///d:/oexml/test_lov/test_xx.xml" htmlbaseurl="" outputurl="file:///d:/oexml/test_lov/test_xx1.xml" processortype="xalan" useresolver="yes" 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="..\dest.xsd" destSchemaRoot="SiebelMessage" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no" ><SourceSchema srcSchemaPath="..\oexml_r1.xsd" srcSchemaRoot="OEXML" AssociatedInstance="file:///d:/oexml/test_a1.xml" loaderFunction="document" loaderFunctionUsesURI="no"/><SourceSchema srcSchemaPath="eai_value_map.xml" srcSchemaRoot="root" AssociatedInstance="file:///d:/oexml/test_lov/eai_value_map.xml" loaderFunction="document" loaderFunctionUsesURI="no"/></MapperInfo><MapperBlockPosition><template match="/"><block path="a:SiebelMessage/xsl:attribute[1]/xsl:for&#x2D;each/xsl:if/=[0]" x="217" y="70"/><block path="a:SiebelMessage/xsl:attribute[1]/xsl:for&#x2D;each/xsl:if" x="263" y="72"/></template><template match="*"></template></MapperBlockPosition><TemplateContext></TemplateContext><MapperFilter side="source"></MapperFilter></MapperMetaTag>
</metaInformation>
-->