stevedlawrence commented on code in PR #1610:
URL: https://github.com/apache/daffodil/pull/1610#discussion_r2683938142
##########
daffodil-core/src/main/scala/org/apache/daffodil/core/compiler/Compiler.scala:
##########
@@ -118,7 +118,16 @@ final class ProcessorFactory private (
def getDiagnostics: java.util.List[api.Diagnostic] = diagnostics.asJava
- override def onPath(xpath: String): api.DataProcessor = sset.onPath(xpath)
+ override def onPath(xpath: String): api.DataProcessor = {
+ try {
+ sset.onPath(xpath)
+ } catch {
+ case sde: SchemaDefinitionError => {
+ sset.error(sde)
+ sset.createDataProcessor(p = null, u = null)
+ }
+ }
+ }
Review Comment:
Ah yeah, the root element is global. That said, we do allow IVC on global
elements, and the spec disallows that too, and we have a lot of tests that make
use of. There's an argument that allowing one should allow the other.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]