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

XSLT 1.0 : HTML table with

Subject: XSLT 1.0 : HTML table with
From: jeanph01 <jeanph01@xxxxxxxx>
Date: Wed, 21 Apr 2010 16:18:43 -0400
 XSLT 1.0 : HTML table with
 I want to create a table with xslt 1.0 from an XML source file containing a
varying number of key for each row :

 <?xml version="1.0" encoding="ISO-8859-1" ?>
       <OTCreatedByFullName>Jean-Philippe Martin</OTCreatedByFullName>
       <OTCreateDate >2007-08-30</OTCreateDate>
       <OTCreatedByFullName >Caroline</OTCreatedByFullName>

 So here my first key <SearchResult> have 3 sub-keys. But the second
<SearchResult> key have 5 sub-keys. I don't know what key will be present in
the set since it's a search result.

 This would have to give an html which would look like this with 5 columns:

                     <td>Jean-Philippe Martin</td>

 First, can it be done ?

 For the head row  I managed to get the unique key names with a M. Kay
algorithm I found but how to link a specific TD to its TH ?

   <xsl:template match="/">
     <table border="1">
           <xsl:for-each select="//SearchResult/*">
             <xsl:sort select="name(.)"/>
             <xsl:if test="generate-id(.) = generate-id(key('names',
                 <xsl:value-of select="local-name()"/>

 Thank you for any help.

Current Thread


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.
First Name
Last Name
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.