Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 16th, 2006, 03:18 AM
Registered User
 
Join Date: May 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default create 2-columns table from an XML document

Hi all,

I have an XML document with a list of names.

Something like this

<NAMES>
  <NAME> Jean Dupont </NAME>
  <NAME> Marie Laforêt </NAME>
  <NAME> Celine Dion </NAME>
  <NAME> Carlos Santana </NAME>
    ...
</NAMES>

I want to create an XSLT stylesheet that could output the names in a HTML table with 2 names per row

Something like this

+---------------------------------+
| Jean Dupont | Marie Laforêt |
| Celine Dion | Carlos Santana |
+---------------------------------+

There can be an arbitrary number of names and I can't modify the XML structure (but I can add attributes to it if it helps)

I'm quite new in XSLT and I don't know if such a thing would be possible without too much complexity.

Thanks to anyone that could help ...

 
Old May 16th, 2006, 03:35 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

See

http://www.dpawson.co.uk/xsl/sect2/N7450.html

especially the first entry.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
 
Old May 16th, 2006, 04:17 AM
Registered User
 
Join Date: May 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

That was exactly what I was looking for.

Thanks a lot !

Thomas






Similar Threads
Thread Thread Starter Forum Replies Last Post
create XML from database table angshujit ASP.NET 2.0 Basics 0 February 1st, 2007 07:09 AM
SQL Table to XML Document kapi.goel SQL Language 1 April 27th, 2006 07:24 AM
SQL Table to XML Document kapi.goel SQL Server 2000 5 April 25th, 2006 06:33 AM
SQL Table to XML Document kapi.goel XML 4 April 24th, 2006 08:03 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.