[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Merging Alternate readings...
Hi There, Let's say I have a snippet of: <foo> <a id="a1"><body wit="A B C D E">This is a <app><rdg wit="A C D">test</rdg><rdg wit="B E">testament</rdg>, really. </body></a> <a id="a2"><body wit="A B C D E">This is a <app><rdg wit="A D">test</rdg><rdg wit="B C E">testament</rdg></app>, a really <app><rdg wit="A E">long</rdg><rdg wit="B C">important</rdg> <rdg wit="D">boring</rdg></app>test! </body> <body wit="F">This is a different body element</body> </a> </foo> And I want to output a list of merged-where-duplicate a/body elements based on the @wit attribute. So something like: <foo> <a id="a1"> <body wit="A C D">This is a test, really.</body> <body wit="B E">This is a testament, really.</body> </a> <a id="a2"> <body wit="A">This is a test, a really long test!</body> <body wit="B C">This is a testament, a really important test!</body> <body wit="D">This is a test, a really boring test!</body> <body wit="E">This is a testament, a really long test!</body> <body wit="F">This is a different body element</body> </a> </foo> I'm assuming it somehow involves an xsl:for-each based on the contents of body/@wit to create an individual reading for each of these IDREFS, but then how do you merge the duplicate ones back together? Many thanks for any (hopefully detailed for the xslt-challenged) help, -James -- Dr James Cummings, James.Cummings@xxxxxxxxx, http://www.uea.ac.uk/~q503 Cursus Project, School of Music, University of East Anglia, Norwich, Norfolk, NR4 7TJ, UK Tel:(01603)593-595 XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|