<?xml version="1.0" encoding="UTF-8"?>
<!--
This file was generated by Altova MapForce 2013sp1

YOU SHOULD NOT MODIFY THIS FILE, BECAUSE IT WILL BE
OVERWRITTEN WHEN YOU RE-RUN CODE GENERATION.

Refer to the Altova MapForce Documentation for further details.
http://www.altova.com/mapforce
-->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs">
	<xsl:output method="xml" encoding="UTF-8" indent="yes"/>
	<xsl:template match="/">
		<xsl:variable name="var1_resultof_cast" select="string(floor('1'))"/>
		<mlxmldata>
			<xsl:attribute name="application">Cardiris Visitenkartenscanner</xsl:attribute>
			<crm_address>
				<xsl:attribute name="updatecheck">
					<xsl:value-of select="$var1_resultof_cast"/>
				</xsl:attribute>
				<xsl:attribute name="showparams">
					<xsl:value-of select="string(floor('0'))"/>
				</xsl:attribute>
				<xsl:attribute name="keyfields">name,surname,email2</xsl:attribute>
				<xsl:attribute name="allowaddcampaign">
					<xsl:value-of select="$var1_resultof_cast"/>
				</xsl:attribute>
				<xsl:for-each select="contacts/contact">
					<xsl:variable name="var2_resultof_first" select="address"/>
					<crm_address_item>
						<xsl:attribute name="zip">
							<xsl:value-of select="string($var2_resultof_first/zip_code)"/>
						</xsl:attribute>
						<xsl:attribute name="title">
							<xsl:value-of select="string(title)"/>
						</xsl:attribute>
						<xsl:attribute name="surname">
							<xsl:value-of select="string(first_name)"/>
						</xsl:attribute>
						<xsl:attribute name="skypenumber2">
							<xsl:value-of select="/.."/>
						</xsl:attribute>
						<xsl:attribute name="photoblob">
							<xsl:value-of select="string(card_image/link)"/>
						</xsl:attribute>
						<xsl:attribute name="phone2">
							<xsl:value-of select="/.."/>
						</xsl:attribute>
						<xsl:attribute name="phone1">
							<xsl:value-of select="string(phone_1)"/>
						</xsl:attribute>
						<xsl:attribute name="name">
							<xsl:value-of select="string(last_name)"/>
						</xsl:attribute>
						<xsl:attribute name="mobile2">
							<xsl:value-of select="/.."/>
						</xsl:attribute>
						<xsl:attribute name="internet2">
							<xsl:value-of select="string(web)"/>
						</xsl:attribute>
						<xsl:attribute name="faxnumber2">
							<xsl:value-of select="string(fax)"/>
						</xsl:attribute>
						<xsl:attribute name="email2">
							<xsl:value-of select="string(e_mail)"/>
						</xsl:attribute>
						<xsl:attribute name="crm_campaign">Import Visitenkartenscanner</xsl:attribute>
						<xsl:attribute name="countryid">
							<xsl:value-of select="string($var2_resultof_first/country)"/>
						</xsl:attribute>
						<xsl:attribute name="companyname">
							<xsl:value-of select="string(company)"/>
						</xsl:attribute>
						<xsl:attribute name="city">
							<xsl:value-of select="string($var2_resultof_first/city)"/>
						</xsl:attribute>
						<xsl:for-each select="($var2_resultof_first/node())[boolean(self::text())]">
							<xsl:attribute name="adress">
								<xsl:value-of select="string(.)"/>
							</xsl:attribute>
						</xsl:for-each>
					</crm_address_item>
				</xsl:for-each>
			</crm_address>
		</mlxmldata>
	</xsl:template>
</xsl:stylesheet>
