Learn how to a build a cloud-first strategyRegister Now


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

Posted on 2007-07-23
Medium Priority
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="http://www.w3.org/1999/XSL/Transform">
<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="http://mysite.co.uk/Images/Me.jpg" width="200" height="122" /></td>
    <td bgcolor="#04676c"><div align="right"><img src="http://mysite.co.uk/Images/logo.jpg" 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
  • 2
LVL 13

Accepted Solution

R7AF earned 1000 total points
ID: 19547170
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;

Author Comment

ID: 19548209
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

jkmyoung earned 1000 total points
ID: 19548297
Using a single value with quotes surrounding it:
<img src="http://myspace/Images/Layout/Logo.jpg" alt="Darbys Logo" width="205" height="122" />

Author Comment

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

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
Create a Windows 10 custom Image with custom task bar and custom start menu using XML for deployment.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
Suggested Courses

810 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