|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] access to preceding-sibling in a sorted list
Hi! I'm using xslt 1 with PHP to create a XHTML output for a address book stored in my own (I can change it, if necessary) xml format which looks basically like this (will be around 500 "<card>": <box> <card type="person"> <full-name>Simon Ruf</full-name> </card> <card type="person"> <full-name>Elizabeth Noname</full-name> </card> <card type="person"> <full-name>Jack</full-name> </card> <card type="person"> <full-name>Emanuel Ruf</full-name> </card> </box> The Ouput is a long sorted (by xsl:sort) <ul>-List. I'd like to jump to the entries beginning with "e" by an xhtml-anchor. For that I need to put an id="E" to the first entry beginning with e. In the end it should look like this: <ul> <li id="E">Elizabeth Noname</li> <li>Emanuel Ruf</li> <li id="J">Jack</li> <li id="S">Simon Ruf</li> </ul> I've tried to achieve this by saving the current first letter to a xsl:param but I couldn't change the value of the global parameter from within the template. Then I tried to access the value of the preceding sibling but this would only get me the values of the preceding sibling in the unsorted-list. (e.g. while processing the card of Emanuel Ruf it would get me the value "Jack" instead of "Elizabeth Noname") If there's a way please let me know. Thanks, Simon Ruf http://simonruf.de/
|
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
|






