Mike Beckerle created DAFFODIL-2729:
---------------------------------------
Summary: Need diagnostic if same namespace imported from 2
different files
Key: DAFFODIL-2729
URL: https://issues.apache.org/jira/browse/DAFFODIL-2729
Project: Daffodil
Issue Type: Bug
Components: Front End
Affects Versions: 3.4.0
Reporter: Mike Beckerle
Suppose you have a big pile of definitions in target namesspace A, in file
A1.dfdl.xsd.
But you have a place in your schema where you need only a few of the
definitions in namespace A.
So you create a separate file A2.dfdl.xsd, and move that handful of definitions
of of A1 into it.
If you try to import A1.dfdl.xsd in one part of your schema where you need all
of it, and import A2.dfdl.xsd in the other place where you need just the few.
You get symbol not found problems.
What we need is a diagnostic saying the same namespace is being imported by way
of multiple different files, and so reject the 2nd one as SDE.
Or,... perhaps this is supposed to work? In which case we need to combine the
contributions to that target namespace from the different files.
But I think this is not supposed to work. A target namespace can only be
imported from one file. Need to verify this.
The workaround is that I got over splitting up my definitions, and just
imported A1.dfdl.xsd from all places that needed any symbols from that
namespace. I eliminated the A2.dfdl.xsd subset file entirely. Didn't seem to
lengthen schema compile time at all. (Very big schema)
The bug is just the amount of time wasted due to this not providing a better
diagnostic.
Any time something is imported/included but the symbols defined there are NOT
going to be visible/resolved, then that's an SDE.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)