Re: [xsl] XSLT hosting

Subject: Re: [xsl] XSLT hosting
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 4 Apr 2001 11:54:06 +0100
> I was getting a (The style sheet does not contain a document element. The
> style sheet may be empty, or it may not be a well-formed XML document.)
> error. I know this is due to an &copy; tag I've got in there, t

Firstly  &copy; is not a tag it's an entity reference. You can use an
entity reference in an XML file only if the entity is defined in the DTD
specified at the top of the file (except for amp lt gt quot and apos
which are predefined) so you could add an <!ENTITY declaration to define
copy, but as you observe it is easier just to use &#169; directly
(although that isn't a tag either).

However if use of an undefined entity is causing an error 
" does not contain a document element." then your parser is not being
particularly helpful with it's error messages. Are you sure that this is
the only error, and that there is not another error in your stylesheet
(such as a missing top level element)

> but, the character is NOT being displayed by the html. 

If &#160; or &copy; is in the generated HTMl file and your browser is
not displaying it then that's a bug in your browser 9which are you

> I think the only way around this is to push &copy; direct to the html
> source

whether you use &copy; (after having defined it) or  &#169; in the
stylesheet the XSL system sees the same input and will produce the same
output, which might be &copy; or any of several other alternatives.


This message has been checked for all known viruses by Star Internet delivered
through the MessageLabs Virus Control Centre. For further information visit

 XSL-List info and archive:

Current Thread