[
https://issues.apache.org/jira/browse/DAFFODIL-1907?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16378785#comment-16378785
]
Michael Beckerle commented on DAFFODIL-1907:
--------------------------------------------
One suggested solution for this bug is for Daffodil (any DFDL processor really)
to inspect any imported file, and if it doesn't have a namespace prefix bound
to the DFDL URI, then ignore it for purposes of compiling the DFDL schema.
If fed to say, Xerces, for validation, the imported schema would still be read,
but Daffodil itself would not parse the file into DSOM objects at all, and so
would not trip over say, attribute declarations that are only needed for an
annotation language.
The only downside of this I can think of is that you could have a DFDL schema
file that contains say, only reusable type definitions that have no DFDL
annotations in them; hence, a prefix for the DFDL namespace wouldn't be
strictly necessary. This rule would require that the schema contain an xml
namespace binding for the DFDL URI anyway. By providing a suppressable Schema
Definition Warning when a file is being ignored, this downside is entirely
acceptable.
> Daffodil disallows attribute declarations for non-DFDL annotation elements.
> ---------------------------------------------------------------------------
>
> Key: DAFFODIL-1907
> URL: https://issues.apache.org/jira/browse/DAFFODIL-1907
> Project: Daffodil
> Issue Type: Bug
> Components: Front End
> Affects Versions: 2.0.0
> Reporter: Michael Beckerle
> Priority: Major
> Fix For: 2.2.0
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> A user has an annotation system goes by name "STF".
> These annotations need to live in the same DFDL schema as DFDL annotations. .
> They are isolated in their own xs:appinfo blocks with different source URI.
> The problem is that this annotation language uses XML attributes on some of
> its annotation elements (just as DFDL does).
> And there's the problem.... this annotation language has xs:attribute
> declarations, and Daffodil issues an SDE because of them, because we don't
> know that they aren't intended to be (mistakenly) used for data. We don't
> have a way of knowing they're only for an annotation language that we'll be
> ignoring.
> We need a mechanism to tolerate these without turning off checking for misuse
> of DFDL-disallowed XML constructs entirely.
> Possibilities might be to issue an SDW, but have a means for suppressing this
> SDW so that users with this situation don't have to put up with lots of SDW
> messages. Another idea is to have a dfdl:ignore annotation that can be placed
> on an xs:include/xs:import telling Daffodil to not carry out that import.
> Another possibility is to add XSD1.1 features for conditional preprocessing
> of schemas.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)