Closed bertrand-lorentz closed 1 year ago
@bertrand-lorentz Thanks for pointing that out - you are totally right. Also the fix is exactly what is needed.
Quick info: afterwards another error occurs, because the pattern ID 1
is invalid:
2087 [main] ERROR com.helger.jaxb.validation.LoggingValidationEventHandler - JAXB [fatal_error] in obj: [ActivePattern@0x4a1e3ac1: document=null; documents=null; id=1; name=null; role=null; text=null] cvc-datatype-valid.1.2.1: '1' ist kein gültiger Wert für 'NCName'. (org.xml.sax.SAXParseException: cvc-datatype-valid.1.2.1: '1' ist kein gültiger Wert für 'NCName'.)
org.xml.sax.SAXParseException; lineNumber: 0; columnNumber: 0; cvc-datatype-valid.1.2.1: '1' ist kein gültiger Wert für 'NCName'.
at java.xml/com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:204)
Will be fixed in the upcoming 7.1.0 version (that is based on Saxon 12)
Quick info: afterwards another error occurs, because the pattern ID
1
is invalid:
The schematron is just a minimal example I quickly put together to reproduce the issue, so not a problem.
Thanks for the quick correction !
Because Saxon 12 has some issues, I also backported all the changes and create a ph-schematron 7.0.1 release that is based on Saxon 11.4
Trying to use the following Schematron in "pure" mode :
It fails for the second rule with the message below, because it can't resolve the
$inPattern
variable in the rule context.It seems that variables defined inside the "pattern" are not considered when resolving variable reference in the
context
attribute. After quick look around in the code I found the following in PSXPathBoundSchema.java:I think this should use
aPatternVariables
instead ofaGlobalVariables
The error message and stacktrace: