Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > XSD and XHTML entity sets.

Reply
Thread Tools

XSD and XHTML entity sets.

 
 
Theo
Guest
Posts: n/a
 
      07-31-2003
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!
 
Reply With Quote
 
 
 
 
Jesper Zedlitz
Guest
Posts: n/a
 
      07-31-2003
> <p>&nbsp;</p>
[...]
> 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

--
Jesper Zedlitz eMail : http://www.velocityreviews.com/forums/(E-Mail Removed)
Homepage : http://www.zedlitz.de
ICQ# : 23890711
PGP-Key : http://zedlitz.de/pub_key.asc
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Entity, problem with entity key ThatsIT.net.au ASP .Net 1 09-07-2009 02:20 AM
Entity Framework - Reassigning child entity's parent Norm ASP .Net 3 07-06-2009 07:28 PM
How to relate a SQL based entity with an Object based entity in Entity Framework markla ASP .Net 1 10-06-2008 09:42 AM
Entity Name or Entity Number? Samuel van Laere HTML 4 02-24-2007 10:11 PM
[XSL XHTML] &nbsp; entity problem Tjerk Wolterink XML 12 03-22-2005 11:32 PM



Advertisments