Hello, I am trying to get my xml to format just the way I need it. A little background. I am using a flash piece which has 'site news' displaying with an xml document. I then have another button below the flash piece that says "view all news items", which I am trying to format.

Here is the xml:

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="news.xsl"?>
<NEWS>	
	<item>
		<date day="30" month="JAN"/>
		<title></title> 
		<description><![CDATA[<p><a href="http://www.google.com">This is news item number one</a></p>]]></description>
	</item>
	 
	<item>
		<date day="23" month="JAN"/>
		<title></title> 
		<description><![CDATA[<p><a href="http://www.msn.com">This is news item number two</a></p>]]></description>
	</item>

And the xsl I have so far to display this is:

<?xml version="1.0" encoding="ISO-8859-1" ?> 
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:template match="/">
  <h1>News</h1> 
- <table bgcolor="#FFFFFF" border="0" cellpadding="5" cellspacing="0">
- <tr bgcolor="#9acd32">
  <th align="left">Date</th> 
  <th align="left">Description</th> 
  </tr>
- <xsl:for-each select="NEWS/item">
- <tr>
- <td>
  <xsl:value-of select="date/@month" /> 
    
  <xsl:value-of select="date/@day" /> 
  </td>
- <td>
  <xsl:value-of select="description" /> 
  </td>
  </tr>
  </xsl:for-each>
  </table>
  </xsl:template>
  </xsl:stylesheet>

The problem i am having is formatting this so there is no link or paragraph tags where there shouldn't be. I am hoping to accomplish this with som XSL, but my knowledge is limited on what I would have to do.

I could rearrange my flash as well to take out the css, but that as well I am limited....

Any help would be appreciated. Many thanks.

Anyone have any suggestions for me?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.