[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

rearranging and colouring a document

Subject: rearranging and colouring a document
From: horst@xxxxxxxxxxx
Date: Tue, 30 Jul 2002 20:28:46 +0200 (CEST)
text colouring
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.