Michael,

Thanks.  I went with James Clark's code.  Once I taught it to use namespaces it worked just fine for me.


--Marty

----- Original Message ----
From: Michael Kay <mike@saxonica.com>
To: Mailing list for SAXON XSLT queries <saxon-help@lists.sourceforge.net>
Sent: Friday, September 29, 2006 2:30:20 PM
Subject: Re: [saxon] Attribute Order

Well, you could put Saxon's output through an XML canonicalizer: some of my test suites use a canonicalizer produced years ago by James Clark. Or you could tweak the Saxon serializer. With the new features in 8.8 this shouldn't be too hard:
 
* create a subclass of XMLEmitter in which you intercept the calls on attribute() and namespace() and startContent() to buffer the attributes and sort them
 
* subclass SerializerFactory, overriding the newXMLEmitter() method to instantiate your subclass of XMLEmitter
 
* register this subclass of SerializerFactory with the Configuration object
 
Michael Kay
http://www.saxonica.com/


From: saxon-help-bounces@lists.sourceforge.net [mailto:saxon-help-bounces@lists.sourceforge.net] On Behalf Of Martin Wegner
Sent: 29 September 2006 19:54
To: saxon-help@lists.sourceforge.net
Subject: [saxon] Attribute Order


Whenever I see someone write into this list about having trouble with the order of attributes in a serialized XML message, I always laugh.  But now I am laughing at myself.  I have found myself in the difficult spot where I need two different machines, with the same JARs, JRE and classpath, to produce the same sequence of bytes for a given DOM.  Is there any solution to this aside from writing my own serializer?

And yes, you can start laughing.


--Marty

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
saxon-help mailing list
saxon-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/saxon-help