I feel like early on we also had issues with Eclipse where it wasn't
smart enough, and once it saw "xs:schema" it assumed this was a XSD and
would allow things outside of the XSD subset that DFDL defines. So it
would essentially ignore the "schema for DFDL schemas" and always use
the "schema for XML Schemas". Using daf:DFDL would definitely avoid that
issue. But I haven't use eclipse or other IDE's, so this may not be an
issue anymore.

On 12/21/20 10:03 AM, Beckerle, Mike wrote:
> Yes, if the tooling is smart enough, there's no reason for this daf:DFDL 
> thing. It's all about allowing people to use whatever tools from whatever 
> source, and get something from the general XML support in those tools.
> 
> ________________________________
> From: John Wass <jwa...@gmail.com>
> Sent: Monday, December 21, 2020 8:08 AM
> To: dev@daffodil.apache.org <dev@daffodil.apache.org>
> Subject: Re: Daffodil schema file extension
> 
>> The advantage of a <daf:DFDL...> element would be that it wouldn't matter
> that the tooling is smart.
> 
> So if the tooling was smart, there would be no need to consider this and
> would just stick with xs:schema?
> 
> (smart: recognizes a .dfdl extension as DFDL _and_ knows the DFDL language,
> actions, etc)
> 
> 
> On Fri, Dec 18, 2020 at 12:45 PM Beckerle, Mike <
> mbecke...@owlcyberdefense.com> wrote:
> 
>> Well, admittedly some of my observations may be dated to using Eclipse. I
>> agree IntelliJ does seem to just generally a better job on all forms of
>> XML/XSD/DFDL.
>>
>> The advantage of a <daf:DFDL...> element would be that it wouldn't matter
>> that the tooling is smart. Any XML-aware tool would treat these as XML
>> documents, and use the schemas we provide to give full support for all
>> aspects.
>>
>> If I was still using Eclipse I would probably have built daf:DFDL by now.
>> With IntelliJ I've been able to avoid the need I guess
>>
>> ________________________________
>> From: John Wass <jwa...@gmail.com>
>> Sent: Friday, December 18, 2020 12:37 PM
>> To: dev@daffodil.apache.org <dev@daffodil.apache.org>
>> Subject: Re: Daffodil schema file extension
>>
>>> If you have edited tdml in an XML aware editor, you know that the support
>> for embedded dfdl schemas is better than it is in xsd editors for a dfdl
>> schema file.
>>
>> Better in what way?  They looked pretty similar to me, in intellij.
>>
>>
>> On Fri, Dec 18, 2020 at 12:35 PM John Wass <jwa...@gmail.com> wrote:
>>
>>> Thanks for the feedback.  It was in line with what I figured.  There is a
>>> chance the ambiguity I am seeing between .dfdl.xsd and .xsd is self
>>> inflicted, but just wanted to put this out there.
>>>
>>>
>>>
>>> On Fri, Dec 18, 2020 at 10:14 AM Beckerle, Mike <
>>> mbecke...@owlcyberdefense.com> wrote:
>>>
>>>> If you have edited tdml in an XML aware editor, you know that the
>> support
>>>> for embedded dfdl schemas is better than it is in xsd editors for a dfdl
>>>> schema file.
>>>>
>>>> For that reason I thought maybe we should use the ".dfdl" extension for
>> a
>>>> daffodil feature which replaces the xs:schema element of a dfdl schema
>> with
>>>> a daf:dfdl element. It would otherwise take all the same attributes as
>>>> xs:schema, but by being our own outermost element the editor support
>> would
>>>> treat it more like tdml than xsd.
>>>>
>>>> This breaks a daf:dfdl schema from being exactly an XML schema, but the
>>>> transform to get back is trivial. This might be worth it for the
>> superior
>>>> IDE support we would get with almost no effort.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Get Outlook for Android<https://aka.ms/ghei36>
>>>> ________________________________
>>>> From: Steve Lawrence <slawre...@apache.org>
>>>> Sent: Friday, December 18, 2020 9:31:58 AM
>>>> To: dev@daffodil.apache.org <dev@daffodil.apache.org>
>>>> Subject: Re: Daffodil schema file extension
>>>>
>>>> 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