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

linking to another finding in a description field breaks management summary #96

Open
Sp0Q1 opened this issue Sep 2, 2022 · 1 comment

Comments

@Sp0Q1
Copy link

Sp0Q1 commented Sep 2, 2022

Something goes wrong when referring to another finding from the description in a finding. The logic at

test="starts-with(@href, '#') and $execsummary = true() and //*[@id = $destination][ancestor-or-self::*[not(@inexecsummary = 'yes')]]">
tests if the description is part of the management summary, which makes sure this gets handled differently. E.g. the page is not displayed after the Finding-ID and there is no hyperlink. But this does not work on my end:

Type error at char 28 in expression in xsl:when/@test on line 34 column 152 of fo_inline.xslt:
  XPTY0004  Cannot compare xs:string to xs:boolean
  In template rule with match="a" on line 10 of fo_inline.xslt
     invoked by built-in template rule (text-only)
  In template rule with match="*" on line 51 of block.xslt
     invoked by xsl:apply-templates at file:/home/user/xxx/xslt/block.xslt#52
  In template rule with match="*" on line 51 of block.xslt
     invoked by xsl:apply-templates at file:/home/user/xxx/xslt/block.xslt#57
  In template rule with match="p" on line 56 of block.xslt
     invoked by xsl:apply-templates at file:/home/user/xxx/xslt/findings.xslt#102
  In template rule with match="description" on line 96 of findings.xslt
     invoked by xsl:apply-templates at file:/home/user/xxx/xslt/functions_params_vars.xslt#458
at variable unsortedFindingSummaryTable on line 433 column 54 of functions_params_vars.xslt:
     invoked by xsl:for-each at file:/home/user/xxx/xslt/functions_params_vars.xslt#435
at variable unsortedFindingSummaryTable on line 433 column 54 of functions_params_vars.xslt:
     invoked by xsl:for-each-group at file:/home/user/xxx/xslt/functions_params_vars.xslt#434
at variable unsortedFindingSummaryTable on line 433 column 54 of functions_params_vars.xslt:
     invoked by global variable unsortedFindingSummaryTable at file:/home/user/xxx/xslt/functions_params_vars.xslt#433
at variable findingSummaryTable on line 469 column 46 of functions_params_vars.xslt:
     invoked by global variable findingSummaryTable at file:/home/user/xxx/xslt/functions_params_vars.xslt#469
  In template rule with match="generate_findings" on line 61 of auto.xslt
     invoked by xsl:apply-templates at file:/home/user/xxx/xslt/structure.xslt#29
  In template rule with match="section" on line 10 of structure.xslt
     invoked by xsl:apply-templates at file:/home/user/xxx/xslt/structure.xslt#29
  In template rule with match="section" on line 10 of structure.xslt
     invoked by xsl:apply-templates at file:/home/user/xxx/xslt/pages.xslt#311
at template generate_pages on line 303 column 41 of pages.xslt:
     invoked by xsl:call-template at file:/home/user/xxx/xslt/pages.xslt#296
at template Content on line 285 column 34 of pages.xslt:
     invoked by xsl:for-each at file:/home/user/xxx/xslt/pages.xslt#295
at template Content on line 285 column 34 of pages.xslt:
     invoked by xsl:call-template at file:/home/user/xxx/./xslt/generate_report.xsl#57
  In template rule with match="/" on line 38 of generate_report.xsl
Cannot compare xs:string to xs:boolean

My tempory fix is to change the test with 1=1 so it compiles and gives a somewhat soothing result. Ideally we investigate what this test.should be doing and fix it :)

@PeterMosmans
Copy link
Contributor

Hi @SpenQ , I'm not sure whether I understand the issue. Do you have a simple example on how to reproduce this issue? Thanks!

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

No branches or pull requests

2 participants