You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by "Mike Beckerle (Jira)" <ji...@apache.org> on 2020/09/23 20:24:00 UTC

[jira] [Commented] (DAFFODIL-182) option for having xsi:type added to infoset

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

Mike Beckerle commented on DAFFODIL-182:
----------------------------------------

I think this is orthogonal to unionMemberSchema (and I do realize my comments above are from me, so I'm talking to myself here..... It's a process. Appreciate it! :))

 

Adding xsi:type, only to simple types, as an option, can make comparison of infosets better. E.g., with xsi:type='xs:double' one can know that 1.0 and 1 should be equal.

Different date/time/datetime variants with various time zones can be equivalent, etc.

We do some of this in the TDML runner for purposes of making test comparisons work better. (Currently as I write this, mostly for calendar-related types).

But it would be generally useful to have the schema's primitive type for elements sometimes. E.g, in tests it would save the author of the test from having to put their own such xsi:type annotations on.

> option for having xsi:type added to infoset
> -------------------------------------------
>
>                 Key: DAFFODIL-182
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-182
>             Project: Daffodil
>          Issue Type: New Feature
>          Components: Back End, DFDL Language
>            Reporter: Mike Beckerle
>            Priority: Minor
>
> Because the infoset is jdom, everything is a string.
> To make clear types, XML uses the xsi:type attribute. 
> We should have an option to have these added. Then our tests can make sure things were detected to be the right type. 
> However, many people will find this too cluttered, so it has to be an option that can be turned off.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)