473,388 Members | 1,427 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Problem with syntax of html strict.dtd?

Hi,
I am trying to track down a bug in a program I've written which
parses an XHTML document. The document has been cleaned up with Tidy and
converted to XHTML and has a strict.dtd reference. When the xerces
parser hits a line in the dtd, I get the following output:

**Parsing Fatal Error**
Line: 81
URI: http://www.w3.org/TR/REC-html40/strict.dtd
Message: The declaration for the entity "ContentType" must end with '>'.

I looked at the dtd in XMLSpy and elsewhere and it does seem to be
incorrect... can anybody help me out here?
-John
Jul 20 '05 #1
3 4555
On Tue, 15 Mar 2005 04:00:21 +0000, John Resler wrote:
I am trying to track down a bug in a program I've written which
parses an XHTML document. The document has been cleaned up with Tidy and
converted to XHTML and has a strict.dtd reference. When the xerces
parser hits a line in the dtd, I get the following output:

**Parsing Fatal Error**
Line: 81
URI: http://www.w3.org/TR/REC-html40/strict.dtd
Message: The declaration for the entity "ContentType" must end with '>'.

I looked at the dtd in XMLSpy and elsewhere and it does seem to be
incorrect... can anybody help me out here?


That's an HTML DTD, so it's no wonder that an XML parser cannot parse it.
Try using an XHTML DTD, such as
<http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd>.

Jul 20 '05 #2
Dean Tiegs wrote:
On Tue, 15 Mar 2005 04:00:21 +0000, John Resler wrote:

I am trying to track down a bug in a program I've written which
parses an XHTML document. The document has been cleaned up with Tidy and
converted to XHTML and has a strict.dtd reference. When the xerces
parser hits a line in the dtd, I get the following output:

**Parsing Fatal Error**
Line: 81
URI: http://www.w3.org/TR/REC-html40/strict.dtd
Message: The declaration for the entity "ContentType" must end with '>'.

I looked at the dtd in XMLSpy and elsewhere and it does seem to be
incorrect... can anybody help me out here?

That's an HTML DTD, so it's no wonder that an XML parser cannot parse it.
Try using an XHTML DTD, such as
<http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd>.

Ok, but it's still a dtd and has to conform to rules for dtd format.
Why the parse error? I thought a dtd was a dtd...? Thanks for the
help by the way.
Jul 20 '05 #3
On Tue, 15 Mar 2005 04:47:48 +0000, John Resler wrote:
Ok, but it's still a dtd and has to conform to rules for dtd format.
Why the parse error? I thought a dtd was a dtd...? Thanks for the
help by the way.


There are SGML DTDs and then there are XML DTDs. HTML is an SGML
language, so it has an SGML DTD. XHTML is an XML language and has an XML
DTD.

XML is a subset of SGML, so an SGML parser can parse XML documents and
DTDs, but in general an XML parser cannot parse SGML documents and DTDs.

For example, in SGML it's OK to put comments inside entity declarations
(delimited with double hyphens: --this is a comment--), but in XML this is
forbidden. It is just such a comment that your XML parser is rejecting.

Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

20
by: Bernd Fuhrmann | last post by:
Hi! I have some trouble with some simple stupid XSLT-stuff. My stylesheet: ------------- <?xml version="1.0" encoding="iso-8859-1"?> <xsl:stylesheet version="1.0"...
6
by: Patrick | last post by:
Hi I am fairly new to CSS and the web.I am trying to build a site more to practice my skills than for the site itself. I have been focusing on CSS and try my best to make it work in I.E 6.0,...
10
by: Mark McLellan | last post by:
Dear all Following the oft-repeated advice here and ciwas I have made my site nearly 4.01 strict (working on it). There are some items on which I would appreciate your advice: 1. Hidden...
9
by: rbronson1976 | last post by:
Hello all, I have a very strange situation -- I have a page that validates (using http://validator.w3.org/) as "XHTML 1.0 Strict" just fine. This page uses this DOCTYPE: <!DOCTYPE html PUBLIC...
6
by: Greg G | last post by:
http://mysite.verizon.net/gdguarino/alps.htm I've got a navigation box with links to the other pages on the site. Below that I've got another box with a hastily-written anecdote in it (to be...
7
by: David Findlay | last post by:
I'm trying to do a table for laying out a links page in CSS. See http://qldstorms.com/links.php. My stylesheet is at http://qldstorms.com/styles/screen.css. My problem is that if the link name in...
8
by: Rich | last post by:
Hello, If I leave Option Strict Off I can use the following syntax to read data from a Lotus Notes application (a NotesViewEntry object represents a row of data from a Lotus Notes View - like a...
5
by: Gernot Frisch | last post by:
Hi, I have a site: http://www.glbasic.com/bugs.htm where 2 divs (class = "outer") overlap in Firefox. In IE it looks good (although the text part has a too large distance from the header...)...
29
by: Richard Lionheart | last post by:
Hi All, I've taken the advice of a few people and managed to cobble together an HTML 4.01 Strict-compliant document (according to the W3C Validation Service), but the way I try to pass a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.