Skip to content

SymbolicFunction expression containing commas inputs fail XML validation #1771

Open
@klevzoff

Description

@klevzoff

Describe the bug
A really minor inconvenience, but a SymbolicFunction expression with commas (which are necessary for using some binary functions, e.g. pow(x,y)) fails validation, because our validation regex pattern for strings does not allow commas.

To Reproduce
Steps to reproduce the behavior:

  1. Modify examples/functions/function_examples/function_examples.xml to use a binary builtin function (e.g. pow)
  2. Run the full build up to the XML validation step
  3. Get error message like
ERROR:SCHEMASV:SCHEMAV_CVC_PATTERN_VALID: Element 'SymbolicFunction', attribute 'expression': [facet 'pattern'] The value 'pow(x,1.5)' is not accepted by the pattern '.*[\[\]`$].*|[^,\{\}]*'.

Expected behavior
Should not fail validation.

Additional context
The reason to not allow commas in string inputs is probably so that regex for string_array is unambiguous (it adds commas between array elements). But I suspect if we allowed it, validation would still work fine, the regex would possibly match a different number of strings (when some are separated by commas with no spaces, they may get mashed into one). This doesn't affect the actual GEOSX parser in any case. Instead, we should prohibit spaces in string regex, because a space is never read by operator>> so a string like "ab cd" will validate but GEOSX will only read "ab".

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions