Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Match roles when elements dont exist on both sides #491

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,10 @@
<!-- The test checks if all of the elements have the same value on both sides as a whole AND checks if atleast 1 of them is not empty.
OR statements between () is to prevent positively matching on the absence of all elements on both sides. -->
<xsl:when test="
$currentGerelateerde/*:statutaireNaam/text() = $matchWithZdsRolGerelateerde/*:statutaireNaam/text() and
$currentGerelateerde/*:inn.rechtsvorm/text() = $matchWithZdsRolGerelateerde/*:inn.rechtsvorm/text() and
($currentGerelateerde/*:statutaireNaam/text() = $matchWithZdsRolGerelateerde/*:statutaireNaam/text() or
(not(exists($currentGerelateerde/*:statutaireNaam)) and not(exists($matchWithZdsRolGerelateerde/*:statutaireNaam)))) and
($currentGerelateerde/*:inn.rechtsvorm/text() = $matchWithZdsRolGerelateerde/*:inn.rechtsvorm/text() or
(not(exists($currentGerelateerde/*:inn.rechtsvorm)) and not(exists($matchWithZdsRolGerelateerde/*:inn.rechtsvorm)))) and
($currentGerelateerde/*:statutaireNaam/text() != '' or
$currentGerelateerde/*:inn.rechtsvorm/text() != '')
">
Expand Down Expand Up @@ -92,13 +94,20 @@
<!-- The test checks if all of the elements have the same value on both sides as a whole AND checks if atleast 1 of them is not empty.
OR statements between () is to prevent positively matching on the absence of all elements on both sides. -->
<xsl:when test="
$currentGerelateerde/*:inp.a-nummer/text() = $matchWithZdsRolGerelateerde/*:inp.a-nummer/text() and
$currentGerelateerde/*:geslachtsnaam/text() = $matchWithZdsRolGerelateerde/*:geslachtsnaam/text() and
$currentGerelateerde/*:voorvoegselGeslachtsnaam/text() = $matchWithZdsRolGerelateerde/*:voorvoegselGeslachtsnaam/text() and
$currentGerelateerde/*:voorletters/text() = $matchWithZdsRolGerelateerde/*:voorletters/text() and
$currentGerelateerde/*:voornamen/text() = $matchWithZdsRolGerelateerde/*:voornamen/text() and
$currentGerelateerde/*:geslachtsaanduiding/text() = $matchWithZdsRolGerelateerde/*:geslachtsaanduiding/text() and
$currentGerelateerde/*:geboortedatum/text() = $matchWithZdsRolGerelateerde/*:geboortedatum/text() and
($currentGerelateerde/*:inp.a-nummer/text() = $matchWithZdsRolGerelateerde/*:inp.a-nummer/text() or
(not(exists($currentGerelateerde/*:inp.a-nummer)) and not(exists($matchWithZdsRolGerelateerde/*:inp.a-nummer)))) and
($currentGerelateerde/*:geslachtsnaam/text() = $matchWithZdsRolGerelateerde/*:geslachtsnaam/text() or
(not(exists($currentGerelateerde/*:geslachtsnaam)) and not(exists($matchWithZdsRolGerelateerde/*:geslachtsnaam)))) and
($currentGerelateerde/*:voorvoegselGeslachtsnaam/text() = $matchWithZdsRolGerelateerde/*:voorvoegselGeslachtsnaam/text() or
(not(exists($currentGerelateerde/*:voorvoegselGeslachtsnaam)) and not(exists($matchWithZdsRolGerelateerde/*:voorvoegselGeslachtsnaam)))) and
($currentGerelateerde/*:voorletters/text() = $matchWithZdsRolGerelateerde/*:voorletters/text() or
(not(exists($currentGerelateerde/*:voorletters)) and not(exists($matchWithZdsRolGerelateerde/*:voorletters)))) and
($currentGerelateerde/*:voornamen/text() = $matchWithZdsRolGerelateerde/*:voornamen/text() or
(not(exists($currentGerelateerde/*:voornamen)) and not(exists($matchWithZdsRolGerelateerde/*:voornamen)))) and
($currentGerelateerde/*:geslachtsaanduiding/text() = $matchWithZdsRolGerelateerde/*:geslachtsaanduiding/text() or
(not(exists($currentGerelateerde/*:geslachtsaanduiding)) and not(exists($matchWithZdsRolGerelateerde/*:geslachtsaanduiding)))) and
($currentGerelateerde/*:geboortedatum/text() = $matchWithZdsRolGerelateerde/*:geboortedatum/text() or
(not(exists($currentGerelateerde/*:geboortedatum)) and not(exists($matchWithZdsRolGerelateerde/*:geboortedatum)))) and
($currentGerelateerde/*:inp.a-nummer/text() != '' or
$currentGerelateerde/*:geslachtsnaam/text() != '' or
$currentGerelateerde/*:voorvoegselGeslachtsnaam/text() != '' or
Expand Down Expand Up @@ -132,9 +141,12 @@
<!-- The test checks if all of the elements have the same value on both sides as a whole AND checks if atleast 1 of them is not empty.
OR statements between () is to prevent positively matching on the absence of all elements on both sides. -->
<xsl:when test="
$currentGerelateerde/*:achternaam/text() = $matchWithZdsRolGerelateerde/*:achternaam/text() and
$currentGerelateerde/*:voorletters/text() = $matchWithZdsRolGerelateerde/*:voorletters/text() and
$currentGerelateerde/*:voorvoegselAchternaam/text() = $matchWithZdsRolGerelateerde/*:voorvoegselAchternaam/text() and
($currentGerelateerde/*:achternaam/text() = $matchWithZdsRolGerelateerde/*:achternaam/text() or
(not(exists($currentGerelateerde/*:achternaam)) and not(exists($matchWithZdsRolGerelateerde/*:achternaam)))) and
($currentGerelateerde/*:voorletters/text() = $matchWithZdsRolGerelateerde/*:voorletters/text() or
(not(exists($currentGerelateerde/*:voorletters)) and not(exists($matchWithZdsRolGerelateerde/*:voorletters)))) and
($currentGerelateerde/*:voorvoegselAchternaam/text() = $matchWithZdsRolGerelateerde/*:voorvoegselAchternaam/text() or
(not(exists($currentGerelateerde/*:voorvoegselAchternaam)) and not(exists($matchWithZdsRolGerelateerde/*:voorvoegselAchternaam)))) and
($currentGerelateerde/*:achternaam/text() != '' or
$currentGerelateerde/*:voorletters/text() != '' or
$currentGerelateerde/*:voorvoegselAchternaam/text() != '')
Expand Down Expand Up @@ -164,8 +176,10 @@
<!-- The test checks if all of the elements have the same value on both sides as a whole AND checks if atleast 1 of them is not empty.
OR statements between () is to prevent positively matching on the absence of all elements on both sides. -->
<xsl:when test="
$currentGerelateerde/*:naam/text() = $matchWithZdsRolGerelateerde/*:naam/text() and
$currentGerelateerde/*:isGehuisvestIn = $matchWithZdsRolGerelateerde/*:isGehuisvestIn and
($currentGerelateerde/*:naam/text() = $matchWithZdsRolGerelateerde/*:naam/text() or
(not(exists($currentGerelateerde/*:naam)) and not(exists($matchWithZdsRolGerelateerde/*:naam)))) and
($currentGerelateerde/*:isGehuisvestIn = $matchWithZdsRolGerelateerde/*:isGehuisvestIn or
(not(exists($currentGerelateerde/*:isGehuisvestIn)) and not(exists($matchWithZdsRolGerelateerde/*:isGehuisvestIn)))) and
($currentGerelateerde/*:naam/text() != '' or
string-length($currentGerelateerde/*:isGehuisvestIn) gt 0)
">
Expand Down Expand Up @@ -194,7 +208,8 @@
<!-- The test checks if all of the elements have the same value on both sides as a whole AND checks if atleast 1 of them is not empty.
OR statements between () is to prevent positively matching on the absence of all elements on both sides. -->
<xsl:when test="
$currentGerelateerde/*:handelsnaam/text() = $matchWithZdsRolGerelateerde/*:handelsnaam/text() and
($currentGerelateerde/*:handelsnaam/text() = $matchWithZdsRolGerelateerde/*:handelsnaam/text() or
(not(exists($currentGerelateerde/*:handelsnaam)) and not(exists($matchWithZdsRolGerelateerde/*:handelsnaam)))) and
$currentGerelateerde/*:handelsnaam/text() != ''
">
<xsl:copy-of select="." />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
scenario.description:

include: ../common.properties

zaakbrug.SelectZdsRolesFromListWithMatchingIdentity.className: nl.nn.adapterframework.testtool.XsltProviderListener
zaakbrug.SelectZdsRolesFromListWithMatchingIdentity.filename: Translate/Common/xsl/SelectZdsRolesFromListWithMatchingIdentity.xslt

step1.zaakbrug.SelectZdsRolesFromListWithMatchingIdentity.read: NNPWithMatchingStatutoryNameButNoInnRechtsvormShouldResultInMatch/in.xml
step1.zaakbrug.SelectZdsRolesFromListWithMatchingIdentity.read.param1.name: MatchWithZdsRol
step1.zaakbrug.SelectZdsRolesFromListWithMatchingIdentity.read.param1.valuefile: NNPWithMatchingStatutoryNameButNoInnRechtsvormShouldResultInMatch/MatchWithZdsRol.xml
step1.zaakbrug.SelectZdsRolesFromListWithMatchingIdentity.read.param1.type: domdoc
step1.zaakbrug.SelectZdsRolesFromListWithMatchingIdentity.read.param2.name: debug
step1.zaakbrug.SelectZdsRolesFromListWithMatchingIdentity.read.param2.value: false
step2.zaakbrug.SelectZdsRolesFromListWithMatchingIdentity.write: NNPWithMatchingStatutoryNameButNoInnRechtsvormShouldResultInMatch/out.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<heeftAlsInitiator entiteittype="ZAKBTRINI">
<gerelateerde xmlns:BG="http://www.egem.nl/StUF/sector/bg/0310"
xmlns:StUF="http://www.egem.nl/StUF/StUF0301"
xmlns:ZKN="http://www.egem.nl/StUF/sector/zkn/0310">
<nietNatuurlijkPersoon entiteittype="NNP">
<statutaireNaam>Gemeente Súdwest-Fryslân</statutaireNaam>
</nietNatuurlijkPersoon>
</gerelateerde>
<StUF:extraElementen xmlns:StUF="http://www.egem.nl/StUF/StUF0301">
<StUF:extraElement naam="kvkNummer">12345678</StUF:extraElement>
</StUF:extraElementen>
</heeftAlsInitiator>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<roles
xmlns:BG="http://www.egem.nl/StUF/sector/bg/0310"
xmlns:StUF="http://www.egem.nl/StUF/StUF0301"
xmlns:ZKN="http://www.egem.nl/StUF/sector/zkn/0310">
<heeftAlsInitiator entiteittype="ZAKBTRINI">
<gerelateerde xmlns:BG="http://www.egem.nl/StUF/sector/bg/0310"
xmlns:StUF="http://www.egem.nl/StUF/StUF0301"
xmlns:ZKN="http://www.egem.nl/StUF/sector/zkn/0310">
<nietNatuurlijkPersoon entiteittype="NNP">
<statutaireNaam>Gemeente Súdwest-Fryslân</statutaireNaam>
</nietNatuurlijkPersoon>
</gerelateerde>
<StUF:extraElementen xmlns:StUF="http://www.egem.nl/StUF/StUF0301">
<StUF:extraElement naam="kvkNummer">different but no kerngegeven</StUF:extraElement>
</StUF:extraElementen>
</heeftAlsInitiator>
</roles>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<roles
xmlns:BG="http://www.egem.nl/StUF/sector/bg/0310"
xmlns:StUF="http://www.egem.nl/StUF/StUF0301"
xmlns:ZKN="http://www.egem.nl/StUF/sector/zkn/0310">
<heeftAlsInitiator entiteittype="ZAKBTRINI">
<gerelateerde>
<nietNatuurlijkPersoon entiteittype="NNP">
<statutaireNaam>Gemeente Súdwest-Fryslân</statutaireNaam>
</nietNatuurlijkPersoon>
</gerelateerde>
<StUF:extraElementen>
<StUF:extraElement naam="kvkNummer">different but no kerngegeven</StUF:extraElement>
</StUF:extraElementen>
</heeftAlsInitiator>
</roles>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
scenario.description:

include: ../common.properties

zaakbrug.SelectZdsRolesFromListWithMatchingIdentity.className: nl.nn.adapterframework.testtool.XsltProviderListener
zaakbrug.SelectZdsRolesFromListWithMatchingIdentity.filename: Translate/Common/xsl/SelectZdsRolesFromListWithMatchingIdentity.xslt

step1.zaakbrug.SelectZdsRolesFromListWithMatchingIdentity.read: NPSWithMatchingGeslachtsnaamButAbsentRemainingKerngegevensShouldResultInMatch/in.xml
step1.zaakbrug.SelectZdsRolesFromListWithMatchingIdentity.read.param1.name: MatchWithZdsRol
step1.zaakbrug.SelectZdsRolesFromListWithMatchingIdentity.read.param1.valuefile: NPSWithMatchingGeslachtsnaamButAbsentRemainingKerngegevensShouldResultInMatch/MatchWithZdsRol.xml
step1.zaakbrug.SelectZdsRolesFromListWithMatchingIdentity.read.param1.type: domdoc
step1.zaakbrug.SelectZdsRolesFromListWithMatchingIdentity.read.param2.name: debug
step1.zaakbrug.SelectZdsRolesFromListWithMatchingIdentity.read.param2.value: false
step2.zaakbrug.SelectZdsRolesFromListWithMatchingIdentity.write: NPSWithMatchingGeslachtsnaamButAbsentRemainingKerngegevensShouldResultInMatch/out.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<heeftAlsInitiator entiteittype="ZAKBTRINI">
<gerelateerde xmlns:BG="http://www.egem.nl/StUF/sector/bg/0310"
xmlns:StUF="http://www.egem.nl/StUF/StUF0301"
xmlns:ZKN="http://www.egem.nl/StUF/sector/zkn/0310">
<natuurlijkPersoon entiteittype="NPS">
<geslachtsnaam>Precies</geslachtsnaam>
</natuurlijkPersoon>
</gerelateerde>
<StUF:extraElementen xmlns:StUF="http://www.egem.nl/StUF/StUF0301">
<StUF:extraElement naam="kvkNummer">12345678</StUF:extraElement>
</StUF:extraElementen>
</heeftAlsInitiator>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<roles
xmlns:BG="http://www.egem.nl/StUF/sector/bg/0310"
xmlns:StUF="http://www.egem.nl/StUF/StUF0301"
xmlns:ZKN="http://www.egem.nl/StUF/sector/zkn/0310">
<heeftAlsInitiator entiteittype="ZAKBTRINI">
<gerelateerde xmlns:BG="http://www.egem.nl/StUF/sector/bg/0310"
xmlns:StUF="http://www.egem.nl/StUF/StUF0301"
xmlns:ZKN="http://www.egem.nl/StUF/sector/zkn/0310">
<natuurlijkPersoon entiteittype="NPS">
<geslachtsnaam>Precies</geslachtsnaam>
</natuurlijkPersoon>
</gerelateerde>
<StUF:extraElementen xmlns:StUF="http://www.egem.nl/StUF/StUF0301">
<StUF:extraElement naam="kvkNummer">12345678</StUF:extraElement>
</StUF:extraElementen>
</heeftAlsInitiator>
</roles>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<roles
xmlns:BG="http://www.egem.nl/StUF/sector/bg/0310"
xmlns:StUF="http://www.egem.nl/StUF/StUF0301"
xmlns:ZKN="http://www.egem.nl/StUF/sector/zkn/0310">
<heeftAlsInitiator entiteittype="ZAKBTRINI">
<gerelateerde>
<natuurlijkPersoon entiteittype="NPS">
<geslachtsnaam>Precies</geslachtsnaam>
</natuurlijkPersoon>
</gerelateerde>
<StUF:extraElementen>
<StUF:extraElement naam="kvkNummer">12345678</StUF:extraElement>
</StUF:extraElementen>
</heeftAlsInitiator>
</roles>
Loading