mike-mcgann commented on code in PR #895:
URL: https://github.com/apache/daffodil/pull/895#discussion_r1050894755
##########
daffodil-core/src/main/scala/org/apache/daffodil/dsom/SchemaSetIncludesAndImportsMixins.scala:
##########
@@ -57,13 +57,20 @@ trait SchemaSetIncludesAndImportsMixin { self: SchemaSet =>
lazy val allSchemaFiles = {
val fd = fakeXMLSchemaDocument //bootstrap
val sa = fd.seenAfter
+ val (_, first) = if (sa.value.isEmpty) (null, null) else sa.value.head
val sfl = sa.value.flatMap {
case (_, ii) => {
val sf = ii.iiSchemaFileMaybe // maybe not if we've already seen this
file for the same namespace.
+ // Require the first schema file to have a DFDL namespace. Other
included or imported schemas can be
+ // standard XSD schemas but emit a warning that the schema is being
ignored.
sf.filter { f =>
- if (f.isDFDLSchemaFile)
+ if (f.isDFDLSchemaFile) {
true
- else {
+ } else if (f eq first) {
+ f.SDEButContinue("Non-DFDL Schema file. Does not have DFDL
namespace definition on schema root element.\n" +
Review Comment:
Updated with the recommended change.
--
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]