-
Notifications
You must be signed in to change notification settings - Fork 6
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
base: 2023.06.x
Are you sure you want to change the base?
MIR-1329 Reenable support for validation of PDF/A documents #998
Conversation
There was a problem hiding this 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.
There should also be a property to disable this, without disabling the whole workflow. |
197d08d
to
43e9eda
Compare
5a3fcdd
to
ee78080
Compare
Adds a mycore property to enable PDF/A validation seperately to Mir Workflow. Default is false.
ee78080
to
7112add
Compare
@@ -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 |
There was a problem hiding this comment.
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,'/')" /> |
There was a problem hiding this comment.
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"/> |
There was a problem hiding this comment.
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'))"> |
There was a problem hiding this comment.
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))"/> |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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"> |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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
Reverts #995