From 431865644846bfb0abaed0abb28b52cfc8985bde Mon Sep 17 00:00:00 2001
From: Michael Westergaard <michael.westergaard@opencircle.solutions>
Date: Thu, 2 Jul 2020 16:14:43 +0200
Subject: [PATCH] Release 2.0.24

---
 LICENSE                                       |   21 +
 xslt-validatie/common/2_0/basis.xsl           | 1767 +++++++++++++++++
 xslt-validatie/common/2_0/check_errors.xsl    |   77 +
 xslt-validatie/common/2_0/heenbericht.xsl     |  151 ++
 xslt-validatie/common/2_0/merge.xsl           |    1 +
 xslt-validatie/jw/3_0/JW301.xsl               |   75 +
 xslt-validatie/jw/3_0/JW303.xsl               |   77 +
 xslt-validatie/jw/3_0/JW304.xsl               |   71 +
 xslt-validatie/jw/3_0/JW305.xsl               |   43 +
 xslt-validatie/jw/3_0/JW307.xsl               |   43 +
 xslt-validatie/jw/3_0/JW315.xsl               |   61 +
 xslt-validatie/jw/3_0/JW317.xsl               |   53 +
 xslt-validatie/jw/3_0/JW319.xsl               |   35 +
 xslt-validatie/jw/3_0/JW323.xsl               |   57 +
 xslt-validatie/jw/3_0/JW325.xsl               |   39 +
 xslt-validatie/jw/3_0/all.xsl                 |  159 ++
 xslt-validatie/jw/3_0/all_merged.xsl          |    1 +
 xslt-validatie/jw/3_0/common/basis.xsl        |  142 ++
 xslt-validatie/jw/3_0/common/check_errors.xsl |    1 +
 xslt-validatie/jw/3_0/common/heenbericht.xsl  |    1 +
 xslt-validatie/jw/3_0/condities/CD005.xsl     |   31 +
 xslt-validatie/jw/3_0/condities/CD007.xsl     |   32 +
 xslt-validatie/jw/3_0/condities/CD009.xsl     |   22 +
 xslt-validatie/jw/3_0/condities/CD025.xsl     |   31 +
 xslt-validatie/jw/3_0/condities/CD034.xsl     |   23 +
 xslt-validatie/jw/3_0/condities/CD041.xsl     |   35 +
 xslt-validatie/jw/3_0/condities/CD043.xsl     |   24 +
 xslt-validatie/jw/3_0/condities/CD044.xsl     |   23 +
 xslt-validatie/jw/3_0/condities/CD055.xsl     |   68 +
 xslt-validatie/jw/3_0/condities/CD056.xsl     |   47 +
 xslt-validatie/jw/3_0/condities/CD058.xsl     |   34 +
 xslt-validatie/jw/3_0/condities/CD059.xsl     |   36 +
 xslt-validatie/jw/3_0/condities/CD060.xsl     |   58 +
 xslt-validatie/jw/3_0/condities/CD062.xsl     |   26 +
 xslt-validatie/jw/3_0/condities/CD066.xsl     |   36 +
 xslt-validatie/jw/3_0/condities/CD067.xsl     |   36 +
 xslt-validatie/jw/3_0/condities/CD068.xsl     |   24 +
 xslt-validatie/jw/3_0/condities/CD075.xsl     |   42 +
 xslt-validatie/jw/3_0/condities/CD076.xsl     |   52 +
 xslt-validatie/jw/3_0/condities/CD077.xsl     |   42 +
 xslt-validatie/jw/3_0/condities/CD078.xsl     |   42 +
 xslt-validatie/jw/3_0/condities/CD079.xsl     |   38 +
 xslt-validatie/jw/3_0/condities/CD080.xsl     |   64 +
 xslt-validatie/jw/3_0/condities/CD081.xsl     |   64 +
 xslt-validatie/jw/3_0/condities/CD085.xsl     |   24 +
 xslt-validatie/jw/3_0/condities/CD086.xsl     |   24 +
 xslt-validatie/jw/3_0/condities/CD087.xsl     |   24 +
 xslt-validatie/jw/3_0/condities/CD088.xsl     |   24 +
 xslt-validatie/jw/3_0/constraints/CS002.xsl   |   20 +
 xslt-validatie/jw/3_0/constraints/CS003.xsl   |   44 +
 xslt-validatie/jw/3_0/constraints/CS023.xsl   |  120 ++
 xslt-validatie/jw/3_0/constraints/CS050.xsl   |   38 +
 xslt-validatie/jw/3_0/constraints/CS058.xsl   |   29 +
 xslt-validatie/jw/3_0/constraints/CS089.xsl   |   31 +
 xslt-validatie/jw/3_0/constraints/CS100.xsl   |   31 +
 xslt-validatie/jw/3_0/constraints/CS102.xsl   |   22 +
 xslt-validatie/jw/3_0/constraints/CS103.xsl   |   38 +
 xslt-validatie/jw/3_0/constraints/CS104.xsl   |   56 +
 xslt-validatie/jw/3_0/constraints/CS108.xsl   |   60 +
 xslt-validatie/jw/3_0/constraints/CS300.xsl   |   78 +
 xslt-validatie/jw/3_0/constraints/CS318.xsl   |   19 +
 xslt-validatie/jw/3_0/constraints/CS323.xsl   |   23 +
 xslt-validatie/jw/3_0/constraints/CS324.xsl   |   22 +
 xslt-validatie/jw/3_0/constraints/CS325.xsl   |  103 +
 xslt-validatie/jw/3_0/constraints/CS327.xsl   |   41 +
 xslt-validatie/jw/3_0/constraints/CS328.xsl   |   32 +
 xslt-validatie/jw/3_0/constraints/CS330.xsl   |   46 +
 xslt-validatie/jw/3_0/constraints/CS331.xsl   |   34 +
 xslt-validatie/jw/3_0/rules/TR002.xsl         |   29 +
 xslt-validatie/jw/3_0/rules/TR006.xsl         |   34 +
 xslt-validatie/jw/3_0/rules/TR018.xsl         |   20 +
 xslt-validatie/jw/3_0/rules/TR052.xsl         |   24 +
 xslt-validatie/jw/3_0/rules/TR061.xsl         |   26 +
 xslt-validatie/jw/3_0/rules/TR097.xsl         |   42 +
 xslt-validatie/jw/3_0/rules/TR101.xsl         |  230 +++
 xslt-validatie/jw/3_0/rules/TR302.xsl         |   55 +
 xslt-validatie/jw/3_0/rules/TR312.xsl         |   44 +
 xslt-validatie/jw/3_0/rules/TR313.xsl         |   48 +
 xslt-validatie/jw/3_0/rules/TR314.xsl         |   35 +
 xslt-validatie/jw/3_0/rules/TR315.xsl         |   48 +
 xslt-validatie/jw/3_0/rules/TR316.xsl         |   96 +
 xslt-validatie/jw/3_0/rules/TR317.xsl         |   28 +
 xslt-validatie/jw/3_0/rules/TR319.xsl         |   46 +
 xslt-validatie/jw/3_0/rules/TR320.xsl         |   64 +
 xslt-validatie/jw/3_0/rules/TR335.xsl         |   24 +
 xslt-validatie/jw/3_0/rules/TR342.xsl         |   54 +
 xslt-validatie/jw/3_0/rules/TR345.xsl         |   25 +
 xslt-validatie/jw/3_0/rules/TR352.xsl         |   24 +
 xslt-validatie/jw/3_0/rules/TR353.xsl         |   24 +
 xslt-validatie/jw/3_0/rules/TR358.xsl         |   44 +
 xslt-validatie/jw/3_0/rules/TR368.xsl         |   43 +
 xslt-validatie/schema/1_1/rapport.xsd         |  108 +
 xslt-validatie/schema/1_1/rapport_example.xml |   29 +
 93 files changed, 6032 insertions(+)
 create mode 100644 LICENSE
 create mode 100644 xslt-validatie/common/2_0/basis.xsl
 create mode 100644 xslt-validatie/common/2_0/check_errors.xsl
 create mode 100644 xslt-validatie/common/2_0/heenbericht.xsl
 create mode 100644 xslt-validatie/common/2_0/merge.xsl
 create mode 100644 xslt-validatie/jw/3_0/JW301.xsl
 create mode 100644 xslt-validatie/jw/3_0/JW303.xsl
 create mode 100644 xslt-validatie/jw/3_0/JW304.xsl
 create mode 100644 xslt-validatie/jw/3_0/JW305.xsl
 create mode 100644 xslt-validatie/jw/3_0/JW307.xsl
 create mode 100644 xslt-validatie/jw/3_0/JW315.xsl
 create mode 100644 xslt-validatie/jw/3_0/JW317.xsl
 create mode 100644 xslt-validatie/jw/3_0/JW319.xsl
 create mode 100644 xslt-validatie/jw/3_0/JW323.xsl
 create mode 100644 xslt-validatie/jw/3_0/JW325.xsl
 create mode 100644 xslt-validatie/jw/3_0/all.xsl
 create mode 100644 xslt-validatie/jw/3_0/all_merged.xsl
 create mode 100644 xslt-validatie/jw/3_0/common/basis.xsl
 create mode 100644 xslt-validatie/jw/3_0/common/check_errors.xsl
 create mode 100644 xslt-validatie/jw/3_0/common/heenbericht.xsl
 create mode 100644 xslt-validatie/jw/3_0/condities/CD005.xsl
 create mode 100644 xslt-validatie/jw/3_0/condities/CD007.xsl
 create mode 100644 xslt-validatie/jw/3_0/condities/CD009.xsl
 create mode 100644 xslt-validatie/jw/3_0/condities/CD025.xsl
 create mode 100644 xslt-validatie/jw/3_0/condities/CD034.xsl
 create mode 100644 xslt-validatie/jw/3_0/condities/CD041.xsl
 create mode 100644 xslt-validatie/jw/3_0/condities/CD043.xsl
 create mode 100644 xslt-validatie/jw/3_0/condities/CD044.xsl
 create mode 100644 xslt-validatie/jw/3_0/condities/CD055.xsl
 create mode 100644 xslt-validatie/jw/3_0/condities/CD056.xsl
 create mode 100644 xslt-validatie/jw/3_0/condities/CD058.xsl
 create mode 100644 xslt-validatie/jw/3_0/condities/CD059.xsl
 create mode 100644 xslt-validatie/jw/3_0/condities/CD060.xsl
 create mode 100644 xslt-validatie/jw/3_0/condities/CD062.xsl
 create mode 100644 xslt-validatie/jw/3_0/condities/CD066.xsl
 create mode 100644 xslt-validatie/jw/3_0/condities/CD067.xsl
 create mode 100644 xslt-validatie/jw/3_0/condities/CD068.xsl
 create mode 100644 xslt-validatie/jw/3_0/condities/CD075.xsl
 create mode 100644 xslt-validatie/jw/3_0/condities/CD076.xsl
 create mode 100644 xslt-validatie/jw/3_0/condities/CD077.xsl
 create mode 100644 xslt-validatie/jw/3_0/condities/CD078.xsl
 create mode 100644 xslt-validatie/jw/3_0/condities/CD079.xsl
 create mode 100644 xslt-validatie/jw/3_0/condities/CD080.xsl
 create mode 100644 xslt-validatie/jw/3_0/condities/CD081.xsl
 create mode 100644 xslt-validatie/jw/3_0/condities/CD085.xsl
 create mode 100644 xslt-validatie/jw/3_0/condities/CD086.xsl
 create mode 100644 xslt-validatie/jw/3_0/condities/CD087.xsl
 create mode 100644 xslt-validatie/jw/3_0/condities/CD088.xsl
 create mode 100644 xslt-validatie/jw/3_0/constraints/CS002.xsl
 create mode 100644 xslt-validatie/jw/3_0/constraints/CS003.xsl
 create mode 100644 xslt-validatie/jw/3_0/constraints/CS023.xsl
 create mode 100644 xslt-validatie/jw/3_0/constraints/CS050.xsl
 create mode 100644 xslt-validatie/jw/3_0/constraints/CS058.xsl
 create mode 100644 xslt-validatie/jw/3_0/constraints/CS089.xsl
 create mode 100644 xslt-validatie/jw/3_0/constraints/CS100.xsl
 create mode 100644 xslt-validatie/jw/3_0/constraints/CS102.xsl
 create mode 100644 xslt-validatie/jw/3_0/constraints/CS103.xsl
 create mode 100644 xslt-validatie/jw/3_0/constraints/CS104.xsl
 create mode 100644 xslt-validatie/jw/3_0/constraints/CS108.xsl
 create mode 100644 xslt-validatie/jw/3_0/constraints/CS300.xsl
 create mode 100644 xslt-validatie/jw/3_0/constraints/CS318.xsl
 create mode 100644 xslt-validatie/jw/3_0/constraints/CS323.xsl
 create mode 100644 xslt-validatie/jw/3_0/constraints/CS324.xsl
 create mode 100644 xslt-validatie/jw/3_0/constraints/CS325.xsl
 create mode 100644 xslt-validatie/jw/3_0/constraints/CS327.xsl
 create mode 100644 xslt-validatie/jw/3_0/constraints/CS328.xsl
 create mode 100644 xslt-validatie/jw/3_0/constraints/CS330.xsl
 create mode 100644 xslt-validatie/jw/3_0/constraints/CS331.xsl
 create mode 100644 xslt-validatie/jw/3_0/rules/TR002.xsl
 create mode 100644 xslt-validatie/jw/3_0/rules/TR006.xsl
 create mode 100644 xslt-validatie/jw/3_0/rules/TR018.xsl
 create mode 100644 xslt-validatie/jw/3_0/rules/TR052.xsl
 create mode 100644 xslt-validatie/jw/3_0/rules/TR061.xsl
 create mode 100644 xslt-validatie/jw/3_0/rules/TR097.xsl
 create mode 100644 xslt-validatie/jw/3_0/rules/TR101.xsl
 create mode 100644 xslt-validatie/jw/3_0/rules/TR302.xsl
 create mode 100644 xslt-validatie/jw/3_0/rules/TR312.xsl
 create mode 100644 xslt-validatie/jw/3_0/rules/TR313.xsl
 create mode 100644 xslt-validatie/jw/3_0/rules/TR314.xsl
 create mode 100644 xslt-validatie/jw/3_0/rules/TR315.xsl
 create mode 100644 xslt-validatie/jw/3_0/rules/TR316.xsl
 create mode 100644 xslt-validatie/jw/3_0/rules/TR317.xsl
 create mode 100644 xslt-validatie/jw/3_0/rules/TR319.xsl
 create mode 100644 xslt-validatie/jw/3_0/rules/TR320.xsl
 create mode 100644 xslt-validatie/jw/3_0/rules/TR335.xsl
 create mode 100644 xslt-validatie/jw/3_0/rules/TR342.xsl
 create mode 100644 xslt-validatie/jw/3_0/rules/TR345.xsl
 create mode 100644 xslt-validatie/jw/3_0/rules/TR352.xsl
 create mode 100644 xslt-validatie/jw/3_0/rules/TR353.xsl
 create mode 100644 xslt-validatie/jw/3_0/rules/TR358.xsl
 create mode 100644 xslt-validatie/jw/3_0/rules/TR368.xsl
 create mode 100644 xslt-validatie/schema/1_1/rapport.xsd
 create mode 100644 xslt-validatie/schema/1_1/rapport_example.xml

diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..b375d51
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2016-2019 Zorginstituut Nederland
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/xslt-validatie/common/2_0/basis.xsl b/xslt-validatie/common/2_0/basis.xsl
new file mode 100644
index 0000000..02a3d3f
--- /dev/null
+++ b/xslt-validatie/common/2_0/basis.xsl
@@ -0,0 +1,1767 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:r="http://www.istandaarden.nl/validatie/1_1/rapport/schema"
+
+>
+    <xsl:output method="xml" version="1.0" encoding="UTF-8"
+                indent="yes"/>
+
+    <!-- Emit the (absolute or relative to the given context) XPath expression
+        for this node; uses indexing when needed context is not checked currently -->
+    <xsl:template name="printXPath">
+        <xsl:param name="pElement" select="."/>
+        <!-- Call recursive unless root; we have to use this way of detecting root
+            for Java -->
+        <xsl:if test="$pElement/ancestor::*"><!---->
+            <xsl:call-template name="printXPath">
+                <xsl:with-param name="pElement" select="$pElement/.."/>
+            </xsl:call-template>
+            <xsl:text>/</xsl:text>
+        </xsl:if><!-- Print self -->
+        <xsl:value-of select="local-name($pElement)"/><!-- Print
+			child selector if applicable -->
+        <xsl:if
+                test="($pElement/preceding-sibling::*|$pElement/following-sibling::*)[local-name()=local-name($pElement)]">
+            <xsl:value-of
+                    select="concat('[',count($pElement/preceding-sibling::*[local-name()=local-name($pElement)])+1,']')"/>
+        </xsl:if>
+    </xsl:template>
+
+    <!-- Evaluate an XPath expression relative to the given context; note: only
+        supports node selectors and indexing, and the expression must start with
+        a / -->
+    <xsl:template name="evaluateXPath">
+        <xsl:param name="pPath" select="."/>
+        <xsl:param name="pContext" select="/"/>
+
+        <xsl:choose>
+            <xsl:when test="string-length($pPath) > 0">
+                <!-- Strip leading / -->
+                <xsl:variable name="vPath" select="substring($pPath,2)"/>
+                <!-- Extract first node selector -->
+                <xsl:variable name="vNodeTest">
+                    <xsl:choose>
+                        <xsl:when test="not(contains($vPath, '/'))">
+                            <xsl:value-of select="$vPath"/>
+                        </xsl:when>
+                        <xsl:otherwise>
+                            <xsl:value-of select="substring-before($vPath, '/')"/>
+                        </xsl:otherwise>
+                    </xsl:choose>
+                </xsl:variable>
+                <!-- Extract node position -->
+                <xsl:variable name="vPosition">
+                    <xsl:choose>
+                        <xsl:when test="not(contains($vNodeTest, '['))">
+                            1
+                        </xsl:when>
+                        <xsl:otherwise>
+                            <xsl:value-of
+                                    select="substring-after(substring-before($vNodeTest, ']'), '[')"/>
+                        </xsl:otherwise>
+                    </xsl:choose>
+                </xsl:variable>
+                <!-- Extract just the node name without position -->
+                <xsl:variable name="vNameTest">
+                    <xsl:choose>
+                        <xsl:when test="not(contains($vNodeTest, '['))">
+                            <xsl:value-of select="$vNodeTest"/>
+                        </xsl:when>
+                        <xsl:otherwise>
+                            <xsl:value-of
+                                    select="substring-before($vNodeTest, '[')"/>
+                        </xsl:otherwise>
+                    </xsl:choose>
+                </xsl:variable>
+                <!-- Call recursively -->
+                <xsl:call-template name="evaluateXPath">
+                    <xsl:with-param name="pPath"
+                                    select="substring-after($pPath, $vNodeTest)"/>
+                    <xsl:with-param name="pContext"
+                                    select="$pContext/*[local-name() = $vNameTest and count(preceding-sibling::*[local-name() = $vNameTest]) = $vPosition - 1]"/>
+                </xsl:call-template>
+            </xsl:when>
+            <xsl:otherwise>
+                <!-- Just print the node contents if we are done -->
+                <xsl:value-of
+                        select="normalize-space($pContext/text())"/>
+            </xsl:otherwise>
+        </xsl:choose>
+    </xsl:template>
+
+    <!-- Add an error element for violating pRule at pElements -->
+    <xsl:template name="addError">
+        <xsl:param name="pRule">
+            FOUT
+        </xsl:param>
+        <xsl:param name="pElements" select="."/>
+        <xsl:param name="pCode" select="nonExistingNode"/>
+        <xsl:param name="pDetails" select="''"/>
+        <r:Fout>
+            <r:Code>
+                <xsl:value-of select="normalize-space($pRule)"/>
+            </r:Code>
+            <xsl:if test="$pCode">
+                <r:Retourcode>
+                    <xsl:value-of select="$pCode"/>
+                </r:Retourcode>
+            </xsl:if>
+            <xsl:for-each select="$pElements">
+                <r:Locatie>
+                    <xsl:text>/</xsl:text>
+                    <xsl:call-template name="printXPath">
+                        <xsl:with-param name="pElement" select="."></xsl:with-param>
+                    </xsl:call-template>
+                </r:Locatie>
+            </xsl:for-each>
+            <xsl:choose>
+                <xsl:when test="$pDetails != ''">
+                    <r:Details>
+                        <xsl:value-of select="$pDetails"/>
+                    </r:Details>
+                </xsl:when>
+                <xsl:otherwise>
+                    <xsl:variable name="translatedDetails">
+                        <xsl:apply-templates select="."
+                                             mode="getDetails">
+                            <xsl:with-param name="pRule"
+                                            select="normalize-space($pRule)"/>
+                        </xsl:apply-templates>
+                    </xsl:variable>
+                    <xsl:if test="$translatedDetails != ''">
+                        <r:Details>
+                            <xsl:value-of select="$translatedDetails"/>
+                        </r:Details>
+                    </xsl:if>
+                </xsl:otherwise>
+            </xsl:choose>
+        </r:Fout>
+    </xsl:template>
+
+    <xsl:template match="*" mode="getDetails" priority="0">
+        <xsl:param name="pRule">
+            FOUT
+        </xsl:param>
+    </xsl:template>
+    
+    <xsl:template name="checkGemeenteCode">
+        <xsl:param name="pThis" select="."/>
+        <xsl:param name="pExtra" select="emptyNodeSet"/>
+        <xsl:param name="pRule">FAIL</xsl:param>
+        
+        <xsl:variable name="vCorrect">
+	        <xsl:apply-templates select="." mode="validGemeente">
+	        	<xsl:with-param name="pGemeenteCode" select="1 * normalize-space($pThis/text())" />
+	        </xsl:apply-templates>
+        </xsl:variable>
+
+        <xsl:if test="$vCorrect != 'true'">
+            <xsl:call-template name="addError">
+                <xsl:with-param name="pRule" select="$pRule"/>
+                <xsl:with-param name="pElements" select="$pThis | $pExtra"/>
+            </xsl:call-template>
+        </xsl:if>
+    </xsl:template>
+    
+    <xsl:template match="*" mode="validGemeente" priority="0">
+        <xsl:param name="pGemeenteCode" select="."/>
+    	<xsl:choose>
+	    	<xsl:when test="$pGemeenteCode &lt; 0 or $pGemeenteCode &gt; 2000"><xsl:value-of select="false()" /></xsl:when>
+	    	<xsl:otherwise><xsl:value-of select="true()" /></xsl:otherwise>
+    	</xsl:choose>
+    </xsl:template>
+    
+    <xsl:template name="checkAGBValid">
+        <xsl:param name="pThis" select="."/>
+        <xsl:param name="pFrom" />
+        <xsl:param name="pTo" select="false()"/>
+        <xsl:param name="pExtra" select="emptyNodeSet"/>
+        <xsl:param name="pRule">FAIL</xsl:param>
+        
+        <xsl:variable name="vCorrect">
+	        <xsl:choose>
+		        <xsl:when test="$pTo">
+			        <xsl:apply-templates select="." mode="validAGBCode">
+			        	<xsl:with-param name="pAGBCode" select="number(normalize-space($pThis/text()))" />
+			        	<xsl:with-param name="pFrom" select="number(translate($pFrom, '-', ''))" />
+			        	<xsl:with-param name="pTo" select="number(translate($pTo, '-', ''))" />
+			        </xsl:apply-templates>
+		        </xsl:when>
+		        <xsl:otherwise>
+			        <xsl:apply-templates select="." mode="validAGBCode">
+			        	<xsl:with-param name="pAGBCode" select="number(normalize-space($pThis/text()))" />
+			        	<xsl:with-param name="pFrom" select="number(translate($pFrom, '-', ''))" />
+			        </xsl:apply-templates>
+		        </xsl:otherwise>
+	        </xsl:choose>
+        </xsl:variable>
+
+        <xsl:if test="$vCorrect != 'true'">
+            <xsl:call-template name="addError">
+                <xsl:with-param name="pRule" select="$pRule"/>
+                <xsl:with-param name="pElements" select="$pThis | $pExtra"/>
+            </xsl:call-template>
+        </xsl:if>
+    </xsl:template>
+    
+    <xsl:template match="*" mode="validAGBCode" priority="0">
+        <xsl:param name="pAGBCode" select="."/>
+        <xsl:param name="pFrom"/>
+        <xsl:param name="pTo" select="0"/>
+    	<xsl:value-of select="true()" />
+    </xsl:template>
+    
+    <xsl:template name="testzorgkantoor">
+        <xsl:param name="pThis"/> <!-- Instelling -->
+        <xsl:param name="pOther"/> <!-- Zorgkantoor-->
+        <xsl:param name="pLocal" select="true()" />
+    	<xsl:choose>
+	    	<xsl:when test="$pLocal">
+	    		<xsl:choose>
+	    			<xsl:when test="normalize-space($pThis) = normalize-space($pOther)"><xsl:value-of select="true()"/></xsl:when>
+	    			<xsl:otherwise><xsl:value-of select="false()" /></xsl:otherwise>
+	    		</xsl:choose>
+	    	</xsl:when>
+	    	<xsl:otherwise>
+		        <xsl:apply-templates select="." mode="validZorginstelling">
+		        	<xsl:with-param name="pInstelling" select="normalize-space($pThis)" />
+		        	<xsl:with-param name="pOntvanger" select="normalize-space($pOther)" />
+		        </xsl:apply-templates>
+	    	</xsl:otherwise>
+    	</xsl:choose>
+    </xsl:template>
+    
+    <xsl:template name="checkzorgkantoor">
+        <xsl:param name="pThis" select="."/> <!-- Instelling -->
+        <xsl:param name="pOther"/> <!-- Zorgkantoor-->
+        <xsl:param name="pExtra" select="emptyNodeSet"/>
+        <xsl:param name="pLocal" select="true()" />
+        <xsl:param name="pRule">FAIL</xsl:param>
+        
+        <xsl:variable name="vCorrect">
+	        <xsl:call-template name="testzorgkantoor">
+	        	<xsl:with-param name="pThis" select="$pThis" />
+	        	<xsl:with-param name="pOther" select="$pOther" />
+	        	<xsl:with-param name="pLocal" select="$pLocal" />
+	        </xsl:call-template>
+        </xsl:variable>
+        
+        <xsl:if test="$vCorrect != 'true'">
+            <xsl:call-template name="addError">
+                <xsl:with-param name="pRule" select="$pRule"/>
+                <xsl:with-param name="pElements" select="$pThis | $pOther | $pExtra"/>
+            </xsl:call-template>
+        </xsl:if>
+    </xsl:template>
+    
+    <xsl:template name="checkzorginstelling">
+        <xsl:param name="pThis"/> <!-- All instellingen -->
+        <xsl:param name="pOther"/> <!-- Ontvanger -->
+        <xsl:param name="pExtra" select="emptyNodeSet"/>
+        <xsl:param name="pLocal" select="true()" />
+        <xsl:param name="pRule">FAIL</xsl:param>
+        
+        <xsl:choose>
+        	<xsl:when test="$pThis">
+		        <xsl:variable name="vCorrect">
+			        <xsl:call-template name="testzorgkantoor">
+			        	<xsl:with-param name="pThis" select="$pThis[1]" />
+			        	<xsl:with-param name="pOther" select="$pOther" />
+			        	<xsl:with-param name="pLocal" select="$pLocal" />
+			        </xsl:call-template>
+		        </xsl:variable>
+		
+		        <xsl:if test="$vCorrect != 'true'">
+			        <xsl:call-template name="checkzorginstelling">
+		                <xsl:with-param name="pThis" select="$pThis[position() != 1]"/>
+		                <xsl:with-param name="pOther" select="$pOther"/>
+		                <xsl:with-param name="pExtra" select="$pExtra | $pThis[1]"/>
+				        <xsl:with-param name="pLocal" select="$pLocal" />
+		                <xsl:with-param name="pRule" select="$pRule"/>
+		            </xsl:call-template>
+		        </xsl:if>
+        	</xsl:when>
+        	<xsl:otherwise>
+	            <xsl:call-template name="addError">
+	                <xsl:with-param name="pRule" select="$pRule"/>
+	                <xsl:with-param name="pElements" select="$pOther | $pExtra"/>
+	            </xsl:call-template>
+        	</xsl:otherwise>
+        </xsl:choose>
+    </xsl:template>
+    
+    <xsl:template match="*" mode="validZorginstelling" priority="0">
+        <xsl:param name="pInstelling"/>
+        <xsl:param name="pOntvanger"/>
+		<xsl:value-of select="true()" />
+    </xsl:template>
+    
+    <!-- Add a error of $pRule for $pElement if $pElement doesn't satisfy the
+        11-proef -->
+    <xsl:template name="check11proef">
+        <xsl:param name="pElement" select="."/>
+        <xsl:param name="pRule">
+            FOUT
+        </xsl:param>
+        <xsl:variable name="digit1"
+                      select="floor(number($pElement/text()) div 1) mod 10"/>
+        <xsl:variable name="digit2"
+                      select="floor(number($pElement/text()) div 10) mod 10"/>
+        <xsl:variable name="digit3"
+                      select="floor(number($pElement/text()) div 100) mod 10"/>
+        <xsl:variable name="digit4"
+                      select="floor(number($pElement/text()) div 1000) mod 10"/>
+        <xsl:variable name="digit5"
+                      select="floor(number($pElement/text()) div 10000) mod 10"/>
+        <xsl:variable name="digit6"
+                      select="floor(number($pElement/text()) div 100000) mod 10"/>
+        <xsl:variable name="digit7"
+                      select="floor(number($pElement/text()) div 1000000) mod 10"/>
+        <xsl:variable name="digit8"
+                      select="floor(number($pElement/text()) div 10000000) mod 10"/>
+        <xsl:variable name="digit9"
+                      select="floor(number($pElement/text()) div 100000000) mod 10"/>
+
+        <xsl:if
+                test="((9 * $digit9 + 8 * $digit8 + 7 * $digit7 + 6 * $digit6 + 5 * $digit5 + 4 * $digit4 + 3 * $digit3 + 2 * $digit2 - 1 * $digit1) mod 11) != 0">
+            <xsl:call-template name="addError">
+                <xsl:with-param name="pRule" select="$pRule"/>
+                <xsl:with-param name="pElements" select="$pElement"/>
+            </xsl:call-template>
+        </xsl:if>
+    </xsl:template>
+
+    <!-- Helper for check testvalue; checks lists of values in XSLT1 -->
+    <xsl:template name="split">
+        <xsl:param name="pElement" select="."/>
+        <xsl:param name="pValue"/>
+
+        <xsl:choose>
+            <xsl:when
+                    test="string-length(normalize-space($pValue)) &gt; 0">
+                <xsl:variable name="vNextItem"
+                              select="normalize-space(substring-before(concat($pValue, ','), ','))"/>
+                <xsl:choose>
+                    <xsl:when
+                            test="normalize-space($pElement/text()) = $vNextItem">
+                        <xsl:value-of select="true()"/>
+                    </xsl:when>
+                    <xsl:otherwise>
+                        <xsl:call-template name="split">
+                            <xsl:with-param name="pElement" select="$pElement"/>
+                            <xsl:with-param name="pValue"
+                                            select="substring-after($pValue, ',')"/>
+                        </xsl:call-template>
+                    </xsl:otherwise>
+                </xsl:choose>
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:value-of select="false()"/>
+            </xsl:otherwise>
+        </xsl:choose>
+    </xsl:template>
+
+    <xsl:template name="callrecursive">
+        <xsl:param name="pT"/>
+        <xsl:param name="pValues"/>
+        <xsl:param name="pText"/>
+        <xsl:param name="pPattern"/>
+
+        <xsl:choose>
+            <xsl:when
+                    test="string-length($pT) = 1 and string-length(translate($pT, $pValues, '')) = 0">
+                <xsl:call-template name="patternmatch">
+                    <xsl:with-param name="pText" select="$pText"/>
+                    <xsl:with-param name="pPattern" select="$pPattern"/>
+                </xsl:call-template>
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:value-of select="false()"/>
+            </xsl:otherwise>
+        </xsl:choose>
+    </xsl:template>
+
+    <xsl:template name="patternmatch">
+        <xsl:param name="pText"/>
+        <xsl:param name="pPattern"/>
+        <xsl:choose>
+            <xsl:when
+                    test="(string-length($pText) = 0 and string-length($pPattern) != 0) or (string-length($pText) != 0 and string-length($pPattern) = 0)">
+                <xsl:value-of select="false()"/>
+            </xsl:when>
+            <xsl:when test="string-length($pText) = 0"> <!-- Nothing left to match -->
+                <xsl:value-of select="true()"/>
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:variable name="t" select="substring($pText, 1, 1)"/>
+                <xsl:variable name="p"
+                              select="substring($pPattern, 1, 1)"/>
+                <xsl:variable name="vText"
+                              select="substring($pText, 2)"/>
+                <xsl:variable name="vPattern"
+                              select="substring($pPattern, 2)"/>
+                <xsl:choose>
+                    <xsl:when test="$p = '.'">
+                        <xsl:call-template name="patternmatch">
+                            <xsl:with-param name="pText" select="$vText"/>
+                            <xsl:with-param name="pPattern" select="$vPattern"/>
+                        </xsl:call-template>
+                    </xsl:when>
+                    <xsl:when
+                            test="$p = '\' and string-length($vPattern) != 0">
+                        <xsl:call-template name="callrecursive">
+                            <xsl:with-param name="pT" select="$t"/>
+                            <xsl:with-param name="pValues"
+                                            select="substring($vPattern, 1, 1)"/>
+                            <xsl:with-param name="pText" select="$vText"/>
+                            <xsl:with-param name="pPattern"
+                                            select="substring($vPattern, 2)"/>
+                        </xsl:call-template>
+                    </xsl:when>
+                    <xsl:when test="$p = '1'">
+                        <xsl:call-template name="callrecursive">
+                            <xsl:with-param name="pT" select="$t"/>
+                            <xsl:with-param name="pValues">
+                                123456789
+                            </xsl:with-param>
+                            <xsl:with-param name="pText" select="$vText"/>
+                            <xsl:with-param name="pPattern" select="$vPattern"/>
+                        </xsl:call-template>
+                    </xsl:when>
+                    <xsl:when test="$p = '0'">
+                        <xsl:call-template name="callrecursive">
+                            <xsl:with-param name="pT" select="$t"/>
+                            <xsl:with-param name="pValues">
+                                0123456789
+                            </xsl:with-param>
+                            <xsl:with-param name="pText" select="$vText"/>
+                            <xsl:with-param name="pPattern" select="$vPattern"/>
+                        </xsl:call-template>
+                    </xsl:when>
+                    <xsl:when test="$p = 'a'">
+                        <xsl:call-template name="callrecursive">
+                            <xsl:with-param name="pT" select="$t"/>
+                            <xsl:with-param name="pValues">
+                                abcdefghijklmnopqrstuvwxyz
+                            </xsl:with-param>
+                            <xsl:with-param name="pText" select="$vText"/>
+                            <xsl:with-param name="pPattern" select="$vPattern"/>
+                        </xsl:call-template>
+                    </xsl:when>
+                    <xsl:when test="$p = 'A'">
+                        <xsl:call-template name="callrecursive">
+                            <xsl:with-param name="pT" select="$t"/>
+                            <xsl:with-param name="pValues">
+                                ABCDEFGHIJKLMNOPQRSTUVWXYZ
+                            </xsl:with-param>
+                            <xsl:with-param name="pText" select="$vText"/>
+                            <xsl:with-param name="pPattern" select="$vPattern"/>
+                        </xsl:call-template>
+                    </xsl:when>
+                    <xsl:when test="$p = 'z' or $p = 'Z'">
+                        <xsl:call-template name="callrecursive">
+                            <xsl:with-param name="pT" select="$t"/>
+                            <xsl:with-param name="pValues">
+                                abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
+                            </xsl:with-param>
+                            <xsl:with-param name="pText" select="$vText"/>
+                            <xsl:with-param name="pPattern" select="$vPattern"/>
+                        </xsl:call-template>
+                    </xsl:when>
+                    <xsl:when test="$t = $p">
+                        <xsl:call-template name="patternmatch">
+                            <xsl:with-param name="pText" select="$vText"/>
+                            <xsl:with-param name="pPattern" select="$vPattern"/>
+                        </xsl:call-template>
+                    </xsl:when>
+                    <xsl:otherwise>
+                        <xsl:value-of select="false()"/>
+                    </xsl:otherwise>
+                </xsl:choose>
+            </xsl:otherwise>
+        </xsl:choose>
+    </xsl:template>
+
+    <!-- Very simple pattern matching; check that pElement matches pPattern;
+        '0' = any number, '1' = 1-9, 'a' = lowercase letter, 'A' = uppercase letter,
+        'z'/'Z' = letter, '.' any character; unmatched characters are matched literally,
+        characters can be escaped using \ to be matched literally -->
+    <xsl:template name="testpattern">
+        <xsl:param name="pElement" select="."/>
+        <xsl:param name="pPattern" select="''"/>
+        <xsl:variable name="vText" select="$pElement/text()"/>
+        <xsl:call-template name="patternmatch">
+            <xsl:with-param name="pText" select="$vText"/>
+            <xsl:with-param name="pPattern" select="$pPattern"/>
+        </xsl:call-template>
+    </xsl:template>
+
+    <!-- Test that $pElement matches $pValues. $pValues can be '' (non-existant
+        or empty), '*' (existant and non-empty), '#' (existant node), '!#' (non-existant
+        node), '#<pattern>' (matching <pattern> according to testpattern), or a (list
+        of) allowed/disallowed values (disallow by prefixing by !) -->
+    <xsl:template name="testvalue">
+        <xsl:param name="pElement" select="."/>
+        <xsl:param name="pValues" select="''"/>
+        <xsl:choose>
+            <xsl:when test="normalize-space($pValues) = ''">
+                <xsl:choose>
+                    <xsl:when test="not($pElement/.)">
+                        <xsl:value-of select="true()"/>
+                    </xsl:when>
+                    <xsl:when test="normalize-space($pElement/text()) = ''">
+                        <xsl:value-of select="true()"/>
+                    </xsl:when>
+                    <xsl:otherwise>
+                        <xsl:value-of select="false()"/>
+                    </xsl:otherwise>
+                </xsl:choose>
+            </xsl:when>
+            <xsl:when test="normalize-space($pValues) = '*'">
+                <xsl:choose>
+                    <xsl:when test="normalize-space($pElement/text()) != ''">
+                        <xsl:value-of select="true()"/>
+                    </xsl:when>
+                    <xsl:otherwise>
+                        <xsl:value-of select="false()"/>
+                    </xsl:otherwise>
+                </xsl:choose>
+            </xsl:when>
+            <xsl:when test="normalize-space($pValues) = '#'">
+                <xsl:choose>
+                    <xsl:when test="$pElement/.">
+                        <xsl:value-of select="true()"/>
+                    </xsl:when>
+                    <xsl:otherwise>
+                        <xsl:value-of select="false()"/>
+                    </xsl:otherwise>
+                </xsl:choose>
+            </xsl:when>
+            <xsl:when
+                    test="string-length(normalize-space($pValues)) > 1 and substring(normalize-space($pValues), 1, 1) = '#'">
+                <xsl:call-template name="testpattern">
+                    <xsl:with-param name="pElement" select="$pElement"/>
+                    <xsl:with-param name="pPattern"
+                                    select="substring(normalize-space($pValues), 2)"/>
+                </xsl:call-template>
+            </xsl:when>
+            <xsl:when
+                    test="string-length(normalize-space($pValues)) > 1 and substring(normalize-space($pValues), 1, 1) = '!'">
+                <xsl:variable name="vValue">
+	                <xsl:call-template name="testvalue">
+	                    <xsl:with-param name="pElement" select="$pElement"/>
+	                    <xsl:with-param name="pValues"
+	                                    select="substring(normalize-space($pValues), 2)"/>
+	                </xsl:call-template>
+                </xsl:variable>
+                <xsl:choose>
+                	<xsl:when test="$vValue = 'true'"><xsl:value-of select="false()"/></xsl:when>
+                	<xsl:otherwise><xsl:value-of select="true()"/></xsl:otherwise>
+                </xsl:choose>
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:call-template name="split">
+                    <xsl:with-param name="pElement" select="$pElement"/>
+                    <xsl:with-param name="pValue" select="$pValues"/>
+                </xsl:call-template>
+            </xsl:otherwise>
+        </xsl:choose>
+    </xsl:template>
+
+    <!-- Checks if pThis is greater than pOther or equals; generates an error
+        if not -->
+    <xsl:template name="checkRelation">
+        <xsl:param name="pThis" select="."/>
+        <xsl:param name="pOther"/>
+        <xsl:param name="pRelation"/>
+        <xsl:param name="pExtra" select="node()"/>
+        <xsl:param name="pRule">
+            FAIL
+        </xsl:param>
+
+        <xsl:choose>
+            <xsl:when test="normalize-space($pRelation) = 'equals'">
+                <xsl:call-template name="checkRelation">
+                    <xsl:with-param name="pThis" select="$pOther"/>
+                    <xsl:with-param name="pOther" select="$pThis"/>
+                    <xsl:with-param name="pRelation">
+                        equalsGt
+                    </xsl:with-param>
+                    <xsl:with-param name="pExtra" select="$pExtra"/>
+                    <xsl:with-param name="pRule" select="$pRule"/>
+                </xsl:call-template>
+                <xsl:call-template name="checkRelation">
+                    <xsl:with-param name="pThis" select="$pOther"/>
+                    <xsl:with-param name="pOther" select="$pThis"/>
+                    <xsl:with-param name="pRelation">
+                        equalsLt
+                    </xsl:with-param>
+                    <xsl:with-param name="pExtra" select="$pExtra"/>
+                    <xsl:with-param name="pRule" select="$pRule"/>
+                </xsl:call-template>
+            </xsl:when>
+            <xsl:when
+                    test="normalize-space($pRelation) = 'equalsGt' and $pThis &lt; $pOther">
+                <xsl:call-template name="addError">
+                    <xsl:with-param name="pRule" select="$pRule"/>
+                    <xsl:with-param name="pElements"
+                                    select="$pThis | $pOther | $pExtra"/>
+                </xsl:call-template>
+            </xsl:when>
+            <xsl:when test="normalize-space($pRelation) = 'equalsLt'">
+                <xsl:call-template name="checkRelation">
+                    <xsl:with-param name="pThis" select="$pOther"/>
+                    <xsl:with-param name="pOther" select="$pThis"/>
+                    <xsl:with-param name="pRelation">
+                        equalsGt
+                    </xsl:with-param>
+                    <xsl:with-param name="pExtra" select="$pExtra"/>
+                    <xsl:with-param name="pRule" select="$pRule"/>
+                </xsl:call-template>
+            </xsl:when>
+        </xsl:choose>
+    </xsl:template>
+
+    <xsl:template name="adjustDate">
+        <xsl:param name="pDate"/>
+        <xsl:param name="pOverflow">carry</xsl:param>
+
+        <xsl:variable name="vDay" select="$pDate mod 100"/>
+        <xsl:variable name="vMonth"
+                      select="floor($pDate div 100) mod 100"/>
+        <xsl:variable name="vYear"
+                      select="floor($pDate div 10000) mod 10000"/>
+
+        <!-- Adjust days for overrun -->
+        <xsl:variable name="vAdjustedDay">
+            <xsl:choose>
+                <xsl:when
+                        test="$vDay > 30 and ($vMonth = 4 or $vMonth = 6 or $vMonth = 9 or $vMonth = 11)">
+                    <xsl:choose>
+	                    <xsl:when test="$pOverflow = 'carry'">
+		                    <xsl:value-of select="$pDate - 30 + 100"/>
+	                    </xsl:when>
+	                    <xsl:when test="$pOverflow = 'truncate'">
+		                    <xsl:value-of select="$pDate - $vDay + 30"/>
+	                    </xsl:when>
+                    </xsl:choose>
+                </xsl:when>
+                <xsl:when
+                        test="$vDay > 31 and ($vMonth = 1 or $vMonth = 3 or $vMonth = 5 or $vMonth = 7 or $vMonth = 8 or $vMonth = 10 or $vMonth = 12)">
+                    <xsl:choose>
+	                    <xsl:when test="$pOverflow = 'carry'">
+		                    <xsl:value-of select="$pDate - 31 + 100"/>
+	                    </xsl:when>
+	                    <xsl:when test="$pOverflow = 'truncate'">
+		                    <xsl:value-of select="$pDate - $vDay + 31"/>
+	                    </xsl:when>
+                    </xsl:choose>
+                </xsl:when>
+                <xsl:when
+                        test="$vDay > 29 and $vMonth = 2 and ($vYear mod 4) = 0">
+                    <xsl:choose>
+	                    <xsl:when test="$pOverflow = 'carry'">
+		                    <xsl:value-of select="$pDate - 29 + 100"/>
+	                    </xsl:when>
+	                    <xsl:when test="$pOverflow = 'truncate'">
+		                    <xsl:value-of select="$pDate - $vDay + 29"/>
+	                    </xsl:when>
+                    </xsl:choose>
+                </xsl:when>
+                <xsl:when
+                        test="$vDay > 28 and $vMonth = 2 and ($vYear mod 4) != 0">
+                    <xsl:choose>
+	                    <xsl:when test="$pOverflow = 'carry'">
+		                    <xsl:value-of select="$pDate - 28 + 100"/>
+	                    </xsl:when>
+	                    <xsl:when test="$pOverflow = 'truncate'">
+		                    <xsl:value-of select="$pDate - $vDay + 28"/>
+	                    </xsl:when>
+                    </xsl:choose>
+                </xsl:when>
+                <xsl:otherwise>
+                    <xsl:value-of select="0 + $pDate"/>
+                </xsl:otherwise>
+            </xsl:choose>
+        </xsl:variable>
+
+        <!-- Adjust months for overrun -->
+        <xsl:variable name="vAdjustedMonth">
+            <xsl:choose>
+                <xsl:when test="floor($vAdjustedDay div 100) mod 100 > 12">
+                    <xsl:value-of select="$vAdjustedDay - 1200 + 10000"/>
+                </xsl:when>
+                <xsl:otherwise>
+                    <xsl:value-of select="0 + $vAdjustedDay"/>
+                </xsl:otherwise>
+            </xsl:choose>
+        </xsl:variable>
+
+        <!-- Return or call recursively (if we need to adjust for more than one
+            overrun) -->
+        <xsl:choose>
+            <xsl:when test="$vAdjustedMonth = $pDate">
+                <xsl:value-of select="0 + $pDate"/>
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:call-template name="adjustDate">
+                    <xsl:with-param name="pDate"
+                                    select="$vAdjustedMonth"/>
+		            <xsl:with-param name="pOverflow" select="$pOverflow" />
+                </xsl:call-template>
+            </xsl:otherwise>
+        </xsl:choose>
+    </xsl:template>
+
+    <!-- Adds a number of days to a date; only works for pExtra < (100 - 31) -->
+    <xsl:template name="addDate">
+        <xsl:param name="pDate"/>
+        <xsl:param name="pExtra"/>
+        <xsl:param name="pOverflow">carry</xsl:param>
+
+		<xsl:if test="normalize-space($pDate) != ''">
+	        <xsl:call-template name="adjustDate">
+	            <xsl:with-param name="pDate"
+	                            select="translate($pDate, '-', '') + $pExtra"/>
+	            <xsl:with-param name="pOverflow" select="$pOverflow" />
+	        </xsl:call-template>
+		</xsl:if>
+    </xsl:template>
+    
+    <!-- Adds a number of months to a date; only works for pExtra < (100 - 12), handles negative values -->
+    <xsl:template name="addMonths">
+        <xsl:param name="pDate"/>
+        <xsl:param name="pExtra"/>
+        <xsl:param name="pOverflow">carry</xsl:param>
+
+		<xsl:choose>
+			<xsl:when test="$pExtra &lt; 0">
+		        <xsl:call-template name="addMonths">
+		            <xsl:with-param name="pDate"
+		                            select="translate($pDate, '-', '') - 10000"/>
+		            <xsl:with-param name="pExtra" select="$pExtra + 12" />
+		            <xsl:with-param name="pOverflow" select="$pOverflow" />
+		        </xsl:call-template>
+			</xsl:when>
+			<xsl:when test="$pExtra &gt; 12">
+		        <xsl:call-template name="addMonths">
+		            <xsl:with-param name="pDate"
+		                            select="translate($pDate, '-', '') + 10000"/>
+		            <xsl:with-param name="pExtra" select="$pExtra - 12" />
+		            <xsl:with-param name="pOverflow" select="$pOverflow" />
+		        </xsl:call-template>
+			</xsl:when>
+			<xsl:otherwise>
+		        <xsl:call-template name="adjustDate">
+		            <xsl:with-param name="pDate"
+		                            select="translate($pDate, '-', '') + 100 * $pExtra"/>
+		            <xsl:with-param name="pOverflow" select="$pOverflow" />
+		        </xsl:call-template>
+			</xsl:otherwise>
+		</xsl:choose>
+    </xsl:template>
+    
+    <!--  Check that a given date intervals have no overlap -->
+    <xsl:template name="checkNoOverlap">
+        <xsl:param name="pStartName">Ingangsdatum</xsl:param>
+        <xsl:param name="pEndName">Einddatum</xsl:param>
+        <xsl:param name="pElements" />
+        <xsl:param name="pExtra" select="emptyNodeSet"/>
+        <xsl:param name="pRule">
+            FAIL
+        </xsl:param>
+        
+        <xsl:for-each select="$pElements">
+        	<xsl:variable name="vThis" select="." />
+        	<xsl:variable name="vPosition" select="position()" />
+        	<xsl:variable name="vViolations" select="$pElements[position() &gt; $vPosition
+        	                                           and (normalize-space($vThis/*[local-name() = $pEndName]/text()) = '' or translate(*[local-name() = $pStartName]/text(), '-', '') &lt;= translate($vThis/*[local-name() = $pEndName]/text(), '-', ''))
+        	                                           and (normalize-space(*[local-name() = $pEndName]/text()) = '' or translate(*[local-name() = $pEndName]/text(), '-', '') &gt;= translate($vThis/*[local-name() = $pStartName]/text(), '-', ''))
+        	                                           ]"/>
+           <xsl:if test="$vViolations">
+ 	        	<xsl:call-template name="addError">
+		        	<xsl:with-param name="pRule" select="$pRule" />
+	                <xsl:with-param name="pElements" select="$vViolations | $vThis"/>
+	        	</xsl:call-template>
+             </xsl:if>
+        </xsl:for-each>
+    </xsl:template>
+    
+    <!--  Check that a given date interval is fully covered by Ingangsdatum-Einddatum of given nodes; this filters pElements for more meaningful errors -->
+    <xsl:template name="checkDateCover">
+        <xsl:param name="pStartName">Ingangsdatum</xsl:param>
+        <xsl:param name="pEndName">Einddatum</xsl:param>
+        <xsl:param name="pElements" />
+        <xsl:param name="pExtra" select="emptyNodeSet"/>
+        <xsl:param name="pRule">
+            FAIL
+        </xsl:param>
+        
+        <xsl:variable name="vStart" select="*[local-name() = $pStartName]/text()" />
+        <xsl:variable name="vEnd" select="*[local-name() = $pEndName]/text()" />
+        
+        <xsl:call-template name="checkDateCoverRecursive">
+	        <xsl:with-param name="pStart" select="$vStart" />
+	        <xsl:with-param name="pEnd" select="$vEnd" />
+	        <xsl:with-param name="pStartName" select="$pStartName" />
+	        <xsl:with-param name="pEndName" select="$pEndName" />
+	        <xsl:with-param name="pElements" select="$pElements[(normalize-space($vEnd) = '' or translate(./*[local-name() = $pStartName]/text(), '-', '') &lt;= translate($vEnd, '-', ''))
+	        																									and (normalize-space(./*[local-name() = $pEndName]/text()) = '' or translate(./*[local-name() = $pEndName]/text(), '-', '') &gt;= translate($vStart, '-', ''))]" />
+	        <xsl:with-param name="pExtra" select="$pExtra" />
+	        <xsl:with-param name="pRule" select="$pRule" />
+        </xsl:call-template>
+    </xsl:template>
+    
+    
+    <!--  Check that a given date interval is fully covered by Ingangsdatum-Einddatum of given nodes -->
+    <xsl:template name="checkDateCoverRecursive">
+        <xsl:param name="pStart" />
+        <xsl:param name="pEnd" />
+        <xsl:param name="pStartName" />
+        <xsl:param name="pEndName" />
+        <xsl:param name="pElements" />
+        <xsl:param name="pExtra" select="emptyNodeSet"/>
+        <xsl:param name="pRule">
+            FAIL
+        </xsl:param>
+        <xsl:variable name="vStart" select="translate($pStart, '-', '')" />
+        <xsl:if test="normalize-space($vStart) != '' and (normalize-space($pEnd) = '' or $vStart &lt;= translate($pEnd, '-', ''))">
+        	<xsl:variable name="vChild"
+				select="$pElements[(translate(./*[local-name() = $pStartName]/text(), '-', '') &lt;= $vStart)
+																			and (normalize-space(./*[local-name() = $pEndName]/text()) = '' or translate(./*[local-name() = $pEndName]/text(), '-', '') &gt;= $vStart)
+																			and (normalize-space(./*[local-name() = $pEndName]/text()) = '' or translate(./*[local-name() = $pEndName]/text(), '-', '') &gt;= translate(./*[local-name() = $pStartName]/text(), '-', ''))
+																			][1]" />
+        	<xsl:choose>
+	        	<xsl:when test="$vChild">
+	        		<xsl:call-template name="checkDateCoverRecursive">
+	        			<xsl:with-param name="pStart">
+	        				<xsl:call-template name="addDate">
+	        					<xsl:with-param name="pDate" select="$vChild/*[local-name() = $pEndName]/text()" />
+	        					<xsl:with-param name="pExtra">1</xsl:with-param>
+	        				</xsl:call-template>
+	        			</xsl:with-param>
+	        			<xsl:with-param name="pEnd" select="$pEnd" />
+				        <xsl:with-param name="pStartName" select="$pStartName" />
+				        <xsl:with-param name="pEndName" select="$pEndName" />
+	        			<xsl:with-param name="pElements" select="$pElements" />
+	        			<xsl:with-param name="pExtra" select="$pExtra" />
+	        			<xsl:with-param name="pRule" select="$pRule" />
+	        		</xsl:call-template>
+	        	</xsl:when>
+	        	<xsl:otherwise>
+	        	<xsl:call-template name="addError">
+		        	<xsl:with-param name="pRule" select="$pRule" />
+	                <xsl:with-param name="pElements" select="$pElements | $pExtra"/>
+	        	</xsl:call-template>
+	        	</xsl:otherwise>
+        	</xsl:choose>
+        </xsl:if>
+    </xsl:template>
+
+
+    <!-- Checks if Date pThis from Node pSource is equal to, or equal to or
+        greater/lesser than a given pDate; generates an error if not dates must be
+        formatted as YYYY-MM-DD -->
+    <xsl:template name="checkDateRelation">
+        <xsl:param name="pSource" select="."/>
+        <xsl:param name="pThis" select="$pSource/text()"/>
+        <xsl:param name="pDate">
+            2018-01-01
+        </xsl:param>
+        <xsl:param name="pRelation"/>
+        <xsl:param name="pExtra"
+                   select="emptyNodeSet"/> <!-- Selecting a not existing node so the default value'll be an empty node-set -->
+        <xsl:param name="pRule">
+            FAIL
+        </xsl:param>
+        
+        <xsl:choose>
+            <xsl:when test="not($pSource)">
+                <xsl:call-template name="addError">
+                    <xsl:with-param name="pRule" select="$pRule"/>
+                    <xsl:with-param name="pElements" select="$pSource"/>
+                </xsl:call-template>
+            </xsl:when>
+            <xsl:when test="$pRelation = 'equals'">
+                <xsl:call-template name="checkDateRelation">
+                    <xsl:with-param name="pThis" select="$pDate"/>
+                    <xsl:with-param name="pDate" select="$pThis"/>
+                    <xsl:with-param name="pRelation">
+                        equalsGt
+                    </xsl:with-param>
+                    <xsl:with-param name="pExtra" select="$pExtra"/>
+                    <xsl:with-param name="pRule" select="$pRule"/>
+                </xsl:call-template>
+                <xsl:call-template name="checkDateRelation">
+                    <xsl:with-param name="pThis" select="$pDate"/>
+                    <xsl:with-param name="pDate" select="$pThis"/>
+                    <xsl:with-param name="pRelation">
+                        equalsLt
+                    </xsl:with-param>
+                    <xsl:with-param name="pExtra" select="$pExtra"/>
+                    <xsl:with-param name="pRule" select="$pRule"/>
+                </xsl:call-template>
+            </xsl:when>
+            <xsl:when
+                    test="$pRelation = 'equalsGt' and translate($pThis, '-', '') &lt; translate($pDate, '-', '')">
+                <xsl:call-template name="addError">
+                    <xsl:with-param name="pRule" select="$pRule"/>
+                    <xsl:with-param name="pElements"
+                                    select="$pSource | $pExtra"/>
+                </xsl:call-template>
+            </xsl:when>
+            <xsl:when test="$pRelation = 'equalsLt'">
+                <xsl:call-template name="checkDateRelation">
+                    <xsl:with-param name="pThis" select="$pDate"/>
+                    <xsl:with-param name="pDate" select="$pThis"/>
+                    <xsl:with-param name="pRelation">
+                        equalsGt
+                    </xsl:with-param>
+                    <xsl:with-param name="pExtra" select="$pExtra"/>
+                    <xsl:with-param name="pRule" select="$pRule"/>
+                </xsl:call-template>
+            </xsl:when>
+            <xsl:when test="$pRelation = 'daysAfter'">
+                <xsl:variable name="vDate">
+                    <xsl:call-template name="addDate">
+                        <xsl:with-param name="pDate" select="$pDate"/>
+                        <xsl:with-param name="pExtra" select="$pExtra"/>
+                    </xsl:call-template>
+                </xsl:variable>
+                <xsl:if test="1 * translate($pThis, '-', '') &lt;= 1 * $vDate">
+                    <xsl:call-template name="addError">
+                        <xsl:with-param name="pRule" select="$pRule"/>
+                        <xsl:with-param name="pElements"
+                                        select="$pSource | $pDate"/>
+                    </xsl:call-template>
+                </xsl:if>
+            </xsl:when>
+            <xsl:when test="$pRelation = 'monthsBefore'">
+                <xsl:variable name="vDate">
+                    <xsl:call-template name="addMonths">
+                        <xsl:with-param name="pDate" select="$pDate"/>
+                        <xsl:with-param name="pExtra" select="$pExtra"/>
+                        <xsl:with-param name="pOverflow">truncate</xsl:with-param>
+                    </xsl:call-template>
+                </xsl:variable>
+                <xsl:if test="1 * translate($pThis, '-', '') &gt; 1 * $vDate">
+                    <xsl:call-template name="addError">
+                        <xsl:with-param name="pRule" select="$pRule"/>
+                        <xsl:with-param name="pElements"
+                                        select="$pSource | $pDate"/>
+                    </xsl:call-template>
+                </xsl:if>
+            </xsl:when>
+            <xsl:when test="$pRelation = 'monthsAfter'">
+                <xsl:variable name="vDate">
+                    <xsl:call-template name="addMonths">
+                        <xsl:with-param name="pDate" select="$pDate"/>
+                        <xsl:with-param name="pExtra" select="$pExtra"/>
+                        <xsl:with-param name="pOverflow">truncate</xsl:with-param>
+                    </xsl:call-template>
+                </xsl:variable>
+                <xsl:if test="1 * translate($pThis, '-', '') &lt; 1 * $vDate">
+                    <xsl:call-template name="addError">
+                        <xsl:with-param name="pRule" select="$pRule"/>
+                        <xsl:with-param name="pElements"
+                                        select="$pSource | $pDate"/>
+                    </xsl:call-template>
+                </xsl:if>
+            </xsl:when>
+        </xsl:choose>
+
+    </xsl:template>
+
+    <!-- Check that $pThis is empty iff $pOther is and add an error for $pRule
+        otherwise -->
+    <xsl:template name="checkempty">
+        <xsl:param name="pThis" select="."/>
+        <xsl:param name="pOther" select="."/>
+        <xsl:param name="pExtra"
+                   select="emptyNodeSet"/> <!-- Selecting a not existing node so the default value'll be an empty node-set -->
+        <xsl:param name="pRule">
+            FAIL
+        </xsl:param>
+
+        <xsl:variable name="thisEmpty">
+            <xsl:call-template name="testvalue">
+                <xsl:with-param name="pElement" select="$pThis"/>
+            </xsl:call-template>
+        </xsl:variable>
+
+        <xsl:variable name="otherEmpty">
+            <xsl:call-template name="testvalue">
+                <xsl:with-param name="pElement" select="$pOther"/>
+            </xsl:call-template>
+        </xsl:variable>
+
+        <xsl:if test="$thisEmpty = 'false' and $otherEmpty = 'true'">
+            <xsl:call-template name="addError">
+                <xsl:with-param name="pRule" select="$pRule"/>
+                <xsl:with-param name="pElements"
+                                select="$pThis | $pOther | $pExtra"/>
+            </xsl:call-template>
+        </xsl:if>
+    </xsl:template>
+
+    <!-- Check pThis is equal to pOther; must be dates in the forst YYYY-MM-DD -->
+    <xsl:template name="checkDateEquals">
+        <xsl:param name="pThis"/>
+        <xsl:param name="pOther"/>
+        <xsl:param name="pExtra"
+                   select="emptyNodeSet"/> <!-- Selecting a not existing node so the default value'll be an empty node-set -->
+        <xsl:param name="pRule">
+            FAIL
+        </xsl:param>
+
+        <xsl:if test="$pThis and $pOther and $pThis != $pOther/text()">
+            <xsl:call-template name="addError">
+                <xsl:with-param name="pRule" select="$pRule"/>
+                <xsl:with-param name="pElements"
+                                select="$pThis | $pOther | $pExtra"/>
+            </xsl:call-template>
+        </xsl:if>
+    </xsl:template>
+
+    <!-- Check pThis comes (non-strictly) after pOther; must be dates in the
+        forst YYYY-MM-DD -->
+    <xsl:template name="checkafter">
+        <xsl:param name="pThis" select="."/>
+        <xsl:param name="pOther" select="."/>
+        <xsl:param name="pExtra"
+                   select="emptyNodeSet"/> <!-- Selecting a not existing node so the default value'll be an empty node-set -->
+        <xsl:param name="pRule">
+            FAIL
+        </xsl:param>
+
+        <xsl:if
+                test="not($pThis) or not($pOther) or translate($pOther/text(), '-', '') &gt; translate($pThis/text(), '-', '')">
+            <xsl:call-template name="addError">
+                <xsl:with-param name="pRule" select="$pRule"/>
+                <xsl:with-param name="pElements"
+                                select="$pThis | $pOther | $pExtra"/>
+            </xsl:call-template>
+        </xsl:if>
+    </xsl:template>
+
+    <!-- Check pThis comes (strictly) after pOther; must be dates in the forst
+        YYYY-MM-DD -->
+    <xsl:template name="checkafterstrict">
+        <xsl:param name="pThis" select="."/>
+        <xsl:param name="pOther" select="."/>
+        <xsl:param name="pExtra"
+                   select="emptyNodeSet"/> <!-- Selecting a not existing node so the default value'll be an empty node-set -->
+        <xsl:param name="pRule">
+            FAIL
+        </xsl:param>
+
+        <xsl:if
+                test="not($pThis) or not($pOther) or translate($pOther/text(), '-', '') &gt;= translate($pThis/text(), '-', '')">
+            <xsl:call-template name="addError">
+                <xsl:with-param name="pRule" select="$pRule"/>
+                <xsl:with-param name="pElements"
+                                select="$pThis | $pOther | $pExtra"/>
+            </xsl:call-template>
+        </xsl:if>
+    </xsl:template>
+
+    <!-- Check if pThis is in the same year as pOther; dates must be formatted
+        as YYYY-MM-DD -->
+    <xsl:template name="checksameyear">
+        <xsl:param name="pThis" select="."/>
+        <xsl:param name="pOther" select="."/>
+        <xsl:param name="pExtra"
+                   select="emptyNodeSet"/> <!-- Selecting a not existing node so the default value'll be an empty node-set -->
+        <xsl:param name="pRule">
+            FAIL
+        </xsl:param>
+
+        <xsl:if
+                test="not($pThis) or not($pOther) or substring(translate($pOther/text(), '-', ''), 1, 4) != substring(translate($pThis/text(), '-', ''), 1, 4)">
+            <xsl:call-template name="addError">
+                <xsl:with-param name="pRule" select="$pRule"/>
+                <xsl:with-param name="pElements"
+                                select="$pThis | $pOther | $pExtra"/>
+            </xsl:call-template>
+        </xsl:if>
+    </xsl:template>
+
+    <!-- Checks if the number of years between pDate1 and pDate2 is not more
+        than pYears -->
+    <xsl:template name="checkYearsBetween">
+        <xsl:param name="pDate1"/>
+        <xsl:param name="pDate2"/>
+        <xsl:param name="pYears"/>
+        <xsl:param name="pExtra"
+                   select="emptyNodeSet"/> <!-- Selecting a not existing node so the default value'll be an empty node-set -->
+        <xsl:param name="pRule">
+            ERROR
+        </xsl:param>
+
+        <xsl:variable name="year1"
+                      select="number(translate($pDate1, '-', ''))"/>
+        <xsl:variable name="year2"
+                      select="number(translate($pDate2, '-', ''))"/>
+        <xsl:variable name="pYearsNumber"
+                      select="number($pYears) * 10000"/>
+
+        <xsl:if test="($year2 + $pYearsNumber) &lt; $year1">
+            <xsl:call-template name="addError">
+                <xsl:with-param name="pRule" select="$pRule"/>
+                <xsl:with-param name="pElements"
+                                select="$pDate1 | $pDate2 | $pExtra"/>
+            </xsl:call-template>
+        </xsl:if>
+    </xsl:template>
+
+    <!-- Checks if one of periods overlay the other bidirectionally. Returns
+        true when there is a overlay and false if not -->
+    <xsl:template name="isPeriodOverlay">
+        <xsl:param name="pThis"/>
+        <xsl:param name="pOther"/>
+
+        <xsl:choose>
+            <xsl:when
+                    test="$pThis/*[local-name()='Einddatum'] and $pOther/*[local-name()='Einddatum']">
+                <xsl:choose>
+                    <xsl:when
+                            test="
+                            translate($pThis/*[local-name()='Einddatum'], '-', '') &gt;=
+                            translate($pOther/*[local-name()='Ingangsdatum'], '-', '') and
+                            translate($pThis/*[local-name()='Einddatum'], '-', '') &lt;=
+                            translate($pOther/*[local-name()='Einddatum'], '-', '')
+                            or
+                            translate($pOther/*[local-name()='Einddatum'], '-', '') &gt;=
+                            translate($pThis/*[local-name()='Ingangsdatum'], '-', '') and
+                            translate($pOther/*[local-name()='Einddatum'], '-', '') &lt;=
+                            translate($pThis/*[local-name()='Einddatum'], '-', '')">
+                        <xsl:value-of select="true()"/>
+                    </xsl:when>
+                    <xsl:otherwise>
+                        <xsl:value-of select="false()"/>
+                    </xsl:otherwise>
+                </xsl:choose>
+            </xsl:when>
+            <xsl:when
+                    test="$pThis/*[local-name()='Einddatum'] and not($pOther/*[local-name()='Einddatum'])">
+                <xsl:choose>
+                    <xsl:when
+                            test="
+                            translate($pThis/*[local-name()='Einddatum'], '-', '') &gt;=
+                            translate($pOther/*[local-name()='Ingangsdatum'], '-', '') and
+                            translate($pThis/*[local-name()='Einddatum'], '-', '') &lt;=
+                            '99999999'
+                            or
+                            '99999999' &gt;=
+                            translate($pThis/*[local-name()='Ingangsdatum'], '-', '') and
+                            '99999999' &lt;=
+                            translate($pThis/*[local-name()='Einddatum'], '-', '')">
+                        <xsl:value-of select="true()"/>
+                    </xsl:when>
+                    <xsl:otherwise>
+                        <xsl:value-of select="false()"/>
+                    </xsl:otherwise>
+                </xsl:choose>
+            </xsl:when>
+            <xsl:when
+                    test="$pOther/*[local-name()='Einddatum'] and not($pThis/*[local-name()='Einddatum'])">
+                <xsl:choose>
+                    <xsl:when
+                            test="
+                            '99999999' &gt;=
+                            translate($pOther/*[local-name()='Ingangsdatum'], '-', '') and
+                            '99999999' &lt;=
+                            translate($pOther/*[local-name()='Einddatum'], '-', '')
+                            or
+                            translate($pOther/*[local-name()='Einddatum'], '-', '') &gt;=
+                            translate($pThis/*[local-name()='Ingangsdatum'], '-', '') and
+                            translate($pOther/*[local-name()='Einddatum'], '-', '') &lt;=
+                            '99999999'">
+                        <xsl:value-of select="true()"/>
+                    </xsl:when>
+                    <xsl:otherwise>
+                        <xsl:value-of select="false()"/>
+                    </xsl:otherwise>
+                </xsl:choose>
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:value-of select="true()"/>
+            </xsl:otherwise>
+        </xsl:choose>
+    </xsl:template>
+
+    <!-- Checks if one of period is within another period. Returns true when
+        it is and false if not -->
+    <xsl:template name="isPeriodWithinPeriod">
+        <xsl:param name="pThis"/>
+        <xsl:param name="pOther"/>
+
+        <xsl:choose>
+            <xsl:when
+                    test="$pThis/*[local-name()='Einddatum'] and $pOther/*[local-name()='Einddatum']">
+                <xsl:choose>
+                    <xsl:when
+                            test="
+                    		translate($pThis/*[local-name()='Einddatum'], '-', '') &gt;=
+                            translate($pThis/*[local-name()='Ingangsdatum'], '-', '')
+                            and
+                            translate($pThis/*[local-name()='Ingangsdatum'], '-', '') &gt;=
+                            translate($pOther/*[local-name()='Ingangsdatum'], '-', '') and
+                            translate($pThis/*[local-name()='Ingangsdatum'], '-', '') &lt;=
+                            translate($pOther/*[local-name()='Einddatum'], '-', '')
+                            and
+                            translate($pThis/*[local-name()='Einddatum'], '-', '') &gt;=
+                            translate($pOther/*[local-name()='Ingangsdatum'], '-', '') and
+                            translate($pThis/*[local-name()='Einddatum'], '-', '') &lt;=
+                            translate($pOther/*[local-name()='Einddatum'], '-', '')">
+                        <xsl:value-of select="true()"/>
+                    </xsl:when>
+                    <xsl:otherwise>
+                        <xsl:value-of select="false()"/>
+                    </xsl:otherwise>
+                </xsl:choose>
+            </xsl:when>
+            <xsl:when
+                    test="$pThis/*[local-name()='Einddatum'] and not($pOther/*[local-name()='Einddatum'])">
+                <xsl:choose>
+                    <xsl:when
+                            test="
+                    		translate($pThis/*[local-name()='Einddatum'], '-', '') &gt;=
+                            translate($pThis/*[local-name()='Ingangsdatum'], '-', '')
+                            and
+                            translate($pThis/*[local-name()='Ingangsdatum'], '-', '') &gt;=
+                            translate($pOther/*[local-name()='Ingangsdatum'], '-', '') and
+                            translate($pThis/*[local-name()='Ingangsdatum'], '-', '') &lt;=
+                            '99999999'
+                            and
+                            translate($pThis/*[local-name()='Einddatum'], '-', '') &gt;=
+                            translate($pOther/*[local-name()='Ingangsdatum'], '-', '') and
+                            translate($pThis/*[local-name()='Einddatum'], '-', '') &lt;=
+                            '99999999'">
+                        <xsl:value-of select="true()"/>
+                    </xsl:when>
+                    <xsl:otherwise>
+                        <xsl:value-of select="false()"/>
+                    </xsl:otherwise>
+                </xsl:choose>
+            </xsl:when>
+            <xsl:when
+                    test="$pOther/*[local-name()='Einddatum'] and not($pThis/*[local-name()='Einddatum'])">
+                <xsl:value-of select="false()"/>
+            </xsl:when>
+            <xsl:when
+                    test="not($pOther/*[local-name()='Einddatum']) and not($pThis/*[local-name()='Einddatum'])">
+                <xsl:choose>
+                    <xsl:when
+                            test="
+                            translate($pThis/*[local-name()='Ingangsdatum'], '-', '') &gt;=
+                            translate($pOther/*[local-name()='Ingangsdatum'], '-', '') and
+                            translate($pThis/*[local-name()='Ingangsdatum'], '-', '') &lt;=
+                            '99999999'">
+                        <xsl:value-of select="true()"/>
+                    </xsl:when>
+                    <xsl:otherwise>
+                        <xsl:value-of select="false()"/>
+                    </xsl:otherwise>
+                </xsl:choose>
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:value-of select="false()"/>
+            </xsl:otherwise>
+        </xsl:choose>
+    </xsl:template>
+
+    <!-- Returns true on one day period overlay -->
+    <xsl:template name="isOneDayPeriodOverlay">
+        <xsl:param name="pThis"/>
+        <xsl:param name="pOther"/>
+        <xsl:choose>
+            <xsl:when
+                    test="translate($pThis/*[local-name()='Ingangsdatum'], '-', '') =
+                            translate($pThis/*[local-name()='Einddatum'], '-', '')">
+                <xsl:value-of select="true()"/>
+            </xsl:when>
+            <xsl:when
+                    test="translate($pThis/*[local-name()='Ingangsdatum'], '-', '') >=
+                            translate($pOther/*[local-name()='Ingangsdatum'], '-', '')">
+                <xsl:choose>
+                    <xsl:when test="$pOther/*[local-name()='Einddatum']">
+                        <xsl:choose>
+                            <xsl:when
+                                    test="translate($pOther/*[local-name()='Einddatum'], '-', '') =
+                                            translate($pThis/*[local-name()='Ingangsdatum'], '-', '')">
+                                <xsl:value-of select="true()"/>
+                            </xsl:when>
+                            <xsl:otherwise>
+                                <xsl:value-of select="false()"/>
+                            </xsl:otherwise>
+                        </xsl:choose>
+                    </xsl:when>
+                    <xsl:otherwise>
+                        <xsl:value-of select="false()"/>
+                    </xsl:otherwise>
+                </xsl:choose>
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:choose>
+                    <xsl:when test="$pThis/*[local-name()='Einddatum']">
+                        <xsl:choose>
+                            <xsl:when
+                                    test="translate($pThis/*[local-name()='Einddatum'], '-', '') =
+                                    translate($pOther/*[local-name()='Ingangsdatum'], '-', '')">
+                                <xsl:value-of select="true()"/>
+                            </xsl:when>
+                            <xsl:otherwise>
+                                <xsl:value-of select="false()"/>
+                            </xsl:otherwise>
+                        </xsl:choose>
+                    </xsl:when>
+                    <xsl:otherwise>
+                        <xsl:value-of select="false()"/>
+                    </xsl:otherwise>
+                </xsl:choose>
+            </xsl:otherwise>
+        </xsl:choose>
+    </xsl:template>
+
+    <!-- Returns the minimum of a collection of dates; must be dates in the
+        forst YYYY-MM-DD -->
+    <xsl:template name="minDate">
+        <xsl:param name="pAccumulator"/>
+        <xsl:param name="pList"/>
+        <xsl:choose>
+            <xsl:when test="not($pList)">
+                <xsl:value-of select="$pAccumulator"/>
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:call-template name="minDate">
+                    <xsl:with-param name="pAccumulator">
+                        <xsl:choose>
+                            <xsl:when
+                                    test="translate($pAccumulator, '-', '') &gt; translate($pList[1]/text(), '-', '')">
+                                <xsl:value-of select="$pList[1]/text()"/>
+                            </xsl:when>
+                            <xsl:otherwise>
+                                <xsl:value-of select="$pAccumulator"/>
+                            </xsl:otherwise>
+                        </xsl:choose>
+                    </xsl:with-param>
+                    <xsl:with-param name="pList"
+                                    select="$pList[position() > 1]"/>
+                </xsl:call-template>
+            </xsl:otherwise>
+        </xsl:choose>
+    </xsl:template>
+
+    <!-- Returns the maximum of a collection of dates; must be dates in the
+        forst YYYY-MM-DD -->
+    <xsl:template name="maxDate">
+        <xsl:param name="pAccumulator" select="0000-00-00"/>
+        <xsl:param name="pList"/>
+        <xsl:choose>
+            <xsl:when test="not($pList)">
+                <xsl:value-of select="$pAccumulator"/>
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:call-template name="maxDate">
+                    <xsl:with-param name="pAccumulator">
+                        <xsl:choose>
+                            <xsl:when
+                                    test="translate($pList[1]/text(), '-', '') &gt; translate($pAccumulator, '-', '')">
+                                <xsl:value-of select="$pList[1]"/>
+                            </xsl:when>
+                            <xsl:otherwise>
+                                <xsl:value-of select="$pAccumulator"/>
+                            </xsl:otherwise>
+                        </xsl:choose>
+                    </xsl:with-param>
+                    <xsl:with-param name="pList"
+                                    select="$pList[position() > 1]"/>
+                </xsl:call-template>
+            </xsl:otherwise>
+        </xsl:choose>
+    </xsl:template>
+
+    <!-- Check that $pThis matches $pValues (same as testvalue) and add a violation
+        of $pRule otherwise -->
+    <xsl:template name="checkvalue">
+        <xsl:param name="pThis" select="."/>
+        <xsl:param name="pValues" select="''"/>
+        <xsl:param name="pExtra"
+                   select="emptyNodeSet"/> <!-- Selecting a not existing node so the default value'll be an empty node-set -->
+        <xsl:param name="pCode" select="nonExistingNode"/>
+        <xsl:param name="pRule">
+            FAIL
+        </xsl:param>
+
+        <xsl:variable name="thisCorrect">
+            <xsl:call-template name="testvalue">
+                <xsl:with-param name="pElement" select="$pThis"/>
+                <xsl:with-param name="pValues" select="$pValues"/>
+            </xsl:call-template>
+        </xsl:variable>
+
+        <xsl:if test="$thisCorrect = 'false'">
+            <xsl:call-template name="addError">
+                <xsl:with-param name="pRule" select="$pRule"/>
+                <xsl:with-param name="pElements"
+                                select="$pThis|$pExtra"/>
+                <xsl:with-param name="pCode" select="$pCode"/>
+            </xsl:call-template>
+        </xsl:if>
+    </xsl:template>
+
+    <!-- Check that $pThis matches $pValues (same as testvalue) and add a violation
+        of $pRule if it does -->
+    <xsl:template name="checknvalue">
+        <xsl:param name="pThis" select="."/>
+        <xsl:param name="pValues" select="''"/>
+        <xsl:param name="pExtra"
+                   select="emptyNodeSet"/> <!-- Selecting a not existing node so the default value'll be an empty -->
+        <xsl:param name="pRule">
+            FAIL
+        </xsl:param>
+
+        <xsl:variable name="thisCorrect">
+            <xsl:call-template name="testvalue">
+                <xsl:with-param name="pElement" select="$pThis"/>
+                <xsl:with-param name="pValues" select="$pValues"/>
+            </xsl:call-template>
+        </xsl:variable>
+
+        <xsl:if test="$thisCorrect = 'true'">
+            <xsl:call-template name="addError">
+                <xsl:with-param name="pRule" select="$pRule"/>
+                <xsl:with-param name="pElements"
+                                select="$pThis | $pExtra"/>
+            </xsl:call-template>
+        </xsl:if>
+    </xsl:template>
+
+    <!-- Check that $pThis matches $pValue1 (same as testvalue) and $pOther
+        matches $pValue2; add a violation of $pRule if not (pThis => pOther), i.e.,
+        if this matches and other doesn't -->
+    <xsl:template name="checkimplication">
+        <xsl:param name="pThis" select="."/>
+        <xsl:param name="pValue1" select="''"/>
+        <xsl:param name="pOther" select="."/>
+        <xsl:param name="pValue2" select="''"/>
+        <xsl:param name="pExtra"
+                   select="emptyNodeSet"/> <!-- Selecting a not existing node so the default value'll be an empty node-set -->
+        <xsl:param name="pRule">
+            FAIL
+        </xsl:param>
+
+        <xsl:variable name="thisCorrect">
+            <xsl:call-template name="testvalue">
+                <xsl:with-param name="pElement" select="$pThis"/>
+                <xsl:with-param name="pValues" select="$pValue1"/>
+            </xsl:call-template>
+        </xsl:variable>
+
+        <xsl:variable name="otherCorrect">
+            <xsl:call-template name="testvalue">
+                <xsl:with-param name="pElement" select="$pOther"/>
+                <xsl:with-param name="pValues" select="$pValue2"/>
+            </xsl:call-template>
+        </xsl:variable>
+
+        <xsl:if
+                test="$thisCorrect = 'true' and $otherCorrect = 'false'">
+            <xsl:call-template name="addError">
+                <xsl:with-param name="pRule" select="$pRule"/>
+                <xsl:with-param name="pElements"
+                                select="$pThis|$pOther|$pExtra"/>
+            </xsl:call-template>
+        </xsl:if>
+    </xsl:template>
+
+    <!-- Check that $pThis matches $pValue1 (same as testvalue) and $pOther
+        matches $pValue2; add a violation of $pRule if they don't both match or none
+        matches -->
+    <xsl:template name="checksame">
+        <xsl:param name="pThis" select="."/>
+        <xsl:param name="pValue1" select="''"/>
+        <xsl:param name="pOther" select="."/>
+        <xsl:param name="pValue2" select="''"/>
+        <xsl:param name="pExtra"
+                   select="emptyNodeSet"/> <!-- Selecting a not existing node so the default value'll be an empty node-set -->
+        <xsl:param name="pRule">
+            FAIL
+        </xsl:param>
+
+        <xsl:variable name="thisCorrect">
+            <xsl:call-template name="testvalue">
+                <xsl:with-param name="pElement" select="$pThis"/>
+                <xsl:with-param name="pValues" select="$pValue1"/>
+            </xsl:call-template>
+        </xsl:variable>
+
+        <xsl:variable name="otherCorrect">
+            <xsl:call-template name="testvalue">
+                <xsl:with-param name="pElement" select="$pOther"/>
+                <xsl:with-param name="pValues" select="$pValue2"/>
+            </xsl:call-template>
+        </xsl:variable>
+
+        <xsl:if test="$thisCorrect != $otherCorrect">
+            <xsl:call-template name="addError">
+                <xsl:with-param name="pRule" select="$pRule"/>
+                <xsl:with-param name="pElements"
+                                select="$pThis | $pOther | $pExtra"/>
+            </xsl:call-template>
+        </xsl:if>
+    </xsl:template>
+
+    <!-- Check that $pThis matches $pValue1 (same as testvalue) and $pOther
+        matches $pValue2; add a violation of $pRule if both don't match -->
+    <xsl:template name="checkSingleCorrect">
+        <xsl:param name="pThis" select="."/>
+        <xsl:param name="pValue1" select="''"/>
+        <xsl:param name="pOther" select="."/>
+        <xsl:param name="pValue2" select="''"/>
+        <xsl:param name="pExtra"
+                   select="emptyNodeSet"/> <!-- Selecting a not existing node so the default value'll be an empty node-set -->
+        <xsl:param name="pRule">
+            FAIL
+        </xsl:param>
+
+        <xsl:variable name="thisCorrect">
+            <xsl:call-template name="testvalue">
+                <xsl:with-param name="pElement" select="$pThis"/>
+                <xsl:with-param name="pValues" select="$pValue1"/>
+            </xsl:call-template>
+        </xsl:variable>
+
+        <xsl:variable name="otherCorrect">
+            <xsl:call-template name="testvalue">
+                <xsl:with-param name="pElement" select="$pOther"/>
+                <xsl:with-param name="pValues" select="$pValue2"/>
+            </xsl:call-template>
+        </xsl:variable>
+
+        <xsl:if
+                test="$thisCorrect = 'false' and $otherCorrect = 'false'">
+            <xsl:call-template name="addError">
+                <xsl:with-param name="pRule" select="$pRule"/>
+                <xsl:with-param name="pElements"
+                                select="$pThis|$pOther|$pExtra"/>
+            </xsl:call-template>
+        </xsl:if>
+    </xsl:template>
+
+    <xsl:template name="inList">
+        <xsl:param name="pList"/>
+        <xsl:param name="pValue"/>
+        <xsl:param name="pCurrent" select="nonExistingNode"/>
+
+        <xsl:choose>
+            <xsl:when test="not($pCurrent) and $pList > 1">
+                <xsl:call-template name="inList">
+                    <xsl:with-param name="pList" select="$pList"/>
+                    <xsl:with-param name="pValue" select="$pValue"/>
+                    <xsl:with-param name="pCurrent" select="$pList[1]"/>
+                </xsl:call-template>
+            </xsl:when>
+            <xsl:when test="$pValue = $pList[1]">
+                <xsl:value-of select="true()"/>
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:choose>
+                    <xsl:when test="$pCurrent = $pValue">
+                        <xsl:value-of select="true()"/>
+                    </xsl:when>
+                    <xsl:otherwise>
+                        <xsl:if test="count($pList) > 0">
+                            <xsl:call-template name="inList">
+                                <xsl:with-param name="pList"
+                                                select="$pList[position() > 1]"/>
+                                <xsl:with-param name="pValue" select="$pValue"/>
+                                <xsl:with-param name="pCurrent"
+                                                select="$pList[1]"/>
+                            </xsl:call-template>
+                        </xsl:if>
+                    </xsl:otherwise>
+                </xsl:choose>
+            </xsl:otherwise>
+        </xsl:choose>
+    </xsl:template>
+
+    <xsl:template name="transformKeys">
+        <xsl:param name="pElement" select="."/>
+        <xsl:param name="pKeys"/>
+
+        <xsl:for-each select="$pElement">
+
+            <xsl:variable name="keys">
+                <xsl:call-template name="evaluateXPath">
+                    <xsl:with-param name="pContext" select="current()"/>
+                    <xsl:with-param name="pPath">
+                        <xsl:value-of
+                                select="substring-before(normalize-space($pKeys), ',')"/>
+                    </xsl:with-param>
+                </xsl:call-template>
+            </xsl:variable>
+
+            <xsl:text disable-output-escaping="yes">&lt;</xsl:text>
+            <xsl:value-of select="$keys"/>
+            <xsl:text disable-output-escaping="yes">&gt;</xsl:text>
+            <xsl:if
+                    test="contains($pKeys, ',') and substring-after(normalize-space($pKeys), ',')">
+                <xsl:call-template name="transformKeys">
+                    <xsl:with-param name="pElement" select="current()"/>
+                    <xsl:with-param name="pKeys"
+                                    select="substring-after(normalize-space($pKeys), ',')"/>
+                </xsl:call-template>
+            </xsl:if>
+        </xsl:for-each>
+    </xsl:template>
+
+    <xsl:template name="checkDuplicateKeys">
+        <xsl:param name="pElement" select="."/>
+        <xsl:param name="pKeys"/>
+        <xsl:param name="pExtra"
+                   select="emptyNodeSet"/> <!-- Selecting a not existing node so the default value'll be an empty node-set -->
+        <xsl:param name="pRule">
+            FAIL
+        </xsl:param>
+
+        <xsl:for-each select="$pElement">
+
+            <xsl:variable name="keys1">
+                <xsl:call-template name="transformKeys">
+                    <xsl:with-param name="pElement" select="current()"/>
+                    <xsl:with-param name="pKeys" select="$pKeys"/>
+                </xsl:call-template>
+            </xsl:variable>
+
+            <xsl:variable name="position" select="position()"/>
+
+            <xsl:for-each select="$pElement[position() > $position]">
+                <xsl:variable name="keys2">
+                    <xsl:call-template name="transformKeys">
+                        <xsl:with-param name="pElement" select="current()"/>
+                        <xsl:with-param name="pKeys" select="$pKeys"/>
+                    </xsl:call-template>
+                </xsl:variable>
+
+                <xsl:if
+                        test="$keys1 = $keys2 and $keys1 != '' and $keys2 != ''">
+                    <xsl:call-template name="addError">
+                        <xsl:with-param name="pRule" select="$pRule"/>
+                        <xsl:with-param name="pElements"
+                                        select="$pElement[position() = $position]|current() | $pExtra"/>
+                    </xsl:call-template>
+                </xsl:if>
+                <!--keys:<xsl:value-of select="$keys1"/> -->
+            </xsl:for-each>
+
+        </xsl:for-each>
+    </xsl:template>
+
+    <xsl:template name="formatNumberInternal">
+        <xsl:param name="pValue"/>
+        <xsl:if test="$pValue &gt; 0">
+            <xsl:call-template name="formatNumberInternal">
+                <xsl:with-param name="pValue" select="floor(number($pValue) div 10)"/>
+            </xsl:call-template>
+            <xsl:value-of select="number($pValue) mod 10"/>
+        </xsl:if>
+    </xsl:template>
+
+    <xsl:template name="formatNumber">
+        <xsl:param name="pValue"/>
+        <xsl:choose>
+            <xsl:when test="number($pValue) &lt; 0">-
+                <xsl:call-template name="formatNumberInternal">
+                    <xsl:with-param name="pValue" select="0 - number($pValue)"/>
+                </xsl:call-template>
+            </xsl:when>
+            <xsl:when test="number($pValue) = 0">0</xsl:when>
+            <xsl:otherwise>
+                <xsl:call-template name="formatNumberInternal">
+                    <xsl:with-param name="pValue" select="number($pValue)"/>
+                </xsl:call-template>
+            </xsl:otherwise>
+        </xsl:choose>
+    </xsl:template>
+
+    <xsl:template match="*[local-name()='BerichtCode']"
+                  mode="header" priority="10">
+        <r:BerichtCode>
+            <xsl:value-of select="text()"/>
+        </r:BerichtCode>
+    </xsl:template>
+    <xsl:template match="*[local-name()='BerichtVersie']"
+                  mode="header" priority="10">
+        <r:BerichtVersie>
+            <xsl:value-of select="text()"/>
+        </r:BerichtVersie>
+    </xsl:template>
+    <xsl:template match="*[local-name()='BerichtSubversie']"
+                  mode="header" priority="10">
+        <r:BerichtSubversie>
+            <xsl:value-of select="text()"/>
+        </r:BerichtSubversie>
+    </xsl:template>
+    <xsl:template
+            match="*[local-name()='Identificatie'] | *[local-name()='DeclarantFactuurNummer']"
+                  mode="header" priority="10">
+        <r:Identificatie>
+            <xsl:value-of select="normalize-space(text())"/>
+        </r:Identificatie>
+    </xsl:template>
+    <xsl:template
+            match="*[local-name()='Dagtekening'] | *[local-name()='FactuurDagtekening']"
+                  mode="header" priority="10">
+        <r:Dagtekening>
+            <xsl:value-of select="text()"/>
+        </r:Dagtekening>
+    </xsl:template>
+    <xsl:template
+            match="*[local-name()='BerichtIdentificatie'] | *[local-name()='DeclaratieFactuurIdentificatie']"
+            mode="header" priority="10">
+        <r:BerichtIdentificatie>
+            <xsl:apply-templates select="*" mode="header"/>
+        </r:BerichtIdentificatie>
+    </xsl:template>
+    <xsl:template
+            match="*[local-name()='DeclaratieIdentificatie']"
+            mode="header" priority="10">
+    </xsl:template>
+
+    <xsl:variable name="xsltVersion">
+        2.0.24
+    </xsl:variable>
+
+    <xsl:template match="*|@*|text()" mode="check"/>
+    <xsl:template match="*|@*|text()" mode="header">
+        <xsl:apply-templates select="*" mode="header"/>
+    </xsl:template>
+    <xsl:template match="*|@*|text()" mode="traverse">
+        <xsl:apply-templates select="*" mode="traverse"/>
+        <xsl:apply-templates select="." mode="check"/>
+    </xsl:template>
+    <xsl:template match="*[local-name() = 'Bericht']">
+        <r:Rapport>
+            <r:Header>
+                <xsl:apply-templates
+			    select="//*[local-name() = 'Header']/*" mode="header"/>
+		    <xsl:choose>
+			    <xsl:when test="contains($xsltVersion, '-SNAPSHOT')">
+				  <r:XSLTVersie>0.0.0</r:XSLTVersie>
+			    </xsl:when>
+			    <xsl:otherwise>
+				  <r:XSLTVersie>
+					<xsl:value-of select="normalize-space($xsltVersion)"/>
+				  </r:XSLTVersie>
+			    </xsl:otherwise>
+		    </xsl:choose>
+            </r:Header>
+            <r:Fouten>
+                <xsl:apply-templates select="*" mode="traverse"/>
+            </r:Fouten>
+        </r:Rapport>
+    </xsl:template>
+</xsl:stylesheet>
diff --git a/xslt-validatie/common/2_0/check_errors.xsl b/xslt-validatie/common/2_0/check_errors.xsl
new file mode 100644
index 0000000..83bd394
--- /dev/null
+++ b/xslt-validatie/common/2_0/check_errors.xsl
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:r="http://www.istandaarden.nl/validatie/1_1/rapport/schema"
+>
+	<xsl:import href="basis.xsl" />
+	<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
+
+	<xsl:template match="*" mode="translateCode" priority="0">
+		<xsl:param name="pCode"/>
+		<xsl:variable name="vFirst" select="substring($pCode, 1, 1)" />
+		<xsl:variable name="vRest" select="substring($pCode, 2)" />
+		<xsl:choose>
+			<xsl:when test="$vFirst = 'S' or $vFirst = 'D'">,C<xsl:value-of select="$pCode" />,</xsl:when>
+			<xsl:when test="$vFirst = '9'">,TR<xsl:value-of select="$vRest" />,</xsl:when>
+			<xsl:otherwise>ERROR</xsl:otherwise>
+		</xsl:choose>
+	</xsl:template>
+
+	<xsl:template match="*" mode="berichtoverstijgend" priority="0">
+		<xsl:param name="pCode"/>
+		<xsl:choose>
+			<xsl:when test="$pCode = '0001'"><xsl:value-of select="true()" /></xsl:when>
+			<xsl:otherwise><xsl:value-of select="true()" /></xsl:otherwise>
+		</xsl:choose>
+	</xsl:template>
+
+	<xsl:template match="*[local-name() = 'Header']/*[local-name() = 'RetourCodes']" priority="20">
+		<xsl:if test="./*[local-name() = 'RetourCode' and text() = '0001']">
+			<xsl:if test="ancestor-or-self::*[local-name() = 'Bericht']/*[local-name() != 'Header']">
+	            <xsl:call-template name="addError">
+	                <xsl:with-param name="pRule">IV028</xsl:with-param>
+	                <xsl:with-param name="pElements" select=". | ancestor-or-self::*[local-name() = 'Bericht']/*[local-name() != 'Header']" />
+	            </xsl:call-template>
+			</xsl:if>
+		</xsl:if>
+	</xsl:template>
+
+	<xsl:template match="*[local-name() = 'RetourCode' and text() = '0001']" priority="30">
+		<xsl:if test="not(ancestor::*[local-name() = 'Header'])">
+            <xsl:call-template name="addError">
+                <xsl:with-param name="pRule">IV028</xsl:with-param>
+            </xsl:call-template>
+		</xsl:if>
+	</xsl:template>
+
+	<xsl:template match="*[local-name() = 'RetourCode' and text() != '0200' and text() != '0233']" priority="20">
+		<xsl:variable name="vRules">
+			<xsl:apply-templates select="." mode="translateCode">
+				<xsl:with-param name="pCode" select="normalize-space(text())" />
+			</xsl:apply-templates>
+		</xsl:variable>
+		<xsl:variable name="vBerichtoverstijgend">
+			<xsl:apply-templates select="." mode="berichtoverstijgend">
+				<xsl:with-param name="pCode" select="normalize-space(text())" />
+			</xsl:apply-templates>
+		</xsl:variable>
+		<xsl:if test="($vBerichtoverstijgend = 'false') and not(../../descendant-or-self::*[contains($vRules, concat(',', concat(@vmCode, ',')))])">
+            <xsl:call-template name="addError">
+                <xsl:with-param name="pRule">IV028</xsl:with-param>
+            </xsl:call-template>
+		</xsl:if>
+	</xsl:template>
+
+	<xsl:template match="/" priority="20">
+        <r:Rapport>
+            <r:Fouten>
+				<xsl:apply-templates select="*" />
+            </r:Fouten>
+        </r:Rapport>
+	</xsl:template>
+
+	<xsl:template match="*" priority="10">
+		<xsl:apply-templates select="*" />
+	</xsl:template>
+
+</xsl:stylesheet>
diff --git a/xslt-validatie/common/2_0/heenbericht.xsl b/xslt-validatie/common/2_0/heenbericht.xsl
new file mode 100644
index 0000000..2816051
--- /dev/null
+++ b/xslt-validatie/common/2_0/heenbericht.xsl
@@ -0,0 +1,151 @@
+<?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" version="1.0" encoding="UTF-8" indent="yes"/>
+
+	<xsl:template name="formatNumberInternal">
+		<xsl:param name="pValue"/>
+		<xsl:if test="$pValue &gt; 0">
+			<xsl:call-template name="formatNumberInternal">
+				<xsl:with-param name="pValue" select="floor(number($pValue) div 10)"/>
+			</xsl:call-template>
+			<xsl:value-of select="number($pValue) mod 10"/>
+		</xsl:if>
+	</xsl:template>
+
+	<xsl:template name="formatNumber">
+		<xsl:param name="pValue"/>
+		<xsl:choose>
+			<xsl:when test="number($pValue) &lt; 0">-
+				<xsl:call-template name="formatNumberInternal">
+					<xsl:with-param name="pValue" select="0 - number($pValue)"/>
+				</xsl:call-template>
+			</xsl:when>
+			<xsl:when test="number($pValue) = 0">0</xsl:when>
+			<xsl:otherwise>
+				<xsl:call-template name="formatNumberInternal">
+					<xsl:with-param name="pValue" select="number($pValue)"/>
+				</xsl:call-template>
+			</xsl:otherwise>
+		</xsl:choose>
+	</xsl:template>
+
+	<xsl:template match="*" mode="mapMessage" priority="100">
+		<xsl:param name="pMessage" />
+		<xsl:choose>
+			<xsl:when test="$pMessage = 'aw310'">aw39</xsl:when>
+			<xsl:when test="$pMessage = 'zk310'">zk39</xsl:when>
+			<xsl:otherwise>
+				<xsl:variable name="vType"><xsl:value-of select="translate($pMessage, '0123456789', '')" /></xsl:variable>
+				<xsl:variable name="vNumber"><xsl:value-of select="translate($pMessage, $vType, '')" /></xsl:variable>
+				<xsl:value-of select="$vType" /><xsl:value-of select="1 * $vNumber - 1" />
+			</xsl:otherwise>
+		</xsl:choose>
+	</xsl:template>
+
+	<xsl:template name="mapNamespace">
+		<xsl:param name="pNamespace"/>
+		<xsl:variable name="vMessage"><xsl:value-of select="substring-before(substring-after(substring-after(substring-after($pNamespace, 'http://www.istandaarden.nl/'), '/'), '/'), '/')"/></xsl:variable>
+		<xsl:variable name="vPrefix"><xsl:value-of select="substring-before($pNamespace, $vMessage)"/></xsl:variable>
+		<xsl:variable name="vSuffix"><xsl:value-of select="substring-after($pNamespace, $vMessage)"/></xsl:variable>
+		<xsl:choose>
+			<xsl:when test="$vMessage = 'basisschema'"><xsl:value-of select="$pNamespace" /></xsl:when>
+			<xsl:otherwise><xsl:value-of select="$vPrefix" /><xsl:apply-templates select="." mode="mapMessage">
+					<xsl:with-param name="pMessage" select="$vMessage" />
+			</xsl:apply-templates><xsl:value-of select="$vSuffix" /></xsl:otherwise>
+		</xsl:choose>
+	</xsl:template>
+
+	<xsl:template match="*" mode="postoverride" priority="0">
+	</xsl:template>
+
+	<xsl:template match="*[local-name() = 'IdentificatieRetour']" priority="10"></xsl:template>
+	<xsl:template match="*[local-name() = 'DagtekeningRetour']" priority="10"></xsl:template>
+	<xsl:template match="*[local-name() = 'XsdVersieRetour']" priority="10"></xsl:template>
+	<xsl:template match="*[local-name() = 'RetourCodes']" priority="10"></xsl:template>
+	<xsl:template match="*[local-name() = 'RetourHeader']" priority="10"></xsl:template>
+	<xsl:template match="*[local-name() = 'RetourBedragen']" priority="10"></xsl:template>
+	<xsl:template match="*[local-name() = 'ToegekendeBedragPrestatie']" priority="10"></xsl:template>
+
+	<xsl:template match="*[local-name() = 'BerichtCode']" priority="10">
+		<xsl:variable name="vNamespace">
+			<xsl:call-template name="mapNamespace">
+				<xsl:with-param name="pNamespace" select="namespace-uri()" />
+			</xsl:call-template>
+		</xsl:variable>
+		<xsl:element name="{local-name()}" namespace="{normalize-space($vNamespace)}">
+			<xsl:value-of select="1 * text() - 1" />
+		</xsl:element>
+	</xsl:template>
+	
+	<xsl:template match="*[local-name() = 'XsdVersie']" priority="10">
+		<xsl:variable name="vMessage"><xsl:value-of select="substring-before(substring-after(substring-after(substring-after(namespace-uri(), 'http://www.istandaarden.nl/'), '/'), '/'), '/')"/></xsl:variable>
+		<xsl:variable name="vNumber"><xsl:value-of select="translate($vMessage, translate($vMessage, '0123456789', ''), '')" /></xsl:variable>
+		<xsl:if test="$vNumber != '304'">
+			<xsl:call-template name="copyElement" />
+		</xsl:if>
+	</xsl:template>
+
+	<xsl:template match="*[local-name() = 'Header']" mode="postoverride" priority="10">
+		<xsl:variable name="vMessage"><xsl:value-of select="substring-before(substring-after(substring-after(substring-after(namespace-uri(), 'http://www.istandaarden.nl/'), '/'), '/'), '/')"/></xsl:variable>
+		<xsl:variable name="vNumber"><xsl:value-of select="translate($vMessage, translate($vMessage, '0123456789', ''), '')" /></xsl:variable>
+		<xsl:if test="$vNumber = '304'">
+			<xsl:variable name="vNamespace">
+				<xsl:call-template name="mapNamespace">
+					<xsl:with-param name="pNamespace" select="namespace-uri()" />
+				</xsl:call-template>
+			</xsl:variable>
+			<xsl:variable name="vBasisNamespace">
+				<xsl:value-of select="namespace-uri(*[local-name() = 'RetourBedragen']/*[local-name() = 'IngediendTotaalBedrag'])" />
+			</xsl:variable>
+
+			<xsl:variable name="vTotaalDebet"
+				select="sum(ancestor-or-self::*[local-name() = 'Bericht']//*[local-name() = 'Client']//*[local-name() = 'IngediendeBedragPrestatie']/*[local-name() = 'DeclaratieFactuurBedrag' and ./*[local-name() = 'DebetCredit']/text() = 'D']/*[local-name() = 'Bedrag'])"/>
+			<xsl:variable name="vTotaalCredit"
+				select="sum(ancestor-or-self::*[local-name() = 'Bericht']//*[local-name() = 'Client']//*[local-name() = 'IngediendeBedragPrestatie']/*[local-name() = 'DeclaratieFactuurBedrag' and ./*[local-name() = 'DebetCredit']/text() = 'C']/*[local-name() = 'Bedrag'])"/>
+			<xsl:variable name="vSaldo" select="$vTotaalDebet - $vTotaalCredit"/>
+			<xsl:element name="DeclaratieFactuurBedragen" namespace="{normalize-space($vNamespace)}">
+				<xsl:choose>
+					<xsl:when test="$vSaldo &lt; 0">
+						<xsl:element name="DeclaratieFactuurTotaalBedrag" namespace="{normalize-space($vBasisNamespace)}">
+							<xsl:element name="TotaalBedrag" namespace="{normalize-space($vBasisNamespace)}">
+								<xsl:call-template name="formatNumber"><xsl:with-param name="pValue" select="0 - number($vSaldo)" /></xsl:call-template>
+							</xsl:element>
+							<xsl:element name="DebetCredit" namespace="{normalize-space($vBasisNamespace)}">D</xsl:element>
+						</xsl:element>
+					</xsl:when>
+					<xsl:otherwise>
+						<xsl:element name="DeclaratieFactuurTotaalBedrag" namespace="{normalize-space($vBasisNamespace)}">
+							<xsl:element name="TotaalBedrag" namespace="{normalize-space($vBasisNamespace)}">
+								<xsl:call-template name="formatNumber"><xsl:with-param name="pValue" select="$vSaldo" /></xsl:call-template>
+							</xsl:element>
+							<xsl:element name="DebetCredit" namespace="{normalize-space($vBasisNamespace)}">C</xsl:element>
+						</xsl:element>
+					</xsl:otherwise>
+				</xsl:choose>
+			</xsl:element>
+			<!--  need loop to change context -->
+			<xsl:for-each select="*[local-name() = 'XsdVersie']">
+				<xsl:call-template name="copyElement" />
+			</xsl:for-each>
+		</xsl:if>
+	</xsl:template>
+	
+	<xsl:template name="copyElement">
+		<xsl:variable name="vNamespace">
+			<xsl:call-template name="mapNamespace">
+				<xsl:with-param name="pNamespace" select="namespace-uri()" />
+			</xsl:call-template>
+		</xsl:variable>
+		<xsl:element name="{local-name()}" namespace="{normalize-space($vNamespace)}">
+			<xsl:copy-of select="@*" />
+			<xsl:apply-templates select="*" />
+			<xsl:apply-templates select="." mode="postoverride" />
+			<xsl:value-of select="text()" />
+		</xsl:element>
+	</xsl:template>
+
+	<xsl:template match="*">
+		<xsl:call-template name="copyElement" />
+	</xsl:template>
+
+</xsl:stylesheet>
diff --git a/xslt-validatie/common/2_0/merge.xsl b/xslt-validatie/common/2_0/merge.xsl
new file mode 100644
index 0000000..9c84d1b
--- /dev/null
+++ b/xslt-validatie/common/2_0/merge.xsl
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><stylesheet xmlns="http://www.w3.org/1999/XSL/Transform" xmlns:n0="http://www.istandaarden.nl/validatie/1_1/rapport/schema" exclude-result-prefixes="" version="1.0"><template match="/"><n0:Rapport><n0:Header><copy-of select="//n0:Header[1]/*"/></n0:Header><n0:Fouten><copy-of select="//n0:Fouten/n0:Fout"/></n0:Fouten></n0:Rapport></template></stylesheet>
\ No newline at end of file
diff --git a/xslt-validatie/jw/3_0/JW301.xsl b/xslt-validatie/jw/3_0/JW301.xsl
new file mode 100644
index 0000000..db58634
--- /dev/null
+++ b/xslt-validatie/jw/3_0/JW301.xsl
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:vr="http://www.istandaarden.nl/validatie/1_1/rapport/schema">
+	<!-- iJw 3.0 JW301 (2020-05-14) -->
+
+	<xsl:import href="common/basis.xsl" />
+	<xsl:include href="condities/CD007.xsl" />
+	<xsl:include href="condities/CD009.xsl" />
+	<xsl:include href="condities/CD025.xsl" />
+	<xsl:include href="condities/CD034.xsl" />
+	<xsl:include href="condities/CD041.xsl" />
+	<xsl:include href="condities/CD044.xsl" />
+	<xsl:include href="condities/CD075.xsl" />
+	<xsl:include href="condities/CD076.xsl" />
+	<xsl:include href="condities/CD077.xsl" />
+	<xsl:include href="condities/CD078.xsl" />
+	<xsl:include href="condities/CD079.xsl" />
+	<xsl:include href="condities/CD080.xsl" />
+	<xsl:include href="condities/CD081.xsl" />
+	<xsl:include href="constraints/CS002.xsl" />
+	<xsl:include href="constraints/CS003.xsl" />
+	<xsl:include href="constraints/CS023.xsl" />
+	<xsl:include href="constraints/CS050.xsl" />
+	<xsl:include href="constraints/CS089.xsl" />
+	<xsl:include href="constraints/CS104.xsl" />
+	<xsl:include href="constraints/CS300.xsl" />
+	<xsl:include href="constraints/CS318.xsl" />
+	<xsl:include href="constraints/CS323.xsl" />
+	<xsl:include href="constraints/CS330.xsl" />
+	<xsl:include href="rules/TR002.xsl" />
+	<xsl:include href="rules/TR006.xsl" />
+	<xsl:include href="rules/TR061.xsl" />
+	<xsl:include href="rules/TR097.xsl" />
+	<xsl:include href="rules/TR101.xsl" />
+	<xsl:include href="rules/TR302.xsl" />
+
+	<xsl:template match="*" mode="check" priority="0">
+		<xsl:apply-templates select="." mode="CD007"/>
+		<xsl:apply-templates select="." mode="CD009"/>
+		<xsl:apply-templates select="." mode="CD025"/>
+		<xsl:apply-templates select="." mode="CD034"/>
+		<xsl:apply-templates select="." mode="CD041"/>
+		<xsl:apply-templates select="." mode="CD044"/>
+		<xsl:apply-templates select="." mode="CD075"/>
+		<xsl:apply-templates select="." mode="CD076"/>
+		<xsl:apply-templates select="." mode="CD077"/>
+		<xsl:apply-templates select="." mode="CD078"/>
+		<xsl:apply-templates select="." mode="CD079"/>
+		<xsl:apply-templates select="." mode="CD080"/>
+		<xsl:apply-templates select="." mode="CD081"/>
+		<xsl:apply-templates select="." mode="CS002"/>
+		<xsl:apply-templates select="." mode="CS003"/>
+		<xsl:apply-templates select="." mode="CS023"/>
+		<xsl:apply-templates select="." mode="CS050"/>
+		<xsl:apply-templates select="." mode="CS089"/>
+		<xsl:apply-templates select="." mode="CS104"/>
+		<xsl:apply-templates select="." mode="CS300"/>
+		<xsl:apply-templates select="." mode="CS318"/>
+		<xsl:apply-templates select="." mode="CS323"/>
+		<xsl:apply-templates select="." mode="CS330"/>
+		<xsl:apply-templates select="." mode="TR002"/>
+		<xsl:apply-templates select="." mode="TR006"/>
+		<xsl:apply-templates select="." mode="TR061"/>
+		<xsl:apply-templates select="." mode="TR097"/>
+		<xsl:apply-templates select="." mode="TR101"/>
+		<xsl:apply-templates select="." mode="TR302"/>
+	</xsl:template>
+
+	<xsl:variable name="versionInfo">
+		<vr:XSLTHeader>
+			<vr:Standaard>ijw</vr:Standaard>
+			<vr:StandaardRelease>3.0</vr:StandaardRelease>
+			<vr:XSLTVersie>2.0.24</vr:XSLTVersie>
+		</vr:XSLTHeader>
+	</xsl:variable>
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/JW303.xsl b/xslt-validatie/jw/3_0/JW303.xsl
new file mode 100644
index 0000000..0e47ea5
--- /dev/null
+++ b/xslt-validatie/jw/3_0/JW303.xsl
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:vr="http://www.istandaarden.nl/validatie/1_1/rapport/schema">
+	<!-- iJw 3.0 JW303 (2020-05-14) -->
+
+	<xsl:import href="common/basis.xsl" />
+	<xsl:include href="condities/CD007.xsl" />
+	<xsl:include href="condities/CD025.xsl" />
+	<xsl:include href="condities/CD055.xsl" />
+	<xsl:include href="condities/CD056.xsl" />
+	<xsl:include href="condities/CD058.xsl" />
+	<xsl:include href="condities/CD059.xsl" />
+	<xsl:include href="condities/CD060.xsl" />
+	<xsl:include href="condities/CD062.xsl" />
+	<xsl:include href="constraints/CS002.xsl" />
+	<xsl:include href="constraints/CS023.xsl" />
+	<xsl:include href="constraints/CS050.xsl" />
+	<xsl:include href="constraints/CS089.xsl" />
+	<xsl:include href="constraints/CS103.xsl" />
+	<xsl:include href="constraints/CS108.xsl" />
+	<xsl:include href="constraints/CS300.xsl" />
+	<xsl:include href="constraints/CS323.xsl" />
+	<xsl:include href="constraints/CS325.xsl" />
+	<xsl:include href="constraints/CS327.xsl" />
+	<xsl:include href="constraints/CS328.xsl" />
+	<xsl:include href="constraints/CS331.xsl" />
+	<xsl:include href="rules/TR002.xsl" />
+	<xsl:include href="rules/TR097.xsl" />
+	<xsl:include href="rules/TR101.xsl" />
+	<xsl:include href="rules/TR312.xsl" />
+	<xsl:include href="rules/TR313.xsl" />
+	<xsl:include href="rules/TR314.xsl" />
+	<xsl:include href="rules/TR315.xsl" />
+	<xsl:include href="rules/TR316.xsl" />
+	<xsl:include href="rules/TR317.xsl" />
+	<xsl:include href="rules/TR319.xsl" />
+
+	<xsl:template match="*" mode="check" priority="0">
+		<xsl:apply-templates select="." mode="CD007"/>
+		<xsl:apply-templates select="." mode="CD025"/>
+		<xsl:apply-templates select="." mode="CD055"/>
+		<xsl:apply-templates select="." mode="CD056"/>
+		<xsl:apply-templates select="." mode="CD058"/>
+		<xsl:apply-templates select="." mode="CD059"/>
+		<xsl:apply-templates select="." mode="CD060"/>
+		<xsl:apply-templates select="." mode="CD062"/>
+		<xsl:apply-templates select="." mode="CS002"/>
+		<xsl:apply-templates select="." mode="CS023"/>
+		<xsl:apply-templates select="." mode="CS050"/>
+		<xsl:apply-templates select="." mode="CS089"/>
+		<xsl:apply-templates select="." mode="CS103"/>
+		<xsl:apply-templates select="." mode="CS108"/>
+		<xsl:apply-templates select="." mode="CS300"/>
+		<xsl:apply-templates select="." mode="CS323"/>
+		<xsl:apply-templates select="." mode="CS325"/>
+		<xsl:apply-templates select="." mode="CS327"/>
+		<xsl:apply-templates select="." mode="CS328"/>
+		<xsl:apply-templates select="." mode="CS331"/>
+		<xsl:apply-templates select="." mode="TR002"/>
+		<xsl:apply-templates select="." mode="TR097"/>
+		<xsl:apply-templates select="." mode="TR101"/>
+		<xsl:apply-templates select="." mode="TR312"/>
+		<xsl:apply-templates select="." mode="TR313"/>
+		<xsl:apply-templates select="." mode="TR314"/>
+		<xsl:apply-templates select="." mode="TR315"/>
+		<xsl:apply-templates select="." mode="TR316"/>
+		<xsl:apply-templates select="." mode="TR317"/>
+		<xsl:apply-templates select="." mode="TR319"/>
+	</xsl:template>
+
+	<xsl:variable name="versionInfo">
+		<vr:XSLTHeader>
+			<vr:Standaard>ijw</vr:Standaard>
+			<vr:StandaardRelease>3.0</vr:StandaardRelease>
+			<vr:XSLTVersie>2.0.24</vr:XSLTVersie>
+		</vr:XSLTHeader>
+	</xsl:variable>
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/JW304.xsl b/xslt-validatie/jw/3_0/JW304.xsl
new file mode 100644
index 0000000..78df798
--- /dev/null
+++ b/xslt-validatie/jw/3_0/JW304.xsl
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:vr="http://www.istandaarden.nl/validatie/1_1/rapport/schema">
+	<!-- iJw 3.0 JW304 (2020-05-14) -->
+
+	<xsl:import href="common/basis.xsl" />
+	<xsl:include href="condities/CD005.xsl" />
+	<xsl:include href="condities/CD007.xsl" />
+	<xsl:include href="condities/CD025.xsl" />
+	<xsl:include href="condities/CD055.xsl" />
+	<xsl:include href="condities/CD056.xsl" />
+	<xsl:include href="condities/CD058.xsl" />
+	<xsl:include href="condities/CD059.xsl" />
+	<xsl:include href="condities/CD060.xsl" />
+	<xsl:include href="condities/CD062.xsl" />
+	<xsl:include href="constraints/CS002.xsl" />
+	<xsl:include href="constraints/CS023.xsl" />
+	<xsl:include href="constraints/CS050.xsl" />
+	<xsl:include href="constraints/CS089.xsl" />
+	<xsl:include href="constraints/CS103.xsl" />
+	<xsl:include href="constraints/CS108.xsl" />
+	<xsl:include href="constraints/CS300.xsl" />
+	<xsl:include href="constraints/CS323.xsl" />
+	<xsl:include href="constraints/CS324.xsl" />
+	<xsl:include href="constraints/CS325.xsl" />
+	<xsl:include href="constraints/CS327.xsl" />
+	<xsl:include href="constraints/CS328.xsl" />
+	<xsl:include href="constraints/CS331.xsl" />
+	<xsl:include href="rules/TR002.xsl" />
+	<xsl:include href="rules/TR097.xsl" />
+	<xsl:include href="rules/TR101.xsl" />
+	<xsl:include href="rules/TR317.xsl" />
+	<xsl:include href="rules/TR320.xsl" />
+
+	<xsl:template match="*" mode="check" priority="0">
+		<xsl:apply-templates select="." mode="CD005"/>
+		<xsl:apply-templates select="." mode="CD007"/>
+		<xsl:apply-templates select="." mode="CD025"/>
+		<xsl:apply-templates select="." mode="CD055"/>
+		<xsl:apply-templates select="." mode="CD056"/>
+		<xsl:apply-templates select="." mode="CD058"/>
+		<xsl:apply-templates select="." mode="CD059"/>
+		<xsl:apply-templates select="." mode="CD060"/>
+		<xsl:apply-templates select="." mode="CD062"/>
+		<xsl:apply-templates select="." mode="CS002"/>
+		<xsl:apply-templates select="." mode="CS023"/>
+		<xsl:apply-templates select="." mode="CS050"/>
+		<xsl:apply-templates select="." mode="CS089"/>
+		<xsl:apply-templates select="." mode="CS103"/>
+		<xsl:apply-templates select="." mode="CS108"/>
+		<xsl:apply-templates select="." mode="CS300"/>
+		<xsl:apply-templates select="." mode="CS323"/>
+		<xsl:apply-templates select="." mode="CS324"/>
+		<xsl:apply-templates select="." mode="CS325"/>
+		<xsl:apply-templates select="." mode="CS327"/>
+		<xsl:apply-templates select="." mode="CS328"/>
+		<xsl:apply-templates select="." mode="CS331"/>
+		<xsl:apply-templates select="." mode="TR002"/>
+		<xsl:apply-templates select="." mode="TR097"/>
+		<xsl:apply-templates select="." mode="TR101"/>
+		<xsl:apply-templates select="." mode="TR317"/>
+		<xsl:apply-templates select="." mode="TR320"/>
+	</xsl:template>
+
+	<xsl:variable name="versionInfo">
+		<vr:XSLTHeader>
+			<vr:Standaard>ijw</vr:Standaard>
+			<vr:StandaardRelease>3.0</vr:StandaardRelease>
+			<vr:XSLTVersie>2.0.24</vr:XSLTVersie>
+		</vr:XSLTHeader>
+	</xsl:variable>
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/JW305.xsl b/xslt-validatie/jw/3_0/JW305.xsl
new file mode 100644
index 0000000..ff972f2
--- /dev/null
+++ b/xslt-validatie/jw/3_0/JW305.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:vr="http://www.istandaarden.nl/validatie/1_1/rapport/schema">
+	<!-- iJw 3.0 JW305 (2020-05-14) -->
+
+	<xsl:import href="common/basis.xsl" />
+	<xsl:include href="condities/CD007.xsl" />
+	<xsl:include href="condities/CD025.xsl" />
+	<xsl:include href="constraints/CS002.xsl" />
+	<xsl:include href="constraints/CS023.xsl" />
+	<xsl:include href="constraints/CS050.xsl" />
+	<xsl:include href="constraints/CS058.xsl" />
+	<xsl:include href="constraints/CS089.xsl" />
+	<xsl:include href="constraints/CS300.xsl" />
+	<xsl:include href="constraints/CS323.xsl" />
+	<xsl:include href="rules/TR002.xsl" />
+	<xsl:include href="rules/TR052.xsl" />
+	<xsl:include href="rules/TR097.xsl" />
+	<xsl:include href="rules/TR101.xsl" />
+
+	<xsl:template match="*" mode="check" priority="0">
+		<xsl:apply-templates select="." mode="CD007"/>
+		<xsl:apply-templates select="." mode="CD025"/>
+		<xsl:apply-templates select="." mode="CS002"/>
+		<xsl:apply-templates select="." mode="CS023"/>
+		<xsl:apply-templates select="." mode="CS050"/>
+		<xsl:apply-templates select="." mode="CS058"/>
+		<xsl:apply-templates select="." mode="CS089"/>
+		<xsl:apply-templates select="." mode="CS300"/>
+		<xsl:apply-templates select="." mode="CS323"/>
+		<xsl:apply-templates select="." mode="TR002"/>
+		<xsl:apply-templates select="." mode="TR052"/>
+		<xsl:apply-templates select="." mode="TR097"/>
+		<xsl:apply-templates select="." mode="TR101"/>
+	</xsl:template>
+
+	<xsl:variable name="versionInfo">
+		<vr:XSLTHeader>
+			<vr:Standaard>ijw</vr:Standaard>
+			<vr:StandaardRelease>3.0</vr:StandaardRelease>
+			<vr:XSLTVersie>2.0.24</vr:XSLTVersie>
+		</vr:XSLTHeader>
+	</xsl:variable>
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/JW307.xsl b/xslt-validatie/jw/3_0/JW307.xsl
new file mode 100644
index 0000000..4f17056
--- /dev/null
+++ b/xslt-validatie/jw/3_0/JW307.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:vr="http://www.istandaarden.nl/validatie/1_1/rapport/schema">
+	<!-- iJw 3.0 JW307 (2020-05-14) -->
+
+	<xsl:import href="common/basis.xsl" />
+	<xsl:include href="condities/CD007.xsl" />
+	<xsl:include href="condities/CD025.xsl" />
+	<xsl:include href="constraints/CS002.xsl" />
+	<xsl:include href="constraints/CS023.xsl" />
+	<xsl:include href="constraints/CS050.xsl" />
+	<xsl:include href="constraints/CS058.xsl" />
+	<xsl:include href="constraints/CS089.xsl" />
+	<xsl:include href="constraints/CS300.xsl" />
+	<xsl:include href="constraints/CS323.xsl" />
+	<xsl:include href="rules/TR002.xsl" />
+	<xsl:include href="rules/TR018.xsl" />
+	<xsl:include href="rules/TR097.xsl" />
+	<xsl:include href="rules/TR101.xsl" />
+
+	<xsl:template match="*" mode="check" priority="0">
+		<xsl:apply-templates select="." mode="CD007"/>
+		<xsl:apply-templates select="." mode="CD025"/>
+		<xsl:apply-templates select="." mode="CS002"/>
+		<xsl:apply-templates select="." mode="CS023"/>
+		<xsl:apply-templates select="." mode="CS050"/>
+		<xsl:apply-templates select="." mode="CS058"/>
+		<xsl:apply-templates select="." mode="CS089"/>
+		<xsl:apply-templates select="." mode="CS300"/>
+		<xsl:apply-templates select="." mode="CS323"/>
+		<xsl:apply-templates select="." mode="TR002"/>
+		<xsl:apply-templates select="." mode="TR018"/>
+		<xsl:apply-templates select="." mode="TR097"/>
+		<xsl:apply-templates select="." mode="TR101"/>
+	</xsl:template>
+
+	<xsl:variable name="versionInfo">
+		<vr:XSLTHeader>
+			<vr:Standaard>ijw</vr:Standaard>
+			<vr:StandaardRelease>3.0</vr:StandaardRelease>
+			<vr:XSLTVersie>2.0.24</vr:XSLTVersie>
+		</vr:XSLTHeader>
+	</xsl:variable>
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/JW315.xsl b/xslt-validatie/jw/3_0/JW315.xsl
new file mode 100644
index 0000000..51af12b
--- /dev/null
+++ b/xslt-validatie/jw/3_0/JW315.xsl
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:vr="http://www.istandaarden.nl/validatie/1_1/rapport/schema">
+	<!-- iJw 3.0 JW315 (2020-05-14) -->
+
+	<xsl:import href="common/basis.xsl" />
+	<xsl:include href="condities/CD007.xsl" />
+	<xsl:include href="condities/CD025.xsl" />
+	<xsl:include href="condities/CD041.xsl" />
+	<xsl:include href="condities/CD043.xsl" />
+	<xsl:include href="condities/CD066.xsl" />
+	<xsl:include href="condities/CD067.xsl" />
+	<xsl:include href="condities/CD068.xsl" />
+	<xsl:include href="condities/CD076.xsl" />
+	<xsl:include href="condities/CD080.xsl" />
+	<xsl:include href="condities/CD081.xsl" />
+	<xsl:include href="constraints/CS002.xsl" />
+	<xsl:include href="constraints/CS003.xsl" />
+	<xsl:include href="constraints/CS023.xsl" />
+	<xsl:include href="constraints/CS050.xsl" />
+	<xsl:include href="constraints/CS089.xsl" />
+	<xsl:include href="constraints/CS104.xsl" />
+	<xsl:include href="constraints/CS300.xsl" />
+	<xsl:include href="constraints/CS323.xsl" />
+	<xsl:include href="constraints/CS330.xsl" />
+	<xsl:include href="rules/TR002.xsl" />
+	<xsl:include href="rules/TR097.xsl" />
+	<xsl:include href="rules/TR101.xsl" />
+
+	<xsl:template match="*" mode="check" priority="0">
+		<xsl:apply-templates select="." mode="CD007"/>
+		<xsl:apply-templates select="." mode="CD025"/>
+		<xsl:apply-templates select="." mode="CD041"/>
+		<xsl:apply-templates select="." mode="CD043"/>
+		<xsl:apply-templates select="." mode="CD066"/>
+		<xsl:apply-templates select="." mode="CD067"/>
+		<xsl:apply-templates select="." mode="CD068"/>
+		<xsl:apply-templates select="." mode="CD076"/>
+		<xsl:apply-templates select="." mode="CD080"/>
+		<xsl:apply-templates select="." mode="CD081"/>
+		<xsl:apply-templates select="." mode="CS002"/>
+		<xsl:apply-templates select="." mode="CS003"/>
+		<xsl:apply-templates select="." mode="CS023"/>
+		<xsl:apply-templates select="." mode="CS050"/>
+		<xsl:apply-templates select="." mode="CS089"/>
+		<xsl:apply-templates select="." mode="CS104"/>
+		<xsl:apply-templates select="." mode="CS300"/>
+		<xsl:apply-templates select="." mode="CS323"/>
+		<xsl:apply-templates select="." mode="CS330"/>
+		<xsl:apply-templates select="." mode="TR002"/>
+		<xsl:apply-templates select="." mode="TR097"/>
+		<xsl:apply-templates select="." mode="TR101"/>
+	</xsl:template>
+
+	<xsl:variable name="versionInfo">
+		<vr:XSLTHeader>
+			<vr:Standaard>ijw</vr:Standaard>
+			<vr:StandaardRelease>3.0</vr:StandaardRelease>
+			<vr:XSLTVersie>2.0.24</vr:XSLTVersie>
+		</vr:XSLTHeader>
+	</xsl:variable>
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/JW317.xsl b/xslt-validatie/jw/3_0/JW317.xsl
new file mode 100644
index 0000000..b2441af
--- /dev/null
+++ b/xslt-validatie/jw/3_0/JW317.xsl
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:vr="http://www.istandaarden.nl/validatie/1_1/rapport/schema">
+	<!-- iJw 3.0 JW317 (2020-05-14) -->
+
+	<xsl:import href="common/basis.xsl" />
+	<xsl:include href="condities/CD075.xsl" />
+	<xsl:include href="condities/CD076.xsl" />
+	<xsl:include href="condities/CD077.xsl" />
+	<xsl:include href="condities/CD078.xsl" />
+	<xsl:include href="condities/CD079.xsl" />
+	<xsl:include href="condities/CD080.xsl" />
+	<xsl:include href="condities/CD081.xsl" />
+	<xsl:include href="constraints/CS002.xsl" />
+	<xsl:include href="constraints/CS102.xsl" />
+	<xsl:include href="constraints/CS104.xsl" />
+	<xsl:include href="constraints/CS300.xsl" />
+	<xsl:include href="constraints/CS323.xsl" />
+	<xsl:include href="constraints/CS330.xsl" />
+	<xsl:include href="rules/TR002.xsl" />
+	<xsl:include href="rules/TR097.xsl" />
+	<xsl:include href="rules/TR101.xsl" />
+	<xsl:include href="rules/TR352.xsl" />
+	<xsl:include href="rules/TR353.xsl" />
+
+	<xsl:template match="*" mode="check" priority="0">
+		<xsl:apply-templates select="." mode="CD075"/>
+		<xsl:apply-templates select="." mode="CD076"/>
+		<xsl:apply-templates select="." mode="CD077"/>
+		<xsl:apply-templates select="." mode="CD078"/>
+		<xsl:apply-templates select="." mode="CD079"/>
+		<xsl:apply-templates select="." mode="CD080"/>
+		<xsl:apply-templates select="." mode="CD081"/>
+		<xsl:apply-templates select="." mode="CS002"/>
+		<xsl:apply-templates select="." mode="CS102"/>
+		<xsl:apply-templates select="." mode="CS104"/>
+		<xsl:apply-templates select="." mode="CS300"/>
+		<xsl:apply-templates select="." mode="CS323"/>
+		<xsl:apply-templates select="." mode="CS330"/>
+		<xsl:apply-templates select="." mode="TR002"/>
+		<xsl:apply-templates select="." mode="TR097"/>
+		<xsl:apply-templates select="." mode="TR101"/>
+		<xsl:apply-templates select="." mode="TR352"/>
+		<xsl:apply-templates select="." mode="TR353"/>
+	</xsl:template>
+
+	<xsl:variable name="versionInfo">
+		<vr:XSLTHeader>
+			<vr:Standaard>ijw</vr:Standaard>
+			<vr:StandaardRelease>3.0</vr:StandaardRelease>
+			<vr:XSLTVersie>2.0.24</vr:XSLTVersie>
+		</vr:XSLTHeader>
+	</xsl:variable>
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/JW319.xsl b/xslt-validatie/jw/3_0/JW319.xsl
new file mode 100644
index 0000000..e6de349
--- /dev/null
+++ b/xslt-validatie/jw/3_0/JW319.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:vr="http://www.istandaarden.nl/validatie/1_1/rapport/schema">
+	<!-- iJw 3.0 JW319 (2020-05-14) -->
+
+	<xsl:import href="common/basis.xsl" />
+	<xsl:include href="condities/CD085.xsl" />
+	<xsl:include href="condities/CD086.xsl" />
+	<xsl:include href="condities/CD088.xsl" />
+	<xsl:include href="constraints/CS002.xsl" />
+	<xsl:include href="constraints/CS300.xsl" />
+	<xsl:include href="constraints/CS323.xsl" />
+	<xsl:include href="rules/TR002.xsl" />
+	<xsl:include href="rules/TR097.xsl" />
+	<xsl:include href="rules/TR101.xsl" />
+
+	<xsl:template match="*" mode="check" priority="0">
+		<xsl:apply-templates select="." mode="CD085"/>
+		<xsl:apply-templates select="." mode="CD086"/>
+		<xsl:apply-templates select="." mode="CD088"/>
+		<xsl:apply-templates select="." mode="CS002"/>
+		<xsl:apply-templates select="." mode="CS300"/>
+		<xsl:apply-templates select="." mode="CS323"/>
+		<xsl:apply-templates select="." mode="TR002"/>
+		<xsl:apply-templates select="." mode="TR097"/>
+		<xsl:apply-templates select="." mode="TR101"/>
+	</xsl:template>
+
+	<xsl:variable name="versionInfo">
+		<vr:XSLTHeader>
+			<vr:Standaard>ijw</vr:Standaard>
+			<vr:StandaardRelease>3.0</vr:StandaardRelease>
+			<vr:XSLTVersie>2.0.24</vr:XSLTVersie>
+		</vr:XSLTHeader>
+	</xsl:variable>
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/JW323.xsl b/xslt-validatie/jw/3_0/JW323.xsl
new file mode 100644
index 0000000..4350217
--- /dev/null
+++ b/xslt-validatie/jw/3_0/JW323.xsl
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:vr="http://www.istandaarden.nl/validatie/1_1/rapport/schema">
+	<!-- iJw 3.0 JW323 (2020-05-14) -->
+
+	<xsl:import href="common/basis.xsl" />
+	<xsl:include href="condities/CD060.xsl" />
+	<xsl:include href="condities/CD087.xsl" />
+	<xsl:include href="constraints/CS002.xsl" />
+	<xsl:include href="constraints/CS023.xsl" />
+	<xsl:include href="constraints/CS100.xsl" />
+	<xsl:include href="constraints/CS108.xsl" />
+	<xsl:include href="constraints/CS300.xsl" />
+	<xsl:include href="constraints/CS323.xsl" />
+	<xsl:include href="constraints/CS325.xsl" />
+	<xsl:include href="constraints/CS330.xsl" />
+	<xsl:include href="rules/TR002.xsl" />
+	<xsl:include href="rules/TR097.xsl" />
+	<xsl:include href="rules/TR101.xsl" />
+	<xsl:include href="rules/TR315.xsl" />
+	<xsl:include href="rules/TR316.xsl" />
+	<xsl:include href="rules/TR319.xsl" />
+	<xsl:include href="rules/TR335.xsl" />
+	<xsl:include href="rules/TR345.xsl" />
+	<xsl:include href="rules/TR358.xsl" />
+	<xsl:include href="rules/TR368.xsl" />
+
+	<xsl:template match="*" mode="check" priority="0">
+		<xsl:apply-templates select="." mode="CD060"/>
+		<xsl:apply-templates select="." mode="CD087"/>
+		<xsl:apply-templates select="." mode="CS002"/>
+		<xsl:apply-templates select="." mode="CS023"/>
+		<xsl:apply-templates select="." mode="CS100"/>
+		<xsl:apply-templates select="." mode="CS108"/>
+		<xsl:apply-templates select="." mode="CS300"/>
+		<xsl:apply-templates select="." mode="CS323"/>
+		<xsl:apply-templates select="." mode="CS325"/>
+		<xsl:apply-templates select="." mode="CS330"/>
+		<xsl:apply-templates select="." mode="TR002"/>
+		<xsl:apply-templates select="." mode="TR097"/>
+		<xsl:apply-templates select="." mode="TR101"/>
+		<xsl:apply-templates select="." mode="TR315"/>
+		<xsl:apply-templates select="." mode="TR316"/>
+		<xsl:apply-templates select="." mode="TR319"/>
+		<xsl:apply-templates select="." mode="TR335"/>
+		<xsl:apply-templates select="." mode="TR345"/>
+		<xsl:apply-templates select="." mode="TR358"/>
+		<xsl:apply-templates select="." mode="TR368"/>
+	</xsl:template>
+
+	<xsl:variable name="versionInfo">
+		<vr:XSLTHeader>
+			<vr:Standaard>ijw</vr:Standaard>
+			<vr:StandaardRelease>3.0</vr:StandaardRelease>
+			<vr:XSLTVersie>2.0.24</vr:XSLTVersie>
+		</vr:XSLTHeader>
+	</xsl:variable>
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/JW325.xsl b/xslt-validatie/jw/3_0/JW325.xsl
new file mode 100644
index 0000000..45dff0c
--- /dev/null
+++ b/xslt-validatie/jw/3_0/JW325.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:vr="http://www.istandaarden.nl/validatie/1_1/rapport/schema">
+	<!-- iJw 3.0 JW325 (2020-05-14) -->
+
+	<xsl:import href="common/basis.xsl" />
+	<xsl:include href="condities/CD060.xsl" />
+	<xsl:include href="constraints/CS002.xsl" />
+	<xsl:include href="constraints/CS023.xsl" />
+	<xsl:include href="constraints/CS108.xsl" />
+	<xsl:include href="constraints/CS300.xsl" />
+	<xsl:include href="constraints/CS323.xsl" />
+	<xsl:include href="constraints/CS325.xsl" />
+	<xsl:include href="rules/TR002.xsl" />
+	<xsl:include href="rules/TR097.xsl" />
+	<xsl:include href="rules/TR101.xsl" />
+	<xsl:include href="rules/TR342.xsl" />
+
+	<xsl:template match="*" mode="check" priority="0">
+		<xsl:apply-templates select="." mode="CD060"/>
+		<xsl:apply-templates select="." mode="CS002"/>
+		<xsl:apply-templates select="." mode="CS023"/>
+		<xsl:apply-templates select="." mode="CS108"/>
+		<xsl:apply-templates select="." mode="CS300"/>
+		<xsl:apply-templates select="." mode="CS323"/>
+		<xsl:apply-templates select="." mode="CS325"/>
+		<xsl:apply-templates select="." mode="TR002"/>
+		<xsl:apply-templates select="." mode="TR097"/>
+		<xsl:apply-templates select="." mode="TR101"/>
+		<xsl:apply-templates select="." mode="TR342"/>
+	</xsl:template>
+
+	<xsl:variable name="versionInfo">
+		<vr:XSLTHeader>
+			<vr:Standaard>ijw</vr:Standaard>
+			<vr:StandaardRelease>3.0</vr:StandaardRelease>
+			<vr:XSLTVersie>2.0.24</vr:XSLTVersie>
+		</vr:XSLTHeader>
+	</xsl:variable>
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/all.xsl b/xslt-validatie/jw/3_0/all.xsl
new file mode 100644
index 0000000..ed041f0
--- /dev/null
+++ b/xslt-validatie/jw/3_0/all.xsl
@@ -0,0 +1,159 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:vr="http://www.istandaarden.nl/validatie/1_1/rapport/schema">
+	<!-- iJw 3.0 (2020-05-14) -->
+
+	<xsl:import href="common/basis.xsl" />
+	<xsl:include href="condities/CD005.xsl" />
+	<xsl:include href="condities/CD007.xsl" />
+	<xsl:include href="condities/CD009.xsl" />
+	<xsl:include href="condities/CD025.xsl" />
+	<xsl:include href="condities/CD034.xsl" />
+	<xsl:include href="condities/CD041.xsl" />
+	<xsl:include href="condities/CD043.xsl" />
+	<xsl:include href="condities/CD044.xsl" />
+	<xsl:include href="condities/CD055.xsl" />
+	<xsl:include href="condities/CD056.xsl" />
+	<xsl:include href="condities/CD058.xsl" />
+	<xsl:include href="condities/CD059.xsl" />
+	<xsl:include href="condities/CD060.xsl" />
+	<xsl:include href="condities/CD062.xsl" />
+	<xsl:include href="condities/CD066.xsl" />
+	<xsl:include href="condities/CD067.xsl" />
+	<xsl:include href="condities/CD068.xsl" />
+	<xsl:include href="condities/CD075.xsl" />
+	<xsl:include href="condities/CD076.xsl" />
+	<xsl:include href="condities/CD077.xsl" />
+	<xsl:include href="condities/CD078.xsl" />
+	<xsl:include href="condities/CD079.xsl" />
+	<xsl:include href="condities/CD080.xsl" />
+	<xsl:include href="condities/CD081.xsl" />
+	<xsl:include href="condities/CD085.xsl" />
+	<xsl:include href="condities/CD086.xsl" />
+	<xsl:include href="condities/CD087.xsl" />
+	<xsl:include href="condities/CD088.xsl" />
+	<xsl:include href="constraints/CS002.xsl" />
+	<xsl:include href="constraints/CS003.xsl" />
+	<xsl:include href="constraints/CS023.xsl" />
+	<xsl:include href="constraints/CS050.xsl" />
+	<xsl:include href="constraints/CS058.xsl" />
+	<xsl:include href="constraints/CS089.xsl" />
+	<xsl:include href="constraints/CS100.xsl" />
+	<xsl:include href="constraints/CS102.xsl" />
+	<xsl:include href="constraints/CS103.xsl" />
+	<xsl:include href="constraints/CS104.xsl" />
+	<xsl:include href="constraints/CS108.xsl" />
+	<xsl:include href="constraints/CS300.xsl" />
+	<xsl:include href="constraints/CS318.xsl" />
+	<xsl:include href="constraints/CS323.xsl" />
+	<xsl:include href="constraints/CS324.xsl" />
+	<xsl:include href="constraints/CS325.xsl" />
+	<xsl:include href="constraints/CS327.xsl" />
+	<xsl:include href="constraints/CS328.xsl" />
+	<xsl:include href="constraints/CS330.xsl" />
+	<xsl:include href="constraints/CS331.xsl" />
+	<xsl:include href="rules/TR002.xsl" />
+	<xsl:include href="rules/TR006.xsl" />
+	<xsl:include href="rules/TR018.xsl" />
+	<xsl:include href="rules/TR052.xsl" />
+	<xsl:include href="rules/TR061.xsl" />
+	<xsl:include href="rules/TR097.xsl" />
+	<xsl:include href="rules/TR101.xsl" />
+	<xsl:include href="rules/TR302.xsl" />
+	<xsl:include href="rules/TR312.xsl" />
+	<xsl:include href="rules/TR313.xsl" />
+	<xsl:include href="rules/TR314.xsl" />
+	<xsl:include href="rules/TR315.xsl" />
+	<xsl:include href="rules/TR316.xsl" />
+	<xsl:include href="rules/TR317.xsl" />
+	<xsl:include href="rules/TR319.xsl" />
+	<xsl:include href="rules/TR320.xsl" />
+	<xsl:include href="rules/TR335.xsl" />
+	<xsl:include href="rules/TR342.xsl" />
+	<xsl:include href="rules/TR345.xsl" />
+	<xsl:include href="rules/TR352.xsl" />
+	<xsl:include href="rules/TR353.xsl" />
+	<xsl:include href="rules/TR358.xsl" />
+	<xsl:include href="rules/TR368.xsl" />
+
+	<xsl:template match="*" mode="check" priority="0">
+		<xsl:apply-templates select="." mode="CD005"/>
+		<xsl:apply-templates select="." mode="CD007"/>
+		<xsl:apply-templates select="." mode="CD009"/>
+		<xsl:apply-templates select="." mode="CD025"/>
+		<xsl:apply-templates select="." mode="CD034"/>
+		<xsl:apply-templates select="." mode="CD041"/>
+		<xsl:apply-templates select="." mode="CD043"/>
+		<xsl:apply-templates select="." mode="CD044"/>
+		<xsl:apply-templates select="." mode="CD055"/>
+		<xsl:apply-templates select="." mode="CD056"/>
+		<xsl:apply-templates select="." mode="CD058"/>
+		<xsl:apply-templates select="." mode="CD059"/>
+		<xsl:apply-templates select="." mode="CD060"/>
+		<xsl:apply-templates select="." mode="CD062"/>
+		<xsl:apply-templates select="." mode="CD066"/>
+		<xsl:apply-templates select="." mode="CD067"/>
+		<xsl:apply-templates select="." mode="CD068"/>
+		<xsl:apply-templates select="." mode="CD075"/>
+		<xsl:apply-templates select="." mode="CD076"/>
+		<xsl:apply-templates select="." mode="CD077"/>
+		<xsl:apply-templates select="." mode="CD078"/>
+		<xsl:apply-templates select="." mode="CD079"/>
+		<xsl:apply-templates select="." mode="CD080"/>
+		<xsl:apply-templates select="." mode="CD081"/>
+		<xsl:apply-templates select="." mode="CD085"/>
+		<xsl:apply-templates select="." mode="CD086"/>
+		<xsl:apply-templates select="." mode="CD087"/>
+		<xsl:apply-templates select="." mode="CD088"/>
+		<xsl:apply-templates select="." mode="CS002"/>
+		<xsl:apply-templates select="." mode="CS003"/>
+		<xsl:apply-templates select="." mode="CS023"/>
+		<xsl:apply-templates select="." mode="CS050"/>
+		<xsl:apply-templates select="." mode="CS058"/>
+		<xsl:apply-templates select="." mode="CS089"/>
+		<xsl:apply-templates select="." mode="CS100"/>
+		<xsl:apply-templates select="." mode="CS102"/>
+		<xsl:apply-templates select="." mode="CS103"/>
+		<xsl:apply-templates select="." mode="CS104"/>
+		<xsl:apply-templates select="." mode="CS108"/>
+		<xsl:apply-templates select="." mode="CS300"/>
+		<xsl:apply-templates select="." mode="CS318"/>
+		<xsl:apply-templates select="." mode="CS323"/>
+		<xsl:apply-templates select="." mode="CS324"/>
+		<xsl:apply-templates select="." mode="CS325"/>
+		<xsl:apply-templates select="." mode="CS327"/>
+		<xsl:apply-templates select="." mode="CS328"/>
+		<xsl:apply-templates select="." mode="CS330"/>
+		<xsl:apply-templates select="." mode="CS331"/>
+		<xsl:apply-templates select="." mode="TR002"/>
+		<xsl:apply-templates select="." mode="TR006"/>
+		<xsl:apply-templates select="." mode="TR018"/>
+		<xsl:apply-templates select="." mode="TR052"/>
+		<xsl:apply-templates select="." mode="TR061"/>
+		<xsl:apply-templates select="." mode="TR097"/>
+		<xsl:apply-templates select="." mode="TR101"/>
+		<xsl:apply-templates select="." mode="TR302"/>
+		<xsl:apply-templates select="." mode="TR312"/>
+		<xsl:apply-templates select="." mode="TR313"/>
+		<xsl:apply-templates select="." mode="TR314"/>
+		<xsl:apply-templates select="." mode="TR315"/>
+		<xsl:apply-templates select="." mode="TR316"/>
+		<xsl:apply-templates select="." mode="TR317"/>
+		<xsl:apply-templates select="." mode="TR319"/>
+		<xsl:apply-templates select="." mode="TR320"/>
+		<xsl:apply-templates select="." mode="TR335"/>
+		<xsl:apply-templates select="." mode="TR342"/>
+		<xsl:apply-templates select="." mode="TR345"/>
+		<xsl:apply-templates select="." mode="TR352"/>
+		<xsl:apply-templates select="." mode="TR353"/>
+		<xsl:apply-templates select="." mode="TR358"/>
+		<xsl:apply-templates select="." mode="TR368"/>
+	</xsl:template>
+
+	<xsl:variable name="versionInfo">
+		<vr:XSLTHeader>
+			<vr:Standaard>ijw</vr:Standaard>
+			<vr:StandaardRelease>3.0</vr:StandaardRelease>
+			<vr:XSLTVersie>2.0.24</vr:XSLTVersie>
+		</vr:XSLTHeader>
+	</xsl:variable>
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/all_merged.xsl b/xslt-validatie/jw/3_0/all_merged.xsl
new file mode 100644
index 0000000..e4b8161
--- /dev/null
+++ b/xslt-validatie/jw/3_0/all_merged.xsl
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><stylesheet xmlns="http://www.w3.org/1999/XSL/Transform" xmlns:n0="http://www.istandaarden.nl/ijw/3_0/jw319/schema" xmlns:n1="http://www.istandaarden.nl/ijw/3_0/jw307/schema" xmlns:n2="http://www.istandaarden.nl/ijw/3_0/jw317/schema" xmlns:n3="http://www.istandaarden.nl/ijw/3_0/jw305/schema" xmlns:n4="http://www.istandaarden.nl/ijw/3_0/jw304/schema" xmlns:n5="http://www.istandaarden.nl/ijw/3_0/jw315/schema" xmlns:n6="http://www.istandaarden.nl/ijw/3_0/jw303/schema" xmlns:n7="http://www.istandaarden.nl/ijw/3_0/jw325/schema" xmlns:n8="http://www.istandaarden.nl/ijw/3_0/jw301/schema" xmlns:n9="http://www.istandaarden.nl/ijw/3_0/jw323/schema" xmlns:na="http://www.istandaarden.nl/validatie/1_1/rapport/schema" xmlns:nb="http://www.istandaarden.nl/ijw/3_0/basisschema/schema" xmlns:nc="http://www.istandaarden.nl/validatie/1_1/rapport/schema" exclude-result-prefixes="na nb n4 n1 n3 n5 n6 n8 n7 n9 n2 n0" version="1.0"><output encoding="UTF-8" indent="yes" method="xml" version="1.0"/><template name="printXPath"><param name="pElement" select="."/><if test="$pElement/ancestor::*"><call-template name="printXPath"><with-param name="pElement" select="$pElement/.."/></call-template><text>/</text></if><value-of select="local-name($pElement)"/><if test="($pElement/preceding-sibling::*|$pElement/following-sibling::*)[local-name()=local-name($pElement)]"><value-of select="concat('[',count($pElement/preceding-sibling::*[local-name()=local-name($pElement)])+1,']')"/></if></template><template name="evaluateXPath"><param name="pPath" select="."/><param name="pContext" select="/"/><choose><when test="string-length($pPath) &gt; 0"><variable name="v0" select="substring($pPath,2)"/><variable name="v1"><choose><when test="not(contains($v0,'/'))"><value-of select="$v0"/></when><otherwise><value-of select="substring-before($v0,'/')"/></otherwise></choose></variable><variable name="v2"><choose><when test="not(contains($v1,'['))">1</when><otherwise><value-of select="substring-after(substring-before($v1,']'),'[')"/></otherwise></choose></variable><variable name="v3"><choose><when test="not(contains($v1,'['))"><value-of select="$v1"/></when><otherwise><value-of select="substring-before($v1,'[')"/></otherwise></choose></variable><call-template name="evaluateXPath"><with-param name="pPath" select="substring-after($pPath,$v1)"/><with-param name="pContext" select="$pContext/*[local-name()=$v3 and count(preceding-sibling::*[local-name()=$v3])=$v2 - 1]"/></call-template></when><otherwise><value-of select="normalize-space($pContext/text())"/></otherwise></choose></template><template name="addError"><param name="pRule">FOUT</param><param name="pElements" select="."/><param name="pCode" select="nonExistingNode"/><param name="pDetails" select="''"/><na:Fout><na:Code><value-of select="normalize-space($pRule)"/></na:Code><if test="$pCode"><na:Retourcode><value-of select="$pCode"/></na:Retourcode></if><for-each select="$pElements"><na:Locatie><text>/</text><call-template name="printXPath"><with-param name="pElement" select="."/></call-template></na:Locatie></for-each><choose><when test="$pDetails!=''"><na:Details><value-of select="$pDetails"/></na:Details></when><otherwise><variable name="v0"><apply-templates mode="getDetails" select="."><with-param name="pRule" select="normalize-space($pRule)"/></apply-templates></variable><if test="$v0!=''"><na:Details><value-of select="$v0"/></na:Details></if></otherwise></choose></na:Fout></template><template match="*" mode="getDetails" priority="0"><param name="pRule">FOUT</param></template><template name="checkGemeenteCode"><param name="pThis" select="."/><param name="pExtra" select="emptyNodeSet"/><param name="pRule">FAIL</param><variable name="v0"><apply-templates mode="validGemeente" select="."><with-param name="pGemeenteCode" select="1*normalize-space($pThis/text())"/></apply-templates></variable><if test="$v0!='true'"><call-template name="addError"><with-param name="pRule" select="$pRule"/><with-param name="pElements" select="$pThis|$pExtra"/></call-template></if></template><template match="*" mode="validGemeente" priority="0"><param name="pGemeenteCode" select="."/><choose><when test="$pGemeenteCode &lt; 0 or $pGemeenteCode &gt; 2000"><value-of select="false()"/></when><otherwise><value-of select="true()"/></otherwise></choose></template><template match="*" mode="validAGBCode" priority="0"><param name="pAGBCode" select="."/><param name="pFrom"/><param name="pTo" select="0"/><value-of select="true()"/></template><template match="*" mode="validZorginstelling" priority="0"><param name="pInstelling"/><param name="pOntvanger"/><value-of select="true()"/></template><template name="check11proef"><param name="pElement" select="."/><param name="pRule">FOUT</param><variable name="v0" select="floor(number($pElement/text()) div 1) mod 10"/><variable name="v1" select="floor(number($pElement/text()) div 10) mod 10"/><variable name="v2" select="floor(number($pElement/text()) div 100) mod 10"/><variable name="v3" select="floor(number($pElement/text()) div 1000) mod 10"/><variable name="v4" select="floor(number($pElement/text()) div 10000) mod 10"/><variable name="v5" select="floor(number($pElement/text()) div 100000) mod 10"/><variable name="v6" select="floor(number($pElement/text()) div 1000000) mod 10"/><variable name="v7" select="floor(number($pElement/text()) div 10000000) mod 10"/><variable name="v8" select="floor(number($pElement/text()) div 100000000) mod 10"/><if test="((9*$v8+8*$v7+7*$v6+6*$v5+5*$v4+4*$v3+3*$v2+2*$v1 - 1*$v0) mod 11)!=0"><call-template name="addError"><with-param name="pRule" select="$pRule"/><with-param name="pElements" select="$pElement"/></call-template></if></template><template name="split"><param name="pElement" select="."/><param name="pValue"/><choose><when test="string-length(normalize-space($pValue)) &gt; 0"><variable name="v0" select="normalize-space(substring-before(concat($pValue,','),','))"/><choose><when test="normalize-space($pElement/text())=$v0"><value-of select="true()"/></when><otherwise><call-template name="split"><with-param name="pElement" select="$pElement"/><with-param name="pValue" select="substring-after($pValue,',')"/></call-template></otherwise></choose></when><otherwise><value-of select="false()"/></otherwise></choose></template><template name="callrecursive"><param name="pT"/><param name="pValues"/><param name="pText"/><param name="pPattern"/><choose><when test="string-length($pT)=1 and string-length(translate($pT,$pValues,''))=0"><call-template name="patternmatch"><with-param name="pText" select="$pText"/><with-param name="pPattern" select="$pPattern"/></call-template></when><otherwise><value-of select="false()"/></otherwise></choose></template><template name="patternmatch"><param name="pText"/><param name="pPattern"/><choose><when test="(string-length($pText)=0 and string-length($pPattern)!=0) or (string-length($pText)!=0 and string-length($pPattern)=0)"><value-of select="false()"/></when><when test="string-length($pText)=0"><value-of select="true()"/></when><otherwise><variable name="v0" select="substring($pText,1,1)"/><variable name="v1" select="substring($pPattern,1,1)"/><variable name="v2" select="substring($pText,2)"/><variable name="v3" select="substring($pPattern,2)"/><choose><when test="$v1='.'"><call-template name="patternmatch"><with-param name="pText" select="$v2"/><with-param name="pPattern" select="$v3"/></call-template></when><when test="$v1='\' and string-length($v3)!=0"><call-template name="callrecursive"><with-param name="pT" select="$v0"/><with-param name="pValues" select="substring($v3,1,1)"/><with-param name="pText" select="$v2"/><with-param name="pPattern" select="substring($v3,2)"/></call-template></when><when test="$v1='1'"><call-template name="callrecursive"><with-param name="pT" select="$v0"/><with-param name="pValues">123456789</with-param><with-param name="pText" select="$v2"/><with-param name="pPattern" select="$v3"/></call-template></when><when test="$v1='0'"><call-template name="callrecursive"><with-param name="pT" select="$v0"/><with-param name="pValues">0123456789</with-param><with-param name="pText" select="$v2"/><with-param name="pPattern" select="$v3"/></call-template></when><when test="$v1='a'"><call-template name="callrecursive"><with-param name="pT" select="$v0"/><with-param name="pValues">abcdefghijklmnopqrstuvwxyz</with-param><with-param name="pText" select="$v2"/><with-param name="pPattern" select="$v3"/></call-template></when><when test="$v1='A'"><call-template name="callrecursive"><with-param name="pT" select="$v0"/><with-param name="pValues">ABCDEFGHIJKLMNOPQRSTUVWXYZ</with-param><with-param name="pText" select="$v2"/><with-param name="pPattern" select="$v3"/></call-template></when><when test="$v1='z' or $v1='Z'"><call-template name="callrecursive"><with-param name="pT" select="$v0"/><with-param name="pValues">abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ</with-param><with-param name="pText" select="$v2"/><with-param name="pPattern" select="$v3"/></call-template></when><when test="$v0=$v1"><call-template name="patternmatch"><with-param name="pText" select="$v2"/><with-param name="pPattern" select="$v3"/></call-template></when><otherwise><value-of select="false()"/></otherwise></choose></otherwise></choose></template><template name="testpattern"><param name="pElement" select="."/><param name="pPattern" select="''"/><variable name="v0" select="$pElement/text()"/><call-template name="patternmatch"><with-param name="pText" select="$v0"/><with-param name="pPattern" select="$pPattern"/></call-template></template><template name="testvalue"><param name="pElement" select="."/><param name="pValues" select="''"/><choose><when test="normalize-space($pValues)=''"><choose><when test="not($pElement/.)"><value-of select="true()"/></when><when test="normalize-space($pElement/text())=''"><value-of select="true()"/></when><otherwise><value-of select="false()"/></otherwise></choose></when><when test="normalize-space($pValues)='*'"><choose><when test="normalize-space($pElement/text())!=''"><value-of select="true()"/></when><otherwise><value-of select="false()"/></otherwise></choose></when><when test="normalize-space($pValues)='#'"><choose><when test="$pElement/."><value-of select="true()"/></when><otherwise><value-of select="false()"/></otherwise></choose></when><when test="string-length(normalize-space($pValues)) &gt; 1 and substring(normalize-space($pValues),1,1)='#'"><call-template name="testpattern"><with-param name="pElement" select="$pElement"/><with-param name="pPattern" select="substring(normalize-space($pValues),2)"/></call-template></when><when test="string-length(normalize-space($pValues)) &gt; 1 and substring(normalize-space($pValues),1,1)='!'"><variable name="v0"><call-template name="testvalue"><with-param name="pElement" select="$pElement"/><with-param name="pValues" select="substring(normalize-space($pValues),2)"/></call-template></variable><choose><when test="$v0='true'"><value-of select="false()"/></when><otherwise><value-of select="true()"/></otherwise></choose></when><otherwise><call-template name="split"><with-param name="pElement" select="$pElement"/><with-param name="pValue" select="$pValues"/></call-template></otherwise></choose></template><template name="checkRelation"><param name="pThis" select="."/><param name="pOther"/><param name="pRelation"/><param name="pExtra" select="node()"/><param name="pRule">FAIL</param><choose><when test="normalize-space($pRelation)='equals'"><call-template name="checkRelation"><with-param name="pThis" select="$pOther"/><with-param name="pOther" select="$pThis"/><with-param name="pRelation">equalsGt</with-param><with-param name="pExtra" select="$pExtra"/><with-param name="pRule" select="$pRule"/></call-template><call-template name="checkRelation"><with-param name="pThis" select="$pOther"/><with-param name="pOther" select="$pThis"/><with-param name="pRelation">equalsLt</with-param><with-param name="pExtra" select="$pExtra"/><with-param name="pRule" select="$pRule"/></call-template></when><when test="normalize-space($pRelation)='equalsGt' and $pThis &lt; $pOther"><call-template name="addError"><with-param name="pRule" select="$pRule"/><with-param name="pElements" select="$pThis|$pOther|$pExtra"/></call-template></when><when test="normalize-space($pRelation)='equalsLt'"><call-template name="checkRelation"><with-param name="pThis" select="$pOther"/><with-param name="pOther" select="$pThis"/><with-param name="pRelation">equalsGt</with-param><with-param name="pExtra" select="$pExtra"/><with-param name="pRule" select="$pRule"/></call-template></when></choose></template><template name="adjustDate"><param name="pDate"/><param name="pOverflow">carry</param><variable name="v0" select="$pDate mod 100"/><variable name="v1" select="floor($pDate div 100) mod 100"/><variable name="v2" select="floor($pDate div 10000) mod 10000"/><variable name="v3"><choose><when test="$v0 &gt; 30 and ($v1=4 or $v1=6 or $v1=9 or $v1=11)"><choose><when test="$pOverflow='carry'"><value-of select="$pDate - 30+100"/></when><when test="$pOverflow='truncate'"><value-of select="$pDate - $v0+30"/></when></choose></when><when test="$v0 &gt; 31 and ($v1=1 or $v1=3 or $v1=5 or $v1=7 or $v1=8 or $v1=10 or $v1=12)"><choose><when test="$pOverflow='carry'"><value-of select="$pDate - 31+100"/></when><when test="$pOverflow='truncate'"><value-of select="$pDate - $v0+31"/></when></choose></when><when test="$v0 &gt; 29 and $v1=2 and ($v2 mod 4)=0"><choose><when test="$pOverflow='carry'"><value-of select="$pDate - 29+100"/></when><when test="$pOverflow='truncate'"><value-of select="$pDate - $v0+29"/></when></choose></when><when test="$v0 &gt; 28 and $v1=2 and ($v2 mod 4)!=0"><choose><when test="$pOverflow='carry'"><value-of select="$pDate - 28+100"/></when><when test="$pOverflow='truncate'"><value-of select="$pDate - $v0+28"/></when></choose></when><otherwise><value-of select="0+$pDate"/></otherwise></choose></variable><variable name="v4"><choose><when test="floor($v3 div 100) mod 100 &gt; 12"><value-of select="$v3 - 1200+10000"/></when><otherwise><value-of select="0+$v3"/></otherwise></choose></variable><choose><when test="$v4=$pDate"><value-of select="0+$pDate"/></when><otherwise><call-template name="adjustDate"><with-param name="pDate" select="$v4"/><with-param name="pOverflow" select="$pOverflow"/></call-template></otherwise></choose></template><template name="addDate"><param name="pDate"/><param name="pExtra"/><param name="pOverflow">carry</param><if test="normalize-space($pDate)!=''"><call-template name="adjustDate"><with-param name="pDate" select="translate($pDate,'-','')+$pExtra"/><with-param name="pOverflow" select="$pOverflow"/></call-template></if></template><template name="addMonths"><param name="pDate"/><param name="pExtra"/><param name="pOverflow">carry</param><choose><when test="$pExtra &lt; 0"><call-template name="addMonths"><with-param name="pDate" select="translate($pDate,'-','') - 10000"/><with-param name="pExtra" select="$pExtra+12"/><with-param name="pOverflow" select="$pOverflow"/></call-template></when><when test="$pExtra &gt; 12"><call-template name="addMonths"><with-param name="pDate" select="translate($pDate,'-','')+10000"/><with-param name="pExtra" select="$pExtra - 12"/><with-param name="pOverflow" select="$pOverflow"/></call-template></when><otherwise><call-template name="adjustDate"><with-param name="pDate" select="translate($pDate,'-','')+100*$pExtra"/><with-param name="pOverflow" select="$pOverflow"/></call-template></otherwise></choose></template><template name="checkDateRelation"><param name="pSource" select="."/><param name="pThis" select="$pSource/text()"/><param name="pDate">2018-01-01</param><param name="pRelation"/><param name="pExtra" select="emptyNodeSet"/><param name="pRule">FAIL</param><choose><when test="not($pSource)"><call-template name="addError"><with-param name="pRule" select="$pRule"/><with-param name="pElements" select="$pSource"/></call-template></when><when test="$pRelation='equals'"><call-template name="checkDateRelation"><with-param name="pThis" select="$pDate"/><with-param name="pDate" select="$pThis"/><with-param name="pRelation">equalsGt</with-param><with-param name="pExtra" select="$pExtra"/><with-param name="pRule" select="$pRule"/></call-template><call-template name="checkDateRelation"><with-param name="pThis" select="$pDate"/><with-param name="pDate" select="$pThis"/><with-param name="pRelation">equalsLt</with-param><with-param name="pExtra" select="$pExtra"/><with-param name="pRule" select="$pRule"/></call-template></when><when test="$pRelation='equalsGt' and translate($pThis,'-','') &lt; translate($pDate,'-','')"><call-template name="addError"><with-param name="pRule" select="$pRule"/><with-param name="pElements" select="$pSource|$pExtra"/></call-template></when><when test="$pRelation='equalsLt'"><call-template name="checkDateRelation"><with-param name="pThis" select="$pDate"/><with-param name="pDate" select="$pThis"/><with-param name="pRelation">equalsGt</with-param><with-param name="pExtra" select="$pExtra"/><with-param name="pRule" select="$pRule"/></call-template></when><when test="$pRelation='daysAfter'"><variable name="v0"><call-template name="addDate"><with-param name="pDate" select="$pDate"/><with-param name="pExtra" select="$pExtra"/></call-template></variable><if test="1*translate($pThis,'-','') &lt;= 1*$v0"><call-template name="addError"><with-param name="pRule" select="$pRule"/><with-param name="pElements" select="$pSource|$pDate"/></call-template></if></when><when test="$pRelation='monthsBefore'"><variable name="v0"><call-template name="addMonths"><with-param name="pDate" select="$pDate"/><with-param name="pExtra" select="$pExtra"/><with-param name="pOverflow">truncate</with-param></call-template></variable><if test="1*translate($pThis,'-','') &gt; 1*$v0"><call-template name="addError"><with-param name="pRule" select="$pRule"/><with-param name="pElements" select="$pSource|$pDate"/></call-template></if></when><when test="$pRelation='monthsAfter'"><variable name="v0"><call-template name="addMonths"><with-param name="pDate" select="$pDate"/><with-param name="pExtra" select="$pExtra"/><with-param name="pOverflow">truncate</with-param></call-template></variable><if test="1*translate($pThis,'-','') &lt; 1*$v0"><call-template name="addError"><with-param name="pRule" select="$pRule"/><with-param name="pElements" select="$pSource|$pDate"/></call-template></if></when></choose></template><template name="checkempty"><param name="pThis" select="."/><param name="pOther" select="."/><param name="pExtra" select="emptyNodeSet"/><param name="pRule">FAIL</param><variable name="v0"><call-template name="testvalue"><with-param name="pElement" select="$pThis"/></call-template></variable><variable name="v1"><call-template name="testvalue"><with-param name="pElement" select="$pOther"/></call-template></variable><if test="$v0='false' and $v1='true'"><call-template name="addError"><with-param name="pRule" select="$pRule"/><with-param name="pElements" select="$pThis|$pOther|$pExtra"/></call-template></if></template><template name="checkafter"><param name="pThis" select="."/><param name="pOther" select="."/><param name="pExtra" select="emptyNodeSet"/><param name="pRule">FAIL</param><if test="not($pThis) or not($pOther) or translate($pOther/text(),'-','') &gt; translate($pThis/text(),'-','')"><call-template name="addError"><with-param name="pRule" select="$pRule"/><with-param name="pElements" select="$pThis|$pOther|$pExtra"/></call-template></if></template><template name="checkafterstrict"><param name="pThis" select="."/><param name="pOther" select="."/><param name="pExtra" select="emptyNodeSet"/><param name="pRule">FAIL</param><if test="not($pThis) or not($pOther) or translate($pOther/text(),'-','') &gt;= translate($pThis/text(),'-','')"><call-template name="addError"><with-param name="pRule" select="$pRule"/><with-param name="pElements" select="$pThis|$pOther|$pExtra"/></call-template></if></template><template name="checkYearsBetween"><param name="pDate1"/><param name="pDate2"/><param name="pYears"/><param name="pExtra" select="emptyNodeSet"/><param name="pRule">ERROR</param><variable name="v0" select="number(translate($pDate1,'-',''))"/><variable name="v1" select="number(translate($pDate2,'-',''))"/><variable name="v2" select="number($pYears)*10000"/><if test="($v1+$v2) &lt; $v0"><call-template name="addError"><with-param name="pRule" select="$pRule"/><with-param name="pElements" select="$pDate1|$pDate2|$pExtra"/></call-template></if></template><template name="isPeriodOverlay"><param name="pThis"/><param name="pOther"/><choose><when test="$pThis/*[local-name()='Einddatum'] and $pOther/*[local-name()='Einddatum']"><choose><when test="translate($pThis/*[local-name()='Einddatum'],'-','') &gt;= translate($pOther/*[local-name()='Ingangsdatum'],'-','') and translate($pThis/*[local-name()='Einddatum'],'-','') &lt;= translate($pOther/*[local-name()='Einddatum'],'-','') or translate($pOther/*[local-name()='Einddatum'],'-','') &gt;= translate($pThis/*[local-name()='Ingangsdatum'],'-','') and translate($pOther/*[local-name()='Einddatum'],'-','') &lt;= translate($pThis/*[local-name()='Einddatum'],'-','')"><value-of select="true()"/></when><otherwise><value-of select="false()"/></otherwise></choose></when><when test="$pThis/*[local-name()='Einddatum'] and not($pOther/*[local-name()='Einddatum'])"><choose><when test="translate($pThis/*[local-name()='Einddatum'],'-','') &gt;= translate($pOther/*[local-name()='Ingangsdatum'],'-','') and translate($pThis/*[local-name()='Einddatum'],'-','') &lt;= '99999999' or '99999999' &gt;= translate($pThis/*[local-name()='Ingangsdatum'],'-','') and '99999999' &lt;= translate($pThis/*[local-name()='Einddatum'],'-','')"><value-of select="true()"/></when><otherwise><value-of select="false()"/></otherwise></choose></when><when test="$pOther/*[local-name()='Einddatum'] and not($pThis/*[local-name()='Einddatum'])"><choose><when test="'99999999' &gt;= translate($pOther/*[local-name()='Ingangsdatum'],'-','') and '99999999' &lt;= translate($pOther/*[local-name()='Einddatum'],'-','') or translate($pOther/*[local-name()='Einddatum'],'-','') &gt;= translate($pThis/*[local-name()='Ingangsdatum'],'-','') and translate($pOther/*[local-name()='Einddatum'],'-','') &lt;= '99999999'"><value-of select="true()"/></when><otherwise><value-of select="false()"/></otherwise></choose></when><otherwise><value-of select="true()"/></otherwise></choose></template><template name="checkvalue"><param name="pThis" select="."/><param name="pValues" select="''"/><param name="pExtra" select="emptyNodeSet"/><param name="pCode" select="nonExistingNode"/><param name="pRule">FAIL</param><variable name="v0"><call-template name="testvalue"><with-param name="pElement" select="$pThis"/><with-param name="pValues" select="$pValues"/></call-template></variable><if test="$v0='false'"><call-template name="addError"><with-param name="pRule" select="$pRule"/><with-param name="pElements" select="$pThis|$pExtra"/><with-param name="pCode" select="$pCode"/></call-template></if></template><template name="checknvalue"><param name="pThis" select="."/><param name="pValues" select="''"/><param name="pExtra" select="emptyNodeSet"/><param name="pRule">FAIL</param><variable name="v0"><call-template name="testvalue"><with-param name="pElement" select="$pThis"/><with-param name="pValues" select="$pValues"/></call-template></variable><if test="$v0='true'"><call-template name="addError"><with-param name="pRule" select="$pRule"/><with-param name="pElements" select="$pThis|$pExtra"/></call-template></if></template><template name="checkimplication"><param name="pThis" select="."/><param name="pValue1" select="''"/><param name="pOther" select="."/><param name="pValue2" select="''"/><param name="pExtra" select="emptyNodeSet"/><param name="pRule">FAIL</param><variable name="v0"><call-template name="testvalue"><with-param name="pElement" select="$pThis"/><with-param name="pValues" select="$pValue1"/></call-template></variable><variable name="v1"><call-template name="testvalue"><with-param name="pElement" select="$pOther"/><with-param name="pValues" select="$pValue2"/></call-template></variable><if test="$v0='true' and $v1='false'"><call-template name="addError"><with-param name="pRule" select="$pRule"/><with-param name="pElements" select="$pThis|$pOther|$pExtra"/></call-template></if></template><template name="checksame"><param name="pThis" select="."/><param name="pValue1" select="''"/><param name="pOther" select="."/><param name="pValue2" select="''"/><param name="pExtra" select="emptyNodeSet"/><param name="pRule">FAIL</param><variable name="v0"><call-template name="testvalue"><with-param name="pElement" select="$pThis"/><with-param name="pValues" select="$pValue1"/></call-template></variable><variable name="v1"><call-template name="testvalue"><with-param name="pElement" select="$pOther"/><with-param name="pValues" select="$pValue2"/></call-template></variable><if test="$v0!=$v1"><call-template name="addError"><with-param name="pRule" select="$pRule"/><with-param name="pElements" select="$pThis|$pOther|$pExtra"/></call-template></if></template><template name="checkSingleCorrect"><param name="pThis" select="."/><param name="pValue1" select="''"/><param name="pOther" select="."/><param name="pValue2" select="''"/><param name="pExtra" select="emptyNodeSet"/><param name="pRule">FAIL</param><variable name="v0"><call-template name="testvalue"><with-param name="pElement" select="$pThis"/><with-param name="pValues" select="$pValue1"/></call-template></variable><variable name="v1"><call-template name="testvalue"><with-param name="pElement" select="$pOther"/><with-param name="pValues" select="$pValue2"/></call-template></variable><if test="$v0='false' and $v1='false'"><call-template name="addError"><with-param name="pRule" select="$pRule"/><with-param name="pElements" select="$pThis|$pOther|$pExtra"/></call-template></if></template><template name="transformKeys"><param name="pElement" select="."/><param name="pKeys"/><for-each select="$pElement"><variable name="v0"><call-template name="evaluateXPath"><with-param name="pContext" select="current()"/><with-param name="pPath"><value-of select="substring-before(normalize-space($pKeys),',')"/></with-param></call-template></variable><text disable-output-escaping="yes">&lt;</text><value-of select="$v0"/><text disable-output-escaping="yes">&gt;</text><if test="contains($pKeys,',') and substring-after(normalize-space($pKeys),',')"><call-template name="transformKeys"><with-param name="pElement" select="current()"/><with-param name="pKeys" select="substring-after(normalize-space($pKeys),',')"/></call-template></if></for-each></template><template name="checkDuplicateKeys"><param name="pElement" select="."/><param name="pKeys"/><param name="pExtra" select="emptyNodeSet"/><param name="pRule">FAIL</param><for-each select="$pElement"><variable name="v0"><call-template name="transformKeys"><with-param name="pElement" select="current()"/><with-param name="pKeys" select="$pKeys"/></call-template></variable><variable name="v1" select="position()"/><for-each select="$pElement[position() &gt; $v1]"><variable name="v2"><call-template name="transformKeys"><with-param name="pElement" select="current()"/><with-param name="pKeys" select="$pKeys"/></call-template></variable><if test="$v0=$v2 and $v0!='' and $v2!=''"><call-template name="addError"><with-param name="pRule" select="$pRule"/><with-param name="pElements" select="$pElement[position()=$v1]|current()|$pExtra"/></call-template></if></for-each></for-each></template><template name="formatNumberInternal"><param name="pValue"/><if test="$pValue &gt; 0"><call-template name="formatNumberInternal"><with-param name="pValue" select="floor(number($pValue) div 10)"/></call-template><value-of select="number($pValue) mod 10"/></if></template><template name="formatNumber"><param name="pValue"/><choose><when test="number($pValue) &lt; 0">-<call-template name="formatNumberInternal"><with-param name="pValue" select="0 - number($pValue)"/></call-template></when><when test="number($pValue)=0">0</when><otherwise><call-template name="formatNumberInternal"><with-param name="pValue" select="number($pValue)"/></call-template></otherwise></choose></template><template match="*[local-name()='BerichtCode']" mode="header" priority="10"><na:BerichtCode><value-of select="text()"/></na:BerichtCode></template><template match="*[local-name()='BerichtVersie']" mode="header" priority="10"><na:BerichtVersie><value-of select="text()"/></na:BerichtVersie></template><template match="*[local-name()='BerichtSubversie']" mode="header" priority="10"><na:BerichtSubversie><value-of select="text()"/></na:BerichtSubversie></template><template match="*[local-name()='Identificatie'] | *[local-name()='DeclarantFactuurNummer']" mode="header" priority="10"><na:Identificatie><value-of select="normalize-space(text())"/></na:Identificatie></template><template match="*[local-name()='Dagtekening'] | *[local-name()='FactuurDagtekening']" mode="header" priority="10"><na:Dagtekening><value-of select="text()"/></na:Dagtekening></template><template match="*[local-name()='BerichtIdentificatie'] | *[local-name()='DeclaratieFactuurIdentificatie']" mode="header" priority="10"><na:BerichtIdentificatie><apply-templates mode="header" select="*"/></na:BerichtIdentificatie></template><template match="*[local-name()='DeclaratieIdentificatie']" mode="header" priority="10"/><variable name="v0">2.0.24</variable><template match="*|@*|text()" mode="check"/><template match="*|@*|text()" mode="header"><apply-templates mode="header" select="*"/></template><template match="*|@*|text()" mode="traverse"><apply-templates mode="traverse" select="*"/><apply-templates mode="check" select="."/></template><template match="*[local-name() = 'Bericht']"><na:Rapport><na:Header><apply-templates mode="header" select="//*[local-name()='Header']/*"/><choose><when test="contains($v0,'-SNAPSHOT')"><na:XSLTVersie>0.0.0</na:XSLTVersie></when><otherwise><na:XSLTVersie><value-of select="normalize-space($v0)"/></na:XSLTVersie></otherwise></choose></na:Header><na:Fouten><apply-templates mode="traverse" select="*"/></na:Fouten></na:Rapport></template><template match="*" mode="getDetails" priority="100"><param name="pRule">FOUT</param><choose><when test="$pRule='CD005'">Als Postcode gevuld is, dan verplicht vullen, anders leeg laten.</when><when test="$pRule='CD007'">Als Communicatie / Vorm de waarde 1 (tolk taal) heeft, dan verplicht vullen, anders leeglaten.</when><when test="$pRule='CD009'">Alleen als Soort adres de waarde 04 (tijdelijk adres) heeft, is vullen toegestaan.</when><when test="$pRule='CD025'">Als Adres / LandCode de waarde NL (Nederland) heeft, dan verplicht vullen.</when><when test="$pRule='CD034'">Als Soort adres de waarde 1 (BRP-adres) of 3 (verblijfadres) heeft, dan verplicht vullen.</when><when test="$pRule='CD041'">Indien Code in Product gevuld is, verplicht vullen.</when><when test="$pRule='CD043'">Indien Beschikkingnummer gevuld is, verplicht vullen, anders leeg laten.</when><when test="$pRule='CD044'">Indien RedenWijziging gevuld is, verplicht vullen.</when><when test="$pRule='CD055'">Verplicht vullen indien BtwVrijstellingIndicatie de waarde 2 (Geen btw-vrijstelling) bevat.</when><when test="$pRule='CD056'">Niet vullen indien BtwVrijstellingIndicatie de waarde 1 (Btw-vrijstelling) bevat.</when><when test="$pRule='CD058'">Verplicht vullen indien BetalingAanID de waarde 01 (= servicebureau) heeft.</when><when test="$pRule='CD059'">Verplicht vullen indien BerichtCode de waarde 448 of 450 (= Factuur Wmo-ondersteuning of Jw-ondersteuning) bevat.</when><when test="$pRule='CD060'">Verplicht vullen indien DebetCredit bij het ingediende bedrag de waarde C (credit) heeft, anders leeg laten.</when><when test="$pRule='CD062'">Niet vullen indien Eenheid is 83 (Euro’s).</when><when test="$pRule='CD066'">Als type verwijzer gelijk is aan 02, 03, 04 of 05 en ZorgverlenerCode is gevuld, dan is Naamverwijzer leeg.</when><when test="$pRule='CD067'">Als type verwijzer gelijk is aan 02, 03, 04 of 05 en ZorgverlenerCode is leeg, dan is Naamverwijzer gevuld.</when><when test="$pRule='CD068'">Als type verwijzer ongelijk is aan 02, 03, 04 of 05, dan is ZorgverlenerCode leeg.</when><when test="$pRule='CD075'">Verplicht vullen indien Budget gevuld is</when><when test="$pRule='CD076'">Verplicht vullen indien Frequentie waarde 2 (per week) of 6 (totaal binnen geldigheid toewijzing) heeft.</when><when test="$pRule='CD077'">Indien Budget gevuld is, dan leeg laten</when><when test="$pRule='CD078'">Indien Omvang gevuld is, dan leeg laten</when><when test="$pRule='CD079'">Indien Budget leeg is, dan verplicht vullen</when><when test="$pRule='CD080'">Indien Code in Product leeg is en Einddatum van het ToegewezenProduct groter dan 31-12-2020 of leeg is, dan leeg laten</when><when test="$pRule='CD081'">Indien eenheid de waarde 14, 16, 83 of 84 heeft en Einddatum van het ToegewezenProduct groter dan 31-12-2020 of leeg is, dan Frequentie vullen met de waarde 2 , 4 of 6</when><when test="$pRule='CD085'">Als VerzoekAntwoord de waarde 1 (Verzoek afgewezen) heeft, dan vullen</when><when test="$pRule='CD086'">Als VerzoekAntwoord de waarde 2 (Aanvraag in onderzoek) heeft, dan leeg laten</when><when test="$pRule='CD087'">Als eenheid ongelijk is aan 83 (euro's) dan verplicht vullen, anders leeg laten.</when><when test="$pRule='CD088'">Als RedenAfwijzingVerzoek ongelijk is aan 8 (Woonplaatsbeginsel), dan leeg laten.</when><when test="$pRule='CS002'">De waarde moet voldoen aan de 11-proef.</when><when test="$pRule='CS003'">Indien van toepassing vullen met een waarde die groter is dan, of gelijk is aan de Begindatum (of Ingangsdatum) van de aangeduide periode.</when><when test="$pRule='CS004'">Aaneengesloten vullen (zonder punten of spaties).</when><when test="$pRule='CS005'">Aaneengesloten vullen met cijfers.</when><when test="$pRule='CS015'">BerichtSubversie vullen met 0.</when><when test="$pRule='CS023'">Vullen met een bestaande datum die niet groter is dan de Dagtekening van het bericht.</when><when test="$pRule='CS025'">BerichtVersie vullen met 3.</when><when test="$pRule='CS050'">Als Partnernaam gevuld is, dan NaamGebruik vullen met waarde 1, 2, 3 of 4. Anders waarde 1 of 6 vullen.</when><when test="$pRule='CS058'">1 (eerste aanlevering) of 3 (verwijderen aanlevering) vullen.</when><when test="$pRule='CS064'">Vullen met een bestaande datum die niet in de toekomst ligt.</when><when test="$pRule='CS089'">Als LandCode de waarde NL (Nederland) heeft, dan moet het formaat overeenkomen met dat van een Nederlandse postcode.</when><when test="$pRule='CS100'">Datum is groter dan of gelijk aan 01-01-2021</when><when test="$pRule='CS102'">Datum is groter dan de dagtekening van het bericht.</when><when test="$pRule='CS103'">De gehele periode ligt voor 01-01-2021.</when><when test="$pRule='CS104'">3 (per 4 weken) en 5 (per jaar) niet vullen indien de Einddatum van het ToegewezenProduct leeg is of groter is dan 31-12-2020.</when><when test="$pRule='CS108'">Vullen met een waarde die groter is dan, of gelijk is aan de Begindatum van de aangeduide periode én die niet groter is dan de Dagtekening van het bericht.</when><when test="$pRule='CS126'">Vullen met BerichtCode volgens de specificatie</when><when test="$pRule='CS128'">Vullen met een versienummer bestaande uit drie gehele getallen, gescheiden met punten.</when><when test="$pRule='CS300'">Vullen met een bestaande gemeentecode uit het overzicht van CBS.</when><when test="$pRule='CS318'">NaamGebruik 6 (Niet-natuurlijk persoon) niet vullen.</when><when test="$pRule='CS319'">Aaneengesloten vullen met cijfers en/of letters</when><when test="$pRule='CS320'">Vullen met een geldig btw-nummer</when><when test="$pRule='CS321'">Vullen met een geldige AGB-code van een servicebureau ( zie https://www.agbcode.nl)</when><when test="$pRule='CS322'">Vullen met een percentage kleiner dan 100.</when><when test="$pRule='CS323'">Bedrag vullen met een waarde kleiner dan of gelijk aan Bedrag in BerekendBedrag</when><when test="$pRule='CS324'">Vullen met een waarde die groter is dan, of gelijk is aan de DagtekeningFactuur.</when><when test="$pRule='CS325'">Indien (Totaal)Bedrag de waarde 0 heeft, dan DebetCredit vullen met D (Debet).</when><when test="$pRule='CS327'">DebetCredit vullen met een waarde die gelijk is aan DebetCredit in DeclaratieFactuurBedrag.</when><when test="$pRule='CS328'">Begindatum vullen met een datum die groter dan of gelijk is aan 2015-01-01.</when><when test="$pRule='CS329'">ProductCode vullen met met een code die, volgens de gehanteerde productcodelijst, past bij de ProductCategorie.</when><when test="$pRule='CS330'">21 (Week) en 81 (Benodigde tijdsduur of tijdsonafhankelijk) niet vullen.</when><when test="$pRule='CS331'">21 (Week) en 81 (Benodigde tijdsduur of tijdsonafhankelijk) niet vullen indien de ProductPeriode Begindatum op of na de implementatiedatum van release 2.3 ligt.</when><when test="$pRule='TR002'">Geboortedatum mag niet meer dan 120 jaar voor de Dagtekening liggen, tenzij Geboortedatum onbekend is.</when><when test="$pRule='TR006'">De berichtklasse Contact moet een berichtelement Telefoon, en/of de combinatie Huis en Postcode bevatten.</when><when test="$pRule='TR018'">Einddatum moet groter dan of gelijk zijn aan Begindatum.</when><when test="$pRule='TR019'">Bij een output- of inspanningsgerichte werkwijze moet de melding van de start of de stop van de ondersteuning gerelateerd zijn aan een toewijzing op basis van het toewijzingnummer</when><when test="$pRule='TR052'">De Begindatum van een geleverd product mag niet groter zijn dan de Dagtekening.</when><when test="$pRule='TR056'">Identificatie moet per berichtsoort uniek zijn voor de verzendende partij.</when><when test="$pRule='TR061'">Bij een Client moet minimaal één Adres voorkomen waarvan Soort de waarde '01' (BRP-adres), '02' (Correspondentie-adres) of '03' (Verblijfadres) heeft.</when><when test="$pRule='TR063'">Indien StatusAanlevering de waarde 3 (aanlevering verwijderen) bevat, dan moet voor de betreffende Client een eerdere aanlevering met dezelfde logische sleutel verstuurd zijn.</when><when test="$pRule='TR069'">De sleutelelementen uit het startbericht moeten in het stopbericht, waarin wordt aangegeven dat de betreffende levering (tijdelijk) beeindigd wordt, ongewijzigd worden overgenomen.</when><when test="$pRule='TR071'">StatusAanlevering mag niet de waarde '3' bevatten als er voor de betreffende melding start zorg al een stop zorg is verstuurd.</when><when test="$pRule='TR074'">Indien StatusAanlevering de waarde '1' bevat, dan moet de sleutel van de betreffende aanlevering niet alleen uniek zijn binnen het bericht zelf, maar ook in combinatie met alle reeds ontvangen berichten.</when><when test="$pRule='TR097'">Voor Geboortedatum geldt dat DatumGebruik en Datum met elkaar in overeenstemming moeten zijn.</when><when test="$pRule='TR101'">Binnen een bericht zijn dubbele regels niet toegestaan.</when><when test="$pRule='TR300'">Indien de toewijzing wordt gestuurd naar aanleiding van het honoreren van een verzoek om toewijzing bericht, moet ReferentieAanbieder worden overgenomen van het betreffende verzoek om toewijzing bericht (315).</when><when test="$pRule='TR302'">Een product mag alleen vaker in een toewijzing voorkomen indien de zorgperiodes elkaar niet overlappen</when><when test="$pRule='TR303'">Iedere prestatie in een declaratie- of factuurbericht is gerelateerd aan een toegewezen product op basis van het toewijzingnummer.</when><when test="$pRule='TR304'">Bsn moet overeenkomen met Bsn van een Client.</when><when test="$pRule='TR305'">ProductCategorie in de Prestatie moet gelijk zijn aan ProductCategorie in het ToegewezenProduct.</when><when test="$pRule='TR306'">ProductCode in de Prestatie moet gelijk zijn aan ProductCode in het ToegewezenProduct, indien deze opgenomen is.</when><when test="$pRule='TR307'">Begindatum in de Prestatie moet groter dan of gelijk zijn aan Ingangsdatum in het ToegewezenProduct.</when><when test="$pRule='TR308'">Einddatum in de Prestatie moet kleiner dan of gelijk zijn aan Einddatum in het ToegewezenProduct, indien die gevuld is.</when><when test="$pRule='TR309'">Eenheid in de Prestatie moet passen bij Eenheid in het ToegewezenProduct.</when><when test="$pRule='TR311'">De indiener van het declaratie- of factuurbericht is de aanbieder of de administratieve eenheid die namens de aanbieder declareert of factureert.</when><when test="$pRule='TR312'">De waarde van TotaalBedrag in DeclaratieFactuurTotaalBedrag moet gelijk zijn aan de SOM van de waarden van Bedrag in DeclaratieFactuurBedrag, rekening houdend met  indicatie debet/credit.</when><when test="$pRule='TR313'">De waarde van TotaalBedrag in BtwTotaalBedrag moet gelijk zijn aan de SOM van de waarden van Bedrag in BtwBedrag, rekening houdend met  indicatie debet/credit.</when><when test="$pRule='TR314'">ReferentieNummer van de Prestatie moet uniek zijn voor de aanbieder binnen het wettelijk domein waarop de Prestatie betrekking heeft, zowel binnen één bericht als berichtoverstijgend.</when><when test="$pRule='TR315'">VorigReferentieNummer van de Prestatie moet uniek zijn in het bericht.</when><when test="$pRule='TR316'">Debetregels mogen niet in hetzelfde bericht gecrediteerd worden.</when><when test="$pRule='TR317'">Indien gevuld moet BerekendBedrag gelijk zijn aan GeleverdVolume vermenigvuldigd met ProductTarief.</when><when test="$pRule='TR318'">Indien iedere DeclaratiePeriode zorg is geleverd, moet DeclaratiePeriode BeginDatum van de volgende declaratie-/factuurperiode precies één dag na de DeclaratiePeriode EindDatum van de voorgaande declaratie-/factuurperiode liggen.</when><when test="$pRule='TR319'">Een declaratie- of factuurbericht bevat alleen prestaties waarvan de ProductPeriode valt binnen de huidige, of een voorgaande declaratie- of factuurperiode.</when><when test="$pRule='TR320'">Alle deels toegekende en/of afgewezen prestaties dienen meegestuurd te worden in het retourbericht op een declaratie/factuur.</when><when test="$pRule='TR321'">Indien in het ToegewezenProduct een Omvang is meegegeven, moet GeleverdVolume in de Prestatie passen binnen Volume in het ToegewezenProduct.</when><when test="$pRule='TR322'">Indien in het ToegewezenProduct een Omvang is meegegeven, moet de som van GeleverdVolume in alle ingediende Prestaties die betrekking hebben op dat ToegewezenProduct passen binnen de toegewezen Omvang.</when><when test="$pRule='TR323'">Een credit Prestatie moet gerelateerd zijn aan een eerder verzonden debet Prestatie op basis van sleutelvelden.</when><when test="$pRule='TR324'">Factuurnummer moet uniek zijn voor de verzendende partij.</when><when test="$pRule='TR326'">Een Startbericht mag pas verstuurd worden als er géén actueel Startbericht bij ToegewezenProduct is.</when><when test="$pRule='TR332'">Ieder ToegewezenProduct binnen één gemeente heeft een uniek nummer per wettelijk domein.</when><when test="$pRule='TR333'">DeclaratieNummer van de Declaratie moet uniek zijn voor de aanbieder binnen het wettelijk domein waarop de Declaratie betrekking heeft.</when><when test="$pRule='TR335'">Einddatum mag niet meer dan 5 jaar voor DeclaratieDagtekening liggen.</when><when test="$pRule='TR337'">Ieder Declaratie-antwoord is gerelateerd aan een ingediende declaratie obv DeclaratieNummer en DeclaratieIdentificatie.</when><when test="$pRule='TR338'">Iedere Prestatie in een declaratiebericht is gerelateerd aan een ToegewezenProduct op basis van het toewijzingnummer.</when><when test="$pRule='TR339'">ProductCategorie in Prestatie moet gelijk zijn aan ProductCategorie in het ToegewezenProduct indien deze opgenomen is.</when><when test="$pRule='TR340'">ProductCode in Prestatie moet gelijk zijn aan ProductCode in het ToegewezenProduct, indien deze opgenomen is.</when><when test="$pRule='TR341'">Eenheid in Prestatie moet passen bij Eenheid in het ToegewezenProduct.</when><when test="$pRule='TR342'">Alle afgewezen Prestaties dienen meegestuurd te worden in het declaratie-antwoordbericht op een declaratie.</when><when test="$pRule='TR345'">Indien Eenheid de waarde 83 (euro's) heeft, moet IngediendBedrag gelijk zijn aan GeleverdVolume.</when><when test="$pRule='TR346'">Indien Eenheid ongelijk is aan waarde 83 (Euro's), moet IngediendBedrag gelijk zijn aan GeleverdVolume vermenigvuldigd met (het onafgeronde) ProductTarief.</when><when test="$pRule='TR347'">ReferentieAanbieder is uniek voor de aanbieder binnen het wettelijk domein</when><when test="$pRule='TR349'">Het verzoek om wijziging bericht bevat alle actuele ToegewezenProducten van de client</when><when test="$pRule='TR350'">Ieder OngewijzigdProduct in een verzoek om wijziging bericht is gerelateerd aan een actueel toegewezen product op basis van het ToewijzingNummer.</when><when test="$pRule='TR351'">Ieder TeWijzigenProduct in een verzoek om wijziging is gerelateerd aan een actueel ToegewezenProduct op basis van ToewijzingNummer.</when><when test="$pRule='TR352'">Bij een verzoek om wijziging komt minstens 1 OngewijzigdProduct of TeWijzigenProduct voor.</when><when test="$pRule='TR353'">Bij een verzoek komt minstens 1 TeWijzigenProduct of NieuwProduct voor.</when><when test="$pRule='TR355'">ReferentieAanbieder in het antwoordbericht komt voor in een eerder verzoek om toewijzing of verzoek om wijziging</when><when test="$pRule='TR357'">Als GewensteIngangsdatum kleiner dan of gelijk is aan de dagtekening, dan is GewensteIngangsdatum gelijk aan ingangsdatum van het originele ToegewezenProduct.</when><when test="$pRule='TR358'">De waarde van TotaalBedrag in TotaalIngediendBedrag  moet gelijk zijn aan de SOM van de waarden van Bedrag in Ingediendbedrag in alle onderliggende Prestaties, rekening houdend met indicatie debet/credit.</when><when test="$pRule='TR359'">Als een antwoordbericht wordt verstuurd, mag er niet al eerder een toewijzingsbericht gestuurd zijn met dezelfde ReferentieAanbieder</when><when test="$pRule='TR360'">Een antwoordbericht met in VerzoekAntwoord de waarde 2 (Aanvraag in onderzoek), mag alleen gestuurd worden indien er nog geen antwoordbericht is met deze ReferentieAanbieder</when><when test="$pRule='TR361'">Een product mag alleen vaker in verzoek om wijziging voorkomen als de zorgperiodes elkaar niet overlappen</when><when test="$pRule='TR362'">Als een toewijzingsbericht niet wordt gestuurd naar aanleiding van het honoreren van een verzoek om toewijzing of een verzoek om wijziging dan wordt ReferentieAanbieder leeg gelaten.</when><when test="$pRule='TR363'">Als een toewijzingsbericht wordt gestuurd als honorering van een verzoek om wijziging, wordt ReferentieAanbieder overgenomen</when><when test="$pRule='TR364'">ReferentieAanbieder in een ToegewezenProduct komt voor in een eerder verzoek om toewijzing of verzoek om wijziging</when><when test="$pRule='TR365'">Als er al een antwoordbericht is met dezelfde ReferentieAanbieder dan moet VerzoekAntwoord daar de waarde 2 (Aanvraag in onderzoek) hebben.</when><when test="$pRule='TR366'">Iedere Prestatie in een declaratieantwoord is gerelateerd aan een declaratiebericht op basis van ProductReferentie.</when><when test="$pRule='TR367'">Waarde moet overeenkomen met waarde uit het declaratiebericht dat gerelateerd is op basis van ProductReferentie</when><when test="$pRule='TR368'">De periode is exact gelijk aan 1 hele kalendermaand</when><when test="$pRule='TR369'">Indien in het ToegewezenProduct een Budget is meegegeven, moet de som van GeleverdVolume in alle ingediende Prestaties die betrekking hebben op dat ToegewezenProduct passen binnen het toegewezen Budget.</when><when test="$pRule='TR371'">Waarde moet overeenkomen met waarde van XsdVersie uit het declaratiebericht dat gerelateerd is op basis van DeclaratieIdentificatie.</when><when test="$pRule='TR373'">Indien in een TeWijzigenProduct het Budget of het totaal over toewijzingsperiode wordt gewijzigd, dient GewensteIngangsdatum gelijk te zijn aan de actuele toewijzing</when><when test="$pRule='TR374'">Een verzoek mag alleen worden verstuurd als er geen onderhanden verzoek is voor de betreffende client van dezelfde aanbieder.</when></choose></template><template match="*" mode="CD005"/><template match="nb:Postcode" mode="CD005"><if test="not (ancestor-or-self::n4:Bericht)"><call-template name="checkempty"><with-param name="pOther" select="../nb:LandCode"/><with-param name="pRule">CD005</with-param></call-template></if></template><template match="nb:LandCode" mode="CD005"><if test="not (ancestor-or-self::n4:Bericht)"><call-template name="checkempty"><with-param name="pOther" select="../nb:Postcode"/><with-param name="pRule">CD005</with-param></call-template></if></template><template match="*" mode="CD007"/><template match="*[nb:Taal | nb:Vorm]" mode="check"><if test="not (ancestor-or-self::n4:Bericht)"><call-template name="checksame"><with-param name="pThis" select="nb:Taal"/><with-param name="pValue1">*</with-param><with-param name="pOther" select="nb:Vorm"/><with-param name="pValue2">1</with-param><with-param name="pRule">CD007</with-param></call-template></if></template><template match="*" mode="CD009"/><template match="n8:Contact/n8:Periode" mode="CD009"><call-template name="checkimplication"><with-param name="pValue1">#</with-param><with-param name="pOther" select="../n8:Soort"/><with-param name="pValue2">04</with-param><with-param name="pRule">CD009</with-param></call-template></template><template match="*" mode="CD025"/><template match="nb:LandCode" mode="CD025"><if test="not (ancestor-or-self::n4:Bericht)"><call-template name="checkimplication"><with-param name="pValue1">NL</with-param><with-param name="pOther" select="../nb:Huis/nb:Huisnummer"/><with-param name="pValue2">*</with-param><with-param name="pRule">CD025</with-param></call-template></if></template><template match="*" mode="CD034"/><template match="n8:Contact" mode="CD034"><call-template name="checkimplication"><with-param name="pThis" select="n8:Soort"/><with-param name="pValue1">01,03</with-param><with-param name="pOther" select="n8:Adres/nb:Postcode"/><with-param name="pValue2">*</with-param><with-param name="pRule">CD034</with-param></call-template></template><template match="*" mode="CD041"/><template match="n8:ToegewezenProduct" mode="CD041"><call-template name="checkimplication"><with-param name="pThis" select="n8:Product/nb:Code"/><with-param name="pValue1">*</with-param><with-param name="pOther" select="n8:Omvang"/><with-param name="pValue2">#</with-param><with-param name="pRule">CD041</with-param></call-template></template><template match="n5:AangevraagdProduct" mode="CD041"><call-template name="checkimplication"><with-param name="pThis" select="n5:Product/nb:Code"/><with-param name="pValue1">*</with-param><with-param name="pOther" select="n5:Omvang"/><with-param name="pValue2">#</with-param><with-param name="pRule">CD041</with-param></call-template></template><template match="*" mode="CD043"/><template match="n5:AangevraagdProduct" mode="CD043"><call-template name="checksame"><with-param name="pThis" select="n5:BeschikkingNummer"/><with-param name="pValue1">*</with-param><with-param name="pOther" select="n5:BeschikkingIngangsdatum"/><with-param name="pValue2">*</with-param><with-param name="pRule">CD043</with-param></call-template></template><template match="*" mode="CD044"/><template match="n8:ToegewezenProduct" mode="CD044"><call-template name="checkimplication"><with-param name="pThis" select="n8:RedenWijziging"/><with-param name="pValue1">*</with-param><with-param name="pOther" select="n8:Einddatum"/><with-param name="pValue2">*</with-param><with-param name="pRule">CD044</with-param></call-template></template><template match="*" mode="CD055"/><template match="n6:IngediendeBedragPrestatie" mode="CD055"><if test="normalize-space(nb:BtwVrijstellingIndicatie/text())='2'"><call-template name="checkvalue"><with-param name="pThis" select="nb:BtwPercentage"/><with-param name="pValues">*</with-param><with-param name="pRule">CD055</with-param><with-param name="pExtra" select="nb:BtwVrijstellingIndicatie"/></call-template><call-template name="checkvalue"><with-param name="pThis" select="nb:BtwBedrag/nb:Bedrag"/><with-param name="pValues">*</with-param><with-param name="pRule">CD055</with-param><with-param name="pExtra" select="nb:BtwVrijstellingIndicatie"/></call-template><call-template name="checkvalue"><with-param name="pThis" select="ancestor-or-self::n6:Bericht/n6:Header//nb:BtwIDNummer"/><with-param name="pValues">*</with-param><with-param name="pRule">CD055</with-param><with-param name="pExtra" select="nb:BtwVrijstellingIndicatie"/></call-template><call-template name="checkvalue"><with-param name="pThis" select="ancestor-or-self::n6:Bericht/n6:Header//nb:BtwTotaalBedrag/nb:TotaalBedrag"/><with-param name="pValues">*</with-param><with-param name="pRule">CD055</with-param><with-param name="pExtra" select="nb:BtwVrijstellingIndicatie"/></call-template></if></template><template match="n4:IngediendeBedragPrestatie" mode="CD055"><if test="normalize-space(nb:BtwVrijstellingIndicatie/text())='2'"><call-template name="checkvalue"><with-param name="pThis" select="nb:BtwPercentage"/><with-param name="pValues">*</with-param><with-param name="pRule">CD055</with-param><with-param name="pExtra" select="nb:BtwVrijstellingIndicatie"/></call-template><call-template name="checkvalue"><with-param name="pThis" select="nb:BtwBedrag/nb:Bedrag"/><with-param name="pValues">*</with-param><with-param name="pRule">CD055</with-param><with-param name="pExtra" select="nb:BtwVrijstellingIndicatie"/></call-template><call-template name="checkvalue"><with-param name="pThis" select="ancestor-or-self::n4:Bericht/n4:Header//nb:BtwIDNummer"/><with-param name="pValues">*</with-param><with-param name="pRule">CD055</with-param><with-param name="pExtra" select="nb:BtwVrijstellingIndicatie"/></call-template></if></template><template match="*" mode="CD056"/><template match="n6:IngediendeBedragPrestatie" mode="CD056"><if test="normalize-space(nb:BtwVrijstellingIndicatie/text())='1'"><call-template name="checkempty"><with-param name="pThis" select="nb:BtwPercentage"/><with-param name="pRule">CD056</with-param></call-template><call-template name="checkempty"><with-param name="pThis" select="nb:BtwBedrag/nb:Bedrag"/><with-param name="pRule">CD056</with-param></call-template></if></template><template match="n4:IngediendeBedragPrestatie" mode="CD056"><if test="normalize-space(nb:BtwVrijstellingIndicatie/text())='1'"><call-template name="checkempty"><with-param name="pThis" select="nb:BtwPercentage"/><with-param name="pRule">CD056</with-param></call-template><call-template name="checkempty"><with-param name="pThis" select="nb:BtwBedrag/nb:Bedrag"/><with-param name="pRule">CD056</with-param></call-template></if></template><template match="*" mode="CD058"/><template match="n6:BetalingAanID" mode="CD058"><call-template name="checkimplication"><with-param name="pValue1">01</with-param><with-param name="pOther" select="../n6:Servicebureau"/><with-param name="pValue2">*</with-param><with-param name="pRule">CD058</with-param></call-template></template><template match="n4:BetalingAanID" mode="CD058"><call-template name="checkimplication"><with-param name="pValue1">01</with-param><with-param name="pOther" select="../n4:Servicebureau"/><with-param name="pValue2">*</with-param><with-param name="pRule">CD058</with-param></call-template></template><template match="*" mode="CD059"/><template match="n6:Prestatie" mode="CD059"><call-template name="checkimplication"><with-param name="pThis" select="ancestor-or-self::n6:Bericht/n6:Header/n6:BerichtCode"/><with-param name="pValue1">448, 450</with-param><with-param name="pOther" select="n6:IngediendeBedragPrestatie/nb:BtwVrijstellingIndicatie"/><with-param name="pValue2">*</with-param><with-param name="pRule">CD059</with-param></call-template></template><template match="n4:Prestatie" mode="CD059"><call-template name="checkimplication"><with-param name="pThis" select="ancestor-or-self::n4:Bericht/n4:Header/n4:BerichtCode"/><with-param name="pValue1">449, 451</with-param><with-param name="pOther" select="n4:IngediendeBedragPrestatie/nb:BtwVrijstellingIndicatie"/><with-param name="pValue2">*</with-param><with-param name="pRule">CD059</with-param></call-template></template><template match="*" mode="CD060"/><template match="n6:Prestatie" mode="CD060"><call-template name="checksame"><with-param name="pThis" select="n6:IngediendeBedragPrestatie/nb:DeclaratieFactuurBedrag/nb:DebetCredit"/><with-param name="pValue1">C</with-param><with-param name="pOther" select="n6:ProductReferentie/nb:VorigReferentieNummer"/><with-param name="pValue2">*</with-param><with-param name="pRule">CD060</with-param></call-template></template><template match="n4:Prestatie" mode="CD060"><call-template name="checksame"><with-param name="pThis" select="n4:IngediendeBedragPrestatie/nb:DeclaratieFactuurBedrag/nb:DebetCredit"/><with-param name="pValue1">C</with-param><with-param name="pOther" select="n4:ProductReferentie/nb:VorigReferentieNummer"/><with-param name="pValue2">*</with-param><with-param name="pRule">CD060</with-param></call-template></template><template match="n9:Prestatie" mode="CD060"><call-template name="checksame"><with-param name="pThis" select="n9:IngediendBedrag/nb:DebetCredit"/><with-param name="pValue1">C</with-param><with-param name="pOther" select="n9:ProductReferentie/nb:VorigReferentieNummer"/><with-param name="pValue2">*</with-param><with-param name="pRule">CD060</with-param></call-template></template><template match="n7:Prestatie" mode="CD060"><call-template name="checksame"><with-param name="pThis" select="n7:IngediendBedrag/nb:DebetCredit"/><with-param name="pValue1">C</with-param><with-param name="pOther" select="n7:ProductReferentie/nb:VorigReferentieNummer"/><with-param name="pValue2">*</with-param><with-param name="pRule">CD060</with-param></call-template></template><template match="*" mode="CD062"/><template match="n6:IngediendeBedragPrestatie | n4:IngediendeBedragPrestatie" mode="CD062"><call-template name="checkimplication"><with-param name="pThis" select="nb:Eenheid"/><with-param name="pValue1">83</with-param><with-param name="pOther" select="nb:ProductTarief"/><with-param name="pValue2"/><with-param name="pRule">CD062</with-param></call-template></template><template match="*" mode="CD066"/><template match="n5:Verwijzer" mode="CD066"><variable name="v1"><call-template name="testvalue"><with-param name="pElement" select="nb:Type"/><with-param name="pValues">02,03,04,05</with-param></call-template></variable><choose><when test="$v1='true'"><call-template name="checkimplication"><with-param name="pThis" select="nb:ZorgverlenerCode"/><with-param name="pValue1">*</with-param><with-param name="pOther" select="nb:Naam"/><with-param name="pValue2"/><with-param name="pExtra" select="nb:Type"/><with-param name="pRule">CD066</with-param></call-template></when></choose></template><template match="*" mode="CD067"/><template match="n5:Verwijzer" mode="CD067"><variable name="v1"><call-template name="testvalue"><with-param name="pElement" select="nb:Type"/><with-param name="pValues">02,03,04,05</with-param></call-template></variable><choose><when test="$v1='true'"><call-template name="checkimplication"><with-param name="pThis" select="nb:ZorgverlenerCode"/><with-param name="pValue1"/><with-param name="pOther" select="nb:Naam"/><with-param name="pValue2">*</with-param><with-param name="pExtra" select="nb:Type"/><with-param name="pRule">CD067</with-param></call-template></when></choose></template><template match="*" mode="CD068"/><template match="n5:Verwijzer" mode="CD068"><call-template name="checkimplication"><with-param name="pThis" select="nb:Type"/><with-param name="pValue1">!02,03,04,05</with-param><with-param name="pOther" select="nb:ZorgverlenerCode"/><with-param name="pValue2"/><with-param name="pRule">CD068</with-param></call-template></template><template match="*" mode="CD075"/><template match="n8:ToegewezenProduct//n8:Budget" mode="CD075"><call-template name="checkimplication"><with-param name="pValue1">*</with-param><with-param name="pOther" select="ancestor-or-self::n8:ToegewezenProduct/n8:Einddatum"/><with-param name="pValue2">*</with-param><with-param name="pRule">CD075</with-param></call-template></template><template match="n2:TeWijzigenProduct//n2:Budget" mode="CD075"><call-template name="checkimplication"><with-param name="pValue1">*</with-param><with-param name="pOther" select="ancestor-or-self::n2:TeWijzigenProduct/n2:Einddatum"/><with-param name="pValue2">*</with-param><with-param name="pRule">CD075</with-param></call-template></template><template match="n2:NieuwProduct//n2:Budget" mode="CD075"><call-template name="checkimplication"><with-param name="pValue1">*</with-param><with-param name="pOther" select="ancestor-or-self::n2:NieuwProduct/n2:Einddatum"/><with-param name="pValue2">*</with-param><with-param name="pRule">CD075</with-param></call-template></template><template match="*" mode="CD076"/><template match="n8:ToegewezenProduct//nb:Frequentie" mode="CD076"><call-template name="checkimplication"><with-param name="pValue1">2,6</with-param><with-param name="pOther" select="ancestor-or-self::n8:ToegewezenProduct/n8:Einddatum"/><with-param name="pValue2">*</with-param><with-param name="pRule">CD076</with-param></call-template></template><template match="n5:AangevraagdProduct//nb:Frequentie" mode="CD076"><call-template name="checkimplication"><with-param name="pValue1">2,6</with-param><with-param name="pOther" select="ancestor-or-self::n5:AangevraagdProduct/n5:ToewijzingEinddatum"/><with-param name="pValue2">*</with-param><with-param name="pRule">CD076</with-param></call-template></template><template match="n2:TeWijzigenProduct//nb:Frequentie" mode="CD076"><call-template name="checkimplication"><with-param name="pValue1">2,6</with-param><with-param name="pOther" select="ancestor-or-self::n2:TeWijzigenProduct/n2:Einddatum"/><with-param name="pValue2">*</with-param><with-param name="pRule">CD076</with-param></call-template></template><template match="n2:NieuwProduct//nb:Frequentie" mode="CD076"><call-template name="checkimplication"><with-param name="pValue1">2,6</with-param><with-param name="pOther" select="ancestor-or-self::n2:NieuwProduct/n2:Einddatum"/><with-param name="pValue2">*</with-param><with-param name="pRule">CD076</with-param></call-template></template><template match="*" mode="CD077"/><template match="n8:ToegewezenProduct//n8:Budget" mode="CD077"><call-template name="checkimplication"><with-param name="pValue1">*</with-param><with-param name="pOther" select="ancestor-or-self::n8:ToegewezenProduct/n8:Omvang"/><with-param name="pValue2">!#</with-param><with-param name="pRule">CD077</with-param></call-template></template><template match="n2:TeWijzigenProduct//n2:Budget" mode="CD077"><call-template name="checkimplication"><with-param name="pValue1">*</with-param><with-param name="pOther" select="ancestor-or-self::n2:TeWijzigenProduct/n2:Omvang"/><with-param name="pValue2">!#</with-param><with-param name="pRule">CD077</with-param></call-template></template><template match="n2:NieuwProduct//n2:Budget" mode="CD077"><call-template name="checkimplication"><with-param name="pValue1">*</with-param><with-param name="pOther" select="ancestor-or-self::n2:NieuwProduct/n2:Omvang"/><with-param name="pValue2">!#</with-param><with-param name="pRule">CD077</with-param></call-template></template><template match="*" mode="CD078"/><template match="n8:ToegewezenProduct//n8:Omvang" mode="CD078"><call-template name="checkimplication"><with-param name="pValue1">#</with-param><with-param name="pOther" select="ancestor-or-self::n8:ToegewezenProduct/n8:Budget"/><with-param name="pValue2"/><with-param name="pRule">CD078</with-param></call-template></template><template match="n2:TeWijzigenProduct//n2:Omvang" mode="CD078"><call-template name="checkimplication"><with-param name="pValue1">#</with-param><with-param name="pOther" select="ancestor-or-self::n2:TeWijzigenProduct/n2:Budget"/><with-param name="pValue2"/><with-param name="pRule">CD078</with-param></call-template></template><template match="n2:NieuwProduct//n2:Omvang" mode="CD078"><call-template name="checkimplication"><with-param name="pValue1">#</with-param><with-param name="pOther" select="ancestor-or-self::n2:NieuwProduct/n2:Budget"/><with-param name="pValue2"/><with-param name="pRule">CD078</with-param></call-template></template><template match="*" mode="CD079"/><template match="n8:ToegewezenProduct" mode="CD079"><call-template name="checkimplication"><with-param name="pThis" select="n8:Budget"/><with-param name="pValue1"/><with-param name="pOther" select="n8:Product"/><with-param name="pValue2">#</with-param><with-param name="pExtra" select="."/><with-param name="pRule">CD079</with-param></call-template></template><template match="n2:NieuwProduct" mode="CD079"><call-template name="checkimplication"><with-param name="pThis" select="n2:Budget"/><with-param name="pValue1"/><with-param name="pOther" select="n2:Product"/><with-param name="pValue2">#</with-param><with-param name="pExtra" select="."/><with-param name="pRule">CD079</with-param></call-template></template><template match="*" mode="CD080"/><template match="n8:ToegewezenProduct//n8:Omvang" mode="CD080"><if test="not(ancestor-or-self::n8:ToegewezenProduct/n8:Einddatum) or number(translate(ancestor-or-self::n8:ToegewezenProduct/n8:Einddatum/text(),'-','')) &gt; 20201231"><call-template name="checkimplication"><with-param name="pValue1">#</with-param><with-param name="pOther" select="ancestor-or-self::n8:ToegewezenProduct/n8:Product/nb:Code"/><with-param name="pValue2">*</with-param><with-param name="pRule">CD080</with-param><with-param name="pExtra" select="ancestor-or-self::n8:ToegewezenProduct/n8:Einddatum"/></call-template></if></template><template match="n5:AangevraagdProduct//n5:Omvang" mode="CD080"><if test="not(ancestor-or-self::n5:AangevraagdProduct/n5:ToewijzingEinddatum) or number(translate(ancestor-or-self::n5:AangevraagdProduct/n5:ToewijzingEinddatum/text(),'-','')) &gt; 20201231"><call-template name="checkimplication"><with-param name="pValue1">#</with-param><with-param name="pOther" select="ancestor-or-self::n5:AangevraagdProduct/n5:Product/nb:Code"/><with-param name="pValue2">*</with-param><with-param name="pRule">CD080</with-param><with-param name="pExtra" select="ancestor-or-self::n5:AangevraagdProduct/n5:ToewijzingEinddatum"/></call-template></if></template><template match="n2:NieuwProduct//n2:Omvang" mode="CD080"><if test="not(ancestor-or-self::n2:NieuwProduct/n2:Einddatum) or number(translate(ancestor-or-self::n2:NieuwProduct/n2:Einddatum/text(),'-','')) &gt; 20201231"><call-template name="checkimplication"><with-param name="pValue1">#</with-param><with-param name="pOther" select="ancestor-or-self::n2:NieuwProduct/n2:Product/nb:Code"/><with-param name="pValue2">*</with-param><with-param name="pRule">CD080</with-param><with-param name="pExtra" select="ancestor-or-self::n2:NieuwProduct/n2:Einddatum"/></call-template></if></template><template match="*" mode="CD081"/><template match="n8:ToegewezenProduct//n8:Omvang/nb:Eenheid" mode="CD081"><if test="not(ancestor-or-self::n8:ToegewezenProduct/n8:Einddatum) or number(translate(ancestor-or-self::n8:ToegewezenProduct/n8:Einddatum/text(),'-','')) &gt; 20201231"><call-template name="checkimplication"><with-param name="pValue1">14,16,83,84</with-param><with-param name="pOther" select="../nb:Frequentie"/><with-param name="pValue2">2,4,6</with-param><with-param name="pRule">CD081</with-param><with-param name="pExtra" select="ancestor-or-self::n8:ToegewezenProduct/n8:Einddatum"/></call-template></if></template><template match="n5:AangevraagdProduct//n5:Omvang/nb:Eenheid" mode="CD081"><if test="not(ancestor-or-self::n5:AangevraagdProduct/n5:ToewijzingEinddatum) or number(translate(ancestor-or-self::n5:AangevraagdProduct/n5:ToewijzingEinddatum/text(),'-','')) &gt; 20201231"><call-template name="checkimplication"><with-param name="pValue1">14,16,83,84</with-param><with-param name="pOther" select="../nb:Frequentie"/><with-param name="pValue2">2,4,6</with-param><with-param name="pRule">CD081</with-param><with-param name="pExtra" select="ancestor-or-self::n5:AangevraagdProduct/n5:ToewijzingEinddatum"/></call-template></if></template><template match="n2:TeWijzigenProduct//n2:Omvang/nb:Eenheid" mode="CD081"><if test="not(ancestor-or-self::n2:TeWijzigenProduct/n2:Einddatum) or number(translate(ancestor-or-self::n2:TeWijzigenProduct/n2:Einddatum/text(),'-','')) &gt; 20201231"><call-template name="checkimplication"><with-param name="pValue1">14,16,83,84</with-param><with-param name="pOther" select="../nb:Frequentie"/><with-param name="pValue2">2,4,6</with-param><with-param name="pRule">CD081</with-param><with-param name="pExtra" select="ancestor-or-self::n2:TeWijzigenProduct/n2:Einddatum"/></call-template></if></template><template match="n2:NieuwProduct//n2:Omvang/nb:Eenheid" mode="CD081"><if test="not(ancestor-or-self::n2:NieuwProduct/n2:Einddatum) or number(translate(ancestor-or-self::n2:NieuwProduct/n2:Einddatum/text(),'-','')) &gt; 20201231"><call-template name="checkimplication"><with-param name="pValue1">14,16,83,84</with-param><with-param name="pOther" select="../nb:Frequentie"/><with-param name="pValue2">2,4,6</with-param><with-param name="pRule">CD081</with-param><with-param name="pExtra" select="ancestor-or-self::n2:NieuwProduct/n2:Einddatum"/></call-template></if></template><template match="*" mode="CD085"/><template match="n0:VerzoekAntwoord" mode="CD085"><call-template name="checkimplication"><with-param name="pValue1">1</with-param><with-param name="pOther" select="../n0:RedenAfwijzingVerzoek"/><with-param name="pValue2">*</with-param><with-param name="pRule">CD085</with-param></call-template></template><template match="*" mode="CD086"/><template match="n0:VerzoekAntwoord" mode="CD086"><call-template name="checkimplication"><with-param name="pValue1">2</with-param><with-param name="pOther" select="../n0:RedenAfwijzingVerzoek"/><with-param name="pValue2"/><with-param name="pRule">CD086</with-param></call-template></template><template match="*" mode="CD087"/><template match="n9:Eenheid" mode="CD087"><call-template name="checksame"><with-param name="pValue1">!83</with-param><with-param name="pOther" select="../n9:ProductTarief"/><with-param name="pValue2">*</with-param><with-param name="pRule">CD087</with-param></call-template></template><template match="*" mode="CD088"/><template match="n0:RedenAfwijzingVerzoek" mode="CD088"><call-template name="checkimplication"><with-param name="pValue1">!8</with-param><with-param name="pOther" select="../n0:Woonplaatsbeginsel"/><with-param name="pValue2">!#</with-param><with-param name="pRule">CD088</with-param></call-template></template><template match="*" mode="CS002"/><template match="*[local-name() = 'Bsn']" mode="CS002"><call-template name="check11proef"><with-param name="pRule">CS002</with-param></call-template></template><template match="*" mode="CS003"/><template match="n8:Beschikking/n8:Einddatum" mode="CS003"><call-template name="checkafter"><with-param name="pOther" select="../n8:Ingangsdatum"/><with-param name="pRule">CS003</with-param></call-template></template><template match="n8:ToegewezenProduct/n8:Einddatum" mode="CS003"><call-template name="checkafter"><with-param name="pOther" select="../n8:Ingangsdatum"/><with-param name="pRule">CS003</with-param></call-template></template><template match="n8:Contact/n8:Periode/nb:Einddatum" mode="CS003"><call-template name="checkafter"><with-param name="pOther" select="../nb:Begindatum"/><with-param name="pRule">CS003</with-param></call-template></template><template match="n5:AangevraagdProduct/n5:ToewijzingEinddatum" mode="CS003"><call-template name="checkafter"><with-param name="pOther" select="../n5:ToewijzingIngangsdatum"/><with-param name="pRule">CS003</with-param></call-template></template><template match="*" mode="CS023"/><template match="n8:Beschikking/n8:Afgiftedatum" mode="CS023"><call-template name="cs023"/></template><template match="n8:Client/n8:Geboortedatum/nb:Datum" mode="CS023"><call-template name="cs023"/></template><template match="n8:Relatie/n8:Geboortedatum/nb:Datum" mode="CS023"><call-template name="cs023"/></template><template match="n8:ToegewezenProduct/n8:Toewijzingsdatum" mode="CS023"><call-template name="cs023"/></template><template match="nb:DeclaratiePeriode/nb:Begindatum" mode="CS023"><call-template name="cs023declaratie"/></template><template match="n6:Client/n6:Geboortedatum/nb:Datum" mode="CS023"><call-template name="cs023declaratie"/></template><template match="n6:DeclaratieFactuurIdentificatie/nb:DeclaratiePeriode/nb:Begindatum" mode="CS023"><call-template name="cs023declaratie"/></template><template match="n6:Prestatie/n6:ProductPeriode/nb:Begindatum" mode="CS023"><call-template name="cs023declaratie"/></template><template match="n4:Client/n4:Geboortedatum/nb:Datum" mode="CS023"><call-template name="cs023declaratie"/></template><template match="n4:DeclaratieFactuurIdentificatie/nb:DeclaratiePeriode/nb:Begindatum" mode="CS023"><call-template name="cs023declaratie"/></template><template match="n4:Prestatie/n4:ProductPeriode/nb:Begindatum" mode="CS023"><call-template name="cs023declaratie"/></template><template match="n3:Client/n3:Geboortedatum/nb:Datum" mode="CS023"><call-template name="cs023"/></template><template match="n1:Client/n1:Geboortedatum/nb:Datum" mode="CS023"><call-template name="cs023"/></template><template match="n1:StopProduct/n1:Einddatum" mode="CS023"><call-template name="cs023"/></template><template match="n5:Client/n5:Geboortedatum/nb:Datum" mode="CS023"><call-template name="cs023"/></template><template match="n9:DeclaratiePeriode/nb:Begindatum" mode="CS023"><call-template name="cs023"/></template><template match="n9:ProductPeriode/nb:Begindatum" mode="CS023"><call-template name="cs023"/></template><template match="n7:ProductPeriode/nb:Begindatum" mode="CS023"><call-template name="cs023"/></template><template name="cs023"><param name="pThis" select="."/><call-template name="checkafter"><with-param name="pThis" select="ancestor-or-self::*[local-name()='Bericht']/*[local-name()='Header']/*[local-name()='BerichtIdentificatie']/*[local-name()='Dagtekening']"/><with-param name="pOther" select="$pThis"/><with-param name="pRule">CS023</with-param></call-template></template><template name="cs023declaratie"><param name="pThis" select="."/><call-template name="checkafter"><with-param name="pThis" select="ancestor-or-self::*[local-name()='Bericht']/*[local-name()='Header']/*[local-name()='DeclaratieFactuurIdentificatie']/*[local-name()='FactuurDagtekening']"/><with-param name="pOther" select="$pThis"/><with-param name="pRule">CS023</with-param></call-template></template><template match="*" mode="CS050"/><template match="nb:NaamGebruik" mode="CS050"><if test="not (ancestor-or-self::n4:Bericht)"><call-template name="checkimplication"><with-param name="pThis" select="../nb:Partnernaam"/><with-param name="pValue1">#</with-param><with-param name="pOther" select="."/><with-param name="pValue2">1,2,3,4</with-param><with-param name="pRule">CS050</with-param></call-template><call-template name="checkimplication"><with-param name="pThis" select="../nb:Partnernaam"/><with-param name="pValue1">!#</with-param><with-param name="pOther" select="."/><with-param name="pValue2">1,6</with-param><with-param name="pRule">CS050</with-param></call-template></if></template><template match="*" mode="CS058"/><template match="n3:StartProduct/n3:StatusAanlevering" mode="CS058"><call-template name="checkvalue"><with-param name="pValues">1,3</with-param><with-param name="pRule">CS058</with-param></call-template></template><template match="n1:StopProduct/n1:StatusAanlevering" mode="CS058"><call-template name="checkvalue"><with-param name="pValues">1,3</with-param><with-param name="pRule">CS058</with-param></call-template></template><template match="*" mode="CS089"/><template match="nb:LandCode" mode="CS089"><if test="not (ancestor-or-self::n4:Bericht)"><call-template name="checkimplication"><with-param name="pValue1">NL</with-param><with-param name="pOther" select="../nb:Postcode"/><with-param name="pValue2">#1000ZZ</with-param><with-param name="pRule">CS089</with-param></call-template></if></template><template match="*" mode="CS100"/><template match="n9:ProductPeriode/nb:Begindatum" mode="CS100"><if test="translate(text(),'-','') &lt; 20210101"><call-template name="addError"><with-param name="pRule">CS100</with-param></call-template></if></template><template match="n9:DeclaratiePeriode/nb:Begindatum" mode="CS100"><if test="translate(text(),'-','') &lt; 20210101"><call-template name="addError"><with-param name="pRule">CS100</with-param></call-template></if></template><template match="*" mode="CS102"/><template match="n2:NieuwProduct/n2:GewensteIngangsdatum" mode="CS102"><call-template name="checkafterstrict"><with-param name="pOther" select="ancestor-or-self::*[local-name()='Bericht']/*[local-name()='Header']/*[local-name()='BerichtIdentificatie']/*[local-name()='Dagtekening']"/><with-param name="pRule">CS102</with-param></call-template></template><template match="*" mode="CS103"/><template match="n6:DeclaratieFactuurIdentificatie/nb:DeclaratiePeriode" mode="CS103"><if test="translate(nb:Einddatum/text(),'-','') &gt;= 20210101"><call-template name="addError"><with-param name="pRule">CS103</with-param></call-template></if></template><template match="n6:ProductPeriode" mode="CS103"><if test="translate(nb:Einddatum/text(),'-','') &gt;= 20210101"><call-template name="addError"><with-param name="pRule">CS103</with-param></call-template></if></template><template match="n4:ProductPeriode" mode="CS103"><if test="translate(nb:Einddatum/text(),'-','') &gt;= 20210101"><call-template name="addError"><with-param name="pRule">CS103</with-param></call-template></if></template><template match="*" mode="CS104"/><template match="n8:ToegewezenProduct//n8:Omvang/nb:Frequentie" mode="CS104"><if test="not(ancestor-or-self::n8:ToegewezenProduct/n8:Einddatum) or number(translate(ancestor-or-self::n8:ToegewezenProduct/n8:Einddatum/text(),'-','')) &gt; 20201231"><call-template name="checkvalue"><with-param name="pValues">!3,5</with-param><with-param name="pExtra" select="ancestor-or-self::n8:ToegewezenProduct/n8:Einddatum"/><with-param name="pRule">CS104</with-param></call-template></if></template><template match="n5:AangevraagdProduct//n5:Omvang/nb:Frequentie" mode="CS104"><if test="not(ancestor-or-self::n5:AangevraagdProduct/n5:ToewijzingEinddatum) or number(translate(ancestor-or-self::n5:AangevraagdProduct/n5:ToewijzingEinddatum/text(),'-','')) &gt; 20201231"><call-template name="checkvalue"><with-param name="pValues">!3,5</with-param><with-param name="pExtra" select="ancestor-or-self::n5:AangevraagdProduct/n5:ToewijzingEinddatum"/><with-param name="pRule">CS104</with-param></call-template></if></template><template match="n2:TeWijzigenProduct//n2:Omvang/nb:Frequentie" mode="CS104"><if test="not(ancestor-or-self::n2:TeWijzigenProduct/n2:Einddatum) or number(translate(ancestor-or-self::n2:TeWijzigenProduct/n2:Einddatum/text(),'-','')) &gt; 20201231"><call-template name="checkvalue"><with-param name="pValues">!3,5</with-param><with-param name="pExtra" select="ancestor-or-self::n2:TeWijzigenProduct/n2:Einddatum"/><with-param name="pRule">CS104</with-param></call-template></if></template><template match="n2:NieuwProduct//n2:Omvang/nb:Frequentie" mode="CS104"><if test="not(ancestor-or-self::n2:NieuwProduct/n2:Einddatum) or number(translate(ancestor-or-self::n2:NieuwProduct/n2:Einddatum/text(),'-','')) &gt; 20201231"><call-template name="checkvalue"><with-param name="pValues">!3,5</with-param><with-param name="pExtra" select="ancestor-or-self::n2:NieuwProduct/n2:Einddatum"/><with-param name="pRule">CS104</with-param></call-template></if></template><template match="*" mode="CS108"/><template match="n6:DeclaratieFactuurIdentificatie/nb:DeclaratiePeriode" mode="CS108"><call-template name="cs108"/></template><template match="n6:ProductPeriode" mode="CS108"><call-template name="cs108"/></template><template match="n4:DeclaratieFactuurIdentificatie/nb:DeclaratiePeriode" mode="CS108"><call-template name="cs108"/></template><template match="n4:ProductPeriode" mode="CS108"><call-template name="cs108"/></template><template match="n9:DeclaratiePeriode" mode="CS108"><call-template name="cs108"/></template><template match="n9:ProductPeriode" mode="CS108"><call-template name="cs108"/></template><template match="n7:ProductPeriode" mode="CS108"><call-template name="cs108"/></template><template name="cs108"><call-template name="checkafter"><with-param name="pThis" select="nb:Einddatum"/><with-param name="pOther" select="nb:Begindatum"/><with-param name="pRule">CS108</with-param></call-template><call-template name="checkafter"><with-param name="pThis" select="ancestor-or-self::*[local-name()='Bericht']/*[local-name()='Header']/*[local-name()='DeclaratieFactuurIdentificatie']/*[local-name()='FactuurDagtekening']|ancestor-or-self::*[local-name()='Bericht']/*[local-name()='Header']/*[local-name()='BerichtIdentificatie']/*[local-name()='Dagtekening']"/><with-param name="pOther" select="nb:Einddatum"/><with-param name="pRule">CS108</with-param></call-template></template><template match="*" mode="CS300"/><template match="n8:Afzender" mode="CS300"><call-template name="checkGemeenteCode"><with-param name="pRule">CS300</with-param></call-template></template><template match="n6:Gemeente" mode="CS300"><call-template name="checkGemeenteCode"><with-param name="pRule">CS300</with-param></call-template></template><template match="n4:Gemeente" mode="CS300"><call-template name="checkGemeenteCode"><with-param name="pRule">CS300</with-param></call-template></template><template match="n3:Ontvanger" mode="CS300"><call-template name="checkGemeenteCode"><with-param name="pRule">CS300</with-param></call-template></template><template match="n1:Ontvanger" mode="CS300"><call-template name="checkGemeenteCode"><with-param name="pRule">CS300</with-param></call-template></template><template match="n5:Ontvanger" mode="CS300"><call-template name="checkGemeenteCode"><with-param name="pRule">CS300</with-param></call-template></template><template match="n2:Ontvanger" mode="CS300"><call-template name="checkGemeenteCode"><with-param name="pRule">CS300</with-param></call-template></template><template match="n0:Afzender" mode="CS300"><call-template name="checkGemeenteCode"><with-param name="pRule">CS300</with-param></call-template></template><template match="n0:Gemeente" mode="CS300"><call-template name="checkGemeenteCode"><with-param name="pRule">CS300</with-param></call-template></template><template match="n9:Ontvanger" mode="CS300"><call-template name="checkGemeenteCode"><with-param name="pRule">CS300</with-param></call-template></template><template match="n7:Afzender" mode="CS300"><call-template name="checkGemeenteCode"><with-param name="pRule">CS300</with-param></call-template></template><template match="*" mode="CS318"/><template match="n8:Client/n8:Naam/nb:NaamGebruik" mode="CS318"><call-template name="checknvalue"><with-param name="pValues">6</with-param><with-param name="pRule">CS318</with-param></call-template></template><template match="*" mode="CS323"/><template match="nb:DeclaratieFactuurBedrag/nb:Bedrag" mode="CS323"><call-template name="checkRelation"><with-param name="pOther" select="../../nb:BerekendBedrag/nb:Bedrag"/><with-param name="pRelation">equalsLt</with-param><with-param name="pRule">CS323</with-param></call-template></template><template match="*" mode="CS324"/><template match="n4:DeclaratieFactuurIdentificatie/nb:FactuurDagtekening" mode="CS324"><call-template name="checkafter"><with-param name="pThis" select="../../n4:RetourHeader/nb:RetourDagtekening"/><with-param name="pRule">CS324</with-param></call-template></template><template match="*" mode="CS325"/><template match="*[local-name() = 'DeclaratieFactuurTotaalBedrag']" mode="CS325"><call-template name="cs325"><with-param name="bedrag" select="nb:TotaalBedrag"/></call-template></template><template match="*[local-name() = 'BtwTotaalBedrag']" mode="CS325"><call-template name="cs325"><with-param name="bedrag" select="nb:TotaalBedrag"/></call-template></template><template match="*[local-name() = 'BerekendBedrag']" mode="CS325"><call-template name="cs325"><with-param name="bedrag" select="nb:Bedrag"/></call-template></template><template match="*[local-name() = 'BtwBedrag']" mode="CS325"><call-template name="cs325"><with-param name="bedrag" select="nb:Bedrag"/></call-template></template><template match="*[local-name() = 'DeclaratieFactuurBedrag']" mode="CS325"><call-template name="cs325"><with-param name="bedrag" select="nb:Bedrag"/></call-template></template><template match="*[local-name() = 'IngediendTotaalBedrag']" mode="CS325"><call-template name="cs325"><with-param name="bedrag" select="nb:TotaalBedrag"/></call-template></template><template match="*[local-name() = 'ToegekendTotaalBedrag']" mode="CS325"><call-template name="cs325"><with-param name="bedrag" select="nb:TotaalBedrag"/></call-template></template><template match="*[local-name() = 'GemeenteBerekendBedrag']" mode="CS325"><call-template name="cs325"><with-param name="bedrag" select="nb:Bedrag"/></call-template></template><template match="*[local-name() = 'ToegekendBedrag']" mode="CS325"><call-template name="cs325"><with-param name="bedrag" select="nb:Bedrag"/></call-template></template><template match="*[local-name() = 'TotaalIngediendBedrag']" mode="CS325"><call-template name="cs325"><with-param name="bedrag" select="nb:TotaalBedrag"/></call-template></template><template match="*[local-name() = 'IngediendBedrag']" mode="CS325"><call-template name="cs325"><with-param name="bedrag" select="nb:Bedrag"/></call-template></template><template match="*[local-name() = 'TotaalToegekendBedrag']" mode="CS325"><call-template name="cs325"><with-param name="bedrag" select="nb:TotaalBedrag"/></call-template></template><template name="cs325"><param name="bedrag"/><param name="debetCredit" select="./nb:DebetCredit"/><if test="$bedrag=0 and (normalize-space($debetCredit)='c' or normalize-space($debetCredit)='C')"><call-template name="addError"><with-param name="pElements" select="$bedrag|$debetCredit"/><with-param name="pRule">CS325</with-param></call-template></if></template><template match="*" mode="CS327"/><template match="n6:IngediendeBedragPrestatie/nb:BerekendBedrag" mode="CS327"><call-template name="cs327"/></template><template match="n6:IngediendeBedragPrestatie/nb:BtwBedrag" mode="CS327"><call-template name="cs327"/></template><template match="n4:IngediendeBedragPrestatie/nb:BerekendBedrag" mode="CS327"><call-template name="cs327"/></template><template match="n4:IngediendeBedragPrestatie/nb:BtwBedrag" mode="CS327"><call-template name="cs327"/></template><template name="cs327"><if test="not(normalize-space(nb:DebetCredit/text())=normalize-space(../nb:DeclaratieFactuurBedrag/nb:DebetCredit/text()))"><call-template name="addError"><with-param name="pRule">CS327</with-param><with-param name="pElements" select="nb:DebetCredit|../nb:DeclaratieFactuurBedrag/nb:DebetCredit"/></call-template></if></template><template match="*" mode="CS328"/><template match="n6:ProductPeriode/nb:Begindatum" mode="CS328"><if test="translate(text(),'-','') &lt; 20150101"><call-template name="addError"><with-param name="pRule">CS328</with-param></call-template></if></template><template match="n4:ProductPeriode/nb:Begindatum" mode="CS328"><if test="translate(text(),'-','') &lt; 20150101"><call-template name="addError"><with-param name="pRule">CS328</with-param></call-template></if></template><template match="*" mode="CS330"/><template match="n8:Omvang/nb:Eenheid" mode="CS330"><call-template name="checknvalue"><with-param name="pValues">21,81</with-param><with-param name="pRule">CS330</with-param></call-template></template><template match="n5:Omvang/nb:Eenheid" mode="CS330"><call-template name="checknvalue"><with-param name="pValues">21,81</with-param><with-param name="pRule">CS330</with-param></call-template></template><template match="n2:TeWijzigenProduct/n2:Omvang/nb:Eenheid | n2:NieuwProduct/n2:Omvang/nb:Eenheid" mode="CS330"><call-template name="checknvalue"><with-param name="pValues">21,81</with-param><with-param name="pRule">CS330</with-param></call-template></template><template match="n9:Prestatie/n9:Eenheid" mode="CS330"><call-template name="checknvalue"><with-param name="pValues">21,81</with-param><with-param name="pRule">CS330</with-param></call-template></template><template match="*" mode="CS331"/><template match="n6:IngediendeBedragPrestatie/nb:Eenheid" mode="CS331"><if test="translate(../../n6:ProductPeriode/nb:Begindatum/text(),'-','') &gt;= 20190401"><call-template name="checknvalue"><with-param name="pValues">21,81</with-param><with-param name="pRule">CS331</with-param></call-template></if></template><template match="n4:IngediendeBedragPrestatie/nb:Eenheid" mode="CS331"><if test="translate(../../n4:ProductPeriode/nb:Begindatum/text(),'-','') &gt;= 20190401"><call-template name="checknvalue"><with-param name="pValues">21,81</with-param><with-param name="pRule">CS331</with-param></call-template></if></template><template match="*" mode="TR002"/><template match="*[local-name() = 'Geboortedatum']/nb:Datum" mode="TR002"><if test="not(../nb:DatumGebruik/text()='3' and text()='1900-01-01')"><variable name="v1" select="ancestor-or-self::*[local-name()='Bericht']/*[local-name()='Header']"/><call-template name="checkYearsBetween"><with-param name="pDate1" select="$v1/*[local-name()='BerichtIdentificatie']/*[local-name()='Dagtekening']|$v1/*[local-name()='DeclaratieFactuurIdentificatie']/*[local-name()='FactuurDagtekening']"/><with-param name="pDate2" select="."/><with-param name="pYears">120</with-param><with-param name="pRule">TR002</with-param></call-template></if></template><template match="*" mode="TR006"/><template match="n8:Contact" mode="TR006"><call-template name="checkSingleCorrect"><with-param name="pThis" select="n8:Telefoon"/><with-param name="pValue1">#</with-param><with-param name="pOther" select="n8:Adres/nb:Huis"/><with-param name="pValue2">#</with-param><with-param name="pExtra" select="."/><with-param name="pRule">TR006</with-param></call-template><call-template name="checkSingleCorrect"><with-param name="pThis" select="n8:Telefoon"/><with-param name="pValue1">#</with-param><with-param name="pOther" select="n8:Adres/nb:Postcode"/><with-param name="pValue2">#</with-param><with-param name="pExtra" select="."/><with-param name="pRule">TR006</with-param></call-template></template><template match="*" mode="TR018"/><template match="n1:StopProduct/n1:Einddatum" mode="TR018"><call-template name="checkafter"><with-param name="pOther" select="../n1:Begindatum"/><with-param name="pRule">TR018</with-param></call-template></template><template match="*" mode="TR052"/><template match="n3:StartProduct/n3:Begindatum" mode="TR052"><call-template name="checkafter"><with-param name="pThis" select="ancestor-or-self::n3:Bericht/n3:Header/n3:BerichtIdentificatie/nb:Dagtekening"/><with-param name="pOther" select="."/><with-param name="pRule">TR052</with-param></call-template></template><template match="*" mode="TR061"/><template match="n8:Client/n8:Contactgegevens" mode="TR061"><if test="not(./n8:Contact/n8:Soort[text()='01' or text()='02' or text()='03'])"><call-template name="addError"><with-param name="pElements" select="n8:Contact"/><with-param name="pRule">TR061</with-param></call-template></if></template><template match="*" mode="TR097"/><template match="*[nb:Datum and nb:DatumGebruik]" mode="TR097"><choose><when test="nb:DatumGebruik='3' and nb:Datum!='1900-01-01'"><call-template name="addError"><with-param name="pElements" select="nb:Datum|nb:DatumGebruik"/><with-param name="pRule">TR097</with-param></call-template></when><when test="nb:DatumGebruik='2' and substring-after(nb:Datum,'-')!='01-01'"><call-template name="addError"><with-param name="pElements" select="nb:Datum|nb:DatumGebruik"/><with-param name="pRule">TR097</with-param></call-template></when><when test="nb:DatumGebruik='1' and substring-after(substring-after(nb:Datum,'-'),'-')!='01'"><call-template name="addError"><with-param name="pElements" select="nb:Datum|nb:DatumGebruik"/><with-param name="pRule">TR097</with-param></call-template></when></choose></template><template match="*" mode="TR101"/><template match="*[n8:Client]" mode="TR101"><call-template name="checkDuplicateKeys"><with-param name="pElement" select="n8:Client"/><with-param name="pKeys">/Bsn,</with-param><with-param name="pRule">TR101</with-param></call-template></template><template match="*[n8:Contact]" mode="TR101"><call-template name="checkDuplicateKeys"><with-param name="pElement" select="n8:Contact"/><with-param name="pKeys">/Soort,</with-param><with-param name="pRule">TR101</with-param></call-template></template><template match="*[n8:Relatie]" mode="TR101"><call-template name="checkDuplicateKeys"><with-param name="pElement" select="n8:Relatie"/><with-param name="pKeys">/Contact/Soort,/Nummer,</with-param><with-param name="pRule">TR101</with-param></call-template></template><template match="*[n8:ToegewezenProduct]" mode="TR101"><call-template name="checkDuplicateKeys"><with-param name="pElement" select="n8:ToegewezenProduct"/><with-param name="pKeys">/ToewijzingNummer,</with-param><with-param name="pRule">TR101</with-param></call-template></template><template match="*[n6:Client]" mode="TR101"><call-template name="checkDuplicateKeys"><with-param name="pElement" select="n6:Client"/><with-param name="pKeys">/Bsn,</with-param><with-param name="pRule">TR101</with-param></call-template></template><template match="*[n6:Prestatie]" mode="TR101"><call-template name="checkDuplicateKeys"><with-param name="pElement" select="n6:Prestatie"/><with-param name="pKeys">/ProductCategorie,/ProductCode,/ProductReferentie/ReferentieNummer,/ProductReferentie/VorigReferentieNummer,</with-param><with-param name="pRule">TR101</with-param></call-template></template><template match="*[n4:Client]" mode="TR101"><call-template name="checkDuplicateKeys"><with-param name="pElement" select="n4:Client"/><with-param name="pKeys">/Bsn,</with-param><with-param name="pRule">TR101</with-param></call-template></template><template match="*[n4:Prestatie]" mode="TR101"><call-template name="checkDuplicateKeys"><with-param name="pElement" select="n4:Prestatie"/><with-param name="pKeys">/ProductCategorie,/ProductCode,/ProductReferentie/ReferentieNummer,/ProductReferentie/VorigReferentieNummer,</with-param><with-param name="pRule">TR101</with-param></call-template></template><template match="*[n3:Client]" mode="TR101"><call-template name="checkDuplicateKeys"><with-param name="pElement" select="n3:Client"/><with-param name="pKeys">/Bsn,</with-param><with-param name="pRule">TR101</with-param></call-template></template><template match="*[n3:StartProduct]" mode="TR101"><call-template name="checkDuplicateKeys"><with-param name="pElement" select="n3:StartProduct"/><with-param name="pKeys">/Begindatum,/Product/Categorie,/Product/Code,/ToewijzingNummer,</with-param><with-param name="pRule">TR101</with-param></call-template></template><template match="*[n1:Client]" mode="TR101"><call-template name="checkDuplicateKeys"><with-param name="pElement" select="n1:Client"/><with-param name="pKeys">/Bsn,</with-param><with-param name="pRule">TR101</with-param></call-template></template><template match="*[n1:StopProduct]" mode="TR101"><call-template name="checkDuplicateKeys"><with-param name="pElement" select="n1:StopProduct"/><with-param name="pKeys">/Begindatum,/Einddatum,/Product/Categorie,/Product/Code,/ToewijzingNummer,</with-param><with-param name="pRule">TR101</with-param></call-template></template><template match="*[n5:AangevraagdProduct]" mode="TR101"><call-template name="checkDuplicateKeys"><with-param name="pElement" select="n5:AangevraagdProduct"/><with-param name="pKeys">/Product/Categorie,/Product/Code,/ToewijzingIngangsdatum,</with-param><with-param name="pRule">TR101</with-param></call-template></template><template match="*[n5:Client]" mode="TR101"><call-template name="checkDuplicateKeys"><with-param name="pElement" select="n5:Client"/><with-param name="pKeys">/Bsn,</with-param><with-param name="pRule">TR101</with-param></call-template></template><template match="*[n2:Client]" mode="TR101"><call-template name="checkDuplicateKeys"><with-param name="pElement" select="n2:Client"/><with-param name="pKeys">/Bsn,</with-param><with-param name="pRule">TR101</with-param></call-template></template><template match="*[n2:NieuwProduct]" mode="TR101"><call-template name="checkDuplicateKeys"><with-param name="pElement" select="n2:NieuwProduct"/><with-param name="pKeys">/GewensteIngangsdatum,/Product/Categorie,/Product/Code,</with-param><with-param name="pRule">TR101</with-param></call-template></template><template match="*[n2:OngewijzigdProduct]" mode="TR101"><call-template name="checkDuplicateKeys"><with-param name="pElement" select="n2:OngewijzigdProduct"/><with-param name="pKeys">/ToewijzingNummer,</with-param><with-param name="pRule">TR101</with-param></call-template></template><template match="*[n2:TeWijzigenProduct]" mode="TR101"><call-template name="checkDuplicateKeys"><with-param name="pElement" select="n2:TeWijzigenProduct"/><with-param name="pKeys">/ToewijzingNummer,</with-param><with-param name="pRule">TR101</with-param></call-template></template><template match="*[n2:Verzoek]" mode="TR101"><call-template name="checkDuplicateKeys"><with-param name="pElement" select="n2:Verzoek"/><with-param name="pKeys">/ReferentieAanbieder,</with-param><with-param name="pRule">TR101</with-param></call-template></template><template match="*[n0:Antwoord]" mode="TR101"><call-template name="checkDuplicateKeys"><with-param name="pElement" select="n0:Antwoord"/><with-param name="pKeys">/ReferentieAanbieder,/VerzoekAntwoord,</with-param><with-param name="pRule">TR101</with-param></call-template></template><template match="*[n0:Woonplaatsbeginsel]" mode="TR101"><call-template name="checkDuplicateKeys"><with-param name="pElement" select="n0:Woonplaatsbeginsel"/><with-param name="pKeys">/Gemeente,</with-param><with-param name="pRule">TR101</with-param></call-template></template><template match="*[n9:Client]" mode="TR101"><call-template name="checkDuplicateKeys"><with-param name="pElement" select="n9:Client"/><with-param name="pKeys">/Bsn,</with-param><with-param name="pRule">TR101</with-param></call-template></template><template match="*[n9:Declaratie]" mode="TR101"><call-template name="checkDuplicateKeys"><with-param name="pElement" select="n9:Declaratie"/><with-param name="pKeys">/DeclaratieNummer,</with-param><with-param name="pRule">TR101</with-param></call-template></template><template match="*[n9:Prestatie]" mode="TR101"><call-template name="checkDuplicateKeys"><with-param name="pElement" select="n9:Prestatie"/><with-param name="pKeys">/ProductReferentie/ReferentieNummer,/ProductReferentie/VorigReferentieNummer,</with-param><with-param name="pRule">TR101</with-param></call-template></template><template match="*[n7:Client]" mode="TR101"><call-template name="checkDuplicateKeys"><with-param name="pElement" select="n7:Client"/><with-param name="pKeys">/Bsn,</with-param><with-param name="pRule">TR101</with-param></call-template></template><template match="*[n7:DeclaratieAntwoord]" mode="TR101"><call-template name="checkDuplicateKeys"><with-param name="pElement" select="n7:DeclaratieAntwoord"/><with-param name="pKeys">/DeclaratieNummer,</with-param><with-param name="pRule">TR101</with-param></call-template></template><template match="*[n7:Prestatie]" mode="TR101"><call-template name="checkDuplicateKeys"><with-param name="pElement" select="n7:Prestatie"/><with-param name="pKeys">/ProductReferentie/ReferentieNummer,/ProductReferentie/VorigReferentieNummer,</with-param><with-param name="pRule">TR101</with-param></call-template></template><template match="*" mode="TR302"/><template match="n8:ToegewezenProduct" mode="TR302"><call-template name="tr302"/></template><template name="tr302"><param name="pThis" select="."/><param name="pList" select="preceding-sibling::*"/><for-each select="$pList"><if test="(($pThis/n8:Product/nb:Code and current()/n8:Product/nb:Code and $pThis/n8:Product/nb:Code=current()/n8:Product/nb:Code) and ($pThis/n8:Product/nb:Categorie and current()/n8:Product/nb:Categorie and $pThis/n8:Product/nb:Categorie=current()/n8:Product/nb:Categorie)) or ((not($pThis/n8:Product/nb:Code) or not(current()/n8:Product/nb:Code)) and ($pThis/n8:Product/nb:Categorie and current()/n8:Product/nb:Categorie and $pThis/n8:Product/nb:Categorie=current()/n8:Product/nb:Categorie)) or ((not($pThis/n8:Product/nb:Code) and not($pThis/n8:Product/nb:Categorie)) or (not(current()/n8:Product/nb:Code) and not(current()/n8:Product/nb:Categorie)))"><variable name="v1"><call-template name="isPeriodOverlay"><with-param name="pThis" select="$pThis"/><with-param name="pOther" select="current()"/></call-template></variable><if test="$v1='true'"><call-template name="addError"><with-param name="pElements" select="$pThis|current()"/><with-param name="pRule">TR302</with-param></call-template></if></if></for-each></template><template match="*" mode="TR312"/><template match="n6:DeclaratieFactuurBedragen" mode="TR312"><variable name="v1" select="sum(ancestor-or-self::n6:Bericht/n6:Clienten/n6:Client/n6:Prestaties/n6:Prestatie/n6:IngediendeBedragPrestatie/nb:DeclaratieFactuurBedrag[nb:DebetCredit/text()='D']/nb:Bedrag)"/><variable name="v2" select="sum(ancestor-or-self::n6:Bericht/n6:Clienten/n6:Client/n6:Prestaties/n6:Prestatie/n6:IngediendeBedragPrestatie/nb:DeclaratieFactuurBedrag[nb:DebetCredit/text()='C']/nb:Bedrag)"/><variable name="v3" select="$v1 - $v2"/><call-template name="checkimplication"><with-param name="pThis" select="nb:DeclaratieFactuurTotaalBedrag/nb:DebetCredit"/><with-param name="pValue1">D</with-param><with-param name="pOther" select="nb:DeclaratieFactuurTotaalBedrag/nb:TotaalBedrag"/><with-param name="pValue2"><call-template name="formatNumber"><with-param name="pValue" select="$v3"/></call-template></with-param><with-param name="pExtra" select="ancestor-or-self::n6:Bericht/n6:Clienten/n6:Client/n6:Prestaties/n6:Prestatie/n6:IngediendeBedragPrestatie/nb:DeclaratieFactuurBedrag/nb:Bedrag"/><with-param name="pRule">TR312</with-param></call-template><call-template name="checkimplication"><with-param name="pThis" select="nb:DeclaratieFactuurTotaalBedrag/nb:DebetCredit"/><with-param name="pValue1">C</with-param><with-param name="pOther" select="nb:DeclaratieFactuurTotaalBedrag/nb:TotaalBedrag"/><with-param name="pValue2"><call-template name="formatNumber"><with-param name="pValue" select="0 - 1*$v3"/></call-template></with-param><with-param name="pExtra" select="ancestor-or-self::n6:Bericht/n6:Clienten/n6:Client/n6:Prestaties/n6:Prestatie/n6:IngediendeBedragPrestatie/nb:DeclaratieFactuurBedrag/nb:Bedrag"/><with-param name="pRule">TR312</with-param></call-template></template><template match="*" mode="TR313"/><template match="n6:DeclaratieFactuurBedragen" mode="TR313"><variable name="v1" select="sum(ancestor-or-self::n6:Bericht/n6:Clienten/n6:Client/n6:Prestaties/n6:Prestatie/n6:IngediendeBedragPrestatie/nb:BtwBedrag[nb:DebetCredit='D']/nb:Bedrag)"/><variable name="v2" select="sum(ancestor-or-self::n6:Bericht/n6:Clienten/n6:Client/n6:Prestaties/n6:Prestatie/n6:IngediendeBedragPrestatie/nb:BtwBedrag[nb:DebetCredit='C']/nb:Bedrag)"/><variable name="v3" select="$v1 - $v2"/><call-template name="checkimplication"><with-param name="pThis" select="nb:BtwTotaalBedrag/nb:DebetCredit"/><with-param name="pValue1">D</with-param><with-param name="pOther" select="nb:BtwTotaalBedrag/nb:TotaalBedrag"/><with-param name="pValue2"><call-template name="formatNumber"><with-param name="pValue" select="$v3"/></call-template></with-param><with-param name="pExtra" select="ancestor-or-self::n6:Bericht/n6:Clienten/n6:Client/n6:Prestaties/n6:Prestatie/n6:IngediendeBedragPrestatie/nb:BtwBedrag/nb:Bedrag"/><with-param name="pRule">TR313</with-param></call-template><call-template name="checkimplication"><with-param name="pThis" select="nb:BtwTotaalBedrag/nb:DebetCredit"/><with-param name="pValue1">C</with-param><with-param name="pOther" select="nb:BtwTotaalBedrag/nb:TotaalBedrag"/><with-param name="pValue2"><call-template name="formatNumber"><with-param name="pValue" select="0 - 1*$v3"/></call-template></with-param><with-param name="pExtra" select="ancestor-or-self::n6:Bericht/n6:Clienten/n6:Client/n6:Prestaties/n6:Prestatie/n6:IngediendeBedragPrestatie/nb:BtwBedrag/nb:Bedrag"/><with-param name="pRule">TR313</with-param></call-template><if test="$v3!='0' and not(nb:BtwTotaalBedrag/nb:DebetCredit)"><call-template name="addError"><with-param name="pElements" select=".|ancestor-or-self::n6:Bericht/n6:Clienten/n6:Client/n6:Prestaties/n6:Prestatie/n6:IngediendeBedragPrestatie/nb:BtwBedrag/nb:Bedrag"/><with-param name="pRule">TR313</with-param></call-template></if></template><template match="*" mode="TR314"/><template match="n6:ProductReferentie" mode="TR314"><variable name="v1" select="normalize-space(nb:ReferentieNummer/text())"/><call-template name="checkvalue"><with-param name="pThis" select="ancestor-or-self::n6:Prestatie/preceding-sibling::n6:Prestatie//nb:ReferentieNummer[text()=$v1]"/><with-param name="pValues">!#</with-param><with-param name="pRule">TR314</with-param><with-param name="pCode">8021</with-param><with-param name="pExtra" select="nb:ReferentieNummer"/></call-template><call-template name="checkvalue"><with-param name="pThis" select="ancestor-or-self::n6:Client/preceding-sibling::n6:Client//nb:ReferentieNummer[text()=$v1]"/><with-param name="pValues">!#</with-param><with-param name="pRule">TR314</with-param><with-param name="pCode">8021</with-param><with-param name="pExtra" select="nb:ReferentieNummer"/></call-template></template><template match="*" mode="TR315"/><template match="n6:ProductReferentie" mode="TR315"><variable name="v1" select="normalize-space(nb:VorigReferentieNummer/text())"/><variable name="v2" select="nb:VorigReferentieNummer"/><for-each select="ancestor-or-self::n6:Prestatie/preceding-sibling::n6:Prestatie//nb:VorigReferentieNummer[text()=$v1]|ancestor-or-self::n6:Client/preceding-sibling::n6:Client//nb:VorigReferentieNummer[text()=$v1]"><call-template name="checkvalue"><with-param name="pValues">!#</with-param><with-param name="pRule">TR315</with-param><with-param name="pExtra" select="$v2"/></call-template></for-each></template><template match="n9:ProductReferentie" mode="TR315"><variable name="v1" select="normalize-space(nb:VorigReferentieNummer/text())"/><variable name="v2" select="nb:VorigReferentieNummer"/><for-each select="ancestor-or-self::n9:Prestatie/preceding-sibling::n9:Prestatie//nb:VorigReferentieNummer[text()=$v1]|ancestor-or-self::n9:Client/preceding-sibling::n9:Client//nb:VorigReferentieNummer[text()=$v1]"><call-template name="checkvalue"><with-param name="pValues">!#</with-param><with-param name="pRule">TR315</with-param><with-param name="pExtra" select="$v2"/></call-template></for-each></template><template match="*" mode="TR316"/><template match="n6:ProductReferentie" mode="TR316"><variable name="v1" select="normalize-space(nb:ReferentieNummer/text())"/><variable name="v2" select="normalize-space(nb:VorigReferentieNummer/text())"/><call-template name="checkvalue"><with-param name="pThis" select="ancestor-or-self::n6:Prestatie/preceding-sibling::n6:Prestatie//nb:ReferentieNummer[text()=$v2]"/><with-param name="pValues">!#</with-param><with-param name="pRule">TR316</with-param><with-param name="pExtra" select="nb:VorigReferentieNummer"/></call-template><call-template name="checkvalue"><with-param name="pThis" select="ancestor-or-self::n6:Client/preceding-sibling::n6:Client//nb:ReferentieNummer[text()=$v2]"/><with-param name="pValues">!#</with-param><with-param name="pRule">TR316</with-param><with-param name="pExtra" select="nb:VorigReferentieNummer"/></call-template><call-template name="checkvalue"><with-param name="pThis" select="ancestor-or-self::n6:Prestatie/preceding-sibling::n6:Prestatie//nb:VorigReferentieNummer[text()=$v1]"/><with-param name="pValues">!#</with-param><with-param name="pRule">TR316</with-param><with-param name="pExtra" select="nb:ReferentieNummer"/></call-template><call-template name="checkvalue"><with-param name="pThis" select="ancestor-or-self::n6:Client/preceding-sibling::n6:Client//nb:VorigReferentieNummer[text()=$v1]"/><with-param name="pValues">!#</with-param><with-param name="pRule">TR316</with-param><with-param name="pExtra" select="nb:ReferentieNummer"/></call-template><if test="$v1=$v2"><call-template name="addError"><with-param name="pRule">TR316</with-param><with-param name="pElements" select="nb:ReferentieNummer|nb:VorigReferentieNummer"/></call-template></if></template><template match="n9:ProductReferentie" mode="TR316"><variable name="v1" select="normalize-space(nb:ReferentieNummer/text())"/><variable name="v2" select="normalize-space(nb:VorigReferentieNummer/text())"/><call-template name="checkvalue"><with-param name="pThis" select="ancestor-or-self::n9:Prestatie/preceding-sibling::n9:Prestatie//nb:ReferentieNummer[text()=$v2]"/><with-param name="pValues">!#</with-param><with-param name="pRule">TR316</with-param><with-param name="pExtra" select="nb:VorigReferentieNummer"/></call-template><call-template name="checkvalue"><with-param name="pThis" select="ancestor-or-self::n9:Client/preceding-sibling::n9:Client//nb:ReferentieNummer[text()=$v2]"/><with-param name="pValues">!#</with-param><with-param name="pRule">TR316</with-param><with-param name="pExtra" select="nb:VorigReferentieNummer"/></call-template><call-template name="checkvalue"><with-param name="pThis" select="ancestor-or-self::n9:Prestatie/preceding-sibling::n9:Prestatie//nb:VorigReferentieNummer[text()=$v1]"/><with-param name="pValues">!#</with-param><with-param name="pRule">TR316</with-param><with-param name="pExtra" select="nb:ReferentieNummer"/></call-template><call-template name="checkvalue"><with-param name="pThis" select="ancestor-or-self::n9:Client/preceding-sibling::n9:Client//nb:VorigReferentieNummer[text()=$v1]"/><with-param name="pValues">!#</with-param><with-param name="pRule">TR316</with-param><with-param name="pExtra" select="nb:ReferentieNummer"/></call-template><if test="$v1=$v2"><call-template name="addError"><with-param name="pRule">TR316</with-param><with-param name="pElements" select="nb:ReferentieNummer|nb:VorigReferentieNummer"/></call-template></if></template><template match="*" mode="TR317"/><template match="n6:IngediendeBedragPrestatie | n4:IngediendeBedragPrestatie" mode="TR317"><variable name="v1" select="normalize-space(nb:GeleverdVolume)*normalize-space(nb:ProductTarief)"/><call-template name="checkimplication"><with-param name="pThis" select="nb:BerekendBedrag/nb:Bedrag"/><with-param name="pValue1">*</with-param><with-param name="pOther" select="nb:BerekendBedrag/nb:Bedrag"/><with-param name="pValue2"><call-template name="formatNumber"><with-param name="pValue" select="$v1"/></call-template></with-param><with-param name="pExtra" select="nb:GeleverdVolume|nb:ProductTarief"/><with-param name="pRule">TR317</with-param></call-template></template><template match="*" mode="TR319"/><template match="n6:Prestatie" mode="TR319"><call-template name="checkafter"><with-param name="pThis" select="ancestor-or-self::n6:Bericht/n6:Header/n6:DeclaratieFactuurIdentificatie/nb:DeclaratiePeriode/nb:Einddatum"/><with-param name="pOther" select="n6:ProductPeriode/nb:Begindatum"/><with-param name="pRule">TR319</with-param></call-template><call-template name="checkafter"><with-param name="pThis" select="ancestor-or-self::n6:Bericht/n6:Header/n6:DeclaratieFactuurIdentificatie/nb:DeclaratiePeriode/nb:Einddatum"/><with-param name="pOther" select="n6:ProductPeriode/nb:Einddatum"/><with-param name="pRule">TR319</with-param></call-template></template><template match="n9:Prestatie" mode="TR319"><call-template name="checkafter"><with-param name="pThis" select="ancestor-or-self::n9:Declaratie/n9:DeclaratiePeriode/nb:Einddatum"/><with-param name="pOther" select="n9:ProductPeriode/nb:Begindatum"/><with-param name="pRule">TR319</with-param></call-template><call-template name="checkafter"><with-param name="pThis" select="ancestor-or-self::n9:Declaratie/n9:DeclaratiePeriode/nb:Einddatum"/><with-param name="pOther" select="n9:ProductPeriode/nb:Einddatum"/><with-param name="pRule">TR319</with-param></call-template></template><template match="*" mode="TR320"/><template match="n4:RetourBedragen" mode="TR320"><variable name="v1" select="sum(ancestor-or-self::n4:Bericht/n4:Clienten/n4:Client/n4:Prestaties/n4:Prestatie/n4:IngediendeBedragPrestatie/nb:DeclaratieFactuurBedrag[nb:DebetCredit='D']/nb:Bedrag)"/><variable name="v2" select="sum(ancestor-or-self::n4:Bericht/n4:Clienten/n4:Client/n4:Prestaties/n4:Prestatie/n4:IngediendeBedragPrestatie/nb:DeclaratieFactuurBedrag[nb:DebetCredit='C']/nb:Bedrag)"/><variable name="v3" select="$v1 - $v2"/><variable name="v4" select="sum(ancestor-or-self::n4:Bericht/n4:Clienten/n4:Client/n4:Prestaties/n4:Prestatie/n4:ToegekendeBedragPrestatie/nb:ToegekendBedrag[nb:DebetCredit='D']/nb:Bedrag)"/><variable name="v5" select="sum(ancestor-or-self::n4:Bericht/n4:Clienten/n4:Client/n4:Prestaties/n4:Prestatie/n4:ToegekendeBedragPrestatie/nb:ToegekendBedrag[nb:DebetCredit='C']/nb:Bedrag)"/><variable name="v6" select="$v4 - $v5"/><variable name="v7" select="$v3 - $v6"/><variable name="v8"><choose><when test="./nb:ToegekendTotaalBedrag/nb:DebetCredit/text()='C'"><value-of select="./nb:ToegekendTotaalBedrag/nb:TotaalBedrag/text()*-1"/></when><otherwise><value-of select="./nb:ToegekendTotaalBedrag/nb:TotaalBedrag/text()"/></otherwise></choose></variable><variable name="v9"><choose><when test="./nb:IngediendTotaalBedrag/nb:DebetCredit/text()='C'"><value-of select="./nb:IngediendTotaalBedrag/nb:TotaalBedrag/text()*-1"/></when><otherwise><value-of select="./nb:IngediendTotaalBedrag/nb:TotaalBedrag/text()"/></otherwise></choose></variable><variable name="va" select="$v9 - $v8"/><if test="count(ancestor-or-self::n4:Bericht/n4:Header/n4:RetourCodes/*[local-name()='RetourCode'][text()!='0200' and text()!='8001'])=0 and normalize-space($v7)!=normalize-space($va)"><call-template name="addError"><with-param name="pRule">TR320</with-param><with-param name="pCode">0001</with-param><with-param name="pElements" select="nb:IngediendTotaalBedrag/nb:TotaalBedrag|nb:IngediendTotaalBedrag/nb:DebetCredit|nb:ToegekendTotaalBedrag/nb:TotaalBedrag|nb:ToegekendTotaalBedrag/nb:DebetCredit"/></call-template></if></template><template match="*" mode="TR335"/><template match="n9:Prestatie/n9:ProductPeriode/nb:Einddatum" mode="TR335"><call-template name="checkDateRelation"><with-param name="pDate" select="ancestor-or-self::n9:Declaratie/n9:DeclaratieDagtekening"/><with-param name="pRelation">monthsAfter</with-param><with-param name="pExtra">-60</with-param><with-param name="pRule">TR335</with-param></call-template></template><template match="*" mode="TR342"/><template match="n7:DeclaratieAntwoord" mode="TR342"><variable name="v1" select="sum(./n7:Clienten/n7:Client/n7:Prestaties/n7:Prestatie/n7:IngediendBedrag[./nb:DebetCredit/text()='D']/nb:Bedrag)"/><variable name="v2" select="sum(./n7:Clienten/n7:Client/n7:Prestaties/n7:Prestatie/n7:IngediendBedrag[./nb:DebetCredit/text()='C']/nb:Bedrag)"/><variable name="v3" select="$v1 - $v2"/><variable name="v4"><choose><when test="./n7:TotaalToegekendBedrag/nb:DebetCredit/text()='C'"><value-of select="number(./n7:TotaalToegekendBedrag/nb:TotaalBedrag/text())*-1"/></when><otherwise><value-of select="number(./n7:TotaalToegekendBedrag/nb:TotaalBedrag/text())"/></otherwise></choose></variable><variable name="v5"><choose><when test="./n7:TotaalIngediendBedrag/nb:DebetCredit/text()='C'"><value-of select="number(./n7:TotaalIngediendBedrag/nb:TotaalBedrag/text())*-1"/></when><otherwise><value-of select="number(./n7:TotaalIngediendBedrag/nb:TotaalBedrag/text())"/></otherwise></choose></variable><variable name="v6" select="$v5 - $v4"/><if test="normalize-space($v3)!=normalize-space($v6)"><call-template name="addError"><with-param name="pRule">TR342</with-param><with-param name="pCode">0001</with-param><with-param name="pElements" select="n7:TotaalToegekendBedrag|n7:TotaalIngediendBedrag"/></call-template></if></template><template match="*" mode="TR345"/><template match="n9:Prestatie[n9:Eenheid/text() = '83']" mode="TR345"><call-template name="checkRelation"><with-param name="pThis" select="n9:GeleverdVolume"/><with-param name="pOther" select="n9:IngediendBedrag/nb:Bedrag"/><with-param name="pExtra" select="nonExistantNode"/><with-param name="pRelation">equals</with-param><with-param name="pRule">TR345</with-param></call-template></template><template match="*" mode="TR352"/><template match="n2:Verzoek" mode="TR352"><call-template name="checkvalue"><with-param name="pThis" select="n2:OngewijzigdeProducten/n2:OngewijzigdProduct|n2:TeWijzigenProducten/n2:TeWijzigenProduct"/><with-param name="pValues">#</with-param><with-param name="pExtra" select="."/><with-param name="pRule">TR352</with-param></call-template></template><template match="*" mode="TR353"/><template match="n2:Verzoek" mode="TR353"><call-template name="checkvalue"><with-param name="pThis" select="n2:TeWijzigenProducten/n2:TeWijzigenProduct|n2:NieuweProducten/n2:NieuwProduct"/><with-param name="pValues">#</with-param><with-param name="pExtra" select="."/><with-param name="pRule">TR353</with-param></call-template></template><template match="*" mode="TR358"/><template match="n9:TotaalIngediendBedrag" mode="TR358"><variable name="v1" select="sum(ancestor-or-self::n9:Declaratie/n9:Clienten/n9:Client/n9:Prestaties/n9:Prestatie/n9:IngediendBedrag[nb:DebetCredit/text()='D']/nb:Bedrag)"/><variable name="v2" select="sum(ancestor-or-self::n9:Declaratie/n9:Clienten/n9:Client/n9:Prestaties/n9:Prestatie/n9:IngediendBedrag[nb:DebetCredit/text()='C']/nb:Bedrag)"/><variable name="v3" select="$v1 - $v2"/><call-template name="checkimplication"><with-param name="pThis" select="nb:DebetCredit"/><with-param name="pValue1">D</with-param><with-param name="pOther" select="nb:TotaalBedrag"/><with-param name="pValue2"><call-template name="formatNumber"><with-param name="pValue" select="$v3"/></call-template></with-param><with-param name="pExtra" select="ancestor-or-self::n9:Declaratie/n9:Clienten/n9:Client/n9:Prestaties/n9:Prestatie/n9:IngediendBedrag"/><with-param name="pRule">TR358</with-param></call-template><call-template name="checkimplication"><with-param name="pThis" select="nb:DebetCredit"/><with-param name="pValue1">C</with-param><with-param name="pOther" select="nb:TotaalBedrag"/><with-param name="pValue2"><call-template name="formatNumber"><with-param name="pValue" select="0 - 1*$v3"/></call-template></with-param><with-param name="pExtra" select="ancestor-or-self::n9:Declaratie/n9:Clienten/n9:Client/n9:Prestaties/n9:Prestatie/n9:IngediendBedrag"/><with-param name="pRule">TR358</with-param></call-template></template><template match="*" mode="TR368"/><template match="n9:DeclaratiePeriode" mode="TR368"><if test="substring-after(substring-after(nb:Begindatum,'-'),'-')!='01'"><call-template name="addError"><with-param name="pElements" select="nb:Begindatum"/><with-param name="pRule">TR368</with-param></call-template></if><variable name="v1"><call-template name="addDate"><with-param name="pDate" select="nb:Einddatum/text()"/><with-param name="pExtra">1</with-param></call-template></variable><variable name="v2"><call-template name="addMonths"><with-param name="pDate" select="nb:Begindatum/text()"/><with-param name="pExtra">1</with-param></call-template></variable><if test="$v1!=$v2"><call-template name="addError"><with-param name="pElements" select="nb:Begindatum|nb:Einddatum"/><with-param name="pRule">TR368</with-param></call-template></if></template><template match="*" mode="check" priority="0"><apply-templates mode="CD005" select="."/><apply-templates mode="CD007" select="."/><apply-templates mode="CD009" select="."/><apply-templates mode="CD025" select="."/><apply-templates mode="CD034" select="."/><apply-templates mode="CD041" select="."/><apply-templates mode="CD043" select="."/><apply-templates mode="CD044" select="."/><apply-templates mode="CD055" select="."/><apply-templates mode="CD056" select="."/><apply-templates mode="CD058" select="."/><apply-templates mode="CD059" select="."/><apply-templates mode="CD060" select="."/><apply-templates mode="CD062" select="."/><apply-templates mode="CD066" select="."/><apply-templates mode="CD067" select="."/><apply-templates mode="CD068" select="."/><apply-templates mode="CD075" select="."/><apply-templates mode="CD076" select="."/><apply-templates mode="CD077" select="."/><apply-templates mode="CD078" select="."/><apply-templates mode="CD079" select="."/><apply-templates mode="CD080" select="."/><apply-templates mode="CD081" select="."/><apply-templates mode="CD085" select="."/><apply-templates mode="CD086" select="."/><apply-templates mode="CD087" select="."/><apply-templates mode="CD088" select="."/><apply-templates mode="CS002" select="."/><apply-templates mode="CS003" select="."/><apply-templates mode="CS023" select="."/><apply-templates mode="CS050" select="."/><apply-templates mode="CS058" select="."/><apply-templates mode="CS089" select="."/><apply-templates mode="CS100" select="."/><apply-templates mode="CS102" select="."/><apply-templates mode="CS103" select="."/><apply-templates mode="CS104" select="."/><apply-templates mode="CS108" select="."/><apply-templates mode="CS300" select="."/><apply-templates mode="CS318" select="."/><apply-templates mode="CS323" select="."/><apply-templates mode="CS324" select="."/><apply-templates mode="CS325" select="."/><apply-templates mode="CS327" select="."/><apply-templates mode="CS328" select="."/><apply-templates mode="CS330" select="."/><apply-templates mode="CS331" select="."/><apply-templates mode="TR002" select="."/><apply-templates mode="TR006" select="."/><apply-templates mode="TR018" select="."/><apply-templates mode="TR052" select="."/><apply-templates mode="TR061" select="."/><apply-templates mode="TR097" select="."/><apply-templates mode="TR101" select="."/><apply-templates mode="TR302" select="."/><apply-templates mode="TR312" select="."/><apply-templates mode="TR313" select="."/><apply-templates mode="TR314" select="."/><apply-templates mode="TR315" select="."/><apply-templates mode="TR316" select="."/><apply-templates mode="TR317" select="."/><apply-templates mode="TR319" select="."/><apply-templates mode="TR320" select="."/><apply-templates mode="TR335" select="."/><apply-templates mode="TR342" select="."/><apply-templates mode="TR345" select="."/><apply-templates mode="TR352" select="."/><apply-templates mode="TR353" select="."/><apply-templates mode="TR358" select="."/><apply-templates mode="TR368" select="."/></template><variable name="v1"><nc:XSLTHeader><nc:Standaard>ijw</nc:Standaard><nc:StandaardRelease>3.0</nc:StandaardRelease><nc:XSLTVersie>2.0.24</nc:XSLTVersie></nc:XSLTHeader></variable></stylesheet>
\ No newline at end of file
diff --git a/xslt-validatie/jw/3_0/common/basis.xsl b/xslt-validatie/jw/3_0/common/basis.xsl
new file mode 100644
index 0000000..f536b24
--- /dev/null
+++ b/xslt-validatie/jw/3_0/common/basis.xsl
@@ -0,0 +1,142 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+	<!-- iJw 3.0 version 2.0.24 (2020-05-14) -->
+
+	<xsl:import href="../../../common/2_0/basis.xsl" />
+		<xsl:template match="*" mode="getDetails" priority="100">
+		<xsl:param name="pRule">FOUT</xsl:param>
+		<xsl:choose>
+			<xsl:when test="$pRule='CD005'">Als Postcode gevuld is, dan verplicht vullen, anders leeg laten.</xsl:when>
+			<xsl:when test="$pRule='CD007'">Als Communicatie / Vorm de waarde 1 (tolk taal) heeft, dan verplicht vullen, anders leeglaten.</xsl:when>
+			<xsl:when test="$pRule='CD009'">Alleen als Soort adres de waarde 04 (tijdelijk adres) heeft, is vullen toegestaan.</xsl:when>
+			<xsl:when test="$pRule='CD025'">Als Adres / LandCode de waarde NL (Nederland) heeft, dan verplicht vullen.</xsl:when>
+			<xsl:when test="$pRule='CD034'">Als Soort adres de waarde 1 (BRP-adres) of 3 (verblijfadres) heeft, dan verplicht vullen.</xsl:when>
+			<xsl:when test="$pRule='CD041'">Indien Code in Product gevuld is, verplicht vullen.</xsl:when>
+			<xsl:when test="$pRule='CD043'">Indien Beschikkingnummer gevuld is, verplicht vullen, anders leeg laten.</xsl:when>
+			<xsl:when test="$pRule='CD044'">Indien RedenWijziging gevuld is, verplicht vullen.</xsl:when>
+			<xsl:when test="$pRule='CD055'">Verplicht vullen indien BtwVrijstellingIndicatie de waarde 2 (Geen btw-vrijstelling) bevat.</xsl:when>
+			<xsl:when test="$pRule='CD056'">Niet vullen indien BtwVrijstellingIndicatie de waarde 1 (Btw-vrijstelling) bevat.</xsl:when>
+			<xsl:when test="$pRule='CD058'">Verplicht vullen indien BetalingAanID de waarde 01 (= servicebureau) heeft.</xsl:when>
+			<xsl:when test="$pRule='CD059'">Verplicht vullen indien BerichtCode de waarde 448 of 450 (= Factuur Wmo-ondersteuning of Jw-ondersteuning) bevat.</xsl:when>
+			<xsl:when test="$pRule='CD060'">Verplicht vullen indien DebetCredit bij het ingediende bedrag de waarde C (credit) heeft, anders leeg laten.</xsl:when>
+			<xsl:when test="$pRule='CD062'">Niet vullen indien Eenheid is 83 (Euro’s).</xsl:when>
+			<xsl:when test="$pRule='CD066'">Als type verwijzer gelijk is aan 02, 03, 04 of 05 en ZorgverlenerCode is gevuld, dan is Naamverwijzer leeg.</xsl:when>
+			<xsl:when test="$pRule='CD067'">Als type verwijzer gelijk is aan 02, 03, 04 of 05 en ZorgverlenerCode is leeg, dan is Naamverwijzer gevuld.</xsl:when>
+			<xsl:when test="$pRule='CD068'">Als type verwijzer ongelijk is aan 02, 03, 04 of 05, dan is ZorgverlenerCode leeg.</xsl:when>
+			<xsl:when test="$pRule='CD075'">Verplicht vullen indien Budget gevuld is</xsl:when>
+			<xsl:when test="$pRule='CD076'">Verplicht vullen indien Frequentie waarde 2 (per week) of 6 (totaal binnen geldigheid toewijzing) heeft.</xsl:when>
+			<xsl:when test="$pRule='CD077'">Indien Budget gevuld is, dan leeg laten</xsl:when>
+			<xsl:when test="$pRule='CD078'">Indien Omvang gevuld is, dan leeg laten</xsl:when>
+			<xsl:when test="$pRule='CD079'">Indien Budget leeg is, dan verplicht vullen</xsl:when>
+			<xsl:when test="$pRule='CD080'">Indien Code in Product leeg is en Einddatum van het ToegewezenProduct groter dan 31-12-2020 of leeg is, dan leeg laten</xsl:when>
+			<xsl:when test="$pRule='CD081'">Indien eenheid de waarde 14, 16, 83 of 84 heeft en Einddatum van het ToegewezenProduct groter dan 31-12-2020 of leeg is, dan Frequentie vullen met de waarde 2 , 4 of 6</xsl:when>
+			<xsl:when test="$pRule='CD085'">Als VerzoekAntwoord de waarde 1 (Verzoek afgewezen) heeft, dan vullen</xsl:when>
+			<xsl:when test="$pRule='CD086'">Als VerzoekAntwoord de waarde 2 (Aanvraag in onderzoek) heeft, dan leeg laten</xsl:when>
+			<xsl:when test="$pRule='CD087'">Als eenheid ongelijk is aan 83 (euro's) dan verplicht vullen, anders leeg laten.</xsl:when>
+			<xsl:when test="$pRule='CD088'">Als RedenAfwijzingVerzoek ongelijk is aan 8 (Woonplaatsbeginsel), dan leeg laten.</xsl:when>
+			<xsl:when test="$pRule='CS002'">De waarde moet voldoen aan de 11-proef.</xsl:when>
+			<xsl:when test="$pRule='CS003'">Indien van toepassing vullen met een waarde die groter is dan, of gelijk is aan de Begindatum (of Ingangsdatum) van de aangeduide periode.</xsl:when>
+			<xsl:when test="$pRule='CS004'">Aaneengesloten vullen (zonder punten of spaties).</xsl:when>
+			<xsl:when test="$pRule='CS005'">Aaneengesloten vullen met cijfers.</xsl:when>
+			<xsl:when test="$pRule='CS015'">BerichtSubversie vullen met 0.</xsl:when>
+			<xsl:when test="$pRule='CS023'">Vullen met een bestaande datum die niet groter is dan de Dagtekening van het bericht.</xsl:when>
+			<xsl:when test="$pRule='CS025'">BerichtVersie vullen met 3.</xsl:when>
+			<xsl:when test="$pRule='CS050'">Als Partnernaam gevuld is, dan NaamGebruik vullen met waarde 1, 2, 3 of 4. Anders waarde 1 of 6 vullen.</xsl:when>
+			<xsl:when test="$pRule='CS058'">1 (eerste aanlevering) of 3 (verwijderen aanlevering) vullen.</xsl:when>
+			<xsl:when test="$pRule='CS064'">Vullen met een bestaande datum die niet in de toekomst ligt.</xsl:when>
+			<xsl:when test="$pRule='CS089'">Als LandCode de waarde NL (Nederland) heeft, dan moet het formaat overeenkomen met dat van een Nederlandse postcode.</xsl:when>
+			<xsl:when test="$pRule='CS100'">Datum is groter dan of gelijk aan 01-01-2021</xsl:when>
+			<xsl:when test="$pRule='CS102'">Datum is groter dan de dagtekening van het bericht.</xsl:when>
+			<xsl:when test="$pRule='CS103'">De gehele periode ligt voor 01-01-2021.</xsl:when>
+			<xsl:when test="$pRule='CS104'">3 (per 4 weken) en 5 (per jaar) niet vullen indien de Einddatum van het ToegewezenProduct leeg is of groter is dan 31-12-2020.</xsl:when>
+			<xsl:when test="$pRule='CS108'">Vullen met een waarde die groter is dan, of gelijk is aan de Begindatum van de aangeduide periode én die niet groter is dan de Dagtekening van het bericht.</xsl:when>
+			<xsl:when test="$pRule='CS126'">Vullen met BerichtCode volgens de specificatie</xsl:when>
+			<xsl:when test="$pRule='CS128'">Vullen met een versienummer bestaande uit drie gehele getallen, gescheiden met punten.</xsl:when>
+			<xsl:when test="$pRule='CS300'">Vullen met een bestaande gemeentecode uit het overzicht van CBS.</xsl:when>
+			<xsl:when test="$pRule='CS318'">NaamGebruik 6 (Niet-natuurlijk persoon) niet vullen.</xsl:when>
+			<xsl:when test="$pRule='CS319'">Aaneengesloten vullen met cijfers en/of letters</xsl:when>
+			<xsl:when test="$pRule='CS320'">Vullen met een geldig btw-nummer</xsl:when>
+			<xsl:when test="$pRule='CS321'">Vullen met een geldige AGB-code van een servicebureau ( zie https://www.agbcode.nl)</xsl:when>
+			<xsl:when test="$pRule='CS322'">Vullen met een percentage kleiner dan 100.</xsl:when>
+			<xsl:when test="$pRule='CS323'">Bedrag vullen met een waarde kleiner dan of gelijk aan Bedrag in BerekendBedrag</xsl:when>
+			<xsl:when test="$pRule='CS324'">Vullen met een waarde die groter is dan, of gelijk is aan de DagtekeningFactuur.</xsl:when>
+			<xsl:when test="$pRule='CS325'">Indien (Totaal)Bedrag de waarde 0 heeft, dan DebetCredit vullen met D (Debet).</xsl:when>
+			<xsl:when test="$pRule='CS327'">DebetCredit vullen met een waarde die gelijk is aan DebetCredit in DeclaratieFactuurBedrag.</xsl:when>
+			<xsl:when test="$pRule='CS328'">Begindatum vullen met een datum die groter dan of gelijk is aan 2015-01-01.</xsl:when>
+			<xsl:when test="$pRule='CS329'">ProductCode vullen met met een code die, volgens de gehanteerde productcodelijst, past bij de ProductCategorie.</xsl:when>
+			<xsl:when test="$pRule='CS330'">21 (Week) en 81 (Benodigde tijdsduur of tijdsonafhankelijk) niet vullen.</xsl:when>
+			<xsl:when test="$pRule='CS331'">21 (Week) en 81 (Benodigde tijdsduur of tijdsonafhankelijk) niet vullen indien de ProductPeriode Begindatum op of na de implementatiedatum van release 2.3 ligt.</xsl:when>
+			<xsl:when test="$pRule='TR002'">Geboortedatum mag niet meer dan 120 jaar voor de Dagtekening liggen, tenzij Geboortedatum onbekend is.</xsl:when>
+			<xsl:when test="$pRule='TR006'">De berichtklasse Contact moet een berichtelement Telefoon, en/of de combinatie Huis en Postcode bevatten.</xsl:when>
+			<xsl:when test="$pRule='TR018'">Einddatum moet groter dan of gelijk zijn aan Begindatum.</xsl:when>
+			<xsl:when test="$pRule='TR019'">Bij een output- of inspanningsgerichte werkwijze moet de melding van de start of de stop van de ondersteuning gerelateerd zijn aan een toewijzing op basis van het toewijzingnummer</xsl:when>
+			<xsl:when test="$pRule='TR052'">De Begindatum van een geleverd product mag niet groter zijn dan de Dagtekening.</xsl:when>
+			<xsl:when test="$pRule='TR056'">Identificatie moet per berichtsoort uniek zijn voor de verzendende partij.</xsl:when>
+			<xsl:when test="$pRule='TR061'">Bij een Client moet minimaal één Adres voorkomen waarvan Soort de waarde '01' (BRP-adres), '02' (Correspondentie-adres) of '03' (Verblijfadres) heeft.</xsl:when>
+			<xsl:when test="$pRule='TR063'">Indien StatusAanlevering de waarde 3 (aanlevering verwijderen) bevat, dan moet voor de betreffende Client een eerdere aanlevering met dezelfde logische sleutel verstuurd zijn.</xsl:when>
+			<xsl:when test="$pRule='TR069'">De sleutelelementen uit het startbericht moeten in het stopbericht, waarin wordt aangegeven dat de betreffende levering (tijdelijk) beeindigd wordt, ongewijzigd worden overgenomen.</xsl:when>
+			<xsl:when test="$pRule='TR071'">StatusAanlevering mag niet de waarde '3' bevatten als er voor de betreffende melding start zorg al een stop zorg is verstuurd.</xsl:when>
+			<xsl:when test="$pRule='TR074'">Indien StatusAanlevering de waarde '1' bevat, dan moet de sleutel van de betreffende aanlevering niet alleen uniek zijn binnen het bericht zelf, maar ook in combinatie met alle reeds ontvangen berichten.</xsl:when>
+			<xsl:when test="$pRule='TR097'">Voor Geboortedatum geldt dat DatumGebruik en Datum met elkaar in overeenstemming moeten zijn.</xsl:when>
+			<xsl:when test="$pRule='TR101'">Binnen een bericht zijn dubbele regels niet toegestaan.</xsl:when>
+			<xsl:when test="$pRule='TR300'">Indien de toewijzing wordt gestuurd naar aanleiding van het honoreren van een verzoek om toewijzing bericht, moet ReferentieAanbieder worden overgenomen van het betreffende verzoek om toewijzing bericht (315).</xsl:when>
+			<xsl:when test="$pRule='TR302'">Een product mag alleen vaker in een toewijzing voorkomen indien de zorgperiodes elkaar niet overlappen</xsl:when>
+			<xsl:when test="$pRule='TR303'">Iedere prestatie in een declaratie- of factuurbericht is gerelateerd aan een toegewezen product op basis van het toewijzingnummer.</xsl:when>
+			<xsl:when test="$pRule='TR304'">Bsn moet overeenkomen met Bsn van een Client.</xsl:when>
+			<xsl:when test="$pRule='TR305'">ProductCategorie in de Prestatie moet gelijk zijn aan ProductCategorie in het ToegewezenProduct.</xsl:when>
+			<xsl:when test="$pRule='TR306'">ProductCode in de Prestatie moet gelijk zijn aan ProductCode in het ToegewezenProduct, indien deze opgenomen is.</xsl:when>
+			<xsl:when test="$pRule='TR307'">Begindatum in de Prestatie moet groter dan of gelijk zijn aan Ingangsdatum in het ToegewezenProduct.</xsl:when>
+			<xsl:when test="$pRule='TR308'">Einddatum in de Prestatie moet kleiner dan of gelijk zijn aan Einddatum in het ToegewezenProduct, indien die gevuld is.</xsl:when>
+			<xsl:when test="$pRule='TR309'">Eenheid in de Prestatie moet passen bij Eenheid in het ToegewezenProduct.</xsl:when>
+			<xsl:when test="$pRule='TR311'">De indiener van het declaratie- of factuurbericht is de aanbieder of de administratieve eenheid die namens de aanbieder declareert of factureert.</xsl:when>
+			<xsl:when test="$pRule='TR312'">De waarde van TotaalBedrag in DeclaratieFactuurTotaalBedrag moet gelijk zijn aan de SOM van de waarden van Bedrag in DeclaratieFactuurBedrag, rekening houdend met  indicatie debet/credit.</xsl:when>
+			<xsl:when test="$pRule='TR313'">De waarde van TotaalBedrag in BtwTotaalBedrag moet gelijk zijn aan de SOM van de waarden van Bedrag in BtwBedrag, rekening houdend met  indicatie debet/credit.</xsl:when>
+			<xsl:when test="$pRule='TR314'">ReferentieNummer van de Prestatie moet uniek zijn voor de aanbieder binnen het wettelijk domein waarop de Prestatie betrekking heeft, zowel binnen één bericht als berichtoverstijgend.</xsl:when>
+			<xsl:when test="$pRule='TR315'">VorigReferentieNummer van de Prestatie moet uniek zijn in het bericht.</xsl:when>
+			<xsl:when test="$pRule='TR316'">Debetregels mogen niet in hetzelfde bericht gecrediteerd worden.</xsl:when>
+			<xsl:when test="$pRule='TR317'">Indien gevuld moet BerekendBedrag gelijk zijn aan GeleverdVolume vermenigvuldigd met ProductTarief.</xsl:when>
+			<xsl:when test="$pRule='TR318'">Indien iedere DeclaratiePeriode zorg is geleverd, moet DeclaratiePeriode BeginDatum van de volgende declaratie-/factuurperiode precies één dag na de DeclaratiePeriode EindDatum van de voorgaande declaratie-/factuurperiode liggen.</xsl:when>
+			<xsl:when test="$pRule='TR319'">Een declaratie- of factuurbericht bevat alleen prestaties waarvan de ProductPeriode valt binnen de huidige, of een voorgaande declaratie- of factuurperiode.</xsl:when>
+			<xsl:when test="$pRule='TR320'">Alle deels toegekende en/of afgewezen prestaties dienen meegestuurd te worden in het retourbericht op een declaratie/factuur.</xsl:when>
+			<xsl:when test="$pRule='TR321'">Indien in het ToegewezenProduct een Omvang is meegegeven, moet GeleverdVolume in de Prestatie passen binnen Volume in het ToegewezenProduct.</xsl:when>
+			<xsl:when test="$pRule='TR322'">Indien in het ToegewezenProduct een Omvang is meegegeven, moet de som van GeleverdVolume in alle ingediende Prestaties die betrekking hebben op dat ToegewezenProduct passen binnen de toegewezen Omvang.</xsl:when>
+			<xsl:when test="$pRule='TR323'">Een credit Prestatie moet gerelateerd zijn aan een eerder verzonden debet Prestatie op basis van sleutelvelden.</xsl:when>
+			<xsl:when test="$pRule='TR324'">Factuurnummer moet uniek zijn voor de verzendende partij.</xsl:when>
+			<xsl:when test="$pRule='TR326'">Een Startbericht mag pas verstuurd worden als er géén actueel Startbericht bij ToegewezenProduct is.</xsl:when>
+			<xsl:when test="$pRule='TR332'">Ieder ToegewezenProduct binnen één gemeente heeft een uniek nummer per wettelijk domein.</xsl:when>
+			<xsl:when test="$pRule='TR333'">DeclaratieNummer van de Declaratie moet uniek zijn voor de aanbieder binnen het wettelijk domein waarop de Declaratie betrekking heeft.</xsl:when>
+			<xsl:when test="$pRule='TR335'">Einddatum mag niet meer dan 5 jaar voor DeclaratieDagtekening liggen.</xsl:when>
+			<xsl:when test="$pRule='TR337'">Ieder Declaratie-antwoord is gerelateerd aan een ingediende declaratie obv DeclaratieNummer en DeclaratieIdentificatie.</xsl:when>
+			<xsl:when test="$pRule='TR338'">Iedere Prestatie in een declaratiebericht is gerelateerd aan een ToegewezenProduct op basis van het toewijzingnummer.</xsl:when>
+			<xsl:when test="$pRule='TR339'">ProductCategorie in Prestatie moet gelijk zijn aan ProductCategorie in het ToegewezenProduct indien deze opgenomen is.</xsl:when>
+			<xsl:when test="$pRule='TR340'">ProductCode in Prestatie moet gelijk zijn aan ProductCode in het ToegewezenProduct, indien deze opgenomen is.</xsl:when>
+			<xsl:when test="$pRule='TR341'">Eenheid in Prestatie moet passen bij Eenheid in het ToegewezenProduct.</xsl:when>
+			<xsl:when test="$pRule='TR342'">Alle afgewezen Prestaties dienen meegestuurd te worden in het declaratie-antwoordbericht op een declaratie.</xsl:when>
+			<xsl:when test="$pRule='TR345'">Indien Eenheid de waarde 83 (euro's) heeft, moet IngediendBedrag gelijk zijn aan GeleverdVolume.</xsl:when>
+			<xsl:when test="$pRule='TR346'">Indien Eenheid ongelijk is aan waarde 83 (Euro's), moet IngediendBedrag gelijk zijn aan GeleverdVolume vermenigvuldigd met (het onafgeronde) ProductTarief.</xsl:when>
+			<xsl:when test="$pRule='TR347'">ReferentieAanbieder is uniek voor de aanbieder binnen het wettelijk domein</xsl:when>
+			<xsl:when test="$pRule='TR349'">Het verzoek om wijziging bericht bevat alle actuele ToegewezenProducten van de client</xsl:when>
+			<xsl:when test="$pRule='TR350'">Ieder OngewijzigdProduct in een verzoek om wijziging bericht is gerelateerd aan een actueel toegewezen product op basis van het ToewijzingNummer.</xsl:when>
+			<xsl:when test="$pRule='TR351'">Ieder TeWijzigenProduct in een verzoek om wijziging is gerelateerd aan een actueel ToegewezenProduct op basis van ToewijzingNummer.</xsl:when>
+			<xsl:when test="$pRule='TR352'">Bij een verzoek om wijziging komt minstens 1 OngewijzigdProduct of TeWijzigenProduct voor.</xsl:when>
+			<xsl:when test="$pRule='TR353'">Bij een verzoek komt minstens 1 TeWijzigenProduct of NieuwProduct voor.</xsl:when>
+			<xsl:when test="$pRule='TR355'">ReferentieAanbieder in het antwoordbericht komt voor in een eerder verzoek om toewijzing of verzoek om wijziging</xsl:when>
+			<xsl:when test="$pRule='TR357'">Als GewensteIngangsdatum kleiner dan of gelijk is aan de dagtekening, dan is GewensteIngangsdatum gelijk aan ingangsdatum van het originele ToegewezenProduct.</xsl:when>
+			<xsl:when test="$pRule='TR358'">De waarde van TotaalBedrag in TotaalIngediendBedrag  moet gelijk zijn aan de SOM van de waarden van Bedrag in Ingediendbedrag in alle onderliggende Prestaties, rekening houdend met indicatie debet/credit.</xsl:when>
+			<xsl:when test="$pRule='TR359'">Als een antwoordbericht wordt verstuurd, mag er niet al eerder een toewijzingsbericht gestuurd zijn met dezelfde ReferentieAanbieder</xsl:when>
+			<xsl:when test="$pRule='TR360'">Een antwoordbericht met in VerzoekAntwoord de waarde 2 (Aanvraag in onderzoek), mag alleen gestuurd worden indien er nog geen antwoordbericht is met deze ReferentieAanbieder</xsl:when>
+			<xsl:when test="$pRule='TR361'">Een product mag alleen vaker in verzoek om wijziging voorkomen als de zorgperiodes elkaar niet overlappen</xsl:when>
+			<xsl:when test="$pRule='TR362'">Als een toewijzingsbericht niet wordt gestuurd naar aanleiding van het honoreren van een verzoek om toewijzing of een verzoek om wijziging dan wordt ReferentieAanbieder leeg gelaten.</xsl:when>
+			<xsl:when test="$pRule='TR363'">Als een toewijzingsbericht wordt gestuurd als honorering van een verzoek om wijziging, wordt ReferentieAanbieder overgenomen</xsl:when>
+			<xsl:when test="$pRule='TR364'">ReferentieAanbieder in een ToegewezenProduct komt voor in een eerder verzoek om toewijzing of verzoek om wijziging</xsl:when>
+			<xsl:when test="$pRule='TR365'">Als er al een antwoordbericht is met dezelfde ReferentieAanbieder dan moet VerzoekAntwoord daar de waarde 2 (Aanvraag in onderzoek) hebben.</xsl:when>
+			<xsl:when test="$pRule='TR366'">Iedere Prestatie in een declaratieantwoord is gerelateerd aan een declaratiebericht op basis van ProductReferentie.</xsl:when>
+			<xsl:when test="$pRule='TR367'">Waarde moet overeenkomen met waarde uit het declaratiebericht dat gerelateerd is op basis van ProductReferentie</xsl:when>
+			<xsl:when test="$pRule='TR368'">De periode is exact gelijk aan 1 hele kalendermaand</xsl:when>
+			<xsl:when test="$pRule='TR369'">Indien in het ToegewezenProduct een Budget is meegegeven, moet de som van GeleverdVolume in alle ingediende Prestaties die betrekking hebben op dat ToegewezenProduct passen binnen het toegewezen Budget.</xsl:when>
+			<xsl:when test="$pRule='TR371'">Waarde moet overeenkomen met waarde van XsdVersie uit het declaratiebericht dat gerelateerd is op basis van DeclaratieIdentificatie.</xsl:when>
+			<xsl:when test="$pRule='TR373'">Indien in een TeWijzigenProduct het Budget of het totaal over toewijzingsperiode wordt gewijzigd, dient GewensteIngangsdatum gelijk te zijn aan de actuele toewijzing</xsl:when>
+			<xsl:when test="$pRule='TR374'">Een verzoek mag alleen worden verstuurd als er geen onderhanden verzoek is voor de betreffende client van dezelfde aanbieder.</xsl:when>
+		</xsl:choose>
+	</xsl:template>
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/common/check_errors.xsl b/xslt-validatie/jw/3_0/common/check_errors.xsl
new file mode 100644
index 0000000..85e262f
--- /dev/null
+++ b/xslt-validatie/jw/3_0/common/check_errors.xsl
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><stylesheet xmlns="http://www.w3.org/1999/XSL/Transform" xmlns:n0="http://www.istandaarden.nl/validatie/1_1/rapport/schema" exclude-result-prefixes="n0" version="1.0"><output encoding="UTF-8" indent="yes" method="xml" version="1.0"/><template name="t0"><param name="p0" select="."/><if test="$p0/ancestor::*"><call-template name="t0"><with-param name="p0" select="$p0/.."/></call-template><text>/</text></if><value-of select="local-name($p0)"/><if test="($p0/preceding-sibling::*|$p0/following-sibling::*)[local-name()=local-name($p0)]"><value-of select="concat('[',count($p0/preceding-sibling::*[local-name()=local-name($p0)])+1,']')"/></if></template><template name="t1"><param name="p0">FOUT</param><param name="p1" select="."/><param name="p2" select="nonExistingNode"/><param name="p3" select="''"/><n0:Fout><n0:Code><value-of select="normalize-space($p0)"/></n0:Code><if test="$p2"><n0:Retourcode><value-of select="$p2"/></n0:Retourcode></if><for-each select="$p1"><n0:Locatie><text>/</text><call-template name="t0"><with-param name="p0" select="."/></call-template></n0:Locatie></for-each><choose><when test="$p3!=''"><n0:Details><value-of select="$p3"/></n0:Details></when><otherwise><variable name="v0"><apply-templates mode="m2" select="."><with-param name="pRule" select="normalize-space($p0)"/></apply-templates></variable><if test="$v0!=''"><n0:Details><value-of select="$v0"/></n0:Details></if></otherwise></choose></n0:Fout></template><template match="*" mode="m2" priority="0"><param name="pRule">FOUT</param></template><template match="*" mode="m5" priority="0"><param name="pGemeenteCode" select="."/><choose><when test="$pGemeenteCode &lt; 0 or $pGemeenteCode &gt; 2000"><value-of select="false()"/></when><otherwise><value-of select="true()"/></otherwise></choose></template><template match="*" mode="m0" priority="0"><param name="pAGBCode" select="."/><param name="pFrom"/><param name="pTo" select="0"/><value-of select="true()"/></template><template match="*" mode="m8" priority="0"><param name="pInstelling"/><param name="pOntvanger"/><value-of select="true()"/></template><template match="*[local-name()='BerichtCode']" mode="m1" priority="10"><n0:BerichtCode><value-of select="text()"/></n0:BerichtCode></template><template match="*[local-name()='BerichtVersie']" mode="m1" priority="10"><n0:BerichtVersie><value-of select="text()"/></n0:BerichtVersie></template><template match="*[local-name()='BerichtSubversie']" mode="m1" priority="10"><n0:BerichtSubversie><value-of select="text()"/></n0:BerichtSubversie></template><template match="*[local-name()='Identificatie'] | *[local-name()='DeclarantFactuurNummer']" mode="m1" priority="10"><n0:Identificatie><value-of select="normalize-space(text())"/></n0:Identificatie></template><template match="*[local-name()='Dagtekening'] | *[local-name()='FactuurDagtekening']" mode="m1" priority="10"><n0:Dagtekening><value-of select="text()"/></n0:Dagtekening></template><template match="*[local-name()='BerichtIdentificatie'] | *[local-name()='DeclaratieFactuurIdentificatie']" mode="m1" priority="10"><n0:BerichtIdentificatie><apply-templates mode="m1" select="*"/></n0:BerichtIdentificatie></template><template match="*[local-name()='DeclaratieIdentificatie']" mode="m1" priority="10"/><variable name="v0">${version}</variable><template match="*|@*|text()" mode="m7"/><template match="*|@*|text()" mode="m1"><apply-templates mode="m1" select="*"/></template><template match="*|@*|text()" mode="m6"><apply-templates mode="m6" select="*"/><apply-templates mode="m7" select="."/></template><template match="*[local-name() = 'Bericht']"><n0:Rapport><n0:Header><apply-templates mode="m1" select="//*[local-name()='Header']/*"/><choose><when test="contains($v0,'-SNAPSHOT')"><n0:XSLTVersie>0.0.0</n0:XSLTVersie></when><otherwise><n0:XSLTVersie><value-of select="normalize-space($v0)"/></n0:XSLTVersie></otherwise></choose></n0:Header><n0:Fouten><apply-templates mode="m6" select="*"/></n0:Fouten></n0:Rapport></template><output encoding="UTF-8" indent="yes" method="xml" version="1.0"/><template match="*" mode="m4" priority="0"><param name="pCode"/><variable name="v1" select="substring($pCode,1,1)"/><variable name="v2" select="substring($pCode,2)"/><choose><when test="$v1='S' or $v1='D'">,C<value-of select="$pCode"/>,</when><when test="$v1='9'">,TR<value-of select="$v2"/>,</when><otherwise>ERROR</otherwise></choose></template><template match="*" mode="m3" priority="0"><param name="pCode"/><choose><when test="$pCode='0001'"><value-of select="true()"/></when><otherwise><value-of select="true()"/></otherwise></choose></template><template match="*[local-name() = 'Header']/*[local-name() = 'RetourCodes']" priority="20"><if test="./*[local-name()='RetourCode' and text()='0001']"><if test="ancestor-or-self::*[local-name()='Bericht']/*[local-name()!='Header']"><call-template name="t1"><with-param name="p0">IV028</with-param><with-param name="p1" select=".|ancestor-or-self::*[local-name()='Bericht']/*[local-name()!='Header']"/></call-template></if></if></template><template match="*[local-name() = 'RetourCode' and text() = '0001']" priority="30"><if test="not(ancestor::*[local-name()='Header'])"><call-template name="t1"><with-param name="p0">IV028</with-param></call-template></if></template><template match="*[local-name() = 'RetourCode' and text() != '0200' and text() != '0233']" priority="20"><variable name="v1"><apply-templates mode="m4" select="."><with-param name="pCode" select="normalize-space(text())"/></apply-templates></variable><variable name="v2"><apply-templates mode="m3" select="."><with-param name="pCode" select="normalize-space(text())"/></apply-templates></variable><if test="($v2='false') and not(../../descendant-or-self::*[contains($v1,concat(',',concat(@vmCode,',')))])"><call-template name="t1"><with-param name="p0">IV028</with-param></call-template></if></template><template match="/" priority="20"><n0:Rapport><n0:Fouten><apply-templates select="*"/></n0:Fouten></n0:Rapport></template><template match="*" priority="10"><apply-templates select="*"/></template><template match="*" mode="m3" priority="100"><param name="pCode"/><choose><when test="contains(',0001,0013,0030,0200,0233,0551,0611,1112,1142,8001,8004,8017,8021,8187,8214,8817,8848,8853,8854,8855,8857,8858,8859,8860,8861,8862,9019,9056,9063,9069,9071,9074,9300,9307,9308,9309,9311,9319,9321,9322,9326,9332,9333,9338,9339,9340,9341,9346,9347,9349,9350,9351,9355,9357,9359,9360,9362,9363,9364,9365,9366,9367,9369,9371,9373,9374,9502,9504,9507,9508,9509,9510,9512,9513,9514,9562,9574,S329,',concat(',',concat($pCode,',')))"><value-of select="true()"/></when><otherwise><value-of select="false()"/></otherwise></choose></template><template match="*" mode="m4" priority="100"><param name="pCode"/><choose><when test="$pCode='9300'">,TR300,</when><when test="$pCode='9069'">,TR069,</when><when test="$pCode='8017'">,TR323,</when><when test="$pCode='9349'">,TR349,</when><when test="$pCode='9346'">,TR346,</when><when test="$pCode='9347'">,TR347,</when><when test="$pCode='8214'">,TR318,</when><when test="$pCode='1142'">,TR306,</when><when test="$pCode='9340'">,TR340,</when><when test="$pCode='9341'">,TR341,</when><when test="$pCode='9063'">,TR063,</when><when test="$pCode='0001'">,CD005,CD007,CD009,CD025,CD034,CD041,CD043,CD044,CD055,CD056,CD058,CD059,CD060,CD062,CD066,CD067,CD068,CD075,CD076,CD077,CD078,CD079,CD080,CD081,CD085,CD086,CD087,CD088,CS002,CS003,CS004,CS005,CS015,CS023,CS025,CS050,CS058,CS089,CS100,CS102,CS103,CS104,CS108,CS128,CS318,CS319,CS320,CS322,CS323,CS324,CS325,CS327,CS328,CS330,CS331,RS001,RS002,RS004,RS005,RS006,RS008,RS009,RS010,RS011,RS012,RS013,RS014,RS015,RS016,RS017,RS018,RS019,RS020,RS021,RS023,RS024,RS025,RS026,RS028,RS031,RS032,RS033,RS034,RS035,RS036,RS037,RS039,RS040,TR002,TR006,TR018,TR052,TR061,TR097,TR101,TR302,TR312,TR313,TR315,TR316,TR317,TR320,TR335,TR342,TR345,TR352,TR353,TR358,TR361,TR368,</when><when test="$pCode='9339'">,TR339,</when><when test="$pCode='8848'">,CS064,</when><when test="$pCode='9355'">,TR355,</when><when test="$pCode='9311'">,TR311,</when><when test="$pCode='S329'">,CS329,</when><when test="$pCode='8187'">,TR304,</when><when test="$pCode='9359'">,TR359,</when><when test="$pCode='9357'">,TR357,</when><when test="$pCode='9071'">,TR071,</when><when test="$pCode='9351'">,TR351,</when><when test="$pCode='8021'">,TR314,</when><when test="$pCode='9074'">,TR074,</when><when test="$pCode='9350'">,TR350,</when><when test="$pCode='0013'">,CS321,</when><when test="$pCode='9308'">,TR308,</when><when test="$pCode='9309'">,TR309,</when><when test="$pCode='9307'">,TR307,</when><when test="$pCode='9366'">,TR366,</when><when test="$pCode='9322'">,TR322,</when><when test="$pCode='9367'">,TR367,</when><when test="$pCode='9364'">,TR364,</when><when test="$pCode='9365'">,TR365,</when><when test="$pCode='9321'">,TR321,</when><when test="$pCode='9326'">,TR326,</when><when test="$pCode='9369'">,TR369,</when><when test="$pCode='0030'">,TR324,</when><when test="$pCode='9362'">,TR362,</when><when test="$pCode='9363'">,TR363,</when><when test="$pCode='9360'">,TR360,</when><when test="$pCode='1112'">,TR305,</when><when test="$pCode='9319'">,TR319,</when><when test="$pCode='9333'">,TR333,</when><when test="$pCode='9056'">,TR056,</when><when test="$pCode='9332'">,TR332,</when><when test="$pCode='9338'">,TR338,</when><when test="$pCode='9019'">,TR019,</when><when test="$pCode='S300'">,CS300,</when><when test="$pCode='9373'">,TR373,</when><when test="$pCode='9374'">,TR374,</when><when test="$pCode='0551'">,TR303,</when><otherwise>ERROR</otherwise></choose></template></stylesheet>
\ No newline at end of file
diff --git a/xslt-validatie/jw/3_0/common/heenbericht.xsl b/xslt-validatie/jw/3_0/common/heenbericht.xsl
new file mode 100644
index 0000000..8316d13
--- /dev/null
+++ b/xslt-validatie/jw/3_0/common/heenbericht.xsl
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><stylesheet xmlns="http://www.w3.org/1999/XSL/Transform" version="1.0"><output encoding="UTF-8" indent="yes" method="xml" version="1.0"/><template name="t0"><param name="p0"/><if test="$p0 &gt; 0"><call-template name="t0"><with-param name="p0" select="floor(number($p0) div 10)"/></call-template><value-of select="number($p0) mod 10"/></if></template><template name="t2"><param name="p0"/><choose><when test="number($p0) &lt; 0">-<call-template name="t0"><with-param name="p0" select="0 - number($p0)"/></call-template></when><when test="number($p0)=0">0</when><otherwise><call-template name="t0"><with-param name="p0" select="number($p0)"/></call-template></otherwise></choose></template><template match="*" mode="m0" priority="100"><param name="pMessage"/><choose><when test="$pMessage='aw310'">aw39</when><when test="$pMessage='zk310'">zk39</when><otherwise><variable name="v0"><value-of select="translate($pMessage,'0123456789','')"/></variable><variable name="v1"><value-of select="translate($pMessage,$v0,'')"/></variable><value-of select="$v0"/><value-of select="1*$v1 - 1"/></otherwise></choose></template><template name="t1"><param name="p0"/><variable name="v0"><value-of select="substring-before(substring-after(substring-after(substring-after($p0,'http://www.istandaarden.nl/'),'/'),'/'),'/')"/></variable><variable name="v1"><value-of select="substring-before($p0,$v0)"/></variable><variable name="v2"><value-of select="substring-after($p0,$v0)"/></variable><choose><when test="$v0='basisschema'"><value-of select="$p0"/></when><otherwise><value-of select="$v1"/><apply-templates mode="m0" select="."><with-param name="pMessage" select="$v0"/></apply-templates><value-of select="$v2"/></otherwise></choose></template><template match="*" mode="m1" priority="0"/><template match="*[local-name() = 'IdentificatieRetour']" priority="10"/><template match="*[local-name() = 'DagtekeningRetour']" priority="10"/><template match="*[local-name() = 'XsdVersieRetour']" priority="10"/><template match="*[local-name() = 'RetourCodes']" priority="10"/><template match="*[local-name() = 'RetourHeader']" priority="10"/><template match="*[local-name() = 'RetourBedragen']" priority="10"/><template match="*[local-name() = 'ToegekendeBedragPrestatie']" priority="10"/><template match="*[local-name() = 'BerichtCode']" priority="10"><variable name="v0"><call-template name="t1"><with-param name="p0" select="namespace-uri()"/></call-template></variable><element name="{local-name()}" namespace="{normalize-space($v0)}"><value-of select="1*text() - 1"/></element></template><template match="*[local-name() = 'XsdVersie']" priority="10"><variable name="v0"><value-of select="substring-before(substring-after(substring-after(substring-after(namespace-uri(),'http://www.istandaarden.nl/'),'/'),'/'),'/')"/></variable><variable name="v1"><value-of select="translate($v0,translate($v0,'0123456789',''),'')"/></variable><if test="$v1!='304'"><call-template name="t3"/></if></template><template match="*[local-name() = 'Header']" mode="m1" priority="10"><variable name="v0"><value-of select="substring-before(substring-after(substring-after(substring-after(namespace-uri(),'http://www.istandaarden.nl/'),'/'),'/'),'/')"/></variable><variable name="v1"><value-of select="translate($v0,translate($v0,'0123456789',''),'')"/></variable><if test="$v1='304'"><variable name="v2"><call-template name="t1"><with-param name="p0" select="namespace-uri()"/></call-template></variable><variable name="v3"><value-of select="namespace-uri(*[local-name()='RetourBedragen']/*[local-name()='IngediendTotaalBedrag'])"/></variable><variable name="v4" select="sum(ancestor-or-self::*[local-name()='Bericht']//*[local-name()='Client']//*[local-name()='IngediendeBedragPrestatie']/*[local-name()='DeclaratieFactuurBedrag' and ./*[local-name()='DebetCredit']/text()='D']/*[local-name()='Bedrag'])"/><variable name="v5" select="sum(ancestor-or-self::*[local-name()='Bericht']//*[local-name()='Client']//*[local-name()='IngediendeBedragPrestatie']/*[local-name()='DeclaratieFactuurBedrag' and ./*[local-name()='DebetCredit']/text()='C']/*[local-name()='Bedrag'])"/><variable name="v6" select="$v4 - $v5"/><element name="DeclaratieFactuurBedragen" namespace="{normalize-space($v2)}"><choose><when test="$v6 &lt; 0"><element name="DeclaratieFactuurTotaalBedrag" namespace="{normalize-space($v3)}"><element name="TotaalBedrag" namespace="{normalize-space($v3)}"><call-template name="t2"><with-param name="p0" select="0 - number($v6)"/></call-template></element><element name="DebetCredit" namespace="{normalize-space($v3)}">D</element></element></when><otherwise><element name="DeclaratieFactuurTotaalBedrag" namespace="{normalize-space($v3)}"><element name="TotaalBedrag" namespace="{normalize-space($v3)}"><call-template name="t2"><with-param name="p0" select="$v6"/></call-template></element><element name="DebetCredit" namespace="{normalize-space($v3)}">C</element></element></otherwise></choose></element><for-each select="*[local-name()='XsdVersie']"><call-template name="t3"/></for-each></if></template><template name="t3"><variable name="v0"><call-template name="t1"><with-param name="p0" select="namespace-uri()"/></call-template></variable><element name="{local-name()}" namespace="{normalize-space($v0)}"><copy-of select="@*"/><apply-templates select="*"/><apply-templates mode="m1" select="."/><value-of select="text()"/></element></template><template match="*"><call-template name="t3"/></template></stylesheet>
\ No newline at end of file
diff --git a/xslt-validatie/jw/3_0/condities/CD005.xsl b/xslt-validatie/jw/3_0/condities/CD005.xsl
new file mode 100644
index 0000000..71944a4
--- /dev/null
+++ b/xslt-validatie/jw/3_0/condities/CD005.xsl
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+	xmlns:jw304="http://www.istandaarden.nl/ijw/3_0/jw304/schema"
+	>
+	<!-- iJw 3.0 CD005 version 1.0.20024 (2020-05-14) -->
+
+	<xsl:import href="../common/basis.xsl"/>
+	<xsl:template match="*" mode="CD005"/>
+	<xsl:template match="*" mode="check">
+		<xsl:apply-templates select="*" mode="CD005"/>
+	</xsl:template>
+
+	<xsl:template match="ijw:Postcode" mode="CD005">
+		<xsl:if test="not (ancestor-or-self::jw304:Bericht)">
+			<xsl:call-template name="checkempty">
+				<xsl:with-param name="pOther" select="../ijw:LandCode"/>
+				<xsl:with-param name="pRule">CD005</xsl:with-param>
+			</xsl:call-template>
+		</xsl:if>
+	</xsl:template>
+	<xsl:template match="ijw:LandCode" mode="CD005">
+		<xsl:if test="not (ancestor-or-self::jw304:Bericht)">
+			<xsl:call-template name="checkempty">
+				<xsl:with-param name="pOther" select="../ijw:Postcode"/>
+				<xsl:with-param name="pRule">CD005</xsl:with-param>
+			</xsl:call-template>
+		</xsl:if>
+	</xsl:template>
+
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/condities/CD007.xsl b/xslt-validatie/jw/3_0/condities/CD007.xsl
new file mode 100644
index 0000000..c4a02b6
--- /dev/null
+++ b/xslt-validatie/jw/3_0/condities/CD007.xsl
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+	xmlns:jw301="http://www.istandaarden.nl/ijw/3_0/jw301/schema"
+	xmlns:jw303="http://www.istandaarden.nl/ijw/3_0/jw303/schema"
+	xmlns:jw304="http://www.istandaarden.nl/ijw/3_0/jw304/schema"
+	xmlns:jw305="http://www.istandaarden.nl/ijw/3_0/jw305/schema"
+	xmlns:jw307="http://www.istandaarden.nl/ijw/3_0/jw307/schema"
+	xmlns:jw315="http://www.istandaarden.nl/ijw/3_0/jw315/schema"
+	>
+
+	<!-- iJw 3.0 CD007 version 2.0.24 (2020-05-14) -->
+
+	<xsl:import href="../common/basis.xsl"/>
+	<xsl:template match="*" mode="CD007"/>
+	<xsl:template match="*" mode="check">
+		<xsl:apply-templates select="*" mode="CD007"/>
+	</xsl:template>
+
+	<xsl:template match="*[ijw:Taal | ijw:Vorm]" mode="check">
+		<xsl:if test="not (ancestor-or-self::jw304:Bericht)">
+			<xsl:call-template name="checksame">
+				<xsl:with-param name="pThis" select="ijw:Taal"/>
+				<xsl:with-param name="pValue1">*</xsl:with-param>
+				<xsl:with-param name="pOther" select="ijw:Vorm"/>
+				<xsl:with-param name="pValue2">1</xsl:with-param>
+				<xsl:with-param name="pRule">CD007</xsl:with-param>
+			</xsl:call-template>
+		</xsl:if>
+	</xsl:template>
+
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/condities/CD009.xsl b/xslt-validatie/jw/3_0/condities/CD009.xsl
new file mode 100644
index 0000000..4ff49d0
--- /dev/null
+++ b/xslt-validatie/jw/3_0/condities/CD009.xsl
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:jw301="http://www.istandaarden.nl/ijw/3_0/jw301/schema"
+>
+    <!-- iJw 3.0 CD009 version 2.0.24 (2020-05-14) -->
+
+    <xsl:import href="../common/basis.xsl"/>
+    <xsl:template match="*" mode="CD009"/>
+    <xsl:template match="*" mode="check">
+        <xsl:apply-templates select="*" mode="CD009"/>
+    </xsl:template>
+
+    <xsl:template match="jw301:Contact/jw301:Periode" mode="CD009">
+        <xsl:call-template name="checkimplication">
+            <xsl:with-param name="pValue1">#</xsl:with-param>
+            <xsl:with-param name="pOther" select="../jw301:Soort"/>
+            <xsl:with-param name="pValue2">04</xsl:with-param>
+            <xsl:with-param name="pRule">CD009</xsl:with-param>
+        </xsl:call-template>
+    </xsl:template>
+
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/condities/CD025.xsl b/xslt-validatie/jw/3_0/condities/CD025.xsl
new file mode 100644
index 0000000..7c04a34
--- /dev/null
+++ b/xslt-validatie/jw/3_0/condities/CD025.xsl
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+	xmlns:jw301="http://www.istandaarden.nl/ijw/3_0/jw301/schema"
+	xmlns:jw303="http://www.istandaarden.nl/ijw/3_0/jw303/schema"
+	xmlns:jw304="http://www.istandaarden.nl/ijw/3_0/jw304/schema"
+	xmlns:jw305="http://www.istandaarden.nl/ijw/3_0/jw305/schema"
+	xmlns:jw307="http://www.istandaarden.nl/ijw/3_0/jw307/schema"
+	xmlns:jw315="http://www.istandaarden.nl/ijw/3_0/jw315/schema"
+	>
+
+	<!-- iJw 3.0 CD025 version 2.0.24 (2020-05-14) -->
+
+	<xsl:import href="../common/basis.xsl"/>
+	<xsl:template match="*" mode="CD025"/>
+	<xsl:template match="*" mode="check">
+		<xsl:apply-templates select="*" mode="CD025"/>
+	</xsl:template>
+
+	<xsl:template match="ijw:LandCode" mode="CD025">
+		<xsl:if test="not (ancestor-or-self::jw304:Bericht)">
+			<xsl:call-template name="checkimplication">
+				<xsl:with-param name="pValue1">NL</xsl:with-param>
+				<xsl:with-param name="pOther" select="../ijw:Huis/ijw:Huisnummer"/>
+				<xsl:with-param name="pValue2">*</xsl:with-param>
+				<xsl:with-param name="pRule">CD025</xsl:with-param>
+			</xsl:call-template>
+		</xsl:if>
+	</xsl:template>
+
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/condities/CD034.xsl b/xslt-validatie/jw/3_0/condities/CD034.xsl
new file mode 100644
index 0000000..bf84417
--- /dev/null
+++ b/xslt-validatie/jw/3_0/condities/CD034.xsl
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+                xmlns:jw301="http://www.istandaarden.nl/ijw/3_0/jw301/schema">
+    <!-- iJw 3.0 CD034 version 2.0.24 (2020-05-14) -->
+
+    <xsl:import href="../common/basis.xsl"/>
+    <xsl:template match="*" mode="CD034"/>
+    <xsl:template match="*" mode="check">
+        <xsl:apply-templates select="*" mode="CD034"/>
+    </xsl:template>
+
+    <xsl:template match="jw301:Contact" mode="CD034">
+        <xsl:call-template name="checkimplication">
+            <xsl:with-param name="pThis" select="jw301:Soort"/>
+            <xsl:with-param name="pValue1">01,03</xsl:with-param>
+            <xsl:with-param name="pOther" select="jw301:Adres/ijw:Postcode"/>
+            <xsl:with-param name="pValue2">*</xsl:with-param>
+            <xsl:with-param name="pRule">CD034</xsl:with-param>
+        </xsl:call-template>
+    </xsl:template>
+
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/condities/CD041.xsl b/xslt-validatie/jw/3_0/condities/CD041.xsl
new file mode 100644
index 0000000..64cf65b
--- /dev/null
+++ b/xslt-validatie/jw/3_0/condities/CD041.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+                xmlns:jw301="http://www.istandaarden.nl/ijw/3_0/jw301/schema"
+                xmlns:jw315="http://www.istandaarden.nl/ijw/3_0/jw315/schema">
+
+    <!-- iJw 3.0 CD041 version 2.0.24 (2020-05-14) -->
+
+    <xsl:import href="../common/basis.xsl"/>
+    <xsl:template match="*" mode="CD041"/>
+    <xsl:template match="*" mode="check">
+        <xsl:apply-templates select="*" mode="CD041"/>
+    </xsl:template>
+
+    <xsl:template match="jw301:ToegewezenProduct" mode="CD041">
+        <xsl:call-template name="checkimplication">
+            <xsl:with-param name="pThis" select="jw301:Product/ijw:Code"/>
+            <xsl:with-param name="pValue1">*</xsl:with-param>
+            <xsl:with-param name="pOther" select="jw301:Omvang"/>
+            <xsl:with-param name="pValue2">#</xsl:with-param>
+            <xsl:with-param name="pRule">CD041</xsl:with-param>
+        </xsl:call-template>
+    </xsl:template>
+
+    <xsl:template match="jw315:AangevraagdProduct" mode="CD041">
+        <xsl:call-template name="checkimplication">
+            <xsl:with-param name="pThis" select="jw315:Product/ijw:Code"/>
+            <xsl:with-param name="pValue1">*</xsl:with-param>
+            <xsl:with-param name="pOther" select="jw315:Omvang"/>
+            <xsl:with-param name="pValue2">#</xsl:with-param>
+            <xsl:with-param name="pRule">CD041</xsl:with-param>
+        </xsl:call-template>
+    </xsl:template>
+
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/condities/CD043.xsl b/xslt-validatie/jw/3_0/condities/CD043.xsl
new file mode 100644
index 0000000..6d90db0
--- /dev/null
+++ b/xslt-validatie/jw/3_0/condities/CD043.xsl
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+                xmlns:jw315="http://www.istandaarden.nl/ijw/3_0/jw315/schema">
+
+    <!-- iJw 3.0 CD043 version 2.0.24 (2020-05-14) -->
+
+    <xsl:import href="../common/basis.xsl"/>
+    <xsl:template match="*" mode="CD043"/>
+    <xsl:template match="*" mode="check">
+        <xsl:apply-templates select="*" mode="CD043"/>
+    </xsl:template>
+
+    <xsl:template match="jw315:AangevraagdProduct" mode="CD043">
+        <xsl:call-template name="checksame">
+            <xsl:with-param name="pThis" select="jw315:BeschikkingNummer"/>
+            <xsl:with-param name="pValue1">*</xsl:with-param>
+            <xsl:with-param name="pOther" select="jw315:BeschikkingIngangsdatum"/>
+            <xsl:with-param name="pValue2">*</xsl:with-param>
+            <xsl:with-param name="pRule">CD043</xsl:with-param>
+        </xsl:call-template>
+    </xsl:template>
+
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/condities/CD044.xsl b/xslt-validatie/jw/3_0/condities/CD044.xsl
new file mode 100644
index 0000000..37458a8
--- /dev/null
+++ b/xslt-validatie/jw/3_0/condities/CD044.xsl
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:jw301="http://www.istandaarden.nl/ijw/3_0/jw301/schema">
+
+    <!-- iJw 3.0 CD044 version 2.0.24 (2020-05-14) -->
+
+    <xsl:import href="../common/basis.xsl"/>
+    <xsl:template match="*" mode="CD044"/>
+    <xsl:template match="*" mode="check">
+        <xsl:apply-templates select="*" mode="CD044"/>
+    </xsl:template>
+
+    <xsl:template match="jw301:ToegewezenProduct" mode="CD044">
+        <xsl:call-template name="checkimplication">
+            <xsl:with-param name="pThis" select="jw301:RedenWijziging"/>
+            <xsl:with-param name="pValue1">*</xsl:with-param>
+            <xsl:with-param name="pOther" select="jw301:Einddatum"/>
+            <xsl:with-param name="pValue2">*</xsl:with-param>
+            <xsl:with-param name="pRule">CD044</xsl:with-param>
+        </xsl:call-template>
+    </xsl:template>
+
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/condities/CD055.xsl b/xslt-validatie/jw/3_0/condities/CD055.xsl
new file mode 100644
index 0000000..35e28aa
--- /dev/null
+++ b/xslt-validatie/jw/3_0/condities/CD055.xsl
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+                xmlns:jw303="http://www.istandaarden.nl/ijw/3_0/jw303/schema"
+                xmlns:jw304="http://www.istandaarden.nl/ijw/3_0/jw304/schema"
+                >
+
+    <!-- iJw 3.0 CD055 version 2.0.24 (2020-05-14) -->
+
+    <xsl:import href="../common/basis.xsl"/>
+    <xsl:template match="*" mode="CD055"/>
+    <xsl:template match="*" mode="check">
+        <xsl:apply-templates select="*" mode="CD055"/>
+    </xsl:template>
+
+    <xsl:template match="jw303:IngediendeBedragPrestatie" mode="CD055">
+        <xsl:if test="normalize-space(ijw:BtwVrijstellingIndicatie/text())='2'">
+            <xsl:call-template name="checkvalue">
+                <xsl:with-param name="pThis" select="ijw:BtwPercentage"/>
+                <xsl:with-param name="pValues">*</xsl:with-param>
+                <xsl:with-param name="pRule">CD055</xsl:with-param>
+                <xsl:with-param name="pExtra" select="ijw:BtwVrijstellingIndicatie"></xsl:with-param>
+            </xsl:call-template>
+            <xsl:call-template name="checkvalue">
+                <xsl:with-param name="pThis" select="ijw:BtwBedrag/ijw:Bedrag"/>
+                <xsl:with-param name="pValues">*</xsl:with-param>
+                <xsl:with-param name="pRule">CD055</xsl:with-param>
+                <xsl:with-param name="pExtra" select="ijw:BtwVrijstellingIndicatie"></xsl:with-param>
+            </xsl:call-template>
+            <xsl:call-template name="checkvalue">
+                <xsl:with-param name="pThis" select="ancestor-or-self::jw303:Bericht/jw303:Header//ijw:BtwIDNummer"/>
+                <xsl:with-param name="pValues">*</xsl:with-param>
+                <xsl:with-param name="pRule">CD055</xsl:with-param>
+                <xsl:with-param name="pExtra" select="ijw:BtwVrijstellingIndicatie"></xsl:with-param>
+            </xsl:call-template>
+            <xsl:call-template name="checkvalue">
+                <xsl:with-param name="pThis" select="ancestor-or-self::jw303:Bericht/jw303:Header//ijw:BtwTotaalBedrag/ijw:TotaalBedrag"/>
+                <xsl:with-param name="pValues">*</xsl:with-param>
+                <xsl:with-param name="pRule">CD055</xsl:with-param>
+                <xsl:with-param name="pExtra" select="ijw:BtwVrijstellingIndicatie"></xsl:with-param>
+            </xsl:call-template>
+        </xsl:if>
+    </xsl:template>
+    
+    <xsl:template match="jw304:IngediendeBedragPrestatie" mode="CD055">
+        <xsl:if test="normalize-space(ijw:BtwVrijstellingIndicatie/text())='2'">
+            <xsl:call-template name="checkvalue">
+                <xsl:with-param name="pThis" select="ijw:BtwPercentage"/>
+                <xsl:with-param name="pValues">*</xsl:with-param>
+                <xsl:with-param name="pRule">CD055</xsl:with-param>
+                <xsl:with-param name="pExtra" select="ijw:BtwVrijstellingIndicatie"></xsl:with-param>
+            </xsl:call-template>
+            <xsl:call-template name="checkvalue">
+                <xsl:with-param name="pThis" select="ijw:BtwBedrag/ijw:Bedrag"/>
+                <xsl:with-param name="pValues">*</xsl:with-param>
+                <xsl:with-param name="pRule">CD055</xsl:with-param>
+                <xsl:with-param name="pExtra" select="ijw:BtwVrijstellingIndicatie"></xsl:with-param>
+            </xsl:call-template>
+            <xsl:call-template name="checkvalue">
+                <xsl:with-param name="pThis" select="ancestor-or-self::jw304:Bericht/jw304:Header//ijw:BtwIDNummer"/>
+                <xsl:with-param name="pValues">*</xsl:with-param>
+                <xsl:with-param name="pRule">CD055</xsl:with-param>
+                <xsl:with-param name="pExtra" select="ijw:BtwVrijstellingIndicatie"></xsl:with-param>
+            </xsl:call-template>
+        </xsl:if>
+    </xsl:template>
+
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/condities/CD056.xsl b/xslt-validatie/jw/3_0/condities/CD056.xsl
new file mode 100644
index 0000000..332bec1
--- /dev/null
+++ b/xslt-validatie/jw/3_0/condities/CD056.xsl
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+                xmlns:jw303="http://www.istandaarden.nl/ijw/3_0/jw303/schema"
+                xmlns:jw304="http://www.istandaarden.nl/ijw/3_0/jw304/schema"
+                >
+
+    <!-- iJw 3.0 CD056 version 2.0.24 (2020-05-14) -->
+
+    <xsl:import href="../common/basis.xsl"/>
+    <xsl:template match="*" mode="CD056"/>
+    <xsl:template match="*" mode="check">
+        <xsl:apply-templates select="*" mode="CD056"/>
+    </xsl:template>
+
+    <xsl:template match="jw303:IngediendeBedragPrestatie" mode="CD056">
+        <xsl:if test="normalize-space(ijw:BtwVrijstellingIndicatie/text())='1'">
+            <xsl:call-template name="checkempty">
+                <xsl:with-param name="pThis" select="ijw:BtwPercentage"/>
+                <xsl:with-param name="pRule">CD056</xsl:with-param>
+                <!--<xsl:with-param name="pExtra" select="ijw:BtwVrijstellingIndicatie"/>-->
+            </xsl:call-template>
+            <xsl:call-template name="checkempty">
+                <xsl:with-param name="pThis" select="ijw:BtwBedrag/ijw:Bedrag"/>
+                <xsl:with-param name="pRule">CD056</xsl:with-param>
+                <!--<xsl:with-param name="pExtra" select="ijw:BtwVrijstellingIndicatie"></xsl:with-param>-->
+            </xsl:call-template>
+        </xsl:if>
+    </xsl:template>
+    
+    <xsl:template match="jw304:IngediendeBedragPrestatie" mode="CD056">
+        <xsl:if test="normalize-space(ijw:BtwVrijstellingIndicatie/text())='1'">
+            <xsl:call-template name="checkempty">
+                <xsl:with-param name="pThis" select="ijw:BtwPercentage"/>
+                <xsl:with-param name="pRule">CD056</xsl:with-param>
+                <!--<xsl:with-param name="pExtra" select="ijw:BtwVrijstellingIndicatie"/>-->
+            </xsl:call-template>
+            <xsl:call-template name="checkempty">
+                <xsl:with-param name="pThis" select="ijw:BtwBedrag/ijw:Bedrag"/>
+                <xsl:with-param name="pRule">CD056</xsl:with-param>
+                <!--<xsl:with-param name="pExtra" select="ijw:BtwVrijstellingIndicatie"></xsl:with-param>-->
+            </xsl:call-template>
+        </xsl:if>
+    </xsl:template>
+
+</xsl:stylesheet>
+	
\ No newline at end of file
diff --git a/xslt-validatie/jw/3_0/condities/CD058.xsl b/xslt-validatie/jw/3_0/condities/CD058.xsl
new file mode 100644
index 0000000..8e5f548
--- /dev/null
+++ b/xslt-validatie/jw/3_0/condities/CD058.xsl
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+                xmlns:jw303="http://www.istandaarden.nl/ijw/3_0/jw303/schema"
+                xmlns:jw304="http://www.istandaarden.nl/ijw/3_0/jw304/schema"
+		    >
+
+    <!-- iJw 3.0 CD058 version 2.0.24 (2020-05-14) -->
+
+    <xsl:import href="../common/basis.xsl"/>
+    <xsl:template match="*" mode="CD058"/>
+    <xsl:template match="*" mode="check">
+        <xsl:apply-templates select="*" mode="CD058"/>
+    </xsl:template>
+
+    <xsl:template match="jw303:BetalingAanID" mode="CD058">
+        <xsl:call-template name="checkimplication">
+            <xsl:with-param name="pValue1">01</xsl:with-param>
+		<xsl:with-param name="pOther" select="../jw303:Servicebureau"/>
+            <xsl:with-param name="pValue2">*</xsl:with-param>
+            <xsl:with-param name="pRule">CD058</xsl:with-param>
+        </xsl:call-template>
+    </xsl:template>
+
+    <xsl:template match="jw304:BetalingAanID" mode="CD058">
+        <xsl:call-template name="checkimplication">
+            <xsl:with-param name="pValue1">01</xsl:with-param>
+		<xsl:with-param name="pOther" select="../jw304:Servicebureau"/>
+            <xsl:with-param name="pValue2">*</xsl:with-param>
+            <xsl:with-param name="pRule">CD058</xsl:with-param>
+        </xsl:call-template>
+    </xsl:template>
+
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/condities/CD059.xsl b/xslt-validatie/jw/3_0/condities/CD059.xsl
new file mode 100644
index 0000000..46cd09c
--- /dev/null
+++ b/xslt-validatie/jw/3_0/condities/CD059.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+                xmlns:jw303="http://www.istandaarden.nl/ijw/3_0/jw303/schema"
+                xmlns:jw304="http://www.istandaarden.nl/ijw/3_0/jw304/schema"
+>
+
+    <!-- iJw 3.0 CD059 version 2.0.24 (2020-05-14) -->
+
+    <xsl:import href="../common/basis.xsl"/>
+    <xsl:template match="*" mode="CD059"/>
+    <xsl:template match="*" mode="check">
+        <xsl:apply-templates select="*" mode="CD059"/>
+    </xsl:template>
+
+    <xsl:template match="jw303:Prestatie" mode="CD059">
+        <xsl:call-template name="checkimplication">
+            <xsl:with-param name="pThis" select="ancestor-or-self::jw303:Bericht/jw303:Header/jw303:BerichtCode"/>
+            <xsl:with-param name="pValue1">448, 450</xsl:with-param>
+            <xsl:with-param name="pOther" select="jw303:IngediendeBedragPrestatie/ijw:BtwVrijstellingIndicatie"/>
+            <xsl:with-param name="pValue2">*</xsl:with-param>
+            <xsl:with-param name="pRule">CD059</xsl:with-param>
+        </xsl:call-template>
+    </xsl:template>
+
+    <xsl:template match="jw304:Prestatie" mode="CD059">
+        <xsl:call-template name="checkimplication">
+            <xsl:with-param name="pThis" select="ancestor-or-self::jw304:Bericht/jw304:Header/jw304:BerichtCode"/>
+            <xsl:with-param name="pValue1">449, 451</xsl:with-param>
+            <xsl:with-param name="pOther" select="jw304:IngediendeBedragPrestatie/ijw:BtwVrijstellingIndicatie"/>
+            <xsl:with-param name="pValue2">*</xsl:with-param>
+            <xsl:with-param name="pRule">CD059</xsl:with-param>
+        </xsl:call-template>
+    </xsl:template>
+
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/condities/CD060.xsl b/xslt-validatie/jw/3_0/condities/CD060.xsl
new file mode 100644
index 0000000..975b654
--- /dev/null
+++ b/xslt-validatie/jw/3_0/condities/CD060.xsl
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+                xmlns:jw303="http://www.istandaarden.nl/ijw/3_0/jw303/schema"
+                xmlns:jw304="http://www.istandaarden.nl/ijw/3_0/jw304/schema"
+                xmlns:jw323="http://www.istandaarden.nl/ijw/3_0/jw323/schema"
+                xmlns:jw325="http://www.istandaarden.nl/ijw/3_0/jw325/schema"
+		    >
+
+    <!-- iJw 3.0 CD060 version 2.0.24 (2020-05-14) -->
+
+    <xsl:import href="../common/basis.xsl"/>
+    <xsl:template match="*" mode="CD060"/>
+    <xsl:template match="*" mode="check">
+        <xsl:apply-templates select="*" mode="CD060"/>
+    </xsl:template>
+
+    <xsl:template match="jw303:Prestatie" mode="CD060">
+        <xsl:call-template name="checksame">
+        	<xsl:with-param name="pThis" select="jw303:IngediendeBedragPrestatie/ijw:DeclaratieFactuurBedrag/ijw:DebetCredit"/>
+            <xsl:with-param name="pValue1">C</xsl:with-param>
+			<xsl:with-param name="pOther" select="jw303:ProductReferentie/ijw:VorigReferentieNummer"/>
+            <xsl:with-param name="pValue2">*</xsl:with-param>
+            <xsl:with-param name="pRule">CD060</xsl:with-param>
+        </xsl:call-template>
+    </xsl:template>
+
+    <xsl:template match="jw304:Prestatie" mode="CD060">
+        <xsl:call-template name="checksame">
+        	<xsl:with-param name="pThis" select="jw304:IngediendeBedragPrestatie/ijw:DeclaratieFactuurBedrag/ijw:DebetCredit"/>
+            <xsl:with-param name="pValue1">C</xsl:with-param>
+			<xsl:with-param name="pOther" select="jw304:ProductReferentie/ijw:VorigReferentieNummer"/>
+            <xsl:with-param name="pValue2">*</xsl:with-param>
+            <xsl:with-param name="pRule">CD060</xsl:with-param>
+        </xsl:call-template>
+    </xsl:template>
+
+    <xsl:template match="jw323:Prestatie" mode="CD060">
+        <xsl:call-template name="checksame">
+        	<xsl:with-param name="pThis" select="jw323:IngediendBedrag/ijw:DebetCredit"/>
+            <xsl:with-param name="pValue1">C</xsl:with-param>
+			<xsl:with-param name="pOther" select="jw323:ProductReferentie/ijw:VorigReferentieNummer"/>
+            <xsl:with-param name="pValue2">*</xsl:with-param>
+            <xsl:with-param name="pRule">CD060</xsl:with-param>
+        </xsl:call-template>
+    </xsl:template>
+    
+    <xsl:template match="jw325:Prestatie" mode="CD060">
+        <xsl:call-template name="checksame">
+        	<xsl:with-param name="pThis" select="jw325:IngediendBedrag/ijw:DebetCredit"/>
+            <xsl:with-param name="pValue1">C</xsl:with-param>
+			<xsl:with-param name="pOther" select="jw325:ProductReferentie/ijw:VorigReferentieNummer"/>
+            <xsl:with-param name="pValue2">*</xsl:with-param>
+            <xsl:with-param name="pRule">CD060</xsl:with-param>
+        </xsl:call-template>
+    </xsl:template>
+    
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/condities/CD062.xsl b/xslt-validatie/jw/3_0/condities/CD062.xsl
new file mode 100644
index 0000000..e0344bf
--- /dev/null
+++ b/xslt-validatie/jw/3_0/condities/CD062.xsl
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+                xmlns:jw303="http://www.istandaarden.nl/ijw/3_0/jw303/schema"
+    		    xmlns:jw304="http://www.istandaarden.nl/ijw/3_0/jw304/schema"
+		    >
+
+    <!-- iJw 3.0 CD062 version 2.0.24 (2020-05-14) -->
+
+    <xsl:import href="../common/basis.xsl"/>
+    <xsl:template match="*" mode="CD062"/>
+    <xsl:template match="*" mode="check">
+        <xsl:apply-templates select="*" mode="CD062"/>
+    </xsl:template>
+
+    <xsl:template match="jw303:IngediendeBedragPrestatie | jw304:IngediendeBedragPrestatie" mode="CD062">
+        <xsl:call-template name="checkimplication">
+            <xsl:with-param name="pThis" select="ijw:Eenheid"/>
+            <xsl:with-param name="pValue1">83</xsl:with-param>
+            <xsl:with-param name="pOther" select="ijw:ProductTarief"/>
+            <xsl:with-param name="pValue2"></xsl:with-param>
+            <xsl:with-param name="pRule">CD062</xsl:with-param>
+        </xsl:call-template>
+    </xsl:template>
+
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/condities/CD066.xsl b/xslt-validatie/jw/3_0/condities/CD066.xsl
new file mode 100644
index 0000000..1041f7b
--- /dev/null
+++ b/xslt-validatie/jw/3_0/condities/CD066.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+	xmlns:jw315="http://www.istandaarden.nl/ijw/3_0/jw315/schema">
+
+	<!-- iJw 3.0 CD066 version 2.0.24 (2020-05-14) -->
+
+	<xsl:import href="../common/basis.xsl" />
+	<xsl:template match="*" mode="CD066" />
+	<xsl:template match="*" mode="check">
+		<xsl:apply-templates select="*" mode="CD066" />
+	</xsl:template>
+
+	<xsl:template match="jw315:Verwijzer" mode="CD066">
+		<xsl:variable name="inList">
+			<xsl:call-template name="testvalue">
+				<xsl:with-param name="pElement" select="ijw:Type" />
+				<xsl:with-param name="pValues">02,03,04,05</xsl:with-param>
+			</xsl:call-template>
+		</xsl:variable>
+
+		<xsl:choose>
+			<xsl:when test="$inList = 'true'">
+				<xsl:call-template name="checkimplication">
+					<xsl:with-param name="pThis" select="ijw:ZorgverlenerCode" />
+					<xsl:with-param name="pValue1">*</xsl:with-param>
+					<xsl:with-param name="pOther" select="ijw:Naam" />
+					<xsl:with-param name="pValue2"></xsl:with-param>
+					<xsl:with-param name="pExtra" select="ijw:Type" />
+					<xsl:with-param name="pRule">CD066</xsl:with-param>
+				</xsl:call-template>
+			</xsl:when>
+		</xsl:choose>
+	</xsl:template>
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/condities/CD067.xsl b/xslt-validatie/jw/3_0/condities/CD067.xsl
new file mode 100644
index 0000000..708c49d
--- /dev/null
+++ b/xslt-validatie/jw/3_0/condities/CD067.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+	xmlns:jw315="http://www.istandaarden.nl/ijw/3_0/jw315/schema">
+
+	<!-- iJw 3.0 CD067 version 2.0.24 (2020-05-14) -->
+
+	<xsl:import href="../common/basis.xsl" />
+	<xsl:template match="*" mode="CD067" />
+	<xsl:template match="*" mode="check">
+		<xsl:apply-templates select="*" mode="CD067" />
+	</xsl:template>
+
+	<xsl:template match="jw315:Verwijzer" mode="CD067">
+		<xsl:variable name="inList">
+			<xsl:call-template name="testvalue">
+				<xsl:with-param name="pElement" select="ijw:Type" />
+				<xsl:with-param name="pValues">02,03,04,05</xsl:with-param>
+			</xsl:call-template>
+		</xsl:variable>
+
+		<xsl:choose>
+			<xsl:when test="$inList = 'true'">
+				<xsl:call-template name="checkimplication">
+					<xsl:with-param name="pThis" select="ijw:ZorgverlenerCode" />
+					<xsl:with-param name="pValue1"></xsl:with-param>
+					<xsl:with-param name="pOther" select="ijw:Naam" />
+					<xsl:with-param name="pValue2">*</xsl:with-param>
+					<xsl:with-param name="pExtra" select="ijw:Type" />
+					<xsl:with-param name="pRule">CD067</xsl:with-param>
+				</xsl:call-template>
+			</xsl:when>
+		</xsl:choose>
+	</xsl:template>
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/condities/CD068.xsl b/xslt-validatie/jw/3_0/condities/CD068.xsl
new file mode 100644
index 0000000..7dfa856
--- /dev/null
+++ b/xslt-validatie/jw/3_0/condities/CD068.xsl
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+	xmlns:jw315="http://www.istandaarden.nl/ijw/3_0/jw315/schema">
+
+	<!-- iJw 3.0 CD068 version 2.0.24 (2020-05-14) -->
+
+	<xsl:import href="../common/basis.xsl" />
+	<xsl:template match="*" mode="CD068" />
+	<xsl:template match="*" mode="check">
+		<xsl:apply-templates select="*" mode="CD068" />
+	</xsl:template>
+
+	<xsl:template match="jw315:Verwijzer" mode="CD068">
+		<xsl:call-template name="checkimplication">
+			<xsl:with-param name="pThis" select="ijw:Type" />
+			<xsl:with-param name="pValue1">!02,03,04,05</xsl:with-param>
+			<xsl:with-param name="pOther" select="ijw:ZorgverlenerCode" />
+			<xsl:with-param name="pValue2"></xsl:with-param>
+			<xsl:with-param name="pRule">CD068</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/condities/CD075.xsl b/xslt-validatie/jw/3_0/condities/CD075.xsl
new file mode 100644
index 0000000..243b777
--- /dev/null
+++ b/xslt-validatie/jw/3_0/condities/CD075.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+	xmlns:jw301="http://www.istandaarden.nl/ijw/3_0/jw301/schema"
+	xmlns:jw317="http://www.istandaarden.nl/ijw/3_0/jw317/schema"
+	>
+
+	<!-- iJw 3.0 CD075 version 2.0.24 (2020-05-14) -->
+
+	<xsl:import href="../common/basis.xsl" />
+	<xsl:template match="*" mode="CD075" />
+	<xsl:template match="*" mode="check">
+		<xsl:apply-templates select="*" mode="CD075" />
+	</xsl:template>
+
+	<xsl:template match="jw301:ToegewezenProduct//jw301:Budget" mode="CD075">
+		<xsl:call-template name="checkimplication">
+			<xsl:with-param name="pValue1">*</xsl:with-param>
+			<xsl:with-param name="pOther" select="ancestor-or-self::jw301:ToegewezenProduct/jw301:Einddatum" />
+			<xsl:with-param name="pValue2">*</xsl:with-param>
+			<xsl:with-param name="pRule">CD075</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+	
+	<xsl:template match="jw317:TeWijzigenProduct//jw317:Budget" mode="CD075">
+		<xsl:call-template name="checkimplication">
+			<xsl:with-param name="pValue1">*</xsl:with-param>
+			<xsl:with-param name="pOther" select="ancestor-or-self::jw317:TeWijzigenProduct/jw317:Einddatum" />
+			<xsl:with-param name="pValue2">*</xsl:with-param>
+			<xsl:with-param name="pRule">CD075</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+	<xsl:template match="jw317:NieuwProduct//jw317:Budget" mode="CD075">
+		<xsl:call-template name="checkimplication">
+			<xsl:with-param name="pValue1">*</xsl:with-param>
+			<xsl:with-param name="pOther" select="ancestor-or-self::jw317:NieuwProduct/jw317:Einddatum" />
+			<xsl:with-param name="pValue2">*</xsl:with-param>
+			<xsl:with-param name="pRule">CD075</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/condities/CD076.xsl b/xslt-validatie/jw/3_0/condities/CD076.xsl
new file mode 100644
index 0000000..4ed20de
--- /dev/null
+++ b/xslt-validatie/jw/3_0/condities/CD076.xsl
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+	xmlns:jw301="http://www.istandaarden.nl/ijw/3_0/jw301/schema"
+	xmlns:jw315="http://www.istandaarden.nl/ijw/3_0/jw315/schema"
+	xmlns:jw317="http://www.istandaarden.nl/ijw/3_0/jw317/schema"
+	>
+
+	<!-- iJw 3.0 CD076 version 2.0.24 (2020-05-14) -->
+
+	<xsl:import href="../common/basis.xsl" />
+	<xsl:template match="*" mode="CD076" />
+	<xsl:template match="*" mode="check">
+		<xsl:apply-templates select="*" mode="CD076" />
+	</xsl:template>
+
+	<xsl:template match="jw301:ToegewezenProduct//ijw:Frequentie" mode="CD076">
+		<xsl:call-template name="checkimplication">
+			<xsl:with-param name="pValue1">2,6</xsl:with-param>
+			<xsl:with-param name="pOther" select="ancestor-or-self::jw301:ToegewezenProduct/jw301:Einddatum" />
+			<xsl:with-param name="pValue2">*</xsl:with-param>
+			<xsl:with-param name="pRule">CD076</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+	
+	<xsl:template match="jw315:AangevraagdProduct//ijw:Frequentie" mode="CD076">
+		<xsl:call-template name="checkimplication">
+			<xsl:with-param name="pValue1">2,6</xsl:with-param>
+			<xsl:with-param name="pOther" select="ancestor-or-self::jw315:AangevraagdProduct/jw315:ToewijzingEinddatum" />
+			<xsl:with-param name="pValue2">*</xsl:with-param>
+			<xsl:with-param name="pRule">CD076</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+	
+	<xsl:template match="jw317:TeWijzigenProduct//ijw:Frequentie" mode="CD076">
+		<xsl:call-template name="checkimplication">
+			<xsl:with-param name="pValue1">2,6</xsl:with-param>
+			<xsl:with-param name="pOther" select="ancestor-or-self::jw317:TeWijzigenProduct/jw317:Einddatum" />
+			<xsl:with-param name="pValue2">*</xsl:with-param>
+			<xsl:with-param name="pRule">CD076</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+	<xsl:template match="jw317:NieuwProduct//ijw:Frequentie" mode="CD076">
+		<xsl:call-template name="checkimplication">
+			<xsl:with-param name="pValue1">2,6</xsl:with-param>
+			<xsl:with-param name="pOther" select="ancestor-or-self::jw317:NieuwProduct/jw317:Einddatum" />
+			<xsl:with-param name="pValue2">*</xsl:with-param>
+			<xsl:with-param name="pRule">CD076</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/condities/CD077.xsl b/xslt-validatie/jw/3_0/condities/CD077.xsl
new file mode 100644
index 0000000..9a833ad
--- /dev/null
+++ b/xslt-validatie/jw/3_0/condities/CD077.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+	xmlns:jw301="http://www.istandaarden.nl/ijw/3_0/jw301/schema"
+	xmlns:jw317="http://www.istandaarden.nl/ijw/3_0/jw317/schema"
+	>
+
+	<!-- iJw 3.0 CD077 version 2.0.24 (2020-05-14) -->
+
+	<xsl:import href="../common/basis.xsl" />
+	<xsl:template match="*" mode="CD077" />
+	<xsl:template match="*" mode="check">
+		<xsl:apply-templates select="*" mode="CD077" />
+	</xsl:template>
+
+	<xsl:template match="jw301:ToegewezenProduct//jw301:Budget" mode="CD077">
+		<xsl:call-template name="checkimplication">
+			<xsl:with-param name="pValue1">*</xsl:with-param>
+			<xsl:with-param name="pOther" select="ancestor-or-self::jw301:ToegewezenProduct/jw301:Omvang" />
+			<xsl:with-param name="pValue2">!#</xsl:with-param>
+			<xsl:with-param name="pRule">CD077</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+	
+	<xsl:template match="jw317:TeWijzigenProduct//jw317:Budget" mode="CD077">
+		<xsl:call-template name="checkimplication">
+			<xsl:with-param name="pValue1">*</xsl:with-param>
+			<xsl:with-param name="pOther" select="ancestor-or-self::jw317:TeWijzigenProduct/jw317:Omvang" />
+			<xsl:with-param name="pValue2">!#</xsl:with-param>
+			<xsl:with-param name="pRule">CD077</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+	<xsl:template match="jw317:NieuwProduct//jw317:Budget" mode="CD077">
+		<xsl:call-template name="checkimplication">
+			<xsl:with-param name="pValue1">*</xsl:with-param>
+			<xsl:with-param name="pOther" select="ancestor-or-self::jw317:NieuwProduct/jw317:Omvang" />
+			<xsl:with-param name="pValue2">!#</xsl:with-param>
+			<xsl:with-param name="pRule">CD077</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/condities/CD078.xsl b/xslt-validatie/jw/3_0/condities/CD078.xsl
new file mode 100644
index 0000000..590c985
--- /dev/null
+++ b/xslt-validatie/jw/3_0/condities/CD078.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+	xmlns:jw301="http://www.istandaarden.nl/ijw/3_0/jw301/schema"
+	xmlns:jw317="http://www.istandaarden.nl/ijw/3_0/jw317/schema"
+	>
+
+	<!-- iJw 3.0 CD078 version 2.0.24 (2020-05-14) -->
+
+	<xsl:import href="../common/basis.xsl" />
+	<xsl:template match="*" mode="CD078" />
+	<xsl:template match="*" mode="check">
+		<xsl:apply-templates select="*" mode="CD078" />
+	</xsl:template>
+
+	<xsl:template match="jw301:ToegewezenProduct//jw301:Omvang" mode="CD078">
+		<xsl:call-template name="checkimplication">
+			<xsl:with-param name="pValue1">#</xsl:with-param>
+			<xsl:with-param name="pOther" select="ancestor-or-self::jw301:ToegewezenProduct/jw301:Budget" />
+			<xsl:with-param name="pValue2"></xsl:with-param>
+			<xsl:with-param name="pRule">CD078</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+	
+	<xsl:template match="jw317:TeWijzigenProduct//jw317:Omvang" mode="CD078">
+		<xsl:call-template name="checkimplication">
+			<xsl:with-param name="pValue1">#</xsl:with-param>
+			<xsl:with-param name="pOther" select="ancestor-or-self::jw317:TeWijzigenProduct/jw317:Budget" />
+			<xsl:with-param name="pValue2"></xsl:with-param>
+			<xsl:with-param name="pRule">CD078</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+	<xsl:template match="jw317:NieuwProduct//jw317:Omvang" mode="CD078">
+		<xsl:call-template name="checkimplication">
+			<xsl:with-param name="pValue1">#</xsl:with-param>
+			<xsl:with-param name="pOther" select="ancestor-or-self::jw317:NieuwProduct/jw317:Budget" />
+			<xsl:with-param name="pValue2"></xsl:with-param>
+			<xsl:with-param name="pRule">CD078</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/condities/CD079.xsl b/xslt-validatie/jw/3_0/condities/CD079.xsl
new file mode 100644
index 0000000..b8b5d13
--- /dev/null
+++ b/xslt-validatie/jw/3_0/condities/CD079.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+	xmlns:jw301="http://www.istandaarden.nl/ijw/3_0/jw301/schema"
+	xmlns:jw317="http://www.istandaarden.nl/ijw/3_0/jw317/schema"
+	>
+
+	<!-- iJw 3.0 CD079 version 2.0.24 (2020-05-14) -->
+
+	<xsl:import href="../common/basis.xsl" />
+	<xsl:template match="*" mode="CD079" />
+	<xsl:template match="*" mode="check">
+		<xsl:apply-templates select="*" mode="CD079" />
+	</xsl:template>
+
+	<xsl:template match="jw301:ToegewezenProduct" mode="CD079">
+		<xsl:call-template name="checkimplication">
+			<xsl:with-param name="pThis" select="jw301:Budget" />
+			<xsl:with-param name="pValue1"></xsl:with-param>
+			<xsl:with-param name="pOther" select="jw301:Product" />
+			<xsl:with-param name="pValue2">#</xsl:with-param>
+			<xsl:with-param name="pExtra" select="." />
+			<xsl:with-param name="pRule">CD079</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+	
+	<xsl:template match="jw317:NieuwProduct" mode="CD079">
+		<xsl:call-template name="checkimplication">
+			<xsl:with-param name="pThis" select="jw317:Budget" />
+			<xsl:with-param name="pValue1"></xsl:with-param>
+			<xsl:with-param name="pOther" select="jw317:Product" />
+			<xsl:with-param name="pValue2">#</xsl:with-param>
+			<xsl:with-param name="pExtra" select="." />
+			<xsl:with-param name="pRule">CD079</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/condities/CD080.xsl b/xslt-validatie/jw/3_0/condities/CD080.xsl
new file mode 100644
index 0000000..c39622b
--- /dev/null
+++ b/xslt-validatie/jw/3_0/condities/CD080.xsl
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+	xmlns:jw301="http://www.istandaarden.nl/ijw/3_0/jw301/schema"
+	xmlns:jw315="http://www.istandaarden.nl/ijw/3_0/jw315/schema"
+	xmlns:jw317="http://www.istandaarden.nl/ijw/3_0/jw317/schema"
+	>
+
+	<!-- iJw 3.0 CD080 version 2.0.24 (2020-05-14) -->
+
+	<xsl:import href="../common/basis.xsl" />
+	<xsl:template match="*" mode="CD080" />
+	<xsl:template match="*" mode="check">
+		<xsl:apply-templates select="*" mode="CD080" />
+	</xsl:template>
+
+	<xsl:template match="jw301:ToegewezenProduct//jw301:Omvang" mode="CD080">
+		<xsl:if test="not(ancestor-or-self::jw301:ToegewezenProduct/jw301:Einddatum) or number(translate(ancestor-or-self::jw301:ToegewezenProduct/jw301:Einddatum/text(), '-', '')) &gt; 20201231">
+			<xsl:call-template name="checkimplication">
+				<xsl:with-param name="pValue1">#</xsl:with-param>
+				<xsl:with-param name="pOther" select="ancestor-or-self::jw301:ToegewezenProduct/jw301:Product/ijw:Code" />
+				<xsl:with-param name="pValue2">*</xsl:with-param>
+				<xsl:with-param name="pRule">CD080</xsl:with-param>
+				<xsl:with-param name="pExtra" select="ancestor-or-self::jw301:ToegewezenProduct/jw301:Einddatum" />
+			</xsl:call-template>
+		</xsl:if>
+	</xsl:template>
+
+	<xsl:template match="jw315:AangevraagdProduct//jw315:Omvang" mode="CD080">
+		<xsl:if test="not(ancestor-or-self::jw315:AangevraagdProduct/jw315:ToewijzingEinddatum) or number(translate(ancestor-or-self::jw315:AangevraagdProduct/jw315:ToewijzingEinddatum/text(), '-', '')) &gt; 20201231">
+			<xsl:call-template name="checkimplication">
+				<xsl:with-param name="pValue1">#</xsl:with-param>
+				<xsl:with-param name="pOther" select="ancestor-or-self::jw315:AangevraagdProduct/jw315:Product/ijw:Code" />
+				<xsl:with-param name="pValue2">*</xsl:with-param>
+				<xsl:with-param name="pRule">CD080</xsl:with-param>
+				<xsl:with-param name="pExtra" select="ancestor-or-self::jw315:AangevraagdProduct/jw315:ToewijzingEinddatum" />
+			</xsl:call-template>
+		</xsl:if>
+	</xsl:template>
+	
+	<!-- 
+	<xsl:template match="jw317:TeWijzigenProduct//jw317:Omvang" mode="CD080">
+		<xsl:call-template name="checkimplication">
+			<xsl:with-param name="pValue1">#</xsl:with-param>
+			<xsl:with-param name="pOther" select="ancestor-or-self::jw317:TeWijzigenProduct/jw317:Product/ijw:Code" />
+			<xsl:with-param name="pValue2">*</xsl:with-param>
+			<xsl:with-param name="pRule">CD080</xsl:with-param>
+				<xsl:with-param name="pExtra" select="ancestor-or-self::jw301:ToegewezenProduct/jw301:Einddatum" />
+		</xsl:call-template>
+	</xsl:template>
+	 -->
+	<xsl:template match="jw317:NieuwProduct//jw317:Omvang" mode="CD080">
+		<xsl:if test="not(ancestor-or-self::jw317:NieuwProduct/jw317:Einddatum) or number(translate(ancestor-or-self::jw317:NieuwProduct/jw317:Einddatum/text(), '-', '')) &gt; 20201231">
+			<xsl:call-template name="checkimplication">
+				<xsl:with-param name="pValue1">#</xsl:with-param>
+				<xsl:with-param name="pOther" select="ancestor-or-self::jw317:NieuwProduct/jw317:Product/ijw:Code" />
+				<xsl:with-param name="pValue2">*</xsl:with-param>
+				<xsl:with-param name="pRule">CD080</xsl:with-param>
+				<xsl:with-param name="pExtra" select="ancestor-or-self::jw317:NieuwProduct/jw317:Einddatum" />
+			</xsl:call-template>
+		</xsl:if>
+	</xsl:template>
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/condities/CD081.xsl b/xslt-validatie/jw/3_0/condities/CD081.xsl
new file mode 100644
index 0000000..80068ee
--- /dev/null
+++ b/xslt-validatie/jw/3_0/condities/CD081.xsl
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+	xmlns:jw301="http://www.istandaarden.nl/ijw/3_0/jw301/schema"
+	xmlns:jw315="http://www.istandaarden.nl/ijw/3_0/jw315/schema"
+	xmlns:jw317="http://www.istandaarden.nl/ijw/3_0/jw317/schema"
+	>
+
+	<!-- iJw 3.0 CD081 version 2.0.24 (2020-05-14) -->
+
+	<xsl:import href="../common/basis.xsl" />
+	<xsl:template match="*" mode="CD081" />
+	<xsl:template match="*" mode="check">
+		<xsl:apply-templates select="*" mode="CD081" />
+	</xsl:template>
+
+	<xsl:template match="jw301:ToegewezenProduct//jw301:Omvang/ijw:Eenheid" mode="CD081">
+		<xsl:if test="not(ancestor-or-self::jw301:ToegewezenProduct/jw301:Einddatum) or number(translate(ancestor-or-self::jw301:ToegewezenProduct/jw301:Einddatum/text(), '-', '')) &gt; 20201231">
+			<xsl:call-template name="checkimplication">
+				<xsl:with-param name="pValue1">14,16,83,84</xsl:with-param>
+				<xsl:with-param name="pOther" select="../ijw:Frequentie" />
+				<xsl:with-param name="pValue2">2,4,6</xsl:with-param>
+				<xsl:with-param name="pRule">CD081</xsl:with-param>
+				<xsl:with-param name="pExtra" select="ancestor-or-self::jw301:ToegewezenProduct/jw301:Einddatum" />
+			</xsl:call-template>
+		</xsl:if>
+	</xsl:template>
+
+	<xsl:template match="jw315:AangevraagdProduct//jw315:Omvang/ijw:Eenheid" mode="CD081">
+		<xsl:if test="not(ancestor-or-self::jw315:AangevraagdProduct/jw315:ToewijzingEinddatum) or number(translate(ancestor-or-self::jw315:AangevraagdProduct/jw315:ToewijzingEinddatum/text(), '-', '')) &gt; 20201231">
+			<xsl:call-template name="checkimplication">
+				<xsl:with-param name="pValue1">14,16,83,84</xsl:with-param>
+				<xsl:with-param name="pOther" select="../ijw:Frequentie" />
+				<xsl:with-param name="pValue2">2,4,6</xsl:with-param>
+				<xsl:with-param name="pRule">CD081</xsl:with-param>
+				<xsl:with-param name="pExtra" select="ancestor-or-self::jw315:AangevraagdProduct/jw315:ToewijzingEinddatum" />
+			</xsl:call-template>
+		</xsl:if>
+	</xsl:template>
+	
+	<xsl:template match="jw317:TeWijzigenProduct//jw317:Omvang/ijw:Eenheid" mode="CD081">
+		<xsl:if test="not(ancestor-or-self::jw317:TeWijzigenProduct/jw317:Einddatum) or number(translate(ancestor-or-self::jw317:TeWijzigenProduct/jw317:Einddatum/text(), '-', '')) &gt; 20201231">
+			<xsl:call-template name="checkimplication">
+				<xsl:with-param name="pValue1">14,16,83,84</xsl:with-param>
+				<xsl:with-param name="pOther" select="../ijw:Frequentie" />
+				<xsl:with-param name="pValue2">2,4,6</xsl:with-param>
+				<xsl:with-param name="pRule">CD081</xsl:with-param>
+				<xsl:with-param name="pExtra" select="ancestor-or-self::jw317:TeWijzigenProduct/jw317:Einddatum" />
+			</xsl:call-template>
+		</xsl:if>
+	</xsl:template>
+	<xsl:template match="jw317:NieuwProduct//jw317:Omvang/ijw:Eenheid" mode="CD081">
+		<xsl:if test="not(ancestor-or-self::jw317:NieuwProduct/jw317:Einddatum) or number(translate(ancestor-or-self::jw317:NieuwProduct/jw317:Einddatum/text(), '-', '')) &gt; 20201231">
+			<xsl:call-template name="checkimplication">
+				<xsl:with-param name="pValue1">14,16,83,84</xsl:with-param>
+				<xsl:with-param name="pOther" select="../ijw:Frequentie" />
+				<xsl:with-param name="pValue2">2,4,6</xsl:with-param>
+				<xsl:with-param name="pRule">CD081</xsl:with-param>
+				<xsl:with-param name="pExtra" select="ancestor-or-self::jw317:NieuwProduct/jw317:Einddatum" />
+			</xsl:call-template>
+		</xsl:if>
+	</xsl:template>
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/condities/CD085.xsl b/xslt-validatie/jw/3_0/condities/CD085.xsl
new file mode 100644
index 0000000..540a2f0
--- /dev/null
+++ b/xslt-validatie/jw/3_0/condities/CD085.xsl
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+	xmlns:jw319="http://www.istandaarden.nl/ijw/3_0/jw319/schema"
+	>
+
+	<!-- iJw 3.0 CD085 version 2.0.24 (2020-05-14) -->
+
+	<xsl:import href="../common/basis.xsl" />
+	<xsl:template match="*" mode="CD085" />
+	<xsl:template match="*" mode="check">
+		<xsl:apply-templates select="*" mode="CD085" />
+	</xsl:template>
+
+	<xsl:template match="jw319:VerzoekAntwoord" mode="CD085">
+		<xsl:call-template name="checkimplication">
+			<xsl:with-param name="pValue1">1</xsl:with-param>
+			<xsl:with-param name="pOther" select="../jw319:RedenAfwijzingVerzoek" />
+			<xsl:with-param name="pValue2">*</xsl:with-param>
+			<xsl:with-param name="pRule">CD085</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/condities/CD086.xsl b/xslt-validatie/jw/3_0/condities/CD086.xsl
new file mode 100644
index 0000000..696738b
--- /dev/null
+++ b/xslt-validatie/jw/3_0/condities/CD086.xsl
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+	xmlns:jw319="http://www.istandaarden.nl/ijw/3_0/jw319/schema"
+	>
+
+	<!-- iJw 3.0 CD086 version 2.0.24 (2020-05-14) -->
+
+	<xsl:import href="../common/basis.xsl" />
+	<xsl:template match="*" mode="CD086" />
+	<xsl:template match="*" mode="check">
+		<xsl:apply-templates select="*" mode="CD086" />
+	</xsl:template>
+
+	<xsl:template match="jw319:VerzoekAntwoord" mode="CD086">
+		<xsl:call-template name="checkimplication">
+			<xsl:with-param name="pValue1">2</xsl:with-param>
+			<xsl:with-param name="pOther" select="../jw319:RedenAfwijzingVerzoek" />
+			<xsl:with-param name="pValue2"></xsl:with-param>
+			<xsl:with-param name="pRule">CD086</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/condities/CD087.xsl b/xslt-validatie/jw/3_0/condities/CD087.xsl
new file mode 100644
index 0000000..c300c72
--- /dev/null
+++ b/xslt-validatie/jw/3_0/condities/CD087.xsl
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+	xmlns:jw323="http://www.istandaarden.nl/ijw/3_0/jw323/schema"
+	>
+
+	<!-- iJw 3.0 CD087 version 2.0.24 (2020-05-14) -->
+
+	<xsl:import href="../common/basis.xsl" />
+	<xsl:template match="*" mode="CD087" />
+	<xsl:template match="*" mode="check">
+		<xsl:apply-templates select="*" mode="CD087" />
+	</xsl:template>
+
+	<xsl:template match="jw323:Eenheid" mode="CD087">
+		<xsl:call-template name="checksame">
+			<xsl:with-param name="pValue1">!83</xsl:with-param>
+			<xsl:with-param name="pOther" select="../jw323:ProductTarief" />
+			<xsl:with-param name="pValue2">*</xsl:with-param>
+			<xsl:with-param name="pRule">CD087</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/condities/CD088.xsl b/xslt-validatie/jw/3_0/condities/CD088.xsl
new file mode 100644
index 0000000..e29b1df
--- /dev/null
+++ b/xslt-validatie/jw/3_0/condities/CD088.xsl
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+	xmlns:jw319="http://www.istandaarden.nl/ijw/3_0/jw319/schema"
+	>
+
+	<!-- iJw 3.0 CD088 version 2.0.24 (2020-05-14) -->
+
+	<xsl:import href="../common/basis.xsl" />
+	<xsl:template match="*" mode="CD088" />
+	<xsl:template match="*" mode="check">
+		<xsl:apply-templates select="*" mode="CD088" />
+	</xsl:template>
+
+	<xsl:template match="jw319:RedenAfwijzingVerzoek" mode="CD088">
+		<xsl:call-template name="checkimplication">
+			<xsl:with-param name="pValue1">!8</xsl:with-param>
+			<xsl:with-param name="pOther" select="../jw319:Woonplaatsbeginsel" />
+			<xsl:with-param name="pValue2">!#</xsl:with-param>
+			<xsl:with-param name="pRule">CD088</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/constraints/CS002.xsl b/xslt-validatie/jw/3_0/constraints/CS002.xsl
new file mode 100644
index 0000000..ffc39fe
--- /dev/null
+++ b/xslt-validatie/jw/3_0/constraints/CS002.xsl
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+>
+
+    <!-- iJw 3.0 CS002 version 2.0.24 (2020-05-14) -->
+
+    <xsl:import href="../common/basis.xsl"/>
+    <xsl:template match="*" mode="CS002"/>
+    <xsl:template match="*" mode="check">
+        <xsl:apply-templates select="*" mode="CS002"/>
+    </xsl:template>
+
+    <xsl:template match="*[local-name() = 'Bsn']" mode="CS002">
+        <xsl:call-template name="check11proef">
+            <xsl:with-param name="pRule">CS002</xsl:with-param>
+        </xsl:call-template>
+    </xsl:template>
+
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/constraints/CS003.xsl b/xslt-validatie/jw/3_0/constraints/CS003.xsl
new file mode 100644
index 0000000..cbbdcc1
--- /dev/null
+++ b/xslt-validatie/jw/3_0/constraints/CS003.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+                xmlns:jw301="http://www.istandaarden.nl/ijw/3_0/jw301/schema"
+                xmlns:jw315="http://www.istandaarden.nl/ijw/3_0/jw315/schema"
+                >
+
+    <!-- iJw 3.0 CS003 version 2.0.24 (2020-05-14) -->
+
+    <xsl:import href="../common/basis.xsl"/>
+    <xsl:template match="*" mode="CS003"/>
+    <xsl:template match="*" mode="check">
+        <xsl:apply-templates select="*" mode="CS003"/>
+    </xsl:template>
+
+    <xsl:template match="jw301:Beschikking/jw301:Einddatum" mode="CS003">
+        <xsl:call-template name="checkafter">
+            <xsl:with-param name="pOther" select="../jw301:Ingangsdatum"/>
+            <xsl:with-param name="pRule">CS003</xsl:with-param>
+        </xsl:call-template>
+    </xsl:template>
+
+    <xsl:template match="jw301:ToegewezenProduct/jw301:Einddatum" mode="CS003">
+        <xsl:call-template name="checkafter">
+            <xsl:with-param name="pOther" select="../jw301:Ingangsdatum"/>
+            <xsl:with-param name="pRule">CS003</xsl:with-param>
+        </xsl:call-template>
+    </xsl:template>
+
+    <xsl:template match="jw301:Contact/jw301:Periode/ijw:Einddatum" mode="CS003">
+        <xsl:call-template name="checkafter">
+            <xsl:with-param name="pOther" select="../ijw:Begindatum"/>
+            <xsl:with-param name="pRule">CS003</xsl:with-param>
+        </xsl:call-template>
+    </xsl:template>
+    
+   <xsl:template match="jw315:AangevraagdProduct/jw315:ToewijzingEinddatum" mode="CS003">
+        <xsl:call-template name="checkafter">
+            <xsl:with-param name="pOther" select="../jw315:ToewijzingIngangsdatum"/>
+            <xsl:with-param name="pRule">CS003</xsl:with-param>
+        </xsl:call-template>
+    </xsl:template>
+    
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/constraints/CS023.xsl b/xslt-validatie/jw/3_0/constraints/CS023.xsl
new file mode 100644
index 0000000..fd4aa2b
--- /dev/null
+++ b/xslt-validatie/jw/3_0/constraints/CS023.xsl
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+                xmlns:jw301="http://www.istandaarden.nl/ijw/3_0/jw301/schema"
+                xmlns:jw303="http://www.istandaarden.nl/ijw/3_0/jw303/schema"
+                xmlns:jw304="http://www.istandaarden.nl/ijw/3_0/jw304/schema"
+                xmlns:jw305="http://www.istandaarden.nl/ijw/3_0/jw305/schema"
+                xmlns:jw307="http://www.istandaarden.nl/ijw/3_0/jw307/schema"
+                xmlns:jw315="http://www.istandaarden.nl/ijw/3_0/jw315/schema"
+                xmlns:jw323="http://www.istandaarden.nl/ijw/3_0/jw323/schema"
+                xmlns:jw325="http://www.istandaarden.nl/ijw/3_0/jw325/schema"
+                >
+
+    <!-- iJw 3.0 CS023 version 2.0.24 (2020-05-14) -->
+
+    <xsl:import href="../common/basis.xsl"/>
+    <xsl:template match="*" mode="CS023"/>
+    <xsl:template match="*" mode="check">
+        <xsl:apply-templates select="*" mode="CS023"/>
+    </xsl:template>
+
+    <xsl:template match="jw301:Beschikking/jw301:Afgiftedatum" mode="CS023">
+        <xsl:call-template name="cs023"/>
+    </xsl:template>
+
+    <xsl:template match="jw301:Client/jw301:Geboortedatum/ijw:Datum" mode="CS023">
+        <xsl:call-template name="cs023"/>
+    </xsl:template>
+
+    <xsl:template match="jw301:Relatie/jw301:Geboortedatum/ijw:Datum" mode="CS023">
+        <xsl:call-template name="cs023"/>
+    </xsl:template>
+
+    <xsl:template match="jw301:ToegewezenProduct/jw301:Toewijzingsdatum" mode="CS023">
+        <xsl:call-template name="cs023"/>
+    </xsl:template>
+
+    <xsl:template match="ijw:DeclaratiePeriode/ijw:Begindatum" mode="CS023">
+        <xsl:call-template name="cs023declaratie"/>
+    </xsl:template>
+
+    <!---->
+
+    <xsl:template match="jw303:Client/jw303:Geboortedatum/ijw:Datum" mode="CS023">
+        <xsl:call-template name="cs023declaratie"/>
+    </xsl:template>
+
+    <xsl:template match="jw303:DeclaratieFactuurIdentificatie/ijw:DeclaratiePeriode/ijw:Begindatum" mode="CS023">
+        <xsl:call-template name="cs023declaratie"/>
+    </xsl:template>
+
+    <xsl:template match="jw303:Prestatie/jw303:ProductPeriode/ijw:Begindatum" mode="CS023">
+        <xsl:call-template name="cs023declaratie"/>
+    </xsl:template>
+
+    <!---->
+
+    <xsl:template match="jw304:Client/jw304:Geboortedatum/ijw:Datum" mode="CS023">
+        <xsl:call-template name="cs023declaratie"/>
+    </xsl:template>
+    
+    <xsl:template match="jw304:DeclaratieFactuurIdentificatie/ijw:DeclaratiePeriode/ijw:Begindatum" mode="CS023">
+        <xsl:call-template name="cs023declaratie"/>
+    </xsl:template>
+
+    <xsl:template match="jw304:Prestatie/jw304:ProductPeriode/ijw:Begindatum" mode="CS023">
+        <xsl:call-template name="cs023declaratie"/>
+    </xsl:template>
+
+    <!---->
+
+    <xsl:template match="jw305:Client/jw305:Geboortedatum/ijw:Datum" mode="CS023">
+        <xsl:call-template name="cs023"/>
+    </xsl:template>
+
+    <xsl:template match="jw307:Client/jw307:Geboortedatum/ijw:Datum" mode="CS023">
+        <xsl:call-template name="cs023"/>
+    </xsl:template>
+
+    <xsl:template match="jw307:StopProduct/jw307:Einddatum" mode="CS023">
+        <xsl:call-template name="cs023"/>
+    </xsl:template>
+
+    <xsl:template match="jw315:Client/jw315:Geboortedatum/ijw:Datum" mode="CS023">
+        <xsl:call-template name="cs023"/>
+    </xsl:template>
+
+    <xsl:template match="jw323:DeclaratiePeriode/ijw:Begindatum" mode="CS023">
+        <xsl:call-template name="cs023"/>
+    </xsl:template>
+
+    <xsl:template match="jw323:ProductPeriode/ijw:Begindatum" mode="CS023">
+        <xsl:call-template name="cs023"/>
+    </xsl:template>
+
+    <xsl:template match="jw325:ProductPeriode/ijw:Begindatum" mode="CS023">
+        <xsl:call-template name="cs023"/>
+    </xsl:template>
+
+    <xsl:template name="cs023">
+        <xsl:param name="pThis" select="."/>
+        <xsl:call-template name="checkafter">
+            <xsl:with-param name="pThis"
+                            select="ancestor-or-self::*[local-name() = 'Bericht']/*[local-name() = 'Header']/*[local-name() = 'BerichtIdentificatie']/*[local-name() = 'Dagtekening']"/>
+            <xsl:with-param name="pOther" select="$pThis"/>
+            <xsl:with-param name="pRule">CS023</xsl:with-param>
+        </xsl:call-template>
+    </xsl:template>
+
+    <xsl:template name="cs023declaratie">
+        <xsl:param name="pThis" select="."/>
+        <xsl:call-template name="checkafter">
+            <xsl:with-param name="pThis"
+                            select="ancestor-or-self::*[local-name() = 'Bericht']/*[local-name() = 'Header']/*[local-name() = 'DeclaratieFactuurIdentificatie']/*[local-name() = 'FactuurDagtekening']"/>
+            <xsl:with-param name="pOther" select="$pThis"/>
+            <xsl:with-param name="pRule">CS023</xsl:with-param>
+        </xsl:call-template>
+    </xsl:template>
+
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/constraints/CS050.xsl b/xslt-validatie/jw/3_0/constraints/CS050.xsl
new file mode 100644
index 0000000..cc6dc3e
--- /dev/null
+++ b/xslt-validatie/jw/3_0/constraints/CS050.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+	xmlns:jw301="http://www.istandaarden.nl/ijw/3_0/jw301/schema"
+	xmlns:jw303="http://www.istandaarden.nl/ijw/3_0/jw303/schema"
+	xmlns:jw304="http://www.istandaarden.nl/ijw/3_0/jw304/schema"
+	xmlns:jw305="http://www.istandaarden.nl/ijw/3_0/jw305/schema"
+	xmlns:jw307="http://www.istandaarden.nl/ijw/3_0/jw307/schema"
+	xmlns:jw315="http://www.istandaarden.nl/ijw/3_0/jw315/schema"
+	>
+	<!-- iJw 3.0 CS050 version 2.0.24 (2020-05-14) -->
+
+	<xsl:import href="../common/basis.xsl"/>
+	<xsl:template match="*" mode="CS050"/>
+	<xsl:template match="*" mode="check">
+		<xsl:apply-templates select="*" mode="CS050"/>
+	</xsl:template>
+
+	<xsl:template match="ijw:NaamGebruik" mode="CS050">
+		<xsl:if test="not (ancestor-or-self::jw304:Bericht)">
+			<xsl:call-template name="checkimplication">
+				<xsl:with-param name="pThis" select="../ijw:Partnernaam"/>
+				<xsl:with-param name="pValue1">#</xsl:with-param>
+				<xsl:with-param name="pOther" select="."/>
+				<xsl:with-param name="pValue2">1,2,3,4</xsl:with-param>
+				<xsl:with-param name="pRule">CS050</xsl:with-param>
+			</xsl:call-template>
+			<xsl:call-template name="checkimplication">
+				<xsl:with-param name="pThis" select="../ijw:Partnernaam"/>
+				<xsl:with-param name="pValue1">!#</xsl:with-param>
+				<xsl:with-param name="pOther" select="."/>
+				<xsl:with-param name="pValue2">1,6</xsl:with-param>
+				<xsl:with-param name="pRule">CS050</xsl:with-param>
+			</xsl:call-template>
+		</xsl:if>
+	</xsl:template>
+
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/constraints/CS058.xsl b/xslt-validatie/jw/3_0/constraints/CS058.xsl
new file mode 100644
index 0000000..b3deeeb
--- /dev/null
+++ b/xslt-validatie/jw/3_0/constraints/CS058.xsl
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+                xmlns:jw305="http://www.istandaarden.nl/ijw/3_0/jw305/schema"
+                xmlns:jw307="http://www.istandaarden.nl/ijw/3_0/jw307/schema"
+                >
+
+    <!-- iJw 3.0 CS058 version 2.0.24 (2020-05-14) -->
+
+    <xsl:import href="../common/basis.xsl"/>
+    <xsl:template match="*" mode="CS058"/>
+    <xsl:template match="*" mode="check">
+        <xsl:apply-templates select="*" mode="CS058"/>
+    </xsl:template>
+
+    <xsl:template match="jw305:StartProduct/jw305:StatusAanlevering" mode="CS058">
+        <xsl:call-template name="checkvalue">
+            <xsl:with-param name="pValues">1,3</xsl:with-param>
+            <xsl:with-param name="pRule">CS058</xsl:with-param>
+        </xsl:call-template>
+    </xsl:template>
+    
+    <xsl:template match="jw307:StopProduct/jw307:StatusAanlevering" mode="CS058">
+        <xsl:call-template name="checkvalue">
+            <xsl:with-param name="pValues">1,3</xsl:with-param>
+            <xsl:with-param name="pRule">CS058</xsl:with-param>
+        </xsl:call-template>
+    </xsl:template>
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/constraints/CS089.xsl b/xslt-validatie/jw/3_0/constraints/CS089.xsl
new file mode 100644
index 0000000..3a77fd8
--- /dev/null
+++ b/xslt-validatie/jw/3_0/constraints/CS089.xsl
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+	xmlns:jw301="http://www.istandaarden.nl/ijw/3_0/jw301/schema"
+	xmlns:jw303="http://www.istandaarden.nl/ijw/3_0/jw303/schema"
+	xmlns:jw304="http://www.istandaarden.nl/ijw/3_0/jw304/schema"
+	xmlns:jw305="http://www.istandaarden.nl/ijw/3_0/jw305/schema"
+	xmlns:jw307="http://www.istandaarden.nl/ijw/3_0/jw307/schema"
+	xmlns:jw315="http://www.istandaarden.nl/ijw/3_0/jw315/schema"
+	>
+
+	<!-- iJw 3.0 CS089 version 2.0.24 (2020-05-14) -->
+
+	<xsl:import href="../common/basis.xsl"/>
+	<xsl:template match="*" mode="CS089"/>
+	<xsl:template match="*" mode="check">
+		<xsl:apply-templates select="*" mode="CS089"/>
+	</xsl:template>
+
+	<xsl:template match="ijw:LandCode" mode="CS089">
+		<xsl:if test="not (ancestor-or-self::jw304:Bericht)">
+			<xsl:call-template name="checkimplication">
+				<xsl:with-param name="pValue1">NL</xsl:with-param>
+				<xsl:with-param name="pOther" select="../ijw:Postcode"/>
+				<xsl:with-param name="pValue2">#1000ZZ</xsl:with-param>
+				<xsl:with-param name="pRule">CS089</xsl:with-param>
+			</xsl:call-template>
+		</xsl:if>
+	</xsl:template>
+
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/constraints/CS100.xsl b/xslt-validatie/jw/3_0/constraints/CS100.xsl
new file mode 100644
index 0000000..2c83548
--- /dev/null
+++ b/xslt-validatie/jw/3_0/constraints/CS100.xsl
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+	xmlns:jw323="http://www.istandaarden.nl/ijw/3_0/jw323/schema"
+	>
+
+	<!-- iJw 3.0 CS100 version 2.0.24 (2020-05-14) -->
+
+	<xsl:import href="../common/basis.xsl"/>
+	<xsl:template match="*" mode="CS100"/>
+	<xsl:template match="*" mode="check">
+		<xsl:apply-templates select="*" mode="CS100"/>
+	</xsl:template>
+
+	<xsl:template match="jw323:ProductPeriode/ijw:Begindatum" mode="CS100">
+		<xsl:if test="translate(text(), '-', '') &lt; 20210101">
+			<xsl:call-template name="addError">
+				<xsl:with-param name="pRule">CS100</xsl:with-param>
+			</xsl:call-template>
+		</xsl:if>
+	</xsl:template>
+
+	<xsl:template match="jw323:DeclaratiePeriode/ijw:Begindatum" mode="CS100">
+		<xsl:if test="translate(text(), '-', '') &lt; 20210101">
+			<xsl:call-template name="addError">
+				<xsl:with-param name="pRule">CS100</xsl:with-param>
+			</xsl:call-template>
+		</xsl:if>
+	</xsl:template>
+
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/constraints/CS102.xsl b/xslt-validatie/jw/3_0/constraints/CS102.xsl
new file mode 100644
index 0000000..e556b49
--- /dev/null
+++ b/xslt-validatie/jw/3_0/constraints/CS102.xsl
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:jw317="http://www.istandaarden.nl/ijw/3_0/jw317/schema"
+                >
+
+    <!-- iJw 3.0 CS102 version 2.0.24 (2020-05-14) -->
+
+    <xsl:import href="../common/basis.xsl"/>
+    <xsl:template match="*" mode="CS102"/>
+    <xsl:template match="*" mode="check">
+        <xsl:apply-templates select="*" mode="CS102"/>
+    </xsl:template>
+
+    <xsl:template match="jw317:NieuwProduct/jw317:GewensteIngangsdatum" mode="CS102">
+        <xsl:call-template name="checkafterstrict">
+            <xsl:with-param name="pOther"
+                            select="ancestor-or-self::*[local-name() = 'Bericht']/*[local-name() = 'Header']/*[local-name() = 'BerichtIdentificatie']/*[local-name() = 'Dagtekening']"/>
+            <xsl:with-param name="pRule">CS102</xsl:with-param>
+        </xsl:call-template>
+    </xsl:template>
+
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/constraints/CS103.xsl b/xslt-validatie/jw/3_0/constraints/CS103.xsl
new file mode 100644
index 0000000..bee964c
--- /dev/null
+++ b/xslt-validatie/jw/3_0/constraints/CS103.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+	xmlns:jw303="http://www.istandaarden.nl/ijw/3_0/jw303/schema"
+	xmlns:jw304="http://www.istandaarden.nl/ijw/3_0/jw304/schema"
+	>
+
+	<!-- iJw 3.0 CS103 version 2.0.24 (2020-05-14) -->
+
+	<xsl:import href="../common/basis.xsl"/>
+	<xsl:template match="*" mode="CS103"/>
+	<xsl:template match="*" mode="check">
+		<xsl:apply-templates select="*" mode="CS103"/>
+	</xsl:template>
+
+	<xsl:template match="jw303:DeclaratieFactuurIdentificatie/ijw:DeclaratiePeriode" mode="CS103">
+		<xsl:if test="translate(ijw:Einddatum/text(), '-', '') &gt;= 20210101">
+			<xsl:call-template name="addError">
+				<xsl:with-param name="pRule">CS103</xsl:with-param>
+			</xsl:call-template>
+		</xsl:if>
+	</xsl:template>
+	<xsl:template match="jw303:ProductPeriode" mode="CS103">
+		<xsl:if test="translate(ijw:Einddatum/text(), '-', '') &gt;= 20210101">
+			<xsl:call-template name="addError">
+				<xsl:with-param name="pRule">CS103</xsl:with-param>
+			</xsl:call-template>
+		</xsl:if>
+	</xsl:template>
+	<xsl:template match="jw304:ProductPeriode" mode="CS103">
+		<xsl:if test="translate(ijw:Einddatum/text(), '-', '') &gt;= 20210101">
+			<xsl:call-template name="addError">
+				<xsl:with-param name="pRule">CS103</xsl:with-param>
+			</xsl:call-template>
+		</xsl:if>
+	</xsl:template>
+
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/constraints/CS104.xsl b/xslt-validatie/jw/3_0/constraints/CS104.xsl
new file mode 100644
index 0000000..c8b2ea2
--- /dev/null
+++ b/xslt-validatie/jw/3_0/constraints/CS104.xsl
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+	xmlns:jw301="http://www.istandaarden.nl/ijw/3_0/jw301/schema"
+	xmlns:jw315="http://www.istandaarden.nl/ijw/3_0/jw315/schema"
+	xmlns:jw317="http://www.istandaarden.nl/ijw/3_0/jw317/schema"
+	>
+
+	<!-- iJw 3.0 CS104 version 2.0.24 (2020-05-14) -->
+
+	<xsl:import href="../common/basis.xsl" />
+	<xsl:template match="*" mode="CS104" />
+	<xsl:template match="*" mode="check">
+		<xsl:apply-templates select="*" mode="CS104" />
+	</xsl:template>
+
+	<xsl:template match="jw301:ToegewezenProduct//jw301:Omvang/ijw:Frequentie" mode="CS104">
+		<xsl:if test="not(ancestor-or-self::jw301:ToegewezenProduct/jw301:Einddatum) or number(translate(ancestor-or-self::jw301:ToegewezenProduct/jw301:Einddatum/text(), '-', '')) &gt; 20201231">
+			<xsl:call-template name="checkvalue">
+				<xsl:with-param name="pValues">!3,5</xsl:with-param>
+				<xsl:with-param name="pExtra" select="ancestor-or-self::jw301:ToegewezenProduct/jw301:Einddatum" />
+				<xsl:with-param name="pRule">CS104</xsl:with-param>
+			</xsl:call-template>
+		</xsl:if>
+	</xsl:template>
+
+	<xsl:template match="jw315:AangevraagdProduct//jw315:Omvang/ijw:Frequentie" mode="CS104">
+		<xsl:if test="not(ancestor-or-self::jw315:AangevraagdProduct/jw315:ToewijzingEinddatum) or number(translate(ancestor-or-self::jw315:AangevraagdProduct/jw315:ToewijzingEinddatum/text(), '-', '')) &gt; 20201231">
+			<xsl:call-template name="checkvalue">
+				<xsl:with-param name="pValues">!3,5</xsl:with-param>
+				<xsl:with-param name="pExtra" select="ancestor-or-self::jw315:AangevraagdProduct/jw315:ToewijzingEinddatum" />
+				<xsl:with-param name="pRule">CS104</xsl:with-param>
+			</xsl:call-template>
+		</xsl:if>
+	</xsl:template>
+	
+	<xsl:template match="jw317:TeWijzigenProduct//jw317:Omvang/ijw:Frequentie" mode="CS104">
+		<xsl:if test="not(ancestor-or-self::jw317:TeWijzigenProduct/jw317:Einddatum) or number(translate(ancestor-or-self::jw317:TeWijzigenProduct/jw317:Einddatum/text(), '-', '')) &gt; 20201231">
+			<xsl:call-template name="checkvalue">
+				<xsl:with-param name="pValues">!3,5</xsl:with-param>
+				<xsl:with-param name="pExtra" select="ancestor-or-self::jw317:TeWijzigenProduct/jw317:Einddatum" />
+				<xsl:with-param name="pRule">CS104</xsl:with-param>
+			</xsl:call-template>
+		</xsl:if>
+	</xsl:template>
+	<xsl:template match="jw317:NieuwProduct//jw317:Omvang/ijw:Frequentie" mode="CS104">
+		<xsl:if test="not(ancestor-or-self::jw317:NieuwProduct/jw317:Einddatum) or number(translate(ancestor-or-self::jw317:NieuwProduct/jw317:Einddatum/text(), '-', '')) &gt; 20201231">
+			<xsl:call-template name="checkvalue">
+				<xsl:with-param name="pValues">!3,5</xsl:with-param>
+				<xsl:with-param name="pExtra" select="ancestor-or-self::jw317:NieuwProduct/jw317:Einddatum" />
+				<xsl:with-param name="pRule">CS104</xsl:with-param>
+			</xsl:call-template>
+		</xsl:if>
+	</xsl:template>
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/constraints/CS108.xsl b/xslt-validatie/jw/3_0/constraints/CS108.xsl
new file mode 100644
index 0000000..007b66c
--- /dev/null
+++ b/xslt-validatie/jw/3_0/constraints/CS108.xsl
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+	xmlns:jw303="http://www.istandaarden.nl/ijw/3_0/jw303/schema"
+	xmlns:jw304="http://www.istandaarden.nl/ijw/3_0/jw304/schema"
+	xmlns:jw323="http://www.istandaarden.nl/ijw/3_0/jw323/schema"
+	xmlns:jw325="http://www.istandaarden.nl/ijw/3_0/jw325/schema"
+	>
+
+	<!-- iJw 3.0 CS108 version 2.0.24 (2020-05-14) -->
+
+	<xsl:import href="../common/basis.xsl"/>
+	<xsl:template match="*" mode="CS108"/>
+	<xsl:template match="*" mode="check">
+		<xsl:apply-templates select="*" mode="CS108"/>
+	</xsl:template>
+
+	<xsl:template match="jw303:DeclaratieFactuurIdentificatie/ijw:DeclaratiePeriode" mode="CS108">
+		<xsl:call-template name="cs108"/>
+	</xsl:template>
+
+	<xsl:template match="jw303:ProductPeriode" mode="CS108">
+		<xsl:call-template name="cs108"/>
+	</xsl:template>
+
+	<xsl:template match="jw304:DeclaratieFactuurIdentificatie/ijw:DeclaratiePeriode" mode="CS108">
+		<xsl:call-template name="cs108"/>
+	</xsl:template>
+
+	<xsl:template match="jw304:ProductPeriode" mode="CS108">
+		<xsl:call-template name="cs108"/>
+	</xsl:template>
+	
+	<xsl:template match="jw323:DeclaratiePeriode" mode="CS108">
+		<xsl:call-template name="cs108"/>
+	</xsl:template>
+
+	<xsl:template match="jw323:ProductPeriode" mode="CS108">
+		<xsl:call-template name="cs108"/>
+	</xsl:template>
+
+	<xsl:template match="jw325:ProductPeriode" mode="CS108">
+		<xsl:call-template name="cs108"/>
+	</xsl:template>
+
+	<xsl:template name="cs108">
+		<xsl:call-template name="checkafter">
+			<xsl:with-param name="pThis" select="ijw:Einddatum" />
+			<xsl:with-param name="pOther" select="ijw:Begindatum"/>
+			<xsl:with-param name="pRule">CS108</xsl:with-param>
+		</xsl:call-template>
+		<xsl:call-template name="checkafter">
+			<xsl:with-param name="pThis"
+				select="ancestor-or-self::*[local-name() = 'Bericht']/*[local-name() = 'Header']/*[local-name() = 'DeclaratieFactuurIdentificatie']/*[local-name() = 'FactuurDagtekening'] |
+				ancestor-or-self::*[local-name() = 'Bericht']/*[local-name() = 'Header']/*[local-name() = 'BerichtIdentificatie']/*[local-name() = 'Dagtekening']"/>
+			<xsl:with-param name="pOther" select="ijw:Einddatum"/>
+			<xsl:with-param name="pRule">CS108</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/constraints/CS300.xsl b/xslt-validatie/jw/3_0/constraints/CS300.xsl
new file mode 100644
index 0000000..916e10f
--- /dev/null
+++ b/xslt-validatie/jw/3_0/constraints/CS300.xsl
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+	xmlns:jw301="http://www.istandaarden.nl/ijw/3_0/jw301/schema"
+	xmlns:jw303="http://www.istandaarden.nl/ijw/3_0/jw303/schema"
+	xmlns:jw304="http://www.istandaarden.nl/ijw/3_0/jw304/schema"
+	xmlns:jw305="http://www.istandaarden.nl/ijw/3_0/jw305/schema"
+	xmlns:jw307="http://www.istandaarden.nl/ijw/3_0/jw307/schema"
+	xmlns:jw315="http://www.istandaarden.nl/ijw/3_0/jw315/schema"
+	xmlns:jw317="http://www.istandaarden.nl/ijw/3_0/jw317/schema"
+	xmlns:jw319="http://www.istandaarden.nl/ijw/3_0/jw319/schema"
+	xmlns:jw323="http://www.istandaarden.nl/ijw/3_0/jw323/schema"
+	xmlns:jw325="http://www.istandaarden.nl/ijw/3_0/jw325/schema"
+	>
+	<!-- iJw 3.0 CS300 version 2.0.24 (2020-05-14) -->
+
+	<xsl:import href="../common/basis.xsl" />
+	<xsl:template match="*" mode="CS300" />
+	<xsl:template match="*" mode="check">
+		<xsl:apply-templates select="*" mode="CS300"/>
+	</xsl:template>
+	
+	<xsl:template match="jw301:Afzender" mode="CS300">
+		<xsl:call-template name="checkGemeenteCode">
+			<xsl:with-param name="pRule">CS300</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+	<xsl:template match="jw303:Gemeente" mode="CS300">
+		<xsl:call-template name="checkGemeenteCode">
+			<xsl:with-param name="pRule">CS300</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+	<xsl:template match="jw304:Gemeente" mode="CS300">
+		<xsl:call-template name="checkGemeenteCode">
+			<xsl:with-param name="pRule">CS300</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+	<xsl:template match="jw305:Ontvanger" mode="CS300">
+		<xsl:call-template name="checkGemeenteCode">
+			<xsl:with-param name="pRule">CS300</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+	<xsl:template match="jw307:Ontvanger" mode="CS300">
+		<xsl:call-template name="checkGemeenteCode">
+			<xsl:with-param name="pRule">CS300</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+	<xsl:template match="jw315:Ontvanger" mode="CS300">
+		<xsl:call-template name="checkGemeenteCode">
+			<xsl:with-param name="pRule">CS300</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+	<xsl:template match="jw317:Ontvanger" mode="CS300">
+		<xsl:call-template name="checkGemeenteCode">
+			<xsl:with-param name="pRule">CS300</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+	<xsl:template match="jw319:Afzender" mode="CS300">
+		<xsl:call-template name="checkGemeenteCode">
+			<xsl:with-param name="pRule">CS300</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+	<xsl:template match="jw319:Gemeente" mode="CS300">
+		<xsl:call-template name="checkGemeenteCode">
+			<xsl:with-param name="pRule">CS300</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+	<xsl:template match="jw323:Ontvanger" mode="CS300">
+		<xsl:call-template name="checkGemeenteCode">
+			<xsl:with-param name="pRule">CS300</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+	<xsl:template match="jw325:Afzender" mode="CS300">
+		<xsl:call-template name="checkGemeenteCode">
+			<xsl:with-param name="pRule">CS300</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+	
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/constraints/CS318.xsl b/xslt-validatie/jw/3_0/constraints/CS318.xsl
new file mode 100644
index 0000000..0ca08c8
--- /dev/null
+++ b/xslt-validatie/jw/3_0/constraints/CS318.xsl
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+	xmlns:jw301="http://www.istandaarden.nl/ijw/3_0/jw301/schema">
+	<!-- iJw 3.0 CS318 version 2.0.24 (2020-05-14) -->
+
+	<xsl:import href="../common/basis.xsl" />
+	<xsl:template match="*" mode="CS318" />
+	<xsl:template match="*" mode="check">
+		<xsl:apply-templates select="*" mode="CS318"/>
+	</xsl:template>
+
+	<xsl:template match="jw301:Client/jw301:Naam/ijw:NaamGebruik" mode="CS318">
+		<xsl:call-template name="checknvalue">
+			<xsl:with-param name="pValues">6</xsl:with-param>
+			<xsl:with-param name="pRule">CS318</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+	
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/constraints/CS323.xsl b/xslt-validatie/jw/3_0/constraints/CS323.xsl
new file mode 100644
index 0000000..62fbb87
--- /dev/null
+++ b/xslt-validatie/jw/3_0/constraints/CS323.xsl
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+				xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema">
+
+	<!-- ijw 2.4 CS323 version 2.0.24 (2020-05-14) -->
+
+	<xsl:import href="../common/basis.xsl"/>
+	<xsl:template match="*" mode="CS323"/>
+	<xsl:template match="*" mode="check">
+		<xsl:apply-templates select="*" mode="CS323"/>
+	</xsl:template>
+
+	<xsl:template match="ijw:DeclaratieFactuurBedrag/ijw:Bedrag" mode="CS323">
+		<xsl:call-template name="checkRelation">
+			<xsl:with-param name="pOther" select="../../ijw:BerekendBedrag/ijw:Bedrag"/>
+			<xsl:with-param name="pRelation">equalsLt</xsl:with-param>
+			<xsl:with-param name="pRule" >
+				CS323
+			</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/constraints/CS324.xsl b/xslt-validatie/jw/3_0/constraints/CS324.xsl
new file mode 100644
index 0000000..c28a197
--- /dev/null
+++ b/xslt-validatie/jw/3_0/constraints/CS324.xsl
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+	xmlns:jw304="http://www.istandaarden.nl/ijw/3_0/jw304/schema"
+	>
+
+	<!-- iJw 3.0 CS324 version 2.0.24 (2020-05-14) -->
+
+	<xsl:import href="../common/basis.xsl"/>
+	<xsl:template match="*" mode="CS324"/>
+	<xsl:template match="*" mode="check">
+		<xsl:apply-templates select="*" mode="CS324"/>
+	</xsl:template>
+
+	<xsl:template match="jw304:DeclaratieFactuurIdentificatie/ijw:FactuurDagtekening" mode="CS324">
+		<xsl:call-template name="checkafter">
+			<xsl:with-param name="pThis" select="../../jw304:RetourHeader/ijw:RetourDagtekening"/>
+			<xsl:with-param name="pRule">CS324</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/constraints/CS325.xsl b/xslt-validatie/jw/3_0/constraints/CS325.xsl
new file mode 100644
index 0000000..355b3e9
--- /dev/null
+++ b/xslt-validatie/jw/3_0/constraints/CS325.xsl
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+				xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+				xmlns:jw303="http://www.istandaarden.nl/ijw/3_0/jw303/schema"
+				xmlns:jw304="http://www.istandaarden.nl/ijw/3_0/jw304/schema"
+				xmlns:jw323="http://www.istandaarden.nl/ijw/3_0/jw323/schema"
+				xmlns:jw325="http://www.istandaarden.nl/ijw/3_0/jw325/schema"
+>
+	<!-- ijw 2.4 CS325 version 2.0.24 (2020-05-14) -->
+
+	<xsl:import href="../common/basis.xsl"/>
+	<xsl:template match="*" mode="CS325"/>
+	<xsl:template match="*" mode="check">
+		<xsl:apply-templates select="*" mode="CS325"/>
+	</xsl:template>
+
+	<xsl:template match="*[local-name() = 'DeclaratieFactuurTotaalBedrag']" mode="CS325">
+		<xsl:call-template name="cs325">
+			<xsl:with-param name="bedrag" select="ijw:TotaalBedrag"/>
+		</xsl:call-template>
+	</xsl:template>
+
+	<xsl:template match="*[local-name() = 'BtwTotaalBedrag']" mode="CS325">
+		<xsl:call-template name="cs325">
+			<xsl:with-param name="bedrag" select="ijw:TotaalBedrag"/>
+		</xsl:call-template>
+	</xsl:template>
+
+	<xsl:template match="*[local-name() = 'BerekendBedrag']" mode="CS325">
+		<xsl:call-template name="cs325">
+			<xsl:with-param name="bedrag" select="ijw:Bedrag"/>
+		</xsl:call-template>
+	</xsl:template>
+
+	<xsl:template match="*[local-name() = 'BtwBedrag']" mode="CS325">
+		<xsl:call-template name="cs325">
+			<xsl:with-param name="bedrag" select="ijw:Bedrag"/>
+		</xsl:call-template>
+	</xsl:template>
+
+	<xsl:template match="*[local-name() = 'DeclaratieFactuurBedrag']" mode="CS325">
+		<xsl:call-template name="cs325">
+			<xsl:with-param name="bedrag" select="ijw:Bedrag"/>
+		</xsl:call-template>
+	</xsl:template>
+
+	<xsl:template match="*[local-name() = 'IngediendTotaalBedrag']" mode="CS325">
+		<xsl:call-template name="cs325">
+			<xsl:with-param name="bedrag" select="ijw:TotaalBedrag"/>
+		</xsl:call-template>
+	</xsl:template>
+
+	<xsl:template match="*[local-name() = 'ToegekendTotaalBedrag']" mode="CS325">
+		<xsl:call-template name="cs325">
+			<xsl:with-param name="bedrag" select="ijw:TotaalBedrag"/>
+		</xsl:call-template>
+	</xsl:template>
+
+	<xsl:template match="*[local-name() = 'GemeenteBerekendBedrag']" mode="CS325">
+		<xsl:call-template name="cs325">
+			<xsl:with-param name="bedrag" select="ijw:Bedrag"/>
+		</xsl:call-template>
+	</xsl:template>
+
+	<xsl:template match="*[local-name() = 'ToegekendBedrag']" mode="CS325">
+		<xsl:call-template name="cs325">
+			<xsl:with-param name="bedrag" select="ijw:Bedrag"/>
+		</xsl:call-template>
+	</xsl:template>
+
+	<xsl:template match="*[local-name() = 'TotaalIngediendBedrag']" mode="CS325">
+		<xsl:call-template name="cs325">
+			<xsl:with-param name="bedrag" select="ijw:TotaalBedrag"/>
+		</xsl:call-template>
+	</xsl:template>
+
+	<xsl:template match="*[local-name() = 'IngediendBedrag']" mode="CS325">
+		<xsl:call-template name="cs325">
+			<xsl:with-param name="bedrag" select="ijw:Bedrag"/>
+		</xsl:call-template>
+	</xsl:template>
+
+	<xsl:template match="*[local-name() = 'TotaalToegekendBedrag']" mode="CS325">
+		<xsl:call-template name="cs325">
+			<xsl:with-param name="bedrag" select="ijw:TotaalBedrag"/>
+		</xsl:call-template>
+	</xsl:template>
+
+	<xsl:template name="cs325">
+		<xsl:param name="bedrag"/>
+		<xsl:param name="debetCredit" select="./ijw:DebetCredit" />
+
+		<xsl:if test="$bedrag = 0 and (normalize-space($debetCredit) = 'c' or normalize-space($debetCredit) = 'C')">
+			<xsl:call-template name="addError">
+				<xsl:with-param name="pElements" select="$bedrag | $debetCredit"/>
+				<xsl:with-param name="pRule">
+					CS325
+				</xsl:with-param>
+			</xsl:call-template>
+		</xsl:if>
+	</xsl:template>
+
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/constraints/CS327.xsl b/xslt-validatie/jw/3_0/constraints/CS327.xsl
new file mode 100644
index 0000000..2834e3e
--- /dev/null
+++ b/xslt-validatie/jw/3_0/constraints/CS327.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+	xmlns:jw303="http://www.istandaarden.nl/ijw/3_0/jw303/schema"
+	xmlns:jw304="http://www.istandaarden.nl/ijw/3_0/jw304/schema"
+	>
+
+	<!-- iJw 3.0 CS327 version 2.0.24 (2020-05-14) -->
+
+	<xsl:import href="../common/basis.xsl"/>
+	<xsl:template match="*" mode="CS327"/>
+	<xsl:template match="*" mode="check">
+		<xsl:apply-templates select="*" mode="CS327"/>
+	</xsl:template>
+
+	<xsl:template match="jw303:IngediendeBedragPrestatie/ijw:BerekendBedrag" mode="CS327">
+		<xsl:call-template name="cs327" />
+	</xsl:template>
+
+	<xsl:template match="jw303:IngediendeBedragPrestatie/ijw:BtwBedrag" mode="CS327">
+		<xsl:call-template name="cs327" />
+	</xsl:template>
+
+	<xsl:template match="jw304:IngediendeBedragPrestatie/ijw:BerekendBedrag" mode="CS327">
+		<xsl:call-template name="cs327" />
+	</xsl:template>
+
+	<xsl:template match="jw304:IngediendeBedragPrestatie/ijw:BtwBedrag" mode="CS327">
+		<xsl:call-template name="cs327" />
+	</xsl:template>
+
+	<xsl:template name="cs327">
+		<xsl:if test="not(normalize-space(ijw:DebetCredit/text()) = normalize-space(../ijw:DeclaratieFactuurBedrag/ijw:DebetCredit/text()))">
+			<xsl:call-template name="addError">
+				<xsl:with-param name="pRule">CS327</xsl:with-param>
+				<xsl:with-param name="pElements" select="ijw:DebetCredit | ../ijw:DeclaratieFactuurBedrag/ijw:DebetCredit" />
+			</xsl:call-template>
+		</xsl:if>
+	</xsl:template>
+
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/constraints/CS328.xsl b/xslt-validatie/jw/3_0/constraints/CS328.xsl
new file mode 100644
index 0000000..5a266b0
--- /dev/null
+++ b/xslt-validatie/jw/3_0/constraints/CS328.xsl
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+	xmlns:jw303="http://www.istandaarden.nl/ijw/3_0/jw303/schema"
+	xmlns:jw304="http://www.istandaarden.nl/ijw/3_0/jw304/schema"
+	>
+
+	<!-- iJw 3.0 CS328 version 2.0.24 (2020-05-14) -->
+
+	<xsl:import href="../common/basis.xsl"/>
+	<xsl:template match="*" mode="CS328"/>
+	<xsl:template match="*" mode="check">
+		<xsl:apply-templates select="*" mode="CS328"/>
+	</xsl:template>
+
+	<xsl:template match="jw303:ProductPeriode/ijw:Begindatum" mode="CS328">
+		<xsl:if test="translate(text(), '-', '') &lt; 20150101">
+			<xsl:call-template name="addError">
+				<xsl:with-param name="pRule">CS328</xsl:with-param>
+			</xsl:call-template>
+		</xsl:if>
+	</xsl:template>
+
+	<xsl:template match="jw304:ProductPeriode/ijw:Begindatum" mode="CS328">
+		<xsl:if test="translate(text(), '-', '') &lt; 20150101">
+			<xsl:call-template name="addError">
+				<xsl:with-param name="pRule">CS328</xsl:with-param>
+			</xsl:call-template>
+		</xsl:if>
+	</xsl:template>
+
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/constraints/CS330.xsl b/xslt-validatie/jw/3_0/constraints/CS330.xsl
new file mode 100644
index 0000000..e296d13
--- /dev/null
+++ b/xslt-validatie/jw/3_0/constraints/CS330.xsl
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+		    xmlns:jw301="http://www.istandaarden.nl/ijw/3_0/jw301/schema"
+		    xmlns:jw315="http://www.istandaarden.nl/ijw/3_0/jw315/schema"
+		    xmlns:jw317="http://www.istandaarden.nl/ijw/3_0/jw317/schema"
+		    xmlns:jw323="http://www.istandaarden.nl/ijw/3_0/jw323/schema"
+		    >
+
+    <!-- iJw 3.0 CS330 version 2.0.24 (2020-05-14) -->
+
+    <xsl:import href="../common/basis.xsl"/>
+    <xsl:template match="*" mode="CS330"/>
+    <xsl:template match="*" mode="check">
+        <xsl:apply-templates select="*" mode="CS330"/>
+    </xsl:template>
+
+    <xsl:template match="jw301:Omvang/ijw:Eenheid" mode="CS330">
+        <xsl:call-template name="checknvalue">
+            <xsl:with-param name="pValues">21,81</xsl:with-param>
+            <xsl:with-param name="pRule">CS330</xsl:with-param>
+        </xsl:call-template>
+    </xsl:template>
+
+    <xsl:template match="jw315:Omvang/ijw:Eenheid" mode="CS330">
+        <xsl:call-template name="checknvalue">
+            <xsl:with-param name="pValues">21,81</xsl:with-param>
+            <xsl:with-param name="pRule">CS330</xsl:with-param>
+        </xsl:call-template>
+    </xsl:template>
+
+    <xsl:template match="jw317:TeWijzigenProduct/jw317:Omvang/ijw:Eenheid | jw317:NieuwProduct/jw317:Omvang/ijw:Eenheid" mode="CS330">
+        <xsl:call-template name="checknvalue">
+            <xsl:with-param name="pValues">21,81</xsl:with-param>
+            <xsl:with-param name="pRule">CS330</xsl:with-param>
+        </xsl:call-template>
+    </xsl:template>
+
+    <xsl:template match="jw323:Prestatie/jw323:Eenheid" mode="CS330">
+        <xsl:call-template name="checknvalue">
+            <xsl:with-param name="pValues">21,81</xsl:with-param>
+            <xsl:with-param name="pRule">CS330</xsl:with-param>
+        </xsl:call-template>
+    </xsl:template>
+
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/constraints/CS331.xsl b/xslt-validatie/jw/3_0/constraints/CS331.xsl
new file mode 100644
index 0000000..76ce591
--- /dev/null
+++ b/xslt-validatie/jw/3_0/constraints/CS331.xsl
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+	xmlns:jw303="http://www.istandaarden.nl/ijw/3_0/jw303/schema"
+	xmlns:jw304="http://www.istandaarden.nl/ijw/3_0/jw304/schema"
+	>
+
+	<!-- iJw 3.0 CS331 version 2.0.24 (2020-05-14) -->
+
+	<xsl:import href="../common/basis.xsl"/>
+	<xsl:template match="*" mode="CS331"/>
+	<xsl:template match="*" mode="check">
+		<xsl:apply-templates select="*" mode="CS331"/>
+	</xsl:template>
+
+	<xsl:template match="jw303:IngediendeBedragPrestatie/ijw:Eenheid" mode="CS331">
+		<xsl:if test="translate(../../jw303:ProductPeriode/ijw:Begindatum/text(), '-', '') &gt;= 20190401">
+			<xsl:call-template name="checknvalue">
+				<xsl:with-param name="pValues">21,81</xsl:with-param>
+				<xsl:with-param name="pRule">CS331</xsl:with-param>
+			</xsl:call-template>
+		</xsl:if>
+	</xsl:template>
+
+	<xsl:template match="jw304:IngediendeBedragPrestatie/ijw:Eenheid" mode="CS331">
+		<xsl:if test="translate(../../jw304:ProductPeriode/ijw:Begindatum/text(), '-', '') &gt;= 20190401">
+			<xsl:call-template name="checknvalue">
+				<xsl:with-param name="pValues">21,81</xsl:with-param>
+				<xsl:with-param name="pRule">CS331</xsl:with-param>
+			</xsl:call-template>
+		</xsl:if>
+	</xsl:template>
+
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/rules/TR002.xsl b/xslt-validatie/jw/3_0/rules/TR002.xsl
new file mode 100644
index 0000000..64a1b2b
--- /dev/null
+++ b/xslt-validatie/jw/3_0/rules/TR002.xsl
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+	>
+
+	<!-- iJw 3.0 TR002 version 2.0.24 (2020-05-14) -->
+
+	<xsl:import href="../common/basis.xsl"/>
+	<xsl:template match="*" mode="TR002"/>
+	<xsl:template match="*" mode="check">
+		<xsl:apply-templates select="*" mode="TR002"/>
+	</xsl:template>
+
+	<xsl:template match="*[local-name() = 'Geboortedatum']/ijw:Datum" mode="TR002">
+		<xsl:if test="not(../ijw:DatumGebruik/text() = '3' and text() = '1900-01-01')">
+			<xsl:variable name="parent" select="ancestor-or-self::*[local-name() = 'Bericht']/*[local-name() = 'Header']"/>
+			<xsl:call-template name="checkYearsBetween">
+				<xsl:with-param name="pDate1"
+					select="$parent/*[local-name() = 'BerichtIdentificatie']/*[local-name() = 'Dagtekening'] | $parent/*[local-name() = 'DeclaratieFactuurIdentificatie']/*[local-name() = 'FactuurDagtekening']"/>
+				<xsl:with-param name="pDate2" select="."/>
+				<xsl:with-param name="pYears">120</xsl:with-param>
+				<xsl:with-param name="pRule">
+					TR002
+				</xsl:with-param>
+			</xsl:call-template>
+		</xsl:if>
+	</xsl:template>
+
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/rules/TR006.xsl b/xslt-validatie/jw/3_0/rules/TR006.xsl
new file mode 100644
index 0000000..bd83234
--- /dev/null
+++ b/xslt-validatie/jw/3_0/rules/TR006.xsl
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+                xmlns:jw301="http://www.istandaarden.nl/ijw/3_0/jw301/schema"
+>
+
+    <!-- iJw 3.0 TR006 version 2.0.24 (2020-05-14) -->
+
+    <xsl:import href="../common/basis.xsl"/>
+    <xsl:template match="*" mode="TR006"/>
+    <xsl:template match="*" mode="check">
+        <xsl:apply-templates select="*" mode="TR006"/>
+    </xsl:template>
+    
+    <xsl:template match="jw301:Contact" mode="TR006">
+        <xsl:call-template name="checkSingleCorrect">
+            <xsl:with-param name="pThis" select="jw301:Telefoon"/>
+            <xsl:with-param name="pValue1">#</xsl:with-param>
+            <xsl:with-param name="pOther" select="jw301:Adres/ijw:Huis"/>
+            <xsl:with-param name="pValue2">#</xsl:with-param>
+            <xsl:with-param name="pExtra" select="."/>
+            <xsl:with-param name="pRule">TR006</xsl:with-param>
+        </xsl:call-template>
+        <xsl:call-template name="checkSingleCorrect">
+            <xsl:with-param name="pThis" select="jw301:Telefoon"/>
+            <xsl:with-param name="pValue1">#</xsl:with-param>
+            <xsl:with-param name="pOther" select="jw301:Adres/ijw:Postcode"/>
+            <xsl:with-param name="pValue2">#</xsl:with-param>
+            <xsl:with-param name="pExtra" select="."/>
+            <xsl:with-param name="pRule">TR006</xsl:with-param>
+        </xsl:call-template>
+    </xsl:template>
+
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/rules/TR018.xsl b/xslt-validatie/jw/3_0/rules/TR018.xsl
new file mode 100644
index 0000000..2fe2216
--- /dev/null
+++ b/xslt-validatie/jw/3_0/rules/TR018.xsl
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:jw307="http://www.istandaarden.nl/ijw/3_0/jw307/schema"
+>
+
+    <!-- iJw 3.0 TR018 version 2.0.24 (2020-05-14) -->
+
+    <xsl:import href="../common/basis.xsl"/>
+    <xsl:template match="*" mode="TR018"/>
+    <xsl:template match="*" mode="check">
+        <xsl:apply-templates select="*" mode="TR018"/>
+    </xsl:template>
+
+    <xsl:template match="jw307:StopProduct/jw307:Einddatum" mode="TR018">
+        <xsl:call-template name="checkafter">
+            <xsl:with-param name="pOther" select="../jw307:Begindatum"/>
+            <xsl:with-param name="pRule">TR018</xsl:with-param>
+        </xsl:call-template>
+    </xsl:template>
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/rules/TR052.xsl b/xslt-validatie/jw/3_0/rules/TR052.xsl
new file mode 100644
index 0000000..7fda918
--- /dev/null
+++ b/xslt-validatie/jw/3_0/rules/TR052.xsl
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+                xmlns:jw305="http://www.istandaarden.nl/ijw/3_0/jw305/schema"
+>
+
+    <!-- iJw 3.0 TR052 version 2.0.24 (2020-05-14) -->
+
+    <xsl:import href="../common/basis.xsl"/>
+    <xsl:template match="*" mode="TR052"/>
+    <xsl:template match="*" mode="check">
+        <xsl:apply-templates select="*" mode="TR052"/>
+    </xsl:template>
+
+    <xsl:template match="jw305:StartProduct/jw305:Begindatum" mode="TR052">
+        <xsl:call-template name="checkafter">
+            <xsl:with-param name="pThis"
+                            select="ancestor-or-self::jw305:Bericht/jw305:Header/jw305:BerichtIdentificatie/ijw:Dagtekening"/>
+            <xsl:with-param name="pOther" select="."/>
+            <xsl:with-param name="pRule">TR052</xsl:with-param>
+        </xsl:call-template>
+    </xsl:template>
+
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/rules/TR061.xsl b/xslt-validatie/jw/3_0/rules/TR061.xsl
new file mode 100644
index 0000000..5f5c67c
--- /dev/null
+++ b/xslt-validatie/jw/3_0/rules/TR061.xsl
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+                xmlns:jw301="http://www.istandaarden.nl/ijw/3_0/jw301/schema"
+>
+
+    <!-- iJw 3.0 TR052 version 2.0.24 (2020-05-14) -->
+
+    <xsl:import href="../common/basis.xsl"/>
+    <xsl:template match="*" mode="TR061"/>
+    <xsl:template match="*" mode="check">
+        <xsl:apply-templates select="*" mode="TR061"/>
+    </xsl:template>
+
+    <xsl:template match="jw301:Client/jw301:Contactgegevens" mode="TR061">
+        <xsl:if test="not(./jw301:Contact/jw301:Soort[text() = '01' or text() = '02' or text() = '03'])">
+            <xsl:call-template name="addError">
+                <xsl:with-param name="pElements" select="jw301:Contact"/>
+                <xsl:with-param name="pRule">
+                    TR061
+                </xsl:with-param>
+            </xsl:call-template>
+        </xsl:if>
+    </xsl:template>
+
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/rules/TR097.xsl b/xslt-validatie/jw/3_0/rules/TR097.xsl
new file mode 100644
index 0000000..c54008c
--- /dev/null
+++ b/xslt-validatie/jw/3_0/rules/TR097.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+	>
+
+	<!-- iJw 3.0 TR097 version 2.0.24 (2020-05-14) -->
+
+	<xsl:import href="../common/basis.xsl"/>
+	<xsl:template match="*" mode="TR097"/>
+	<xsl:template match="*" mode="check">
+		<xsl:apply-templates select="*" mode="TR097"/>
+	</xsl:template>
+
+	<xsl:template match="*[ijw:Datum and ijw:DatumGebruik]" mode="TR097">
+		<xsl:choose>
+			<xsl:when test="ijw:DatumGebruik = '3' and ijw:Datum != '1900-01-01'">
+				<xsl:call-template name="addError">
+					<xsl:with-param name="pElements" select="ijw:Datum | ijw:DatumGebruik"/>
+					<xsl:with-param name="pRule">
+						TR097
+					</xsl:with-param>
+				</xsl:call-template>
+			</xsl:when>
+			<xsl:when test="ijw:DatumGebruik = '2' and substring-after(ijw:Datum, '-') != '01-01'">
+				<xsl:call-template name="addError">
+					<xsl:with-param name="pElements" select="ijw:Datum | ijw:DatumGebruik"/>
+					<xsl:with-param name="pRule">
+						TR097
+					</xsl:with-param>
+				</xsl:call-template>
+			</xsl:when>
+			<xsl:when test="ijw:DatumGebruik = '1' and substring-after(substring-after(ijw:Datum, '-'), '-') != '01'">
+				<xsl:call-template name="addError">
+					<xsl:with-param name="pElements" select="ijw:Datum | ijw:DatumGebruik"/>
+					<xsl:with-param name="pRule">
+						TR097
+					</xsl:with-param>
+				</xsl:call-template>
+			</xsl:when>
+		</xsl:choose>
+	</xsl:template>
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/rules/TR101.xsl b/xslt-validatie/jw/3_0/rules/TR101.xsl
new file mode 100644
index 0000000..aeec254
--- /dev/null
+++ b/xslt-validatie/jw/3_0/rules/TR101.xsl
@@ -0,0 +1,230 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:jw301="http://www.istandaarden.nl/ijw/3_0/jw301/schema"
+	xmlns:jw303="http://www.istandaarden.nl/ijw/3_0/jw303/schema"
+	xmlns:jw304="http://www.istandaarden.nl/ijw/3_0/jw304/schema"
+	xmlns:jw305="http://www.istandaarden.nl/ijw/3_0/jw305/schema"
+	xmlns:jw307="http://www.istandaarden.nl/ijw/3_0/jw307/schema"
+	xmlns:jw315="http://www.istandaarden.nl/ijw/3_0/jw315/schema"
+	xmlns:jw317="http://www.istandaarden.nl/ijw/3_0/jw317/schema"
+	xmlns:jw319="http://www.istandaarden.nl/ijw/3_0/jw319/schema"
+	xmlns:jw323="http://www.istandaarden.nl/ijw/3_0/jw323/schema"
+	xmlns:jw325="http://www.istandaarden.nl/ijw/3_0/jw325/schema"
+>
+	<!-- iJw 3.0 TR101 version 2.0.24 (2020-05-14) -->
+
+	<xsl:import href="../common/basis.xsl"/>
+	<xsl:template match="*" mode="TR101"/>
+	<xsl:template match="*" mode="check">
+		<xsl:apply-templates select="*" mode="TR101"/>
+	</xsl:template>
+
+	<!-- JW301 -->
+	<xsl:template match="*[jw301:Client]" mode="TR101">
+		<xsl:call-template name="checkDuplicateKeys">
+			<xsl:with-param name="pElement" select="jw301:Client"/>
+			<xsl:with-param name="pKeys">/Bsn,</xsl:with-param>
+			<xsl:with-param name="pRule">TR101</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+	<xsl:template match="*[jw301:Contact]" mode="TR101">
+		<xsl:call-template name="checkDuplicateKeys">
+			<xsl:with-param name="pElement" select="jw301:Contact"/>
+			<xsl:with-param name="pKeys">/Soort,</xsl:with-param>
+			<xsl:with-param name="pRule">TR101</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+	<xsl:template match="*[jw301:Relatie]" mode="TR101">
+		<xsl:call-template name="checkDuplicateKeys">
+			<xsl:with-param name="pElement" select="jw301:Relatie"/>
+			<xsl:with-param name="pKeys">/Contact/Soort,/Nummer,</xsl:with-param>
+			<xsl:with-param name="pRule">TR101</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+	<xsl:template match="*[jw301:ToegewezenProduct]" mode="TR101">
+		<xsl:call-template name="checkDuplicateKeys">
+			<xsl:with-param name="pElement" select="jw301:ToegewezenProduct"/>
+			<xsl:with-param name="pKeys">/ToewijzingNummer,</xsl:with-param>
+			<xsl:with-param name="pRule">TR101</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+
+	<!-- JW303 -->
+	<xsl:template match="*[jw303:Client]" mode="TR101">
+		<xsl:call-template name="checkDuplicateKeys">
+			<xsl:with-param name="pElement" select="jw303:Client"/>
+			<xsl:with-param name="pKeys">/Bsn,</xsl:with-param>
+			<xsl:with-param name="pRule">TR101</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+	<xsl:template match="*[jw303:Prestatie]" mode="TR101">
+		<xsl:call-template name="checkDuplicateKeys">
+			<xsl:with-param name="pElement" select="jw303:Prestatie"/>
+			<xsl:with-param name="pKeys">/ProductCategorie,/ProductCode,/ProductReferentie/ReferentieNummer,/ProductReferentie/VorigReferentieNummer,</xsl:with-param>
+			<xsl:with-param name="pRule">TR101</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+
+	<!-- JW304 -->
+	<xsl:template match="*[jw304:Client]" mode="TR101">
+		<xsl:call-template name="checkDuplicateKeys">
+			<xsl:with-param name="pElement" select="jw304:Client"/>
+			<xsl:with-param name="pKeys">/Bsn,</xsl:with-param>
+			<xsl:with-param name="pRule">TR101</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+	<xsl:template match="*[jw304:Prestatie]" mode="TR101">
+		<xsl:call-template name="checkDuplicateKeys">
+			<xsl:with-param name="pElement" select="jw304:Prestatie"/>
+			<xsl:with-param name="pKeys">/ProductCategorie,/ProductCode,/ProductReferentie/ReferentieNummer,/ProductReferentie/VorigReferentieNummer,</xsl:with-param>
+			<xsl:with-param name="pRule">TR101</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+
+	<!-- JW305 -->
+	<xsl:template match="*[jw305:Client]" mode="TR101">
+		<xsl:call-template name="checkDuplicateKeys">
+			<xsl:with-param name="pElement" select="jw305:Client"/>
+			<xsl:with-param name="pKeys">/Bsn,</xsl:with-param>
+			<xsl:with-param name="pRule">TR101</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+	<xsl:template match="*[jw305:StartProduct]" mode="TR101">
+		<xsl:call-template name="checkDuplicateKeys">
+			<xsl:with-param name="pElement" select="jw305:StartProduct"/>
+			<xsl:with-param name="pKeys">/Begindatum,/Product/Categorie,/Product/Code,/ToewijzingNummer,</xsl:with-param>
+			<xsl:with-param name="pRule">TR101</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+
+	<!-- JW307 -->
+	<xsl:template match="*[jw307:Client]" mode="TR101">
+		<xsl:call-template name="checkDuplicateKeys">
+			<xsl:with-param name="pElement" select="jw307:Client"/>
+			<xsl:with-param name="pKeys">/Bsn,</xsl:with-param>
+			<xsl:with-param name="pRule">TR101</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+	<xsl:template match="*[jw307:StopProduct]" mode="TR101">
+		<xsl:call-template name="checkDuplicateKeys">
+			<xsl:with-param name="pElement" select="jw307:StopProduct"/>
+			<xsl:with-param name="pKeys">/Begindatum,/Einddatum,/Product/Categorie,/Product/Code,/ToewijzingNummer,</xsl:with-param>
+			<xsl:with-param name="pRule">TR101</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+
+	<!-- JW315 -->
+	<xsl:template match="*[jw315:AangevraagdProduct]" mode="TR101">
+		<xsl:call-template name="checkDuplicateKeys">
+			<xsl:with-param name="pElement" select="jw315:AangevraagdProduct"/>
+			<xsl:with-param name="pKeys">/Product/Categorie,/Product/Code,/ToewijzingIngangsdatum,</xsl:with-param>
+			<xsl:with-param name="pRule">TR101</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+	<xsl:template match="*[jw315:Client]" mode="TR101">
+		<xsl:call-template name="checkDuplicateKeys">
+			<xsl:with-param name="pElement" select="jw315:Client"/>
+			<xsl:with-param name="pKeys">/Bsn,</xsl:with-param>
+			<xsl:with-param name="pRule">TR101</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+
+	<!-- JW317 -->
+	<xsl:template match="*[jw317:Client]" mode="TR101">
+		<xsl:call-template name="checkDuplicateKeys">
+			<xsl:with-param name="pElement" select="jw317:Client"/>
+			<xsl:with-param name="pKeys">/Bsn,</xsl:with-param>
+			<xsl:with-param name="pRule">TR101</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+	<xsl:template match="*[jw317:NieuwProduct]" mode="TR101">
+		<xsl:call-template name="checkDuplicateKeys">
+			<xsl:with-param name="pElement" select="jw317:NieuwProduct"/>
+			<xsl:with-param name="pKeys">/GewensteIngangsdatum,/Product/Categorie,/Product/Code,</xsl:with-param>
+			<xsl:with-param name="pRule">TR101</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+	<xsl:template match="*[jw317:OngewijzigdProduct]" mode="TR101">
+		<xsl:call-template name="checkDuplicateKeys">
+			<xsl:with-param name="pElement" select="jw317:OngewijzigdProduct"/>
+			<xsl:with-param name="pKeys">/ToewijzingNummer,</xsl:with-param>
+			<xsl:with-param name="pRule">TR101</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+	<xsl:template match="*[jw317:TeWijzigenProduct]" mode="TR101">
+		<xsl:call-template name="checkDuplicateKeys">
+			<xsl:with-param name="pElement" select="jw317:TeWijzigenProduct"/>
+			<xsl:with-param name="pKeys">/ToewijzingNummer,</xsl:with-param>
+			<xsl:with-param name="pRule">TR101</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+	<xsl:template match="*[jw317:Verzoek]" mode="TR101">
+		<xsl:call-template name="checkDuplicateKeys">
+			<xsl:with-param name="pElement" select="jw317:Verzoek"/>
+			<xsl:with-param name="pKeys">/ReferentieAanbieder,</xsl:with-param>
+			<xsl:with-param name="pRule">TR101</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+
+	<!-- JW319 -->
+	<xsl:template match="*[jw319:Antwoord]" mode="TR101">
+		<xsl:call-template name="checkDuplicateKeys">
+			<xsl:with-param name="pElement" select="jw319:Antwoord"/>
+			<xsl:with-param name="pKeys">/ReferentieAanbieder,/VerzoekAntwoord,</xsl:with-param>
+			<xsl:with-param name="pRule">TR101</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+	<xsl:template match="*[jw319:Woonplaatsbeginsel]" mode="TR101">
+		<xsl:call-template name="checkDuplicateKeys">
+			<xsl:with-param name="pElement" select="jw319:Woonplaatsbeginsel"/>
+			<xsl:with-param name="pKeys">/Gemeente,</xsl:with-param>
+			<xsl:with-param name="pRule">TR101</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+
+	<!-- JW323 -->
+	<xsl:template match="*[jw323:Client]" mode="TR101">
+		<xsl:call-template name="checkDuplicateKeys">
+			<xsl:with-param name="pElement" select="jw323:Client"/>
+			<xsl:with-param name="pKeys">/Bsn,</xsl:with-param>
+			<xsl:with-param name="pRule">TR101</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+	<xsl:template match="*[jw323:Declaratie]" mode="TR101">
+		<xsl:call-template name="checkDuplicateKeys">
+			<xsl:with-param name="pElement" select="jw323:Declaratie"/>
+			<xsl:with-param name="pKeys">/DeclaratieNummer,</xsl:with-param>
+			<xsl:with-param name="pRule">TR101</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+	<xsl:template match="*[jw323:Prestatie]" mode="TR101">
+		<xsl:call-template name="checkDuplicateKeys">
+			<xsl:with-param name="pElement" select="jw323:Prestatie"/>
+			<xsl:with-param name="pKeys">/ProductReferentie/ReferentieNummer,/ProductReferentie/VorigReferentieNummer,</xsl:with-param>
+			<xsl:with-param name="pRule">TR101</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+
+	<!-- JW325 -->
+	<xsl:template match="*[jw325:Client]" mode="TR101">
+		<xsl:call-template name="checkDuplicateKeys">
+			<xsl:with-param name="pElement" select="jw325:Client"/>
+			<xsl:with-param name="pKeys">/Bsn,</xsl:with-param>
+			<xsl:with-param name="pRule">TR101</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+	<xsl:template match="*[jw325:DeclaratieAntwoord]" mode="TR101">
+		<xsl:call-template name="checkDuplicateKeys">
+			<xsl:with-param name="pElement" select="jw325:DeclaratieAntwoord"/>
+			<xsl:with-param name="pKeys">/DeclaratieNummer,</xsl:with-param>
+			<xsl:with-param name="pRule">TR101</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+	<xsl:template match="*[jw325:Prestatie]" mode="TR101">
+		<xsl:call-template name="checkDuplicateKeys">
+			<xsl:with-param name="pElement" select="jw325:Prestatie"/>
+			<xsl:with-param name="pKeys">/ProductReferentie/ReferentieNummer,/ProductReferentie/VorigReferentieNummer,</xsl:with-param>
+			<xsl:with-param name="pRule">TR101</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/rules/TR302.xsl b/xslt-validatie/jw/3_0/rules/TR302.xsl
new file mode 100644
index 0000000..296eb43
--- /dev/null
+++ b/xslt-validatie/jw/3_0/rules/TR302.xsl
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+                xmlns:jw301="http://www.istandaarden.nl/ijw/3_0/jw301/schema"
+>
+
+    <!-- iJw 3.0 TR302 version 2.0.24 (2020-05-14) -->
+
+    <xsl:import href="../common/basis.xsl"/>
+    <xsl:template match="*" mode="TR302"/>
+    <xsl:template match="*" mode="check">
+        <xsl:apply-templates select="*" mode="TR302"/>
+    </xsl:template>
+
+    <xsl:template match="jw301:ToegewezenProduct" mode="TR302">
+        <xsl:call-template name="tr302"/>
+    </xsl:template>
+
+    <xsl:template name="tr302">
+        <xsl:param name="pThis" select="."/>
+        <xsl:param name="pList" select="preceding-sibling::*"/>
+
+        <xsl:for-each select="$pList">
+            <xsl:if test="(
+							            ($pThis/jw301:Product/ijw:Code and current()/jw301:Product/ijw:Code and $pThis/jw301:Product/ijw:Code = current()/jw301:Product/ijw:Code) and
+                                        ($pThis/jw301:Product/ijw:Categorie and current()/jw301:Product/ijw:Categorie and $pThis/jw301:Product/ijw:Categorie = current()/jw301:Product/ijw:Categorie)
+                                  ) or 
+                                 (
+                                 		(not($pThis/jw301:Product/ijw:Code) or not(current()/jw301:Product/ijw:Code)) and
+                                        ($pThis/jw301:Product/ijw:Categorie and current()/jw301:Product/ijw:Categorie and $pThis/jw301:Product/ijw:Categorie = current()/jw301:Product/ijw:Categorie)
+                         		) or
+                         		(
+                                 		(not($pThis/jw301:Product/ijw:Code) and not($pThis/jw301:Product/ijw:Categorie)) or
+                                 		(not(current()/jw301:Product/ijw:Code) and not(current()/jw301:Product/ijw:Categorie))
+                         		)
+                                 "> 
+                          
+                <xsl:variable name="isOverlay">
+                    <xsl:call-template name="isPeriodOverlay">
+                        <xsl:with-param name="pThis" select="$pThis"/>
+                        <xsl:with-param name="pOther" select="current()"/>
+                    </xsl:call-template>
+                </xsl:variable>
+                <xsl:if test="$isOverlay = 'true'">
+                    <xsl:call-template name="addError">
+                        <xsl:with-param name="pElements" select="$pThis | current()"/>
+                        <xsl:with-param name="pRule">TR302</xsl:with-param>
+                    </xsl:call-template>
+                </xsl:if>
+            </xsl:if>
+        </xsl:for-each>
+
+    </xsl:template>
+
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/rules/TR312.xsl b/xslt-validatie/jw/3_0/rules/TR312.xsl
new file mode 100644
index 0000000..8b557fd
--- /dev/null
+++ b/xslt-validatie/jw/3_0/rules/TR312.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+	xmlns:jw303="http://www.istandaarden.nl/ijw/3_0/jw303/schema"
+	>
+
+	<!-- iJw 3.0 TR312 version 2.0.24 (2020-05-14) -->
+
+	<xsl:import href="../common/basis.xsl"/>
+	<xsl:template match="*" mode="TR312"/>
+	<xsl:template match="*" mode="check">
+		<xsl:apply-templates select="*" mode="TR312"/>
+	</xsl:template>
+
+	<xsl:template match="jw303:DeclaratieFactuurBedragen" mode="TR312">
+		<xsl:variable name="vTotaalDebet"
+			select="sum(ancestor-or-self::jw303:Bericht/jw303:Clienten/jw303:Client/jw303:Prestaties/jw303:Prestatie/jw303:IngediendeBedragPrestatie/ijw:DeclaratieFactuurBedrag[ijw:DebetCredit/text() = 'D']/ijw:Bedrag)"/>
+		<xsl:variable name="vTotaalCredit"
+			select="sum(ancestor-or-self::jw303:Bericht/jw303:Clienten/jw303:Client/jw303:Prestaties/jw303:Prestatie/jw303:IngediendeBedragPrestatie/ijw:DeclaratieFactuurBedrag[ijw:DebetCredit/text() = 'C']/ijw:Bedrag)"/>
+
+		<xsl:variable name="vSaldo" select="$vTotaalDebet - $vTotaalCredit"/>
+
+		<!-- Controleren of BtwTotaalBedrag overeenkomt met saldo BtwBedragen -->
+		<xsl:call-template name="checkimplication">
+			<xsl:with-param name="pThis" select="ijw:DeclaratieFactuurTotaalBedrag/ijw:DebetCredit" />
+			<xsl:with-param name="pValue1">D</xsl:with-param>
+			<xsl:with-param name="pOther" select="ijw:DeclaratieFactuurTotaalBedrag/ijw:TotaalBedrag" />
+			<xsl:with-param name="pValue2"><xsl:call-template name="formatNumber"><xsl:with-param name="pValue" select="$vSaldo" /></xsl:call-template></xsl:with-param>
+			<xsl:with-param name="pExtra" select="ancestor-or-self::jw303:Bericht/jw303:Clienten/jw303:Client/jw303:Prestaties/jw303:Prestatie/jw303:IngediendeBedragPrestatie/ijw:DeclaratieFactuurBedrag/ijw:Bedrag"/>
+			<xsl:with-param name="pRule">TR312</xsl:with-param>
+		</xsl:call-template>
+
+		<!-- In het geval van Credit moet het bedrag negatief worden gemaakt -->
+		<xsl:call-template name="checkimplication">
+			<xsl:with-param name="pThis" select="ijw:DeclaratieFactuurTotaalBedrag/ijw:DebetCredit" />
+			<xsl:with-param name="pValue1">C</xsl:with-param>
+			<xsl:with-param name="pOther" select="ijw:DeclaratieFactuurTotaalBedrag/ijw:TotaalBedrag" />
+			<xsl:with-param name="pValue2"><xsl:call-template name="formatNumber"><xsl:with-param name="pValue" select="0 - 1 * $vSaldo" /></xsl:call-template></xsl:with-param>
+			<xsl:with-param name="pExtra" select="ancestor-or-self::jw303:Bericht/jw303:Clienten/jw303:Client/jw303:Prestaties/jw303:Prestatie/jw303:IngediendeBedragPrestatie/ijw:DeclaratieFactuurBedrag/ijw:Bedrag"/>
+			<xsl:with-param name="pRule">TR312</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/rules/TR313.xsl b/xslt-validatie/jw/3_0/rules/TR313.xsl
new file mode 100644
index 0000000..97dd5a0
--- /dev/null
+++ b/xslt-validatie/jw/3_0/rules/TR313.xsl
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+	xmlns:jw303="http://www.istandaarden.nl/ijw/3_0/jw303/schema"
+	>
+
+	<!-- iJw 3.0 TR313 version 2.0.24 (2020-05-14) -->
+
+	<xsl:import href="../common/basis.xsl"/>
+	<xsl:template match="*" mode="TR313"/>
+	<xsl:template match="*" mode="check">
+		<xsl:apply-templates select="*" mode="TR313"/>
+	</xsl:template>
+
+	<xsl:template match="jw303:DeclaratieFactuurBedragen" mode="TR313">
+		<xsl:variable name="vTotaalDebet" select="sum(ancestor-or-self::jw303:Bericht/jw303:Clienten/jw303:Client/jw303:Prestaties/jw303:Prestatie/jw303:IngediendeBedragPrestatie/ijw:BtwBedrag[ijw:DebetCredit = 'D']/ijw:Bedrag)"/>
+		<xsl:variable name="vTotaalCredit" select="sum(ancestor-or-self::jw303:Bericht/jw303:Clienten/jw303:Client/jw303:Prestaties/jw303:Prestatie/jw303:IngediendeBedragPrestatie/ijw:BtwBedrag[ijw:DebetCredit = 'C']/ijw:Bedrag)"/>
+		<xsl:variable name="vSaldo" select="$vTotaalDebet - $vTotaalCredit"/>
+
+		<!-- Controleren of BtwTotaalBedrag overeenkomt met saldo BtwBedragen -->
+		<xsl:call-template name="checkimplication">
+			<xsl:with-param name="pThis" select="ijw:BtwTotaalBedrag/ijw:DebetCredit" />
+			<xsl:with-param name="pValue1">D</xsl:with-param>
+			<xsl:with-param name="pOther" select="ijw:BtwTotaalBedrag/ijw:TotaalBedrag" />
+			<xsl:with-param name="pValue2"><xsl:call-template name="formatNumber"><xsl:with-param name="pValue" select="$vSaldo" /></xsl:call-template></xsl:with-param>
+			<xsl:with-param name="pExtra" select="ancestor-or-self::jw303:Bericht/jw303:Clienten/jw303:Client/jw303:Prestaties/jw303:Prestatie/jw303:IngediendeBedragPrestatie/ijw:BtwBedrag/ijw:Bedrag"/>
+			<xsl:with-param name="pRule">TR313</xsl:with-param>
+		</xsl:call-template>
+
+		<!-- In het geval van Credit moet het bedrag negatief worden gemaakt -->
+		<xsl:call-template name="checkimplication">
+			<xsl:with-param name="pThis" select="ijw:BtwTotaalBedrag/ijw:DebetCredit" />
+			<xsl:with-param name="pValue1">C</xsl:with-param>
+			<xsl:with-param name="pOther" select="ijw:BtwTotaalBedrag/ijw:TotaalBedrag" />
+			<xsl:with-param name="pValue2"><xsl:call-template name="formatNumber"><xsl:with-param name="pValue" select="0 - 1 * $vSaldo" /></xsl:call-template></xsl:with-param>
+			<xsl:with-param name="pExtra" select="ancestor-or-self::jw303:Bericht/jw303:Clienten/jw303:Client/jw303:Prestaties/jw303:Prestatie/jw303:IngediendeBedragPrestatie/ijw:BtwBedrag/ijw:Bedrag"/>
+			<xsl:with-param name="pRule">TR313</xsl:with-param>
+		</xsl:call-template>
+		
+		<xsl:if test="$vSaldo != '0' and not(ijw:BtwTotaalBedrag/ijw:DebetCredit)">
+			<xsl:call-template name="addError">
+				<xsl:with-param name="pElements" select=". | ancestor-or-self::jw303:Bericht/jw303:Clienten/jw303:Client/jw303:Prestaties/jw303:Prestatie/jw303:IngediendeBedragPrestatie/ijw:BtwBedrag/ijw:Bedrag"/>
+				<xsl:with-param name="pRule">TR313</xsl:with-param>
+			</xsl:call-template>
+		</xsl:if>
+	</xsl:template>
+
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/rules/TR314.xsl b/xslt-validatie/jw/3_0/rules/TR314.xsl
new file mode 100644
index 0000000..06d66fb
--- /dev/null
+++ b/xslt-validatie/jw/3_0/rules/TR314.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+	xmlns:jw303="http://www.istandaarden.nl/ijw/3_0/jw303/schema"
+	>
+
+	<!-- iJw 3.0 TR314 version 2.0.24 (2020-05-14) -->
+
+	<xsl:import href="../common/basis.xsl"/>
+	<xsl:template match="*" mode="TR314"/>
+	<xsl:template match="*" mode="check">
+		<xsl:apply-templates select="*" mode="TR314"/>
+	</xsl:template>
+
+	<xsl:template match="jw303:ProductReferentie" mode="TR314">
+		<xsl:variable name="vReferentieNummer" select="normalize-space(ijw:ReferentieNummer/text())" />
+
+		<xsl:call-template name="checkvalue">
+			<xsl:with-param name="pThis" select="ancestor-or-self::jw303:Prestatie/preceding-sibling::jw303:Prestatie//ijw:ReferentieNummer[text() = $vReferentieNummer]" />
+			<xsl:with-param name="pValues">!#</xsl:with-param>
+			<xsl:with-param name="pRule">TR314</xsl:with-param>
+			<xsl:with-param name="pCode">8021</xsl:with-param>
+			<xsl:with-param name="pExtra" select="ijw:ReferentieNummer" />
+		</xsl:call-template>
+
+		<xsl:call-template name="checkvalue">
+			<xsl:with-param name="pThis" select="ancestor-or-self::jw303:Client/preceding-sibling::jw303:Client//ijw:ReferentieNummer[text() = $vReferentieNummer]" />
+			<xsl:with-param name="pValues">!#</xsl:with-param>
+			<xsl:with-param name="pRule">TR314</xsl:with-param>
+			<xsl:with-param name="pCode">8021</xsl:with-param>
+			<xsl:with-param name="pExtra" select="ijw:ReferentieNummer" />
+		</xsl:call-template>
+	</xsl:template>
+
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/rules/TR315.xsl b/xslt-validatie/jw/3_0/rules/TR315.xsl
new file mode 100644
index 0000000..f0eaf38
--- /dev/null
+++ b/xslt-validatie/jw/3_0/rules/TR315.xsl
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+	xmlns:jw303="http://www.istandaarden.nl/ijw/3_0/jw303/schema"
+	xmlns:jw323="http://www.istandaarden.nl/ijw/3_0/jw323/schema"
+	>
+
+	<!-- iJw 3.0 TR315 version 2.0.24 (2020-05-14) -->
+
+	<xsl:import href="../common/basis.xsl"/>
+	<xsl:template match="*" mode="TR315"/>
+	<xsl:template match="*" mode="check">
+		<xsl:apply-templates select="*" mode="TR315"/>
+	</xsl:template>
+
+	<xsl:template match="jw303:ProductReferentie" mode="TR315">
+		<xsl:variable name="vVorigReferentieNummer" select="normalize-space(ijw:VorigReferentieNummer/text())" />
+		<xsl:variable name="vSelf" select="ijw:VorigReferentieNummer" />
+
+		<xsl:for-each select="
+				ancestor-or-self::jw303:Prestatie/preceding-sibling::jw303:Prestatie//ijw:VorigReferentieNummer[text() = $vVorigReferentieNummer] |
+				ancestor-or-self::jw303:Client/preceding-sibling::jw303:Client//ijw:VorigReferentieNummer[text() = $vVorigReferentieNummer]
+				">
+			<xsl:call-template name="checkvalue">
+				<xsl:with-param name="pValues">!#</xsl:with-param>
+				<xsl:with-param name="pRule">TR315</xsl:with-param>
+				<xsl:with-param name="pExtra" select="$vSelf" />
+			</xsl:call-template>
+		</xsl:for-each>
+	</xsl:template>
+
+	<xsl:template match="jw323:ProductReferentie" mode="TR315">
+		<xsl:variable name="vVorigReferentieNummer" select="normalize-space(ijw:VorigReferentieNummer/text())" />
+		<xsl:variable name="vSelf" select="ijw:VorigReferentieNummer" />
+
+		<xsl:for-each select="
+				ancestor-or-self::jw323:Prestatie/preceding-sibling::jw323:Prestatie//ijw:VorigReferentieNummer[text() = $vVorigReferentieNummer] |
+				ancestor-or-self::jw323:Client/preceding-sibling::jw323:Client//ijw:VorigReferentieNummer[text() = $vVorigReferentieNummer]
+				">
+			<xsl:call-template name="checkvalue">
+				<xsl:with-param name="pValues">!#</xsl:with-param>
+				<xsl:with-param name="pRule">TR315</xsl:with-param>
+				<xsl:with-param name="pExtra" select="$vSelf" />
+			</xsl:call-template>
+		</xsl:for-each>
+	</xsl:template>
+
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/rules/TR316.xsl b/xslt-validatie/jw/3_0/rules/TR316.xsl
new file mode 100644
index 0000000..b4159ef
--- /dev/null
+++ b/xslt-validatie/jw/3_0/rules/TR316.xsl
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+	xmlns:jw303="http://www.istandaarden.nl/ijw/3_0/jw303/schema"
+	xmlns:jw323="http://www.istandaarden.nl/ijw/3_0/jw323/schema"
+	>
+
+	<!-- iJw 3.0 TR316 version 2.0.24 (2020-05-14) -->
+
+	<xsl:import href="../common/basis.xsl"/>
+	<xsl:template match="*" mode="TR316"/>
+	<xsl:template match="*" mode="check">
+		<xsl:apply-templates select="*" mode="TR316"/>
+	</xsl:template>
+
+	<xsl:template match="jw303:ProductReferentie" mode="TR316">
+		<xsl:variable name="vReferentieNummer" select="normalize-space(ijw:ReferentieNummer/text())" />
+		<xsl:variable name="vVorigReferentieNummer" select="normalize-space(ijw:VorigReferentieNummer/text())" />
+
+		<xsl:call-template name="checkvalue">
+			<xsl:with-param name="pThis" select="ancestor-or-self::jw303:Prestatie/preceding-sibling::jw303:Prestatie//ijw:ReferentieNummer[text() = $vVorigReferentieNummer]" />
+			<xsl:with-param name="pValues">!#</xsl:with-param>
+			<xsl:with-param name="pRule">TR316</xsl:with-param>
+			<xsl:with-param name="pExtra" select="ijw:VorigReferentieNummer" />
+		</xsl:call-template>
+
+		<xsl:call-template name="checkvalue">
+			<xsl:with-param name="pThis" select="ancestor-or-self::jw303:Client/preceding-sibling::jw303:Client//ijw:ReferentieNummer[text() = $vVorigReferentieNummer]" />
+			<xsl:with-param name="pValues">!#</xsl:with-param>
+			<xsl:with-param name="pRule">TR316</xsl:with-param>
+			<xsl:with-param name="pExtra" select="ijw:VorigReferentieNummer" />
+		</xsl:call-template>
+
+		<xsl:call-template name="checkvalue">
+			<xsl:with-param name="pThis" select="ancestor-or-self::jw303:Prestatie/preceding-sibling::jw303:Prestatie//ijw:VorigReferentieNummer[text() = $vReferentieNummer]" />
+			<xsl:with-param name="pValues">!#</xsl:with-param>
+			<xsl:with-param name="pRule">TR316</xsl:with-param>
+			<xsl:with-param name="pExtra" select="ijw:ReferentieNummer" />
+		</xsl:call-template>
+
+		<xsl:call-template name="checkvalue">
+			<xsl:with-param name="pThis" select="ancestor-or-self::jw303:Client/preceding-sibling::jw303:Client//ijw:VorigReferentieNummer[text() = $vReferentieNummer]" />
+			<xsl:with-param name="pValues">!#</xsl:with-param>
+			<xsl:with-param name="pRule">TR316</xsl:with-param>
+			<xsl:with-param name="pExtra" select="ijw:ReferentieNummer" />
+		</xsl:call-template>
+
+		<xsl:if test="$vReferentieNummer = $vVorigReferentieNummer">
+			<xsl:call-template name="addError">
+				<xsl:with-param name="pRule">TR316</xsl:with-param>
+				<xsl:with-param name="pElements" select="ijw:ReferentieNummer | ijw:VorigReferentieNummer" />
+			</xsl:call-template>
+		</xsl:if>
+	</xsl:template>
+
+	<xsl:template match="jw323:ProductReferentie" mode="TR316">
+		<xsl:variable name="vReferentieNummer" select="normalize-space(ijw:ReferentieNummer/text())" />
+		<xsl:variable name="vVorigReferentieNummer" select="normalize-space(ijw:VorigReferentieNummer/text())" />
+
+		<xsl:call-template name="checkvalue">
+			<xsl:with-param name="pThis" select="ancestor-or-self::jw323:Prestatie/preceding-sibling::jw323:Prestatie//ijw:ReferentieNummer[text() = $vVorigReferentieNummer]" />
+			<xsl:with-param name="pValues">!#</xsl:with-param>
+			<xsl:with-param name="pRule">TR316</xsl:with-param>
+			<xsl:with-param name="pExtra" select="ijw:VorigReferentieNummer" />
+		</xsl:call-template>
+
+		<xsl:call-template name="checkvalue">
+			<xsl:with-param name="pThis" select="ancestor-or-self::jw323:Client/preceding-sibling::jw323:Client//ijw:ReferentieNummer[text() = $vVorigReferentieNummer]" />
+			<xsl:with-param name="pValues">!#</xsl:with-param>
+			<xsl:with-param name="pRule">TR316</xsl:with-param>
+			<xsl:with-param name="pExtra" select="ijw:VorigReferentieNummer" />
+		</xsl:call-template>
+
+		<xsl:call-template name="checkvalue">
+			<xsl:with-param name="pThis" select="ancestor-or-self::jw323:Prestatie/preceding-sibling::jw323:Prestatie//ijw:VorigReferentieNummer[text() = $vReferentieNummer]" />
+			<xsl:with-param name="pValues">!#</xsl:with-param>
+			<xsl:with-param name="pRule">TR316</xsl:with-param>
+			<xsl:with-param name="pExtra" select="ijw:ReferentieNummer" />
+		</xsl:call-template>
+
+		<xsl:call-template name="checkvalue">
+			<xsl:with-param name="pThis" select="ancestor-or-self::jw323:Client/preceding-sibling::jw323:Client//ijw:VorigReferentieNummer[text() = $vReferentieNummer]" />
+			<xsl:with-param name="pValues">!#</xsl:with-param>
+			<xsl:with-param name="pRule">TR316</xsl:with-param>
+			<xsl:with-param name="pExtra" select="ijw:ReferentieNummer" />
+		</xsl:call-template>
+
+		<xsl:if test="$vReferentieNummer = $vVorigReferentieNummer">
+			<xsl:call-template name="addError">
+				<xsl:with-param name="pRule">TR316</xsl:with-param>
+				<xsl:with-param name="pElements" select="ijw:ReferentieNummer | ijw:VorigReferentieNummer" />
+			</xsl:call-template>
+		</xsl:if>
+	</xsl:template>
+
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/rules/TR317.xsl b/xslt-validatie/jw/3_0/rules/TR317.xsl
new file mode 100644
index 0000000..79601cf
--- /dev/null
+++ b/xslt-validatie/jw/3_0/rules/TR317.xsl
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+	xmlns:jw303="http://www.istandaarden.nl/ijw/3_0/jw303/schema"
+	xmlns:jw304="http://www.istandaarden.nl/ijw/3_0/jw304/schema"
+	>
+
+	<!-- iJw 3.0 TR317 version 2.0.24 (2020-05-14) -->
+
+	<xsl:import href="../common/basis.xsl"/>
+	<xsl:template match="*" mode="TR317"/>
+	<xsl:template match="*" mode="check">
+		<xsl:apply-templates select="*" mode="TR317"/>
+	</xsl:template>
+
+	<xsl:template match="jw303:IngediendeBedragPrestatie | jw304:IngediendeBedragPrestatie" mode="TR317">
+		<xsl:variable name="vBedrag" select="normalize-space(ijw:GeleverdVolume) * normalize-space(ijw:ProductTarief)" />
+		<xsl:call-template name="checkimplication">
+			<xsl:with-param name="pThis" select="ijw:BerekendBedrag/ijw:Bedrag" />
+			<xsl:with-param name="pValue1">*</xsl:with-param>
+			<xsl:with-param name="pOther" select="ijw:BerekendBedrag/ijw:Bedrag" />
+			<xsl:with-param name="pValue2"><xsl:call-template name="formatNumber"><xsl:with-param name="pValue" select="$vBedrag" /></xsl:call-template></xsl:with-param>
+			<xsl:with-param name="pExtra" select="ijw:GeleverdVolume | ijw:ProductTarief" />
+			<xsl:with-param name="pRule">TR317</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/rules/TR319.xsl b/xslt-validatie/jw/3_0/rules/TR319.xsl
new file mode 100644
index 0000000..48eb2d2
--- /dev/null
+++ b/xslt-validatie/jw/3_0/rules/TR319.xsl
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+                xmlns:jw303="http://www.istandaarden.nl/ijw/3_0/jw303/schema"
+                xmlns:jw323="http://www.istandaarden.nl/ijw/3_0/jw323/schema"
+>
+
+    <!-- iJw 3.0 TR319 version 2.0.24 (2020-05-14) -->
+
+    <xsl:import href="../common/basis.xsl"/>
+    <xsl:template match="*" mode="TR319"/>
+    <xsl:template match="*" mode="check">
+        <xsl:apply-templates select="*" mode="TR319"/>
+    </xsl:template>
+
+    <xsl:template match="jw303:Prestatie" mode="TR319">
+        <xsl:call-template name="checkafter">
+            <xsl:with-param name="pThis"
+                            select="ancestor-or-self::jw303:Bericht/jw303:Header/jw303:DeclaratieFactuurIdentificatie/ijw:DeclaratiePeriode/ijw:Einddatum"/>
+            <xsl:with-param name="pOther" select="jw303:ProductPeriode/ijw:Begindatum"/>
+            <xsl:with-param name="pRule">TR319</xsl:with-param>
+        </xsl:call-template>
+        <xsl:call-template name="checkafter">
+            <xsl:with-param name="pThis"
+                            select="ancestor-or-self::jw303:Bericht/jw303:Header/jw303:DeclaratieFactuurIdentificatie/ijw:DeclaratiePeriode/ijw:Einddatum"/>
+            <xsl:with-param name="pOther" select="jw303:ProductPeriode/ijw:Einddatum"/>
+            <xsl:with-param name="pRule">TR319</xsl:with-param>
+        </xsl:call-template>
+    </xsl:template>
+
+    <xsl:template match="jw323:Prestatie" mode="TR319">
+        <xsl:call-template name="checkafter">
+            <xsl:with-param name="pThis"
+                            select="ancestor-or-self::jw323:Declaratie/jw323:DeclaratiePeriode/ijw:Einddatum"/>
+            <xsl:with-param name="pOther" select="jw323:ProductPeriode/ijw:Begindatum"/>
+            <xsl:with-param name="pRule">TR319</xsl:with-param>
+        </xsl:call-template>
+        <xsl:call-template name="checkafter">
+            <xsl:with-param name="pThis"
+                            select="ancestor-or-self::jw323:Declaratie/jw323:DeclaratiePeriode/ijw:Einddatum"/>
+            <xsl:with-param name="pOther" select="jw323:ProductPeriode/ijw:Einddatum"/>
+            <xsl:with-param name="pRule">TR319</xsl:with-param>
+        </xsl:call-template>
+    </xsl:template>
+
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/rules/TR320.xsl b/xslt-validatie/jw/3_0/rules/TR320.xsl
new file mode 100644
index 0000000..5e48757
--- /dev/null
+++ b/xslt-validatie/jw/3_0/rules/TR320.xsl
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+	xmlns:jw304="http://www.istandaarden.nl/ijw/3_0/jw304/schema"
+	>
+
+	<!-- iJw 3.0 TR320 version 2.0.24 (2020-05-14) -->
+
+	<xsl:import href="../common/basis.xsl"/>
+	<xsl:template match="*" mode="TR320"/>
+	<xsl:template match="*" mode="check">
+		<xsl:apply-templates select="*" mode="TR320"/>
+	</xsl:template>
+
+	<xsl:template match="jw304:RetourBedragen" mode="TR320">
+		<!-- Bereken SaldoIngediendeBedragregel -->
+		<xsl:variable name="IngediendTotaalDebet" select="sum(ancestor-or-self::jw304:Bericht/jw304:Clienten/jw304:Client/jw304:Prestaties/jw304:Prestatie/jw304:IngediendeBedragPrestatie/ijw:DeclaratieFactuurBedrag[ijw:DebetCredit = 'D']/ijw:Bedrag)"/>
+		<xsl:variable name="IngediendTotaalCredit" select="sum(ancestor-or-self::jw304:Bericht/jw304:Clienten/jw304:Client/jw304:Prestaties/jw304:Prestatie/jw304:IngediendeBedragPrestatie/ijw:DeclaratieFactuurBedrag[ijw:DebetCredit = 'C']/ijw:Bedrag)"/>
+		<xsl:variable name="SaldoIngediendeBedragregel" select="$IngediendTotaalDebet - $IngediendTotaalCredit"/>
+
+		<!-- Bereken SaldoToegekendeBedragregel -->
+		<xsl:variable name="ToegekendTotaalDebet" select="sum(ancestor-or-self::jw304:Bericht/jw304:Clienten/jw304:Client/jw304:Prestaties/jw304:Prestatie/jw304:ToegekendeBedragPrestatie/ijw:ToegekendBedrag[ijw:DebetCredit = 'D']/ijw:Bedrag)"/>
+		<xsl:variable name="ToegekendTotaalCredit" select="sum(ancestor-or-self::jw304:Bericht/jw304:Clienten/jw304:Client/jw304:Prestaties/jw304:Prestatie/jw304:ToegekendeBedragPrestatie/ijw:ToegekendBedrag[ijw:DebetCredit = 'C']/ijw:Bedrag)"/>
+		<xsl:variable name="SaldoToegekendeBedragregel" select="$ToegekendTotaalDebet - $ToegekendTotaalCredit"/>
+
+		<!-- Bepaal verschil E: = SaldoIngediendeBedragregel minus SaldoToegekende bedragregel-->
+		<xsl:variable name="VerschilBedragregel" select="$SaldoIngediendeBedragregel - $SaldoToegekendeBedragregel"/>
+
+		<!-- Maak van ToegekendTotaalBedrag een negatief getal als ToegekendDebetCredit waarde C heeft -->
+		<xsl:variable name="ToegekendTotaalBedragDC">
+			<xsl:choose>
+				<xsl:when test="./ijw:ToegekendTotaalBedrag/ijw:DebetCredit/text() = 'C' ">
+					<xsl:value-of select='./ijw:ToegekendTotaalBedrag/ijw:TotaalBedrag/text() * -1'/>
+				</xsl:when>
+				<xsl:otherwise><xsl:value-of select='./ijw:ToegekendTotaalBedrag/ijw:TotaalBedrag/text()'/></xsl:otherwise>
+			</xsl:choose>
+		</xsl:variable>
+
+		<!-- Maak van IngediendTotaalBedrag een negatief getal als IngediendDebetCredit waarde C heeft -->
+		<xsl:variable name="IngediendTotaalBedragDC">
+			<xsl:choose>
+				<xsl:when test="./ijw:IngediendTotaalBedrag/ijw:DebetCredit/text() = 'C' ">
+					<xsl:value-of select='./ijw:IngediendTotaalBedrag/ijw:TotaalBedrag/text() * -1'/>
+				</xsl:when>
+				<xsl:otherwise><xsl:value-of select='./ijw:IngediendTotaalBedrag/ijw:TotaalBedrag/text()'/></xsl:otherwise>
+			</xsl:choose>
+		</xsl:variable>
+
+		<!-- Bepaal verschil F:= IngediendTotaalBedrag minus ToegekendTotaalBedrag-->
+		<xsl:variable name="VerschilHeaderTotalen" select="$IngediendTotaalBedragDC - $ToegekendTotaalBedragDC"/>
+
+		<!-- Controleren of verschil E overeenkomt met verschil F bedragen -->
+		<xsl:if test="count(ancestor-or-self::jw304:Bericht/jw304:Header/jw304:RetourCodes/*[local-name() = 'RetourCode'][text() != '0200' and text() != '8001']) = 0 and normalize-space($VerschilBedragregel) != normalize-space($VerschilHeaderTotalen)">
+			<xsl:call-template name="addError">
+				<xsl:with-param name="pRule">TR320</xsl:with-param>
+				<xsl:with-param name="pCode">0001</xsl:with-param>
+				<xsl:with-param name="pElements" select="
+					ijw:IngediendTotaalBedrag/ijw:TotaalBedrag | ijw:IngediendTotaalBedrag/ijw:DebetCredit |
+					ijw:ToegekendTotaalBedrag/ijw:TotaalBedrag | ijw:ToegekendTotaalBedrag/ijw:DebetCredit"/>
+			</xsl:call-template>
+		</xsl:if>
+	</xsl:template>
+
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/rules/TR335.xsl b/xslt-validatie/jw/3_0/rules/TR335.xsl
new file mode 100644
index 0000000..fe878a4
--- /dev/null
+++ b/xslt-validatie/jw/3_0/rules/TR335.xsl
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+                xmlns:jw323="http://www.istandaarden.nl/ijw/3_0/jw323/schema"
+>
+
+    <!-- iJw 3.0 TR335 version 2.0.24 (2020-05-14) -->
+
+    <xsl:import href="../common/basis.xsl"/>
+    <xsl:template match="*" mode="TR335"/>
+    <xsl:template match="*" mode="check">
+        <xsl:apply-templates select="*" mode="TR335"/>
+    </xsl:template>
+
+    <xsl:template match="jw323:Prestatie/jw323:ProductPeriode/ijw:Einddatum" mode="TR335">
+        <xsl:call-template name="checkDateRelation">
+            <xsl:with-param name="pDate" select="ancestor-or-self::jw323:Declaratie/jw323:DeclaratieDagtekening"/>
+			<xsl:with-param name="pRelation">monthsAfter</xsl:with-param>
+            <xsl:with-param name="pExtra">-60</xsl:with-param>
+            <xsl:with-param name="pRule">TR335</xsl:with-param>
+        </xsl:call-template>
+    </xsl:template>
+
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/rules/TR342.xsl b/xslt-validatie/jw/3_0/rules/TR342.xsl
new file mode 100644
index 0000000..02a65e6
--- /dev/null
+++ b/xslt-validatie/jw/3_0/rules/TR342.xsl
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+	xmlns:jw325="http://www.istandaarden.nl/ijw/3_0/jw325/schema"
+	>
+
+	<!-- iJw 3.0 TR342 version 2.0.24 (2020-05-14) -->
+
+	<xsl:import href="../common/basis.xsl"/>
+	<xsl:template match="*" mode="TR342"/>
+	<xsl:template match="*" mode="check">
+		<xsl:apply-templates select="*" mode="TR342"/>
+	</xsl:template>
+
+	<xsl:template match="jw325:DeclaratieAntwoord" mode="TR342">
+		<!-- Bereken SaldoIngediendeBedragregel -->
+		<xsl:variable name="IngediendTotaalDebet" select="sum(./jw325:Clienten/jw325:Client/jw325:Prestaties/jw325:Prestatie/jw325:IngediendBedrag[./ijw:DebetCredit/text() = 'D']/ijw:Bedrag)"/>
+		<xsl:variable name="IngediendTotaalCredit" select="sum(./jw325:Clienten/jw325:Client/jw325:Prestaties/jw325:Prestatie/jw325:IngediendBedrag[./ijw:DebetCredit/text() = 'C']/ijw:Bedrag)"/>
+		<xsl:variable name="SaldoIngediendeBedragregel" select="$IngediendTotaalDebet - $IngediendTotaalCredit"/>
+
+		<!-- Maak van ToegekendTotaalBedrag een negatief getal als ToegekendDebetCredit waarde C heeft -->
+		<xsl:variable name="ToegekendTotaalBedragDC">
+			<xsl:choose>
+				<xsl:when test="./jw325:TotaalToegekendBedrag/ijw:DebetCredit/text() = 'C' ">
+					<xsl:value-of select='number(./jw325:TotaalToegekendBedrag/ijw:TotaalBedrag/text()) * -1'/>
+				</xsl:when>
+				<xsl:otherwise><xsl:value-of select='number(./jw325:TotaalToegekendBedrag/ijw:TotaalBedrag/text())'/></xsl:otherwise>
+			</xsl:choose>
+		</xsl:variable>
+
+		<!-- Maak van IngediendTotaalBedrag een negatief getal als IngediendDebetCredit waarde C heeft -->
+		<xsl:variable name="IngediendTotaalBedragDC">
+			<xsl:choose>
+				<xsl:when test="./jw325:TotaalIngediendBedrag/ijw:DebetCredit/text() = 'C' ">
+					<xsl:value-of select="number(./jw325:TotaalIngediendBedrag/ijw:TotaalBedrag/text()) * -1"/>
+				</xsl:when>
+				<xsl:otherwise><xsl:value-of select="number(./jw325:TotaalIngediendBedrag/ijw:TotaalBedrag/text())"/></xsl:otherwise>
+			</xsl:choose>
+		</xsl:variable>
+
+		<!-- Bepaal verschil F:= IngediendTotaalBedrag minus ToegekendTotaalBedrag-->
+		<xsl:variable name="VerschilHeaderTotalen" select="$IngediendTotaalBedragDC - $ToegekendTotaalBedragDC"/>
+
+		<!-- Controleren of verschil E overeenkomt met verschil F bedragen -->
+		<xsl:if test="normalize-space($SaldoIngediendeBedragregel) != normalize-space($VerschilHeaderTotalen)">
+			<xsl:call-template name="addError">
+				<xsl:with-param name="pRule">TR342</xsl:with-param>
+				<xsl:with-param name="pCode">0001</xsl:with-param>
+				<xsl:with-param name="pElements" select="jw325:TotaalToegekendBedrag | jw325:TotaalIngediendBedrag "/>
+			</xsl:call-template>
+		</xsl:if>
+	</xsl:template>
+
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/rules/TR345.xsl b/xslt-validatie/jw/3_0/rules/TR345.xsl
new file mode 100644
index 0000000..18d71dd
--- /dev/null
+++ b/xslt-validatie/jw/3_0/rules/TR345.xsl
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+                xmlns:jw323="http://www.istandaarden.nl/ijw/3_0/jw323/schema"
+>
+
+    <!-- iJw 3.0 TR345 version 2.0.24 (2020-05-14) -->
+
+    <xsl:import href="../common/basis.xsl"/>
+    <xsl:template match="*" mode="TR345"/>
+    <xsl:template match="*" mode="check">
+        <xsl:apply-templates select="*" mode="TR345"/>
+    </xsl:template>
+
+    <xsl:template match="jw323:Prestatie[jw323:Eenheid/text() = '83']" mode="TR345">
+        <xsl:call-template name="checkRelation">
+            <xsl:with-param name="pThis" select="jw323:GeleverdVolume" />
+            <xsl:with-param name="pOther" select="jw323:IngediendBedrag/ijw:Bedrag"/>
+            <xsl:with-param name="pExtra" select="nonExistantNode" />
+            <xsl:with-param name="pRelation">equals</xsl:with-param>
+            <xsl:with-param name="pRule">TR345</xsl:with-param>
+        </xsl:call-template>
+    </xsl:template>
+
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/rules/TR352.xsl b/xslt-validatie/jw/3_0/rules/TR352.xsl
new file mode 100644
index 0000000..7fabc87
--- /dev/null
+++ b/xslt-validatie/jw/3_0/rules/TR352.xsl
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+                xmlns:jw317="http://www.istandaarden.nl/ijw/3_0/jw317/schema"
+>
+
+    <!-- iJw 3.0 TR352 version 2.0.24 (2020-05-14) -->
+
+    <xsl:import href="../common/basis.xsl"/>
+    <xsl:template match="*" mode="TR352"/>
+    <xsl:template match="*" mode="check">
+        <xsl:apply-templates select="*" mode="TR352"/>
+    </xsl:template>
+
+    <xsl:template match="jw317:Verzoek" mode="TR352">
+        <xsl:call-template name="checkvalue">
+            <xsl:with-param name="pThis" select="jw317:OngewijzigdeProducten/jw317:OngewijzigdProduct | jw317:TeWijzigenProducten/jw317:TeWijzigenProduct" />
+            <xsl:with-param name="pValues">#</xsl:with-param>
+            <xsl:with-param name="pExtra" select="." />
+            <xsl:with-param name="pRule">TR352</xsl:with-param>
+        </xsl:call-template>
+    </xsl:template>
+
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/rules/TR353.xsl b/xslt-validatie/jw/3_0/rules/TR353.xsl
new file mode 100644
index 0000000..f134067
--- /dev/null
+++ b/xslt-validatie/jw/3_0/rules/TR353.xsl
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+                xmlns:jw317="http://www.istandaarden.nl/ijw/3_0/jw317/schema"
+>
+
+    <!-- iJw 3.0 TR353 version 2.0.24 (2020-05-14) -->
+
+    <xsl:import href="../common/basis.xsl"/>
+    <xsl:template match="*" mode="TR353"/>
+    <xsl:template match="*" mode="check">
+        <xsl:apply-templates select="*" mode="TR353"/>
+    </xsl:template>
+
+    <xsl:template match="jw317:Verzoek" mode="TR353">
+        <xsl:call-template name="checkvalue">
+            <xsl:with-param name="pThis" select="jw317:TeWijzigenProducten/jw317:TeWijzigenProduct | jw317:NieuweProducten/jw317:NieuwProduct" />
+            <xsl:with-param name="pValues">#</xsl:with-param>
+            <xsl:with-param name="pExtra" select="." />
+            <xsl:with-param name="pRule">TR353</xsl:with-param>
+        </xsl:call-template>
+    </xsl:template>
+
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/rules/TR358.xsl b/xslt-validatie/jw/3_0/rules/TR358.xsl
new file mode 100644
index 0000000..854069c
--- /dev/null
+++ b/xslt-validatie/jw/3_0/rules/TR358.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+	xmlns:jw323="http://www.istandaarden.nl/ijw/3_0/jw323/schema"
+	>
+
+	<!-- iJw 3.0 TR358 version 2.0.24 (2020-05-14) -->
+
+	<xsl:import href="../common/basis.xsl"/>
+	<xsl:template match="*" mode="TR358"/>
+	<xsl:template match="*" mode="check">
+		<xsl:apply-templates select="*" mode="TR358"/>
+	</xsl:template>
+
+	<xsl:template match="jw323:TotaalIngediendBedrag" mode="TR358">
+		<xsl:variable name="vTotaalDebet"
+			select="sum(ancestor-or-self::jw323:Declaratie/jw323:Clienten/jw323:Client/jw323:Prestaties/jw323:Prestatie/jw323:IngediendBedrag[ijw:DebetCredit/text() = 'D']/ijw:Bedrag)"/>
+		<xsl:variable name="vTotaalCredit"
+			select="sum(ancestor-or-self::jw323:Declaratie/jw323:Clienten/jw323:Client/jw323:Prestaties/jw323:Prestatie/jw323:IngediendBedrag[ijw:DebetCredit/text() = 'C']/ijw:Bedrag)"/>
+
+		<xsl:variable name="vSaldo" select="$vTotaalDebet - $vTotaalCredit"/>
+
+		<!-- Controleren of BtwTotaalBedrag overeenkomt met saldo BtwBedragen -->
+		<xsl:call-template name="checkimplication">
+			<xsl:with-param name="pThis" select="ijw:DebetCredit" />
+			<xsl:with-param name="pValue1">D</xsl:with-param>
+			<xsl:with-param name="pOther" select="ijw:TotaalBedrag" />
+			<xsl:with-param name="pValue2"><xsl:call-template name="formatNumber"><xsl:with-param name="pValue" select="$vSaldo" /></xsl:call-template></xsl:with-param>
+			<xsl:with-param name="pExtra" select="ancestor-or-self::jw323:Declaratie/jw323:Clienten/jw323:Client/jw323:Prestaties/jw323:Prestatie/jw323:IngediendBedrag"/>
+			<xsl:with-param name="pRule">TR358</xsl:with-param>
+		</xsl:call-template>
+
+		<!-- In het geval van Credit moet het bedrag negatief worden gemaakt -->
+		<xsl:call-template name="checkimplication">
+			<xsl:with-param name="pThis" select="ijw:DebetCredit" />
+			<xsl:with-param name="pValue1">C</xsl:with-param>
+			<xsl:with-param name="pOther" select="ijw:TotaalBedrag" />
+			<xsl:with-param name="pValue2"><xsl:call-template name="formatNumber"><xsl:with-param name="pValue" select="0 - 1 * $vSaldo" /></xsl:call-template></xsl:with-param>
+			<xsl:with-param name="pExtra" select="ancestor-or-self::jw323:Declaratie/jw323:Clienten/jw323:Client/jw323:Prestaties/jw323:Prestatie/jw323:IngediendBedrag"/>
+			<xsl:with-param name="pRule">TR358</xsl:with-param>
+		</xsl:call-template>
+	</xsl:template>
+
+</xsl:stylesheet>
diff --git a/xslt-validatie/jw/3_0/rules/TR368.xsl b/xslt-validatie/jw/3_0/rules/TR368.xsl
new file mode 100644
index 0000000..648ff1c
--- /dev/null
+++ b/xslt-validatie/jw/3_0/rules/TR368.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:ijw="http://www.istandaarden.nl/ijw/3_0/basisschema/schema"
+	xmlns:jw323="http://www.istandaarden.nl/ijw/3_0/jw323/schema"
+	>
+
+	<!-- iJw 3.0 TR368 version 2.0.24 (2020-05-14) -->
+
+	<xsl:import href="../common/basis.xsl"/>
+	<xsl:template match="*" mode="TR368"/>
+	<xsl:template match="*" mode="check">
+		<xsl:apply-templates select="*" mode="TR368"/>
+	</xsl:template>
+
+	<xsl:template match="jw323:DeclaratiePeriode" mode="TR368">
+		<xsl:if test="substring-after(substring-after(ijw:Begindatum, '-'), '-') != '01'">
+			<xsl:call-template name="addError">
+				<xsl:with-param name="pElements" select="ijw:Begindatum" />
+				<xsl:with-param name="pRule">TR368</xsl:with-param>
+			</xsl:call-template>
+		</xsl:if>
+		
+		<xsl:variable name="vAdjustedDay">
+			<xsl:call-template name="addDate">
+				<xsl:with-param name="pDate" select="ijw:Einddatum/text()" />
+				<xsl:with-param name="pExtra">1</xsl:with-param>
+			</xsl:call-template>
+		</xsl:variable>
+		<xsl:variable name="vAdjustedMonth">
+			<xsl:call-template name="addMonths">
+				<xsl:with-param name="pDate" select="ijw:Begindatum/text()" />
+				<xsl:with-param name="pExtra">1</xsl:with-param>
+			</xsl:call-template>
+		</xsl:variable>
+		<xsl:if test="$vAdjustedDay != $vAdjustedMonth">
+			<xsl:call-template name="addError">
+				<xsl:with-param name="pElements" select="ijw:Begindatum | ijw:Einddatum" />
+				<xsl:with-param name="pRule">TR368</xsl:with-param>
+			</xsl:call-template>
+		</xsl:if>
+	</xsl:template>
+
+</xsl:stylesheet>
diff --git a/xslt-validatie/schema/1_1/rapport.xsd b/xslt-validatie/schema/1_1/rapport.xsd
new file mode 100644
index 0000000..f6eb77b
--- /dev/null
+++ b/xslt-validatie/schema/1_1/rapport.xsd
@@ -0,0 +1,108 @@
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:r="http://www.istandaarden.nl/validatie/1_1/rapport/schema"
+	targetNamespace="http://www.istandaarden.nl/validatie/1_1/rapport/schema" elementFormDefault="qualified">
+	<xs:element name="Rapport">
+		<xs:complexType>
+			<xs:sequence>
+				<xs:element name="Header" type="r:Header" />
+				<xs:element name="Fouten" type="r:Fouten" minOccurs="0" />
+			</xs:sequence>
+		</xs:complexType>
+	</xs:element>
+	
+	<xs:element name="XSLTHeader">
+		<xs:complexType>
+			<xs:sequence>
+				<xs:sequence>
+					<xs:element name="Standaard" type="r:LDT_Standaard" />
+					<xs:element name="StandaardRelease" type="r:LDT_Release" />
+					<xs:element name="XSLTVersie" type="r:LDT_XSLTVersie" minOccurs="0" />
+				</xs:sequence>
+			</xs:sequence>
+		</xs:complexType>
+	</xs:element>
+
+	<xs:complexType name="Header">
+		<xs:sequence>
+			<xs:element name="BerichtCode" type="r:LDT_BerichtCode" />
+			<xs:element name="BerichtVersie" type="r:LDT_BerichtVersie" />
+			<xs:element name="BerichtSubversie" type="r:LDT_BerichtSubversie" />
+			<xs:element name="BerichtIdentificatie" type="r:CDT_BerichtIdentificatie" />
+			<xs:element name="XSLTVersie" type="r:LDT_XSLTVersie" minOccurs="0" />
+		</xs:sequence>
+	</xs:complexType>
+
+	<xs:simpleType name="LDT_Standaard">
+		<xs:restriction base="xs:string" />
+	</xs:simpleType>
+
+	<xs:simpleType name="LDT_BerichtCode">
+		<xs:restriction base="xs:string" />
+	</xs:simpleType>
+
+	<xs:simpleType name="LDT_BerichtVersie">
+		<xs:restriction base="xs:integer">
+			<xs:maxInclusive value="99" />
+			<xs:minInclusive value="0" />
+		</xs:restriction>
+	</xs:simpleType>
+	
+	<xs:simpleType name="LDT_BerichtSubversie">
+		<xs:restriction base="xs:integer">
+			<xs:maxInclusive value="99" />
+			<xs:minInclusive value="0" />
+		</xs:restriction>
+	</xs:simpleType>
+	
+	<xs:simpleType name="LDT_Release">
+		<xs:restriction base="xs:token">
+			<xs:pattern value="(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(\.(0|[1-9][0-9]*))?" />
+		</xs:restriction>
+	</xs:simpleType>
+	
+	<xs:simpleType name="LDT_XSLTVersie">
+		<xs:restriction base="xs:token">
+			<xs:pattern value="(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)" />
+		</xs:restriction>
+	</xs:simpleType>
+
+	<xs:complexType name="CDT_BerichtIdentificatie">
+		<xs:sequence>
+			<xs:element name="Identificatie" type="r:LDT_IdentificatieBericht" />
+			<xs:element name="Dagtekening" type="r:LDT_Datum" />
+		</xs:sequence>
+	</xs:complexType>
+
+	<xs:simpleType name="LDT_IdentificatieBericht">
+		<xs:restriction base="xs:string">
+			<xs:maxLength value="12" />
+		</xs:restriction>
+	</xs:simpleType>
+
+	<xs:simpleType name="LDT_Datum">
+		<xs:restriction base="xs:date">
+			<xs:pattern value="[^:Z]*" />
+		</xs:restriction>
+	</xs:simpleType>
+
+	<xs:complexType name="Fouten">
+		<xs:sequence>
+			<xs:element name="Fout" minOccurs="0" maxOccurs="unbounded" type="r:Fout" />
+		</xs:sequence>
+	</xs:complexType>
+
+	<xs:complexType name="Fout">
+		<xs:sequence>
+			<xs:element name="Code" type="xs:string" />
+			<xs:element name="Retourcode" type="xs:string" minOccurs="0" />
+			<xs:element name="Locatie" maxOccurs="unbounded" type="r:XPath" />
+			<xs:element name="Details" type="xs:string" minOccurs="0" />
+		</xs:sequence>
+	</xs:complexType>
+
+	<xs:simpleType name="XPath">
+		<!-- XPath spec from XSLT 2.0 spec -->
+		<xs:restriction base="xs:token">
+			<xs:pattern value=".+" />
+		</xs:restriction>
+	</xs:simpleType>
+</xs:schema>
diff --git a/xslt-validatie/schema/1_1/rapport_example.xml b/xslt-validatie/schema/1_1/rapport_example.xml
new file mode 100644
index 0000000..45b2dd1
--- /dev/null
+++ b/xslt-validatie/schema/1_1/rapport_example.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<r:Rapport xmlns:r="http://www.istandaarden.nl/validatie/1_1/rapport/schema">
+	<r:Header>
+		<r:BerichtCode>354</r:BerichtCode>
+		<r:BerichtVersie>5</r:BerichtVersie>
+		<r:BerichtSubversie>0</r:BerichtSubversie>
+		<r:BerichtIdentificatie>
+			<r:Identificatie>tisIwlzZAdir</r:Identificatie>
+			<r:Dagtekening>2014-07-20</r:Dagtekening>
+		</r:BerichtIdentificatie>
+		<r:XSLTVersie>1.3.2</r:XSLTVersie>
+	</r:Header>
+	<r:Fouten>
+		<r:Fout>
+			<r:Code>CD004</r:Code>
+			<r:Locatie>/Bericht/Clienten/Client/GeleverdeZorgzwaartepakketten/GeleverdZorgzwaartepakket/Sleuteldatum</r:Locatie>
+			<r:Locatie>/Bericht/Clienten/Client/GeleverdeZorgzwaartepakketten/GeleverdZorgzwaartepakket/Leveringsvorm</r:Locatie>
+		</r:Fout>
+		<r:Fout>
+			<r:Code>CD051</r:Code>
+			<r:Locatie>/Bericht/Clienten/Client/GeleverdeZorgzwaartepakketten/GeleverdZorgzwaartepakket/Klasse</r:Locatie>
+			<r:Locatie>/Bericht/Clienten/Client/GeleverdeZorgzwaartepakketten/GeleverdZorgzwaartepakket/Leveringsvorm</r:Locatie>
+		</r:Fout>
+		<r:Fout>
+			<r:Code>CS127</r:Code>
+			<r:Locatie>/Bericht/Clienten/Client/GeleverdeZorgzwaartepakketten/GeleverdZorgzwaartepakket/Leveringsvorm</r:Locatie>
+		</r:Fout>
+	</r:Fouten>
+</r:Rapport>
-- 
GitLab