When including a rule_type of Report in an ingest file, the output Schematron is invalid because the opening tag is but the closing tag is </sch:assert>.
π΅οΈ Expected behavior
I expected LDDTool to use both opening and closing tags for a given rule with report or assert, as appropriate.
π To Reproduce
Create a rule with rule_type report, e.g.
<DD_Rule>
<local_identifier>label_file_version</local_identifier>
<rule_context>/pds:Product_Observational/pds:Identification_Area</rule_context>
<rule_assign>name="file-name" value="replace(tokenize(document-uri(/), '/')[last()],'\.[^.]+$','')"</rule_assign>
<DD_Rule_Statement>
<rule_type>Report</rule_type>
<rule_test>
contains($file-name, '__')
</rule_test>
<rule_message>
Label filename (<sch:value-of select="$file-name"/>) must contain the version ID in the format __[major]_[minor].xml|lblx, and no "__" detected here
</rule_message>
<rule_description>Look for double-underscore</rule_description>
</DD_Rule_Statement>
Inspect the generated schematron and note:
<sch:pattern>
<sch:rule context="/pds:Product_Observational/pds:Identification_Area">
<sch:let name="file-name" value="replace(tokenize(document-uri(/), '/')[last()],'\.[^.]+$','')"/>
<sch:report test="
contains($file-name, '__')
">
<title>/pds:Product_Observational/pds:Identification_Area/Rule</title>
Label filename (<sch:value-of select="$file-name"/>) must contain the version ID in the format __[major]_[minor].xml|lblx, and no "__" detected here
</sch:assert>
which is invalid since the closing report tag should is missing (instead it's assert).
Checked for duplicates
Yes - I've already checked
π Describe the bug
When including a rule_type of Report in an ingest file, the output Schematron is invalid because the opening tag is but the closing tag is </sch:assert>.
π΅οΈ Expected behavior
I expected LDDTool to use both opening and closing tags for a given rule with report or assert, as appropriate.
π To Reproduce
Create a rule with rule_type report, e.g.
Inspect the generated schematron and note:
which is invalid since the closing report tag should is missing (instead it's assert).
π₯ Environment Info
π Version of Software Used
14.2.4
π©Ί Test Data / Additional context
No response
π¦ Related requirements
π¦ #xyz
βοΈ Engineering Details
No response