Project

Profile

Help

Attribute order in Saxon 10

Added by Vladimir Nesterovsky about 4 years ago

Saxon 10 has significantly changes the order of attributes in the serialized xml. In past it followed the order of generation or source xml, while at present it probably implementation defined (probably depends on order in hash table, and might be even to depend on random seed).

I know order of attributes in serialized xml is not important according to xml specification but we store generated files in source control, and earlier technique was more benign in respect to diffs between regeneration.

At present addition or removal of single attribute may lead to considerable reordering of serialized form.

Is it possible to reinstate original attribute stability as a Saxon feature?


Replies (3)

Please register to reply

RE: Attribute order in Saxon 10 - Added by Michael Kay about 4 years ago

Yes, I think we may have to rethink this. It seems a lot of people are doing lexical diffs rather than logical diffs when comparing test results.

Could you confirm that the effect is only observed when there are 5 or more attributes?

RE: Attribute order in Saxon 10 - Added by Vladimir Nesterovsky about 4 years ago

It looks like this. We have cases of 2-3 attributes that look stable, and cases of many attributes are not.

RE: Attribute order in Saxon 10 - Added by Michael Kay about 4 years ago

I decided to revert this change: see bug #4498. The LargeAttributeMap now maintains attributes in order of insertion.

    (1-3/3)

    Please register to reply