[erlang-questions] no default value support in xmerl?
Mon Mar 14 14:16:27 CET 2011
I be damned! Haha. It's XML Schema that is broken then. Smile.
On 2011-03-14 11:34, Taylor Venable wrote:
> On Mon, Mar 14, 2011 at 02:54, Joakim G. <jocke@REDACTED> wrote:
>> The XML schema support in xmerl considers all default elements
>> as mandatory.
> I think this is correct behavior; according to http://www.w3.org/TR/xmlschema-0/
> "The schema processor treats defaulted elements slightly differently.
> When an element is declared with a default value, the value of the
> element is whatever value appears as the element's content in the
> instance document; if the element appears without any content, the
> schema processor provides the element with a value equal to that of
> the default attribute. However, if the element does not appear in the
> instance document, the schema processor does not provide the element
> at all. In summary, the differences between element and attribute
> defaults can be stated as: Default attribute values apply when
> attributes are missing, and default element values apply when elements
> are empty."
More information about the erlang-questions