[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: ATTRIBUTE ORDER
Hi,
At 12:26 AM 5/28/2006, M. David wrote: Both Dimitre and Dr. Kay bring out an important point to understand. The only counter argument I would make is "How many people actually use more than one XSLT processor on the same code base in production?" No, you have no idea ... except when you do. I have any number of stylesheets that will never run anywhere except on my own system, in a processor of my choice. I also write (and deliver to clients) stylesheets that are warranted to "run the same" on X version of Y processor (due to their use of extension functions or whatever). These cases I think are safely within the zone. In short, it's true that collation order creates an edge case for the sort-your-attributes solution to the attribute-ordering problem. On the other hand, one is not always looking at an edge case. Yet one of the reasons this list is a useful resource is that we're very careful, even sometimes to a fault, about edge cases. I could have qualified my suggestion further (actually I did remember the caveat, but was in haste as I wrote :-). But then we wouldn't have Mike's (and David's) correction to think about, or M. David's recommendation to hedge the hedge with comments. The XSLT 2.0 solution, select="(@mike, @davidc, @dimitre)", works great -- as long as you know who your attributes are ahead of time. (Which the OP did, IIRC. But I don't think he was using 2.0, and personally haven't come to the point where I'm recommending 2.0 solutions to 1.0 problems except in dramatic cases.) Cheers, Wendell
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|