Jump to content

Recommended Posts

Hello Everyone. I have a problem with the displaying of data in my XSL document which I hope someone could help me with. This should be quite simple for people with XSL experience.

I am currently pulling information from an XML file and displaying it using XSL on a cold fusion web page. My page is currently working displaying the "eventname" as it should down the left hand side of the page. However I have decided to put this information into a table on my page, to make it a little more "formatted". I have tried doing this myself and have come up with several error messages which I don't quite understand. If anyone could advise me on how this can be achieved like the below table that would be super. Thanks

[img]http://www.club-fish.com/gallery/images/2/medium/1_table.JPG[/img]

[code]<?xml version="1.0"?>
<xsl:stylesheet version="1.0"

  xmlns:xsl="(URL address blocked: See forum rules)">
  <xsl:output method="html" omit-xml-declaration="yes" />
 
  <xsl:template match="/">
<xsl:element name="html">
  <xsl:element name="head">
  <link rel="STYLESHEET" type="text/css" href="style.css"/>
  <title>boo</title>
  </xsl:element>
 
  <xsl:element name="body"> 
  <xsl:text>Events Avaliable ..</xsl:text>
  <xsl:element name="br" />
  <xsl:element name="br" />
  <xsl:apply-templates select="/boo/eventid" />
  </xsl:element>
    </xsl:element>
</xsl:template>

<xsl:template match="eventid">
<img src="images/arrow.gif"/>
  <xsl:element name="a">
  <xsl:attribute name="href">displayevents.cfm?id=<xsl:value-of select="@id"/></xsl:attribute>
  <xsl:value-of select="eventname"/>
  </xsl:element>
  <xsl:element name="br" />
</xsl:template>

</xsl:stylesheet>[/code]
Link to comment
https://forums.phpfreaks.com/topic/25987-xsl-help-displaying-in-a-table/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.