Sean was having some problems with the .Net xml parser, it seems to think that attribute order is significant when the W3C spec says otherwise.

W3C Spec:

[Definition: The beginning of every non-empty XML element is marked by a start-tag.]

Start-tag
[40] STag ::= '<' Name (S Attribute)* S? '>' [WFC: Unique Att Spec]
[41] Attribute ::= Name Eq AttValue [VC: Attribute Value Type]
[WFC: No External Entity References]
[WFC: No < in Attribute Values]

The Name in the start- and end-tags gives the element’s type. [Definition: The Name-AttValue pairs are referred to as the attribute specifications of the element], [Definition: with the Name in each pair referred to as the attribute name ] and [Definition: the content of the AttValue (the text between the ' or " delimiters) as the attribute value.] Note that the order of attribute specifications in a start-tag or empty-element tag is not significant.

Microsoft’s response to Sean’s bug:

Hi Sean,

This is by design.XNodeEqualityComparer was not designed to stricly adhere to the xml spec.Most people expect attribute ordering to be significant and hence XNodeEqualityComparer was designed that way.

thanks
Nithya Sampathkumar
Program Manager

Read the full post here.

No TweetBacks yet. (Be the first to Tweet this post)