<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:output method="xml" indent="yes" encoding="ISO-8859-1"/>

	<xsl:strip-space elements="*"/>
	<xsl:template match="/">

			<OIT>
			<xsl:for-each select="FS_XML_Export/Claim">	
			<xsl:variable name="empty_string"/>
				<data>
				<xsl:if test="CompanyCode != $empty_string">
					<application>
						<xsl:attribute name="id">Figtree</xsl:attribute>
						<xsl:attribute name="version">1.0</xsl:attribute>
						<xsl:attribute name="xslversion">1.0.0</xsl:attribute>
						<xsl:attribute name="database">Default</xsl:attribute>
					</application>
					<entities>
						<entity>
							<xsl:attribute name="type">organization</xsl:attribute>
							<xsl:attribute name="action">CreatedOrModified</xsl:attribute>
						</entity>
					</entities>
					<Attributes>
						<Attribute>
							<xsl:attribute name="id">CompanyCode</xsl:attribute>
							<xsl:attribute name="value">
							<xsl:value-of select="CompanyCode"/>
							</xsl:attribute>
						</Attribute>
						<Attribute>
							<xsl:attribute name="id">Company</xsl:attribute>
							<xsl:attribute name="value">
							<xsl:value-of select="Company"/>
							</xsl:attribute>
						</Attribute>
					</Attributes>
				</xsl:if>
				</data>
				<data>
				<xsl:if test="ClaimNo != $empty_string">
					<application>
						<xsl:attribute name="id">Figtree</xsl:attribute>
						<xsl:attribute name="version">1.0</xsl:attribute>
						<xsl:attribute name="xslversion">1.0.0</xsl:attribute>
						<xsl:attribute name="database">Default</xsl:attribute>
					</application>
					<entities>
						<entity>
							<xsl:attribute name="type">claimant</xsl:attribute>
							<xsl:attribute name="action">CreatedOrModified</xsl:attribute>
						</entity>
					</entities>
					<Attributes>
						<Attribute>
							<xsl:attribute name="id">CompanyCode</xsl:attribute>
							<xsl:attribute name="value">
							<xsl:value-of select="CompanyCode"/>
							</xsl:attribute>
						</Attribute>
						<Attribute>
							<xsl:attribute name="id">Surname</xsl:attribute>
							<xsl:attribute name="value">
							<xsl:value-of select="Surname"/>
							</xsl:attribute>
						</Attribute>
						<Attribute>
							<xsl:attribute name="id">OtherNameS</xsl:attribute>
							<xsl:attribute name="value">
							<xsl:value-of select="OtherNameS"/>
							</xsl:attribute>
						</Attribute>
						<Attribute>
							<xsl:attribute name="id">ClaimNo</xsl:attribute>
							<xsl:attribute name="value">
							<xsl:value-of select="ClaimNo"/>
							</xsl:attribute>
						</Attribute>
						<Attribute>
							<xsl:attribute name="id">IncidentDate</xsl:attribute>
							<xsl:attribute name="value">
							<xsl:value-of select="IncidentDate"/>
							</xsl:attribute>
						</Attribute>
					</Attributes>
				</xsl:if>
				</data>
				<data>
				<xsl:if test="ClaimNo != $empty_string">
					<application>
						<xsl:attribute name="id">Figtree</xsl:attribute>
						<xsl:attribute name="version">1.0</xsl:attribute>
						<xsl:attribute name="xslversion">1.0.0</xsl:attribute>
						<xsl:attribute name="database">Default</xsl:attribute>
					</application>
				
					<entities>
						<entity>
							<xsl:attribute name="type">claim</xsl:attribute>
							<xsl:attribute name="action">CreatedOrModified</xsl:attribute>
						</entity>
					</entities>
					<Attributes>
						<Attribute>
							<xsl:attribute name="id">CompanyCode</xsl:attribute>
							<xsl:attribute name="value">
							<xsl:value-of select="CompanyCode"/>
							</xsl:attribute>
						</Attribute>
						<Attribute>
							<xsl:attribute name="id">ClaimNo</xsl:attribute>
							<xsl:attribute name="value">
							<xsl:value-of select="ClaimNo"/>
							</xsl:attribute>
						</Attribute>
						<Attribute>
							<xsl:attribute name="id">IncidentDate</xsl:attribute>
							<xsl:attribute name="value">
							<xsl:value-of select="IncidentDate"/>
							</xsl:attribute>
						</Attribute>
					</Attributes>
				</xsl:if>
				</data>
			</xsl:for-each>	
		</OIT>
	</xsl:template>
</xsl:stylesheet><!-- Stylus Studio meta-information - (c) 2004-2008. Progress Software Corporation. All rights reserved.

<metaInformation>
	<scenarios>
		<scenario default="no" name="Scenario1" userelativepaths="yes" externalpreview="no" url="..\Bais\Examples\Bais\poli1.xml" htmlbaseurl="" outputurl="..\Bais\Examples\Bais\result2.xml" processortype="saxon8" useresolver="yes" profilemode="0"
		          profiledepth="" profilelength="" urlprofilexml="" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext="" validateoutput="no"
		          validator="internal" customvalidator="">
			<advancedProp name="sInitialMode" value=""/>
			<advancedProp name="bXsltOneIsOkay" value="true"/>
			<advancedProp name="bSchemaAware" value="true"/>
			<advancedProp name="bXml11" value="false"/>
			<advancedProp name="iValidation" value="0"/>
			<advancedProp name="bExtensions" value="true"/>
			<advancedProp name="iWhitespace" value="0"/>
			<advancedProp name="sInitialTemplate" value=""/>
			<advancedProp name="bTinyTree" value="true"/>
			<advancedProp name="bWarnings" value="true"/>
			<advancedProp name="bUseDTD" value="false"/>
			<advancedProp name="iErrorHandling" value="fatal"/>
		</scenario>
		<scenario default="no" name="Scenario2" userelativepaths="yes" externalpreview="no" url="..\Bais\Examples\Bais\BAIS_PolicyNumber_Example.xml" htmlbaseurl="" outputurl="..\Bais\Examples\Bais\result3.xml" processortype="saxon8" useresolver="yes"
		          profilemode="0" profiledepth="" profilelength="" urlprofilexml="" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext=""
		          validateoutput="no" validator="internal" customvalidator="">
			<advancedProp name="sInitialMode" value=""/>
			<advancedProp name="bXsltOneIsOkay" value="true"/>
			<advancedProp name="bSchemaAware" value="true"/>
			<advancedProp name="bXml11" value="false"/>
			<advancedProp name="iValidation" value="0"/>
			<advancedProp name="bExtensions" value="true"/>
			<advancedProp name="iWhitespace" value="0"/>
			<advancedProp name="sInitialTemplate" value=""/>
			<advancedProp name="bTinyTree" value="true"/>
			<advancedProp name="bWarnings" value="true"/>
			<advancedProp name="bUseDTD" value="false"/>
			<advancedProp name="iErrorHandling" value="fatal"/>
		</scenario>
		<scenario default="no" name="Scenario3" userelativepaths="yes" externalpreview="no" url="..\Bais\Examples\Bais\BAIS_PolicyNumber_Example.xml" htmlbaseurl="" outputurl="..\Bais\Examples\Bais\result1.xml" processortype="saxon8" useresolver="yes"
		          profilemode="0" profiledepth="" profilelength="" urlprofilexml="" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext=""
		          validateoutput="no" validator="internal" customvalidator="">
			<advancedProp name="sInitialMode" value=""/>
			<advancedProp name="bXsltOneIsOkay" value="true"/>
			<advancedProp name="bSchemaAware" value="true"/>
			<advancedProp name="bXml11" value="false"/>
			<advancedProp name="iValidation" value="0"/>
			<advancedProp name="bExtensions" value="true"/>
			<advancedProp name="iWhitespace" value="0"/>
			<advancedProp name="sInitialTemplate" value=""/>
			<advancedProp name="bTinyTree" value="true"/>
			<advancedProp name="bWarnings" value="true"/>
			<advancedProp name="bUseDTD" value="false"/>
			<advancedProp name="iErrorHandling" value="fatal"/>
		</scenario>
		<scenario default="no" name="Scenario4" userelativepaths="yes" externalpreview="no" url="" htmlbaseurl="" outputurl="" processortype="saxon8" useresolver="yes" profilemode="0" profiledepth="" profilelength="" urlprofilexml="" commandline=""
		          additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext="" validateoutput="no" validator="internal" customvalidator="">
			<advancedProp name="sInitialMode" value=""/>
			<advancedProp name="bXsltOneIsOkay" value="true"/>
			<advancedProp name="bSchemaAware" value="true"/>
			<advancedProp name="bXml11" value="false"/>
			<advancedProp name="iValidation" value="0"/>
			<advancedProp name="bExtensions" value="true"/>
			<advancedProp name="iWhitespace" value="0"/>
			<advancedProp name="sInitialTemplate" value=""/>
			<advancedProp name="bTinyTree" value="true"/>
			<advancedProp name="bWarnings" value="true"/>
			<advancedProp name="bUseDTD" value="false"/>
			<advancedProp name="iErrorHandling" value="fatal"/>
		</scenario>
		<scenario default="no" name="Scenario5" userelativepaths="yes" externalpreview="no" url="..\SAMPLE_XML_SCHEMA.xml" htmlbaseurl="" outputurl="..\result2.xml" processortype="saxon8" useresolver="yes" profilemode="0" profiledepth="" profilelength=""
		          urlprofilexml="" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext="" validateoutput="no" validator="internal"
		          customvalidator="">
			<advancedProp name="sInitialMode" value=""/>
			<advancedProp name="bXsltOneIsOkay" value="true"/>
			<advancedProp name="bSchemaAware" value="true"/>
			<advancedProp name="bXml11" value="false"/>
			<advancedProp name="iValidation" value="0"/>
			<advancedProp name="bExtensions" value="true"/>
			<advancedProp name="iWhitespace" value="0"/>
			<advancedProp name="sInitialTemplate" value=""/>
			<advancedProp name="bTinyTree" value="true"/>
			<advancedProp name="bWarnings" value="true"/>
			<advancedProp name="bUseDTD" value="false"/>
			<advancedProp name="iErrorHandling" value="fatal"/>
		</scenario>
		<scenario default="yes" name="Scenario6" userelativepaths="yes" externalpreview="no" url="Xmls\figtree_proclaim_17052010.xml" htmlbaseurl="" outputurl="Xmls\figtreeresul1.xml" processortype="saxon8" useresolver="yes" profilemode="0" profiledepth=""
		          profilelength="" urlprofilexml="" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext="" validateoutput="no" validator="internal"
		          customvalidator="">
			<advancedProp name="sInitialMode" value=""/>
			<advancedProp name="bXsltOneIsOkay" value="true"/>
			<advancedProp name="bSchemaAware" value="true"/>
			<advancedProp name="bXml11" value="false"/>
			<advancedProp name="iValidation" value="0"/>
			<advancedProp name="bExtensions" value="true"/>
			<advancedProp name="iWhitespace" value="0"/>
			<advancedProp name="sInitialTemplate" value=""/>
			<advancedProp name="bTinyTree" value="true"/>
			<advancedProp name="bWarnings" value="true"/>
			<advancedProp name="bUseDTD" value="false"/>
			<advancedProp name="iErrorHandling" value="fatal"/>
		</scenario>
	</scenarios>
	<MapperMetaTag>
		<MapperInfo srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no">
			<SourceSchema srcSchemaPath="Examples\Bais\BAIS_ClaimNumber_Example.xml" srcSchemaRoot="BAIS" AssociatedInstance="" loaderFunction="document" loaderFunctionUsesURI="no"/>
		</MapperInfo>
		<MapperBlockPosition>
			<template match="/"></template>
			<template match="Associates"></template>
			<template match="BAIS"></template>
		</MapperBlockPosition>
		<TemplateContext></TemplateContext>
		<MapperFilter side="source"></MapperFilter>
	</MapperMetaTag>
</metaInformation>
-->