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

Grouping data

Subject: Grouping data
From: Daniel Rodríguez Díaz <danielr@xxxxxxxxxxxxx>
Date: Thu, 16 Jan 2003 16:09:48 +0100
daniel rodriguez diaz
Hi,
I've got an xml document with 5 nodes and I try to transform it from xml into html in the following way:
I want to put the first 3 nodes inside a <p></p> using certain template, the rest inside a <div></div> using a different template.


I know how to manage the elements and count them but I don't know how to create a node including templates when I'm in the first or third node.

Here is an example to explain better:


XML


<raiz>
<item>
<nombre>Uno</nombre>
<apellidos>1111</apellidos>
</item>
<item>
<nombre>Dos</nombre>
<apellidos>2222</apellidos>
</item>
<item>
<nombre>Tres</nombre>
<apellidos>3333</apellidos>
</item>
<item>
<nombre>Cuatro</nombre>
<apellidos>4444</apellidos>
</item>
<item>
<nombre>Cinco</nombre>
<apellidos>5555</apellidos>
</item>
</raiz>


HTML


<p>
<h1>Uno</h1><h2>1111</h2>
<h1>Dos</h1><h2>2222</h2>
<h1>Tres</h1><h2>3333</h2>
</p>
<div>
<h3>Cinco</h3>
<h3>Cinco</h3>
</div>

Thanks in advance


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread
  • Grouping data
    • Daniel Rodríguez Díaz - Thu, 16 Jan 2003 10:09:34 -0500 (EST) <=
      • <Possible follow-ups>
      • Andy J. Cupp - Thu, 16 Jan 2003 12:03:12 -0500 (EST)

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.