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

MIR-1329 Reenable support for validation of PDF/A documents #998

Open
wants to merge 4 commits into
base: 2023.06.x
Choose a base branch
from

Conversation

yagee-de
Copy link
Member

Reverts #995

@yagee-de yagee-de requested a review from sebhofmann April 24, 2024 13:33
@yagee-de yagee-de marked this pull request as ready for review April 24, 2024 13:33
@yagee-de yagee-de self-assigned this Apr 24, 2024
Copy link
Member

@sebhofmann sebhofmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No Ticket number, it needs to be MIR-1304. The Bug https://mycore.atlassian.net/browse/MIR-1303 should also be solved before merging this back.

@sebhofmann
Copy link
Member

There should also be a property to disable this, without disabling the whole workflow.

@toKrause toKrause changed the title Revert "MIR-1304 Revert "MIR-1198 Support validation of PDF/A documents (#900)"" Reenable support for validation of PDF/A documents Jul 2, 2024
@toKrause toKrause changed the title Reenable support for validation of PDF/A documents MIR-1329 Reenable support for validation of PDF/A documents Jul 2, 2024
@Antoniafriedrich Antoniafriedrich force-pushed the revert-995-issues/MIR-1304-remove_validation_until_validation_frequency_improved branch from 197d08d to 43e9eda Compare October 7, 2024 08:26
@Antoniafriedrich Antoniafriedrich changed the base branch from 2023.06.x to main October 7, 2024 08:59
@Antoniafriedrich Antoniafriedrich force-pushed the revert-995-issues/MIR-1304-remove_validation_until_validation_frequency_improved branch from 5a3fcdd to ee78080 Compare October 8, 2024 07:43
@yagee-de yagee-de changed the base branch from main to 2023.06.x October 8, 2024 13:51
@Antoniafriedrich Antoniafriedrich force-pushed the revert-995-issues/MIR-1304-remove_validation_until_validation_frequency_improved branch from ee78080 to 7112add Compare October 16, 2024 09:01
@@ -733,7 +733,7 @@ MCR.Object.Static.Content.Generator.mir-history.Transformer=mir-history
MCR.URIResolver.xslImports.mirworkflow=metadata/mir-workflow.xsl
MIR.Workflow.Menu=false
MIR.Workflow.Box=false

MIR.EnablePdfaValidationInWorkflow=false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer something like MIR.Workflow.PDFValidation

<xsl:if test="not(normalize-space($result))">
<xsl:apply-templates select="$result/derivate/file" mode="displayPdfError"/>
</xsl:if>
<xsl:variable name="derivbase" select="concat($ServletsBaseURL,'MCRFileNodeServlet/',$result/derivate/@id,'/')" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused varables

xmlns:xalan="http://xml.apache.org/xalan"
version="1.0" exclude-result-prefixes="i18n mcrxsl">

<xsl:param name="WebApplicationBaseURL"/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused Variables

</div>
</div>
</xsl:when>
<xsl:when test="string-length(normalize-space($errorMessages)) > 0 and not(contains($errorMessages,'Clause'))">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and not(contains($errorMessages,'Clause')) is not necessary


<xsl:template match="structure/derobjects/derobject" mode="displayPdfError">
<xsl:variable name="derivateID" select="@xlink:href"/>
<xsl:variable name="result" select="document(concat('pdfAValidator:', $derivateID))"/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be a notNull or exception uri resolver chained in, to prevent the resolver from crashing the whole metadata page like in MIR-1303

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am working on that ticket seperately and will be merging it into this branch in a seperate pull request.

<div id="{$derivate}{$uniqueFileId}" class="font-weight-bold d-flex list-group list-group-root">
<a onclick="$('#{$derivate}{$uniqueFileId}cbButton').toggleClass('fa-chevron-right fa-chevron-down');"
data-toggle="collapse" href="#collapse{$derivate}{$uniqueFileId}"
class="text-left d-flex flex-md-row flex-grow-1 list-group-item align-items-center">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary space in @class attribute.

<li class="list-group-item d-flex flex-column flex-xl-row flex-grow-1 text-break">
<p class="flex-grow col-lg-8 col-md-9 align-self-center">
<span class="text-muted pdf-term">
Specification:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be translated

<xsl:value-of select="concat(' ', @specification, ' ')"/>
</span>
<span class="text-muted pdf-term">
Clause:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be translated

<xsl:value-of select="concat(' ', @clause, ' ')"/>
</span>
<span class="text-muted pdf-term">
Test:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be translated

Adds translation, removes unused variables and fixes some minor issues
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants