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

RE: RE: RE: html tables with XSL

Subject: RE: RE: RE: html tables with XSL
From: cknell@xxxxxxxxxx
Date: Thu, 12 Jan 2006 07:20:38 -0500
RE: RE: RE:  html tables with XSL
Attaching files is not a good idea. When we ask for you to post a stylesheet or a data file or whatever, just paste them into the body of the message.

That being said, given the data document you posted today and the expected output you attached to yesterday's message, I don't see how you can get the output you asked for. Nonetheless, I took the data document you posted today and constructed a stylesheet that produces an output of the format you asked for yesterday, making allowances for the difference in the string values of the elements in the input document versus the expected output in yesterday's attachment.

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

  <xsl:template match="/">
    <table border="1">
      <TR>
        <TH COLSPAN="1" bgcolor="#E0E0E0">Name</TH>
        <TH COLSPAN="1" bgcolor="#E0E0E0">Key Properties</TH>
        <TH COLSPAN="1" bgcolor="#E0E0E0">checkthis</TH>
      </TR>
      <xsl:apply-templates />
    </table>
  </xsl:template>
  
  <xsl:template match="Formelements">
    <xsl:apply-templates />
  </xsl:template>
  
  <xsl:template match="Form[contains(elementid,'properties')]">
    <tr>
      <td bgcolor="#F0F8FF">
        <ul>
          <li>
            Name: <xsl:value-of select="preceding-sibling::Form[contains(elementid,'name')]" />
          </li>
          <li>
            Address: <xsl:value-of select="preceding-sibling::Form[contains(elementid,'address')]" />
          </li>
        </ul>
      </td>
      <td bgcolor="#F0F8FF"><ul><li>Key Prop:<xsl:value-of select="." /></li></ul></td>
      <td><input type="radio" name="group1" value="check" bgcolor="#F0F8FF">check this</input></td>
    </tr>
  </xsl:template>
  
  <xsl:template match="Form/elementid[not(contains(elementid,'properties'))]" />

</xsl:stylesheet>
-- 
Charles Knell
cknell@xxxxxxxxxx - email

Current Thread
  • html tables with XSL, (continued)
    • Deepak - 11 Jan 2006 16:28:32 -0000
    • cknell - 11 Jan 2006 18:31:48 -0000
    • Deepak - 12 Jan 2006 10:05:42 -0000
    • Deepak - 12 Jan 2006 10:05:58 -0000
    • cknell - 12 Jan 2006 12:20:28 -0000 <=
      • Deepak - 13 Jan 2006 11:09:05 -0000
        • Deepak - 13 Jan 2006 15:13:48 -0000
        • Deepak - 18 Jan 2006 15:10:46 -0000
    • cknell - 18 Jan 2006 21:37:23 -0000

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.