PDA

View Full Version : PHP - XSL Help


Elarion
03-06-2005, 14:29
Hi Folks,

I'm working on styling up a new site and i'm having an issue with the xsl>xml feed I use.

The content section in the centre is styled absolute. This works fine: http://new.new-homes-in.co.uk/search/Wrexham

However when the feed contains some html in the fields this happens:
http://new.new-homes-in.co.uk/search/Liverpool

Code in the xsl file is:

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" omit-xml-declaration="yes" /><xsl:template match="//Search"><xsl:for-each select="//Search/Property">

<div class="restitle">New Home in <xsl:value-of select="address" /></div>
<div class="resubtitle"><xsl:value-of select="bedrooms" /> Bed <xsl:value-of select="propertytype" /> (<xsl:value-of select="price" />)</div>

<xsl:element name="a"> <xsl:attribute name="href">/goto.php?path=www.smartnewhomes.com/link.asp?iLinkID=homeservices-snh:property./.id=<xsl:value-of select="propertyid" /></xsl:attribute>
<xsl:attribute name="target">snh</xsl:attribute>
<xsl:attribute name="title">Click to request further information from the Home Builder</xsl:attribute></xsl:element>
<img border="0" width="200" id="img"><xsl:attribute name="src">
<xsl:value-of select="imageurl"/></xsl:attribute></img>

<xsl:element name="a"> <xsl:attribute name="href">/goto.php?path=www.smartnewhomes.com/link.asp?iLinkID=homeservices-snh:property./.id=<xsl:value-of select="propertyid" /></xsl:attribute>
<xsl:attribute name="target">snh</xsl:attribute>
<xsl:attribute name="title">Click to request further information from the Home Builder</xsl:attribute>
<xsl:value-of select="description" />
<p><xsl:value-of select="proptext" /></p>
<p><b>Click to request further information from the Home Builder</b></p></xsl:element>

</xsl:for-each> </xsl:template> </xsl:stylesheet>

Anyone able to help? i'm guzzumped.

Thanks,
Mark.

Edit: Ignore me, found the problem. In their database they had a same class name that I was using on my site for the absolute positioning, what's the chances :)