<?xml version="1.0" encoding="Windows-1252"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" encoding="Windows-1252"/>

<xsl:variable name="new_line" select="'&#xA;'"/>

	<xsl:template name="escape_quote">
		<xsl:param name="string"/>
		<xsl:choose>
			<xsl:when test="contains($string, '&quot;')">
				<xsl:value-of select="substring-before($string, '&quot;')"/>&quot;&quot;<xsl:call-template name="escape_quote">
					<xsl:with-param name="string" select="substring-after($string, '&quot;')"/></xsl:call-template></xsl:when>
			<xsl:otherwise>
				<xsl:value-of select="$string"/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>

<xsl:template match="/">
<xsl:if test="facilitor/personen">LOCATIECODE;GEBOUWCODE;BOUWLAAGVOLGNUMMER;RUIMTENUMMER;WERKPLEKVOLGNUMMER;OMSCHRIJVING;AFDELINGSCODE;PERSOONACHTERNAAM;TUSSENVOEGSEL;VOORLETTERS;VOORNAAM;TITEL_AANHEF;TELEFOONNUMMER;MOBIEL;EMAIL;FUNCTIE;PERSONEELSNUMMER;LOGINNAAM;PASSWORD<xsl:value-of select="$new_line"/></xsl:if>
<xsl:if test="facilitor/afdelingen">BEDRIJFSNAAM;AFDELINGSCODEPARENT;AFDELINGSCODE;AFDELINGSOMSCHRIJVING;KOSTENPLAATS;<xsl:value-of select="$new_line"/></xsl:if>
<xsl:for-each select="facilitor/personen/persoon">
<xsl:value-of select="locatiecode"/>;<xsl:value-of select="gebouwcode"/>;<xsl:value-of select="bouwlaagvolgnummer"/>;<xsl:value-of select="ruimtenummer"/>;<xsl:value-of select="werkplekvolgnummer"/>;<xsl:value-of select="omschrijving"/>;<xsl:value-of select="afdelingscode"/>;<xsl:value-of select="persoonachternaam"/>;<xsl:value-of select="tussenvoegsel"/>;<xsl:value-of select="voorletters"/>;<xsl:value-of select="voornaam"/>;<xsl:value-of select="titel_aanhef"/>;<xsl:value-of select="telefoonnummer"/>;<xsl:value-of select="mobiel"/>;<xsl:value-of select="email"/>;<xsl:value-of select="functie"/>;<xsl:value-of select="personeelsnummer"/>;<xsl:value-of select="loginnaam"/>;<xsl:value-of select="password"/><xsl:value-of select="$new_line"/>
</xsl:for-each>
<xsl:for-each select="facilitor/afdelingen/afdeling">
<xsl:value-of select="bedrijfsnaam"/>;<xsl:value-of select="afdelingscodeparent"/>;<xsl:value-of select="afdelingscode"/>;<xsl:value-of select="afdelingsomschrijving"/>;<xsl:value-of select="kostenplaats"/>;<xsl:value-of select="$new_line"/>
</xsl:for-each>
	</xsl:template>

	<xsl:template name="StrReplace">
    <xsl:param name="string"/>
    <xsl:param name="str1"/>
    <xsl:param name="str2"/>
    <xsl:choose>
      <xsl:when test="contains($string, $str1)">
        <xsl:value-of select="substring-before($string, $str1)"/><xsl:value-of select="$str2"/>
        <xsl:call-template name="StrReplace">
          <xsl:with-param name="string" select="substring-after($string, $str1)"/>
          <xsl:with-param name="str1" select="$str1"/>
					<xsl:with-param name="str2" select="$str2"/>
        </xsl:call-template>
      </xsl:when>
      <xsl:otherwise>
        <xsl:value-of select="$string"/>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>

</xsl:stylesheet>
<!-- Stylesheet edited using Stylus Studio - (c) 2004-2007. Progress Software Corporation. All rights reserved. --><!-- 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="file:///c:/temp/smt_dm_t_org_push_xml2.xml" htmlbaseurl="" outputurl="" processortype="msxml6" 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"/><MapperBlockPosition></MapperBlockPosition><TemplateContext></TemplateContext><MapperFilter side="source"></MapperFilter></MapperMetaTag>
</metaInformation>
-->