olabusayoT commented on code in PR #1610:
URL: https://github.com/apache/daffodil/pull/1610#discussion_r2683770181
##########
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:
Just that bit throws the SDE. The spec does say OVC can't be on a global
element, which the root is, no? ("The element must not be optional nor an array
nor be global.")
--
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]