[
https://issues.apache.org/jira/browse/DAFFODIL-2947?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17892528#comment-17892528
]
Mike Beckerle commented on DAFFODIL-2947:
-----------------------------------------
Note that this is another bug that makes creation of a root element in a
no-namespace schema impossible.
Any other schema that defines a global element of the same name, like
"message", but in a namespace means that this TDML error will occur.
> TDML test case rootNS="" doesn't work to specify root element in no namespace
> -----------------------------------------------------------------------------
>
> Key: DAFFODIL-2947
> URL: https://issues.apache.org/jira/browse/DAFFODIL-2947
> Project: Daffodil
> Issue Type: Bug
> Components: TDML Runner
> Affects Versions: 3.9.0
> Reporter: Mike Beckerle
> Priority: Major
>
> I have a schema with a "message" element defined as the root element in a
> no-namespace schema.
>
> This schema imports another schema (tcpHeader) which defines a "message"
> element in its own namespace.
>
> When I try to run a TDML test, I get this error:
> ```
> [error] Test
> io.github.dfdlschemas.envelopepayload.TestEnvelopePayload.test_envelopepayload_02
> failed: org.apache.daffodil.tdml.TDMLExceptionImpl: (Implementation:
> daffodil) test does not expect Error diagnostics, but created the following:
> Schema Definition Error: Root element message is ambiguous. Candidates are
> List(message in namespace urn:io.github.dfdlschemas.tcpMessage, message in no
> namespace).
> ```
> This happens regardless of whether the test case contains
> ```
> root="message" rootNS=""
> ```
> or just
> ```
> root="message"
> ```
> or no root specified as an attribute at all.
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)