[ 
https://issues.apache.org/jira/browse/DAFFODIL-1155?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mike Beckerle updated DAFFODIL-1155:
------------------------------------
    Priority: Minor  (was: Major)

> boolean element default='true' causes SDE
> -----------------------------------------
>
>                 Key: DAFFODIL-1155
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-1155
>             Project: Daffodil
>          Issue Type: Bug
>          Components: General, Middle "End"
>    Affects Versions: s15
>            Reporter: Mike Beckerle
>            Priority: Minor
>
> If you have an element declaration like this:
> {code}
> <xs:element name="foo" type="xs:boolean" default="true" .../>
> {code}
> Then you get an SDE - cannot convert true to Boolean.
> Changing the default to
> {code}
> <xs:element name="foo" type="xs:boolean" default="{ fn:true() }" .../>
> {code}
> Seems logical, but should give a different SDE because the default attribute 
> is an XSD thing, and it can't take DFDL expressions there, only XSD values.
> We need to check that the value of the default attribute is an XSD value. If 
> the type of the element was xs:string, it would be really confusing because 
> then this default value that looks like an expression would be accepted! (but 
> treated as a literal string".
> We should check that the value of the default attribute is a legal XSD value, 
> and issue a warning if it is a string, for an element of type string, which 
> looks like a DFDL expression.



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

Reply via email to