Closed yaozhihang closed 2 years ago
The issue is the use of forward slashes in the string literal "http://somewhere"
. Forward slashes are interpreted as slash operator by the query compiler but not as part of the string literal. I am not sure whether slashes are allowed in strings or should rather be esacped according to the XPath specification?
On a XML schema level, the value of <valueReference>
is defined as simple xs:string
. That's why the XML validates against the schema, although the XPath expression cannot be processed.
Ok, I checked it: forward slashes don't need to be escaped. This means you have found a bug here.
I created a PR (#221) to support slashes in string literals.
Yet, the Validate XML query
process only checks whether the XML query entered into the input field conforms to the XML schema. Should we also compile the query to identify more possible errors when clicking this button (like incorrect names and namespaces of features and attributes, incorrect XPath expressions, data type issues, etc.)? Not sure if this is easy to implement though.
Moved the question above to a separate ticket #224
The following query is valid, but cannot be parsed by the Importer/Exporter