As I modify my schematron rules to make more use of variable, I've noticed that a variable defined as an XPath location with a predicate causes a warning:
WARN com.helger.schematron.pure.xpath.XPathEvaluationHelper$SaxonEvaluator - Unknown Saxon expression type: net.sf.saxon.expr.FilterExpression
An example of such a variable would be:
<let name="filterVar" value="/xml/car[@owner = 'o1']"/>
There's no problem when referencing this variable, as XPathEvaluationHelper.evaluateAsNodeList works and returns a node list.
Without the predicate [@owner = 'o1'], this would be a SlashExpression.
And as you can't know what the predicate/filter does, I think it would be OK to handle FilterExpression the same way as SlashExpression: map it to NODESET.
I think I'm done modifying my schematron rules, so this should be the last issue on this topic from me 😃
As I modify my schematron rules to make more use of variable, I've noticed that a variable defined as an XPath location with a predicate causes a warning:
WARN com.helger.schematron.pure.xpath.XPathEvaluationHelper$SaxonEvaluator - Unknown Saxon expression type: net.sf.saxon.expr.FilterExpression
An example of such a variable would be:
<let name="filterVar" value="/xml/car[@owner = 'o1']"/>
There's no problem when referencing this variable, as
XPathEvaluationHelper.evaluateAsNodeList
works and returns a node list.Without the predicate
[@owner = 'o1']
, this would be aSlashExpression
. And as you can't know what the predicate/filter does, I think it would be OK to handleFilterExpression
the same way asSlashExpression
: map it to NODESET.I think I'm done modifying my schematron rules, so this should be the last issue on this topic from me 😃