I think the main reason for the .xsd extension is so IDEs/editors
recognize the file as a normal XML Schema file, and so you get all the
benefits that come with that (e.g. autocompletion, syntax highlighting,
error checking), since most tools aren't going to know about a DFDL
schema, at least by default.

The .dfdl.xsd extension is so that it makes it possible to configure
IDEs/editors to know specifically about DFDL schemas (e.g. DFDL specific
annotations/properties). But that requires a little IDE configuration,
and not all IDEs/editors support this kind of thing. So even if you
can't do that, you still at least get the XML Schema capabilities with
the .xsd extension.

As for changing it, that should be fine from a Daffodil perspective. It
doesn't care at all about the extension--it is purely a convention to
make authoring schemas easier.

Though, one thing to keep in mind is that although these are "DFDL
Schemas", they are still valid XML Schemas and can be used anywhere an
XML Schema can be used. For example, it's not uncommon to parse a file
with a DFDL schema and then use that exact same schema to validate the
resulting infoset. It's possible some XML validation tools/systems
expect XML validation schemas to end in .xsd, though I'm not aware of
any though.

I general, I think the benefit to .dfdl.xsd is that things that only
care about XML schemas can view these files as normal XML Schemas due to
the .xsd extension. But things that also care about DFDL schemas can
have a special case to treat files with .dfdl.xsd extensions differently.

Also, I think I have seen .xml and plain .xsd (without .dfdl) extensions
used for DFDL schemas, likely for the IDE support. But .dfdl.xsd gets
you the possibility of that extra customization.


On 12/18/20 8:21 AM, John Wass wrote:
> Doing a little work with software that cares about file extensions,
> resulting in a couple questions about the history and future of the dfdl
> file extension.
> 
> 1, Why was the extension of .dfdl.xsd used?
> 2. What issues would arise by dropping the xsd part?
> 3. Are there any other extensions being used, or were there others in the
> past?
> 
> Interested in Daffodil and DFDL answers, if they diverge somehow.
> 
> Thanks!
> 

Reply via email to