[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Xalan attribute order

Subject: Xalan attribute order
From: Joseph Kesselman <keshlam@xxxxxxxxxx>
Date: Wed, 28 Aug 2002 16:22:30 -0400
xerces attribute order
>I know, attribute order doesn't matter, and if order matters,
> something is wrong.

****EXTREMELY**** wrong. Attribute order shouldn't be significant for HTML 
either.

> 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 
it. 

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 
expect.

______________________________________
Joe Kesselman  / IBM Research

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.