[erlang-questions] no default value support in xmerl?

Taylor Venable <>
Mon Mar 14 11:34:15 CET 2011


On Mon, Mar 14, 2011 at 02:54, Joakim G. <> 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."

-- 
Taylor C. Venable
http://metasyntax.net/


More information about the erlang-questions mailing list