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

first-of-type

Subject: first-of-type
From: "Clark C. Evans" <clark.evans@xxxxxxxxxxxxxxxxxxxx>
Date: Sat, 2 Oct 1999 19:09:00 -0400 (EDT)
first of type
Hello.  I'm looking for the replacement for
the 'first-of-type' predicate.

Input:

  <p>
     <x> content for first x </x>
     <y> content for first y </y>
     <y> content for second y </y>
     <z> content for first z </z>
  <p>

I'd like output:

<table>
<tr><td>x</td><td>content for first x  </td></tr>
<tr><td>y</td><td>content for first y  </td></tr>
<tr><td> </td><td>content for second y </td></tr>
<tr><td>z</td><td>content for first z  </td></tr>
</table>

I can generate <table> and </table> on a template
for <p>.  Also, I seem to be able to do special
things for x and z using first() and last().  However,
I can't figure out how to differentiate between the
first y and the second y.

BTW, it seems that these predicates (first-of-type/last-of-type)
are horribly useful, why did they get nuked?

Thanks!

Clark Evans


 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.