<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
   <xsl:output method="xml" encoding="utf-8" indent="yes"/>
   <xsl:decimal-format name="european" decimal-separator="." grouping-separator=","/>
   <xsl:param name="mode"/>

	<xsl:template match="rapport">
		<xsl:if test="@view='pchd_v_imp_prs_perslid_sync' or @view='PCHD_V_IMP_PRS_PERSLID_SYNC'">
		  <xsl:element name="FACILITOR">
		    <xsl:element name="PCHD">
		      <xsl:for-each select="rapport_data/data_row">
		        <xsl:element name="PERSLID">
		          <xsl:copy-of select="./node()"/>     
		        </xsl:element>
		      </xsl:for-each>
		    </xsl:element>
		  </xsl:element>
		</xsl:if>
  </xsl:template>


   <!-- Root -->
   <xsl:template match="facilitor">
     <xsl:apply-templates select="rapport"/>
   </xsl:template>

</xsl:stylesheet>