-
Notifications
You must be signed in to change notification settings - Fork 11
#315: Proper implementation of par template (with recursion) #359
Conversation
- Added `style` attribute to `code` element in `expected` parameter in `project.xsl`; - Replaced `!=` operator by `not(deep-equal())` in `assertions.xsl` because received parameters are document fragments, not strings; - Added `xmlns:xs` so it can be excluded in `assert-that` comparisons (`project.xsl` puts `xmlns:xs` in its elements); - Corrected `actual` and `expected` variable names in failure message.
Changes: - Corrected `par` template in `templates.xsl` for using recursion and correctly replacing paragraphs numbers; - Added comment to `par.xsl`, corrected test description and set `ignore` to `false`.
Job #359 is now in scope, role is |
This pull request #359 is assigned to @amihaiemil/z, here is why; the budget is 15 minutes, see §4; please, read §27 and when you decide to accept the changes, inform @g4s8/z (the architect) right in this ticket; if you decide that this PR should not be accepted ever, also inform the architect; this blog post will help you understand what is expected from a code reviewer; there will be a monetary reward for this job |
@amihaiemil Had to commit #339 changes into this branch, because they are needed to proper behavior of |
@paulodamaso I'll have a look in 1-2 days, I'm away from my laptop for the weekend :( |
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.
@paulodamaso A few comments, please have a look. And try to see why CI is failing -- from what I see, it has nothing to do with your changes but maybe I'm missing something.
xsl/templates.xsl
Outdated
<xsl:analyze-string select="$text" regex="(§[0-9]*)"> | ||
<xsl:matching-substring> | ||
<xsl:variable select="regex-group(1)" name="paragraph" /> | ||
<a href="{concat('http://www.zerocracy.com/policy.html#', substring-after($paragraph,'§'))}"> |
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.
@paulodamaso We should use https://
here, I see it is enabled for zerocracy.com, but redirection from http://
to https://
is not :(
xsl-test/templates/project.xsl
Outdated
@@ -23,8 +23,9 @@ SOFTWARE. | |||
<xsl:with-param name="message" select="'Fails to format project name'"/> | |||
<xsl:with-param name="expected"> | |||
<span> | |||
<code> | |||
<a href="https://www.0crat.com/p/ABCDEFGHI" title="Project ABCDEFGHI"> | |||
<code style="background-color:#daf1e0;"> |
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.
@paulodamaso Why the background-color
attribute, what does it do? And is the reindentation of <a>
needed?
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.
@amihaiemil This bug correction depends on #339; I've had to put it here so the build doesn't fali.
<xsl:text>" is not equal to expected "</xsl:text> | ||
<xsl:value-of select="$expected_xml"/> | ||
<xsl:copy-of select="$expected"/> | ||
<xsl:text>")</xsl:text> | ||
</xsl:message> | ||
</xsl:if> |
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.
@paulodamaso I don't think the changes to this file belong in this PR, or?
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.
@amihaiemil Same as above.
Usage of `https` instead `http`.
@amihaiemil Thanks for the comments, made some changes and answered question, please take a look. |
@amihaiemil Let's do this the right way. I've removed all changes unrelated to #315, but now the build fails because some wrong code in master. |
@paulodamaso yes, the most correct would be to put this task on hold before #339 is solved. If you can merge the PR for #339 soon (the next 5 days?), then we can wait with this PR. But if you think it will take longer, then we should close this PR (you keep your branch), and make another one later after the impediment is merged. This is so I don't lose this job, because I can't put PRs on hold ;( |
@amihaiemil Don't worry, I'll try to fix #339 build problems as soon as possible. I think we will have enough time to this PR. |
@paulodamaso sure, thanks :D |
@paulodamaso I think you merged the waiting fix, right? But now the CI is still failing :D |
@amihaiemil I'm having some problems with the build, seems like some lib we are using does not support XSLT 2.0 |
@g4s8 @amihaiemil This is a no-go here. |
@paulodamaso @g4s8 I honestly have no idea, but this seems like a bug. I would say: file a bug so you are paid for this research, put your task on hold (this one) until that one is fixed and you have all the necessary tools to remake this PR later. WDYT? |
@paulodamaso @amihaiemil right, I think we have to use Saxon to transform |
@ypshenychka/z please review this job completed by @amihaiemil/z, as in §30; the job will be fully closed and all payments will be made when the quality review is completed |
The job #359 is now out of scope |
@amihaiemil According to our QA Rules:
Only two issues were found during code review. |
@ypshenychka confirmed |
@amihaiemil Thanks |
@0crat quality acceptable |
Order was finished, quality is "acceptable": +15 point(s) just awarded to @amihaiemil/z |
@0crat status |
@g4s8 For some reason I got no points and payment here. Could you please do it manually? |
@g4s8 ping |
For #315, made proper implementation of par template (with recursion)
Performed changes:
par
template intemplates.xsl
for using recursion and correctly replacing paragraphs numbers;par.xsl
, corrected test description and setignore
tofalse
.