[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] grouping/sorting on delimited field
Hi all. I am a digester, so I would appreciate a direct reply along with your reply to the list. I have XML that looks like this: <dataroot xmlns:od="urn:schemas-microsoft-com:officedata" generated="2005-06-07T15:27:42"> <HQPayloads> <MotherPayload>ADF</MotherPayload> <PayloadTitle>Avian Development Biology Experiment</PayloadTitle> <Increment>|4|</Increment> </HQPayloads> <HQPayloads> <MotherPayload>ADUM</MotherPayload> <PayloadTitle>Advanced Diagnostic Ultrasound in Microgravity</PayloadTitle> <Increment>|8||9||10||11|</Increment> </HQPayloads> <HQPayloads> <MotherPayload>AFEL</MotherPayload> <PayloadTitle>Advanced Flight Engineering Lab</PayloadTitle> <Increment>|3|6||8|</Increment> </HQPayloads> </dataroot> and I need to sort and group on the <Increment> element so that I end up with something like this: <p>Increment 1<br/> <PayloadTitle> (<MotherPayload>)<br/> <PayloadTitle> (<MotherPayload>)<br/> <PayloadTitle> (<MotherPayload>) </p> <p>Increment 2<br/> <PayloadTitle> (<MotherPayload>) <PayloadTitle> (<MotherPayload>)<br/> <PayloadTitle> (<MotherPayload>)<br/> <PayloadTitle> (<MotherPayload>)<br/> <PayloadTitle> (<MotherPayload>) </p> <p>Increment 3<br/> <PayloadTitle> (<MotherPayload>) <PayloadTitle> (<MotherPayload>)<br/> <PayloadTitle> (<MotherPayload>) </p> <p>Increment 4<br/> <PayloadTitle> (<MotherPayload>) <PayloadTitle> (<MotherPayload>)<br/> <PayloadTitle> (<MotherPayload>)<br/> <PayloadTitle> (<MotherPayload>) </p> I am using XSLT 1, Saxon and am trying to avoid extension functions (one option would be to use Saxon's range function and loop from 1 to 11, using contains()). Any ideas/help is appreciated! I have never had to sort/group on a delimited field before. --Nate ____________________________________________________ Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs
|
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
|