|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Accessing multiple values of an attribute
Hello everyone, I have xml similar to the following <Table stripes="blue red green purple"> <Boxgrp> <Boxbod> <Boxrow> <Content> First Row</Content> </Boxrow> <Boxrow> <Content> Second Row</Content> </Boxrow> <Boxrow> <Content> Third Row</Content> </Boxrow> <Boxrow> <Content> Fourth Row</Content> </Boxrow> <Boxrow> <Content> Fifth Row</Content> </Boxrow> <Boxrow> <Content> Sixth Row</Content> </Boxrow> The number of values existing in the stripes attribute is variable (not always 4), and the rows in the table can also be of different numbers (i.e. I could get one with 20 rows) Using xsl, I must access the values of the 'stripes' attribute and colour the rows of the box.....i.e. in the above case, the box has 6 rows and 4 different colours so I want my rows to be coloured in the following way: Row 1: blue Row 2: red Row 3: green Row 4: purple Row 5: blue Row 6: red etc " green " purple Question: First of all, how do I access the different values of the stripes attribute (is there an easy way that I have overlooked?)? I need to know (a) how many of them there are (for my mod function) (b) what values they have. I was trying string-before and string-after but that could get messy if I got alot of different colours. Thanks & Regards Karen 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








