Skip to content

Rule blocked: CORERULES-9628 - new operator to check that values of specified variable is valid XHTML #897

@ASL-rmarshall

Description

@ASL-rmarshall

Links to related JIRA Tickets

Rule Information

  • Standard: USDM
  • Rule ID: DDF00085
  • Rule Description: Narrative content text is expected to be HTML formatted.

Describe the problem
The values of some USDM attributes are expected to be represented in XHTML format (see XHTML Attributes). We have defined rules to check that the values in these attributes are valid XHTML, but there isn't yet a CORE operator to check this.

The XHTML reference in the IG indicates that custom USDM tags may be used, which means that strict XHTML validation cannot be used (because custom tags are not allowed in XHTML). It may be that a custom DTD that includes the additional USDM elements/attributes will need to be defined to be used as the basis for the validation.

It may be that this could be implemented as an operation that performs validation and returns a list of error messages, with the not_empty operator then used to report when the result of the operation contains at least one message.

Proposed rule logic

Check:
  - any:
    - name: $xhtml_errors
      operator: not_empty
Operation:
  - name: text
    operator: get_xhtml_errors
    id: $xhtml_errors 

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions