XSD and XHTML entity sets.

T

Theo

Hi,

On my desktop, I have a copy of both xhtml1-strict.dtd and
xhtml1-strict.xsd. Using XML Spy, when I try to validate the
following xhtml code, it works fine with the dtd but not with the xsd:

<?xml version="1.0"?>
<html>
<head>
<title>A title.</title>
</head>

<body>
<p>&nbsp;</p>
</body>
</html>

I keep getting the error: DTD error - entity 'nbsp' is undefined.
Does XSD not support the entity sets? (I was reading somewhere that
XML discourages entity sets other than the built-in 5.) Is there a
way around this so that I can make the XSD file validate this xml?

Thanks for any help!
 
J

Jesper Zedlitz

I keep getting the error: DTD error - entity 'nbsp' is undefined.
Does XSD not support the entity sets?
You can only define named entities in a DTD (that can be included in the xml
file).
If you write   instead of &nbsp; you won't need any named entity
declaration.

Jesper
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,222
Members
46,809
Latest member
moe77

Latest Threads

Top