|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] rearranging and colouring a document
Hello, I hope I shouldn't have found the answers to my questions on previous mails in the list, or the (very, very good xsl faq) I do have a document (drama marked up in TEI in fact), which I would like to transform in two ways: a) rearrange the document, so that all the parts for one person are listed in a block b) colour the text for a person in a certain colour (it does not matter which colour, as long as it is consistent within the document). As this should be applied to several texts, I do not want to have a fixed colour / name realationship. - Of course the text should otherwise be just a copy of the original text. Example source: <text> <sp><speaker>person1</speaker><p>text 1</p></sp> <sp><speaker>person2</speaker><p>text 2</p></sp> <sp><speaker>person3</speaker><p>text 3</p></sp> <sp><speaker>person2</speaker><p>text 4</p></sp> <sp><speaker>person1</speaker><p>text 5</p></sp> <sp><speaker>person2</speaker><p>text 6</p></sp> <sp><speaker>person1</speaker><p>text 7</p></sp> </text> expected result: a) (text sorting) <text> <sp><speaker>person1</speaker><p>text 1</p></sp> <sp><speaker>person1</speaker><p>text 5</p></sp> <sp><speaker>person1</speaker><p>text 7</p></sp> <sp><speaker>person2</speaker><p>text 2</p></sp> <sp><speaker>person2</speaker><p>text 4</p></sp> <sp><speaker>person2</speaker><p>text 6</p></sp> <sp><speaker>person3</speaker><p>text 3</p></sp> </text> b) (text colouring) <text> <sp colour="red"><speaker>person1</speaker><p>text 1</p></sp> <sp colour="blue"><speaker>person2</speaker><p>text 2</p></sp> <sp colour="green"><speaker>person3</speaker><p>text 3</p></sp> <sp colour="blue"><speaker>person2</speaker><p>text 4</p></sp> <sp colour="red"><speaker>person1</speaker><p>text 5</p></sp> <sp colour="blue"><speaker>person2</speaker><p>text 6</p></sp> <sp colour="red"><speaker>person1</speaker><p>text 7</p></sp> </text> Thanks for your assistance, Horst -- Horst@xxxxxxxxxxx Horst Eyermann Germany You need a dictionary? - visit http://www.freedict.de for free (GPL) dictionaries (unix; windows work in progress) For windows, visit http://www.freedict.de/wbuch A article (in German) about dictionary efforts on the net http://www.heise.de/tp/deutsch/inhalt/on/5927/1.html 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
|

Cart








