I know, attribute order doesn't matter, and if order matters,
something is wrong.
****EXTREMELY**** wrong. Attribute order shouldn't be significant for HTML
I guess Xalan sorts the attributs alphabetically.
Is there a way, to change the behaviour of Xalan?
XML parsers do not promise to retain attribute order, so this information
is generally gone before it reaches Xalan. I don't think we deliberately
change the order, but I know we don't make any special effort to maintaiin
You could try to find an XML parser which retains the original order,
connect Xalan to that rather than using the Xerces or Crimson parsers we
generally run with, and see if Xalan "just happens" to then do the right
thing for you.
If it doesn't... I think you're looking at writing some sort of custom
extension of the Xalan HTML serializer which knows what attribute order
works for your tools and sorts them (or feeding Xalan's output into some
other resorting mechanism).
Personally, I would suggest you replace the downstream tools. Nonstandard
patches to support broken behavior are a thoroughly bad game to get into;
the ongoing maintainance costs are likely to be much larger than you
Joe Kesselman / IBM Research
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list