[Bug] SymbolicFunction expression containing commas inputs fail XML validation
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:
- Modify
examples/functions/function_examples/function_examples.xmlto use a binary builtin function (e.g.pow) - Run the full build up to the XML validation step
- 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".
Sounds reasonable. If I recall correctly, whitespace isn't allowed in symbolic functions anyway.