A related node here was - http://stackoverflow.com/questions/152313/xml-attributes-vs-elements but that was more a design question.
My question is about validity.
If a schema requires
<record name="foo" description="bar" />
and I supply
<record>
<name>foo</name>
<description>bar</description>
</record>
Will the XML be considered invalid?
And vice versa: if elements were specified and I provide attributes, is it invalid?
Is there a reference in an XML spec documenting what an XML parser should do in this case, where the semantics is the same, but the literal XML structure differs?