Skip to content

Commit

Permalink
Merge pull request #8 from Sudwest-Fryslan/result-file-corrections
Browse files Browse the repository at this point in the history
Apply result file corrections
  • Loading branch information
DelanoWAF authored Oct 10, 2023
2 parents a074134 + 12eb2df commit 45ee8e9
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@
<Forward name="else" path="exception message for ZaakType" />
</XmlIfPipe>

<XsltPipe name="StoreIdentificatie" xpathExpression="//identificatie" storeResultInSessionKey="identificatie"/>

<EchoPipe name="exception message for ZaakType"
getInputFromFixedValue="verkeerde zaaktype, active zaaktypes ${active_zaaktypes} verwacht">
<Forward name="success" path="Exit" />
Expand Down Expand Up @@ -162,7 +164,7 @@

<XsltPipe name="Create result file" getInputFromSessionKey="getZaakXml"
omitXmlDeclaration="true"
styleSheetName="xsl/result.xsl">
styleSheetName="xsl/result.xsl" storeResultInSessionKey="resultDocumentXML">
<Param name="storeResultaat" sessionKey="storeResultaat" type="DOMDOC" />
<Param name="storeRollenJson" sessionKey="storeRollenJson" type="DOMDOC" />
<Param name="storeZaakTypeResponse" sessionKey="storeZaakTypeResponse" type="DOMDOC" />
Expand All @@ -171,16 +173,20 @@
<Param name="organisationId" value="${organisation}" />
<Param name="administrationId" value="${administration}" />
<Param name="endpointVerwijzing" value="${endpointVerwijzing}" />
<Forward name="success" path="Store result file" />
</XsltPipe>

<XsltPipe name="MakeAnonymous" omitXmlDeclaration="true" styleSheetName="xsl/anonymize.xsl"/>

<XsltPipe name="storeTijdstipBericht" xpathExpression="//*[local-name()='tijdstipBericht']" storeResultInSessionKey="tijdstipBericht"/>

<LocalFileSystemPipe name="Store result file"
action="write"
overwrite="true">
overwrite="true" getInputFromSessionKey="resultDocumentXML">
<Param name="filename"
xpathExpression="concat('${mijnzaaknotificaties.resultFolder}/', '{', upper-case($uuid), '}', '_', $date, '.xml')">
<Param name="uuid" sessionKey="uuid" />
<Param name="date" sessionKey="systemDate" />
xpathExpression="concat('${mijnzaaknotificaties.resultFolder}/', $identificatie, '-', $tijdstipBericht, '-', $referentienummer, '.xml')">
<Param name="identificatie" sessionKey="identificatie" />
<Param name="referentienummer" sessionKey="referentienummer" />
<Param name="tijdstipBericht" sessionKey="tijdstipBericht" />
</Param>
<Forward name="success" path="Exit" />
</LocalFileSystemPipe>
Expand Down
35 changes: 35 additions & 0 deletions src/main/configurations/LopendeZaken/xsl/anonymize.xsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.egem.nl/StUF/sector/zkn/0310"
xmlns:StUF="http://www.egem.nl/StUF/StUF0301"
xmlns:BG="http://www.egem.nl/StUF/sector/bg/0310"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" />

<xsl:template match="@* | node()">
<xsl:copy>
<xsl:apply-templates select="@* | node()" />
</xsl:copy>
</xsl:template>

<xsl:template match="//BG:geslachtsnaam">
<BG:geslachtsnaam></BG:geslachtsnaam>
</xsl:template>

<xsl:template match="//BG:voorvoegselGeslachtsnaam">
<BG:voorvoegselGeslachtsnaam></BG:voorvoegselGeslachtsnaam>
</xsl:template>

<xsl:template match="//BG:voorletters">
<BG:voorletters></BG:voorletters>
</xsl:template>

<xsl:template match="//BG:voornamen">
<BG:voornamen></BG:voornamen>
</xsl:template>

<xsl:template match="//BG:geslachtsaanduiding">
<BG:geslachtsaanduiding></BG:geslachtsaanduiding>
</xsl:template>

</xsl:stylesheet>
6 changes: 2 additions & 4 deletions src/main/configurations/LopendeZaken/xsl/result.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,11 @@
<xsl:value-of select="format-date(root/einddatum,'[Y0001][M01][D01]')" />
</einddatum>
</xsl:when>
</xsl:choose>
<xsl:choose>
<xsl:when test="string-length(root/einddatumGepland) &gt; 0">
<xsl:otherwise>
<einddatumGepland>
<xsl:value-of select="format-date(root/einddatumGepland,'[Y0001][M01][D01]')" />
</einddatumGepland>
</xsl:when>
</xsl:otherwise>
</xsl:choose>
<xsl:if test="string-length($endpointVerwijzing) &gt; 0">
<StUF:extraElementen>
Expand Down

0 comments on commit 45ee8e9

Please sign in to comment.