Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Caveat: For this to work, the schemas being combined must have target namespaces, and they all must be distinct target namespaces.

Issue:

Jira
serverASF JIRA
serverId5aa69414-a9e9-3523-82ec-879b028fb15b
keyDAFFODIL-2916
is a bug (in Daffodil 3.8.0 and prior) which , (until fixed) prevents combining from working for schemas with no namespace.  

Hint: if DFDL schemas follow the style suggestions in DFDL Schema Style Guide, they are much easier to combine/compose together. 

Let's assume you have 3 different message types, A, B, and C. Each has a DFDL schema file a.dfdl.xsd, b.dfdl.xsd, and c.dfdl.xsd. 

...

Code Block
titlea.dfdl.xsd
<schema
 xmlns    
 xmlns="http://www.w3.org/2001/XMLSchema"
 xmlns:xs="http://www.w3.org/2001/XMLSchema"
 xmlns:a="urn:a"
 targetNamespace="urn:a">
 
<element name="a_msg" type="a:a_msg_type"/>

... plus type definitions
</schema>

...

Code Block
titleb.dfdl.xsd
<schema
 xmlns    
 xmlns="http://www.w3.org/2001/XMLSchema"
 xmlns:xs="http://www.w3.org/2001/XMLSchema"
 xmlns:b="urn:b"
 targetNamespace="urn:b">
 
<element name="b_msg" type="b:b_msg_type"/>

... plus type definitions
</schema>

...

Code Block
titlec.dfdl.xsd
<schema
 xmlns    
 xmlns="http://www.w3.org/2001/XMLSchema"
 xmlns:xs="http://www.w3.org/2001/XMLSchema"
 xmlns:c="urn:c"
 targetNamespace="urn:c">
 
<element name="c_msg" type="c:c_msg_type"/>

... plus type definitions
</schema>

...