troubleshooting Question

XML will not display on the page

Avatar of awolarczuk
awolarczukFlag for Australia asked on
Web Languages and StandardsPHPXML
64 Comments1 Solution470 ViewsLast Modified:
Hi all i have a php page that had xml on it, i have two other files, of course the XML file with the date and then i have a XLst and XLS file for formatting, when i try to view the file on the screen all i see if a white screen with my css styling

can someone please give em a hand here

Here is the Products.XSLT as i could noty attatch

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl=""
    <xsl:key name="product-by-cat" match="product" use="@cat-ref"/>
    <xsl:key name="product-by-id" match="product" use="@id"/>
    <xsl:strip-space elements="*"/>
    <xsl:output indent="yes"/>
    <xsl:param name="product"/>
    <xsl:param name="base-page" select="'../product.php'"/>
    <xsl:template match="products">
        <div id="productsdesc">
            <xsl:if test="normalize-space($product)">
                <xsl:apply-templates select="key('product-by-id', $product)/Description"/>
        <div id="products">
                        <xsl:for-each select="categories/category[position() mod 3 = 1]">
                                <th><xsl:apply-templates select="."/></th>
                                <th><xsl:apply-templates select="following-sibling::category[1]"/></th>
                                <th><xsl:apply-templates select="following-sibling::category[2]"/></th>
                            <xsl:call-template name="get-next-row">
                                <xsl:with-param name="cat1" select="@cat-id"/>
                                <xsl:with-param name="cat2" select="following-sibling::category[1]/@cat-id"/>
                                <xsl:with-param name="cat3" select="following-sibling::category[2]/@cat-id"/>
                                <xsl:with-param name="count" select="1"/>
    <xsl:template name="get-next-row">
        <xsl:param name="cat1"/>
        <xsl:param name="cat2"/>
        <xsl:param name="cat3"/>
        <xsl:param name="count"/>
        <xsl:if test="key('product-by-cat', $cat1)[position() = $count ]| key('product-by-cat', $cat2)[position() = $count] | key('product-by-cat', $cat3)[position() = $count]">
                <td><a href="{concat($base-page, '?product=', key('product-by-cat', $cat1)[position() = $count ]/@id)}"><xsl:apply-templates select="key('product-by-cat', $cat1)[position() = $count ]/title"/></a></td>
                <td><a href="{concat($base-page, '?product=', key('product-by-cat', $cat2)[position() = $count ]/@id)}"><xsl:apply-templates select="key('product-by-cat', $cat2)[position() = $count ]/title"/></a></td>
                <td><a href="{concat($base-page, '?product=', key('product-by-cat', $cat3)[position() = $count ]/@id)}"><xsl:apply-templates select="key('product-by-cat', $cat3)[position() = $count ]/title"/></a></td>
            <xsl:call-template name="get-next-row">
                <xsl:with-param name="cat1" select="$cat1"/>
                <xsl:with-param name="cat2" select="$cat2"/>
                <xsl:with-param name="cat3" select="$cat3"/>
                <xsl:with-param name="count" select="$count + 1"/>
    <xsl:template match="p">
            <xsl:apply-templates select="node()"/>
    <xsl:template match="list">
        <p class="list_intro">
            <xsl:apply-templates select="list-intro"/>
            <xsl:for-each select="list-item">
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 64 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 64 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros