[DFDL-WG] MBTK and Daffodil - Intentioning Violating Property Scoping Rules?

Garriss Jr., James P. jgarriss at mitre.org
Thu Apr 25 09:59:43 EDT 2013


(Emotions are hard to convey in email; please trust me when I say that I am writing this email with kindness and friendliness!)

In section 8 it says, "The dfdl:format annotation on the top level xs:schema declaration provides defaults for the DFDL representation properties at every DFDL-annotatable component contained in the schema document. They do not apply to any components in any included or imported schema document (these may have their own defaults)."

If I understand this, it means that when properties are defined using <dfdl:format> in one DFDL schema file, they are out of scope for any other DFDL schema file.

So if schema A defines some properties and includes schema B, the properties are out of scope in schema B.
Similarly, if schema A includes schema B and schema B defines some properties, the properties are out of scope in schema A.

Is that right?  I think so, and I have empirically confirmed this in both tools.

Ok, so you know where this going, right?  Why does the following line work?

<xsd:import namespace="http://www.ibm.com/dfdl/GeneralPurposeFormat" schemaLocation="IBMdefined/GeneralPurposeFormat.xsd"/>

According to the spec, it shouldn't.  Yet both tools support it.

But if you make any changes to the GeneralPurposeFormat, it breaks.  You can't rename it.  You can't put it in a different folder.  Etc.

Here's what I suspect:  Both MBTK and Daffodil hard-coded this as an undocumented exception to the rule.

I think you want to have your cake (properties are out of scope) and eat it, too (except when we want them to be in scope because repeating all the properties in every DFDL file is a pain).

If I'm wrong, just let me know.  It's entirely possible that I don't really understand what's going here.

But if I'm right, then you guys should not do this.


*       If the spec makes sense, then you should follow the spec.

*       If the spec doesn't make sense, then you should change the spec.

*       If the spec needs an exception to the rule for this one case, then add an exception and follow it.

To intentionally break the spec in an undocumented fashion seems wrong.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ogf.org/pipermail/dfdl-wg/attachments/20130425/e9cf8485/attachment-0001.html>


More information about the dfdl-wg mailing list