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

  <xsl:variable name="Rev">
    <!-- Revision van deze perslid_sync.xsl -->
    <xsl:value-of select="substring(translate('$Revision$', '$ ', ''), 10)"/>
  </xsl:variable>

  <xsl:template match="rapport">
    <xsl:if test="@view='venr_v_imp_prs_perslid_sync' or @view='VENR_V_IMP_PRS_PERSLID_SYNC'">
      <xsl:element name="FACILITOR">
        <xsl:element name="VENR">
          <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>
