xsl - Policy Control - stylesheet does not contain a document element

Posted on 2007-07-23
Last Modified: 2013-11-18
Hi everyone.

I seem to be having trouble in getting my xsl stylesheet to work.  Keeps coming up with an error.

The stylesheet does not contain a document element. The stylesheet may be empty, or it may not be a well-formed XML document.

Can anyone help.

<?xml version='1.0' encoding='utf-8'?>
<xsl:stylesheet version="1.0" xmlns:xsl="">
<xsl:output method="html"/>

<xsl:template match="/">

      <div style="font-size: 10pt; margin: 0px; color: #000000; font-family: verdana, arial, helvetica, sans-serif; background-color: #f9d1c9">

<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
    <td width="5%">&nbsp;</td>
    <td width="79%">&nbsp;</td>
    <td><img src="" width="200" height="122" /></td>
    <td bgcolor="#04676c"><div align="right"><img src="" width="205" height="122" /></div></td>
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
    <td width="16%" bgcolor="#FFFFFF">&nbsp;</td>
    <td width="84%" bgcolor="#FFFFFF">&nbsp;</td>
    <td colspan="2" valign="top" bgcolor="#FFFFFF"><xsl:value-of select="MESSAGE/BODY" disable-output-escaping="yes"/>
    <p><xsl:value-of select="MESSAGE/DISCLAIMER" disable-output-escaping="yes"/></p></td>



<xsl:template match="BODY"/>

Many thanks

Question by:Bakersville
    LVL 13

    Accepted Solution

    This is the problem:
    <td width="5%">&nbsp;</td>

    &nbsp; is not allowed in XML unless you define it in the DTD. It's easier to use &#160;
    LVL 1

    Author Comment

    thank you for that.  how do i get it to look to the internet for a image?

    <img src=url("{http://myspace/Images/Layout/Logo.jpg}")" alt="Darbys Logo" width="205" height="122" />

    But i get the same error as before.  i can use <img src=file:\\c:\Images/Layout/Logo.jpg}")" alt="Darbys Logo" width="205" height="122" /> but it display this is no image as it can't find it on other users local machine???
    LVL 12

    Assisted Solution

    Using a single value with quotes surrounding it:
    <img src="http://myspace/Images/Layout/Logo.jpg" alt="Darbys Logo" width="205" height="122" />
    LVL 1

    Author Comment

    Thank you.  Can't believe i was being so stupid.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
    I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
    Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
    The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now