[ 
https://issues.apache.org/jira/browse/DAFFODIL-1638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16869805#comment-16869805
 ] 

Michael Beckerle commented on DAFFODIL-1638:
--------------------------------------------

So validation of DFDL schemas seems hopeless in eclipse (at least without 
modifying eclipse) for now.

But one can still achieve something and get some good eclipse UI support.

One can enable XML validation, setup ".tdml" files to be viewed as XML, and 
then a number of small bugs arise which can be fixed where we have xml files 
that are invalid for small reasons.

What works:
 * content assist for long-form dfdl properties. E.g., if you place cursor in a 
dfdl:format or dfdl:element annotation element, then eclipse provides an 
"Add-Attribute" menu which will roll-out and show you all the allowed 
properties. It will even insert them with the "dfdl:" prefix for short form 
inside embedded schemas of TDML files.
 * content assist for TDML files.
 * Validation of TDML files
 * Validation of XML files

Once you do this, the test TDML files that intentionally contain invalid DFDL 
schema become apparent.

There are 28 validation errors spread over 8 TDML files in daffodil-test

Once you enable XML validation, TDML files must declare namespace prefixes for 
ex and tns, because the eclipse tooling can't see the magic the TDML runner 
does to automatically insert these.

Probably the TDML runner feature that does this magic should be deprecated so 
that we're not creating TDML files that are invalid relative to the tdml.xsd 
schema.

> Isolate invalid DFDL schema and XML files so IDEs dont flag them
> ----------------------------------------------------------------
>
>                 Key: DAFFODIL-1638
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-1638
>             Project: Daffodil
>          Issue Type: Improvement
>          Components: Clean Ups, Infrastructure
>            Reporter: Michael Beckerle
>            Priority: Major
>
> our daffodil source tree has, intentionally, invalid DFDL schema files that 
> cause validation to fail for unit test purposes (negative tests). We should 
> rename these files so they don't cause the Eclipse (or other) IDE to create 
> distracting validation warnings when you have the daffodil source tree open.
> These tests need to explicitly use file names like foo.dfdl.xsd.invalid so 
> that the IDE will not view it as a XSD file and try to validate it.
> This will enable a single setup of Eclipse to be used by persons trying to 
> author DFDL schemas, who want the XML & XSD validation capabilities turned 
> on, and used by persons trying to do daffodil development.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to