[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Sorting chemical formulae in XSLT 2.0
From: emmanuel.begue@xxxxxxxxx [mailto:emmanuel.begue@xxxxxxxxx] On Behalf Of Emmanuel Bigui >I think regexp would help. While it's been a while since I have had to >deal with chemical elements, and am therefore not sure I completely >understand your requirements, the following stylesheet gives the >expected result: Thanks, that's exactly the kind of solution I was after, and it sorts the elements in the full list correctly (at least based on the sample list I've been given). The Saxon collation David suggested looks like a very useful tip, but in this case, it sorted the numbers before the letters, so CH2O appeared after C2Cl4 which wasn't the desired outcome. I dare say it would have worked with some tweaking, but the regex solution is perfect. Cheers, Emma
|
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
|