Closed qligier closed 1 year ago
I am afraid this seems to be the same as #88 Pure version does not handle "let" with variables correctly :(
Query language binding for XPath 2 states:
The let element should not be used.
Oh, so variables substitution as it's implemented should only work with simpler XPath 1 expressions?
What do you think about always adding braces when substituting XPath variables? It should improve support for more complex expressions without pejorating current support (at least to my current understanding)?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hi, I've been playing with that and have implemented a PoC inspired by the pure version to validate Schematron files, using Saxon as XQuery processor and avoiding all XSLT transformations. I think the main difference is that I don't substitute variables in the patterns but execute them with Saxon and inject the result in the following selectors. It works fine with the large Schematron files I'm dealing with, but I don't know what subset of XPath 2/XSLT is effectively used in it and if it could work with any Schematron file. Could it be of any help here? If not, I guess this issue can be closed.
Closing this in favour of the newer #143 - tackle it there.
Hi, I'm trying to use the Pure Schematron validator but I've encountered an issue with variable substitution. The Schematron I deal with uses let statements with XPath 2 patterns, and an example of problematic rule is:
When the variables are resolved and replaced, the test becomes
and Saxon fails to compile it (Unexpected token "if(" at start of expression). Now, if braces are added around when replacing variable names with their content, Saxon is able to compile the resulting test:
The validation with XSLT is working as expected. Do you have any idea on this issue? Thank you, Quentin