Connecting Tech Pros Worldwide Help | Site Map

ParseException in .xhtml files

Newbie
 
Join Date: Nov 2009
Posts: 5
#1: 2 Weeks Ago
Hi all,

I'm working on a Facelets project inside Eclipse and I keep getting the following error almost every time I open up a .xhtml page:

ParseException: Error validating the model: Server returned HTTP response code: 503 for url: http://www.w3.org/TR/html1/DTD/xhtml1-transitional.dtd

Even more odd is that Eclipse points location to line -1.

Attached is a picture of this error's property window.

Thanks in advance!
GTLudwig
Attached Thumbnails
parseexception.jpg  
Dormilich's Avatar
Moderator
 
Join Date: Aug 2008
Location: Leipzig, Germany
Posts: 3,629
#2: 2 Weeks Ago

re: ParseException in .xhtml files


sorry, the image is too small. could you provide a better image?

you can do this by
[img]http://www.example.org/image.png[/img]
Newbie
 
Join Date: Nov 2009
Posts: 5
#3: 2 Weeks Ago

re: ParseException in .xhtml files


Hmm, try looking here:
http://img340.imageshack.us/img340/5...eexception.png
Dormilich's Avatar
Moderator
 
Join Date: Aug 2008
Location: Leipzig, Germany
Posts: 3,629
#4: 2 Weeks Ago

re: ParseException in .xhtml files


what do you try to do?
Newbie
 
Join Date: Nov 2009
Posts: 5
#5: 2 Weeks Ago

re: ParseException in .xhtml files


I just open the document and the error appears. Take, for instance, the following template.xhtml file:

Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3.  
  4. <html xmlns="http://www.w3.org/1999/xhtml"
  5.     xmlns:h="http://java.sun.com/jsf/html"
  6.     xmlns:f="http://java.sun.com/jsf/core"
  7.     xmlns:ui="http://java.sun.com/jsf/facelets"
  8.     xmlns:rich="http://richfaces.org/rich"
  9.     xmlns:a4j="http://richfaces.org/a4j">
  10.  
  11. <body>
  12. <table>
  13.     <tr>
  14.         <td><ui:include src="/jsf/AnamanMenu.xhtml" /></td>
  15.     </tr>
  16.     <tr>
  17.         <td><ui:insert name="body" /></td>
  18.     </tr>
  19.     <tr>
  20.         <td><ui:insert name="bottom" /></td>
  21.     </tr>
  22. </table>
  23. </body>
  24. </html>
It looks alright, doesn't it?

Well, on Eclipse, every time I open this file, and other with the .xhtml extension for that matter, a red square with an white x (the error symbol) appears over the file name on the package tree list and an message saying the file contains errors pops up upon saving.

Doesn't makes much sense, does it?
Dormilich's Avatar
Moderator
 
Join Date: Aug 2008
Location: Leipzig, Germany
Posts: 3,629
#6: 2 Weeks Ago

re: ParseException in .xhtml files


Quote:

Originally Posted by gtludwig View Post

It looks alright, doesn't it?

no.

basic XHTML doesn’t allow elements that are not defined in its DTD (all the namespaced elements). therefore a lot of XHTML flavours exist (xhtml+svg, xhtml+mathml, etc.)
Newbie
 
Join Date: Nov 2009
Posts: 5
#7: 2 Weeks Ago

re: ParseException in .xhtml files


Quote:
basic XHTML doesn’t allow elements that are not defined in its DTD (all the namespaced elements). therefore a lot of XHTML flavours exist (xhtml+svg, xhtml+mathml, etc.)
Hmm, ok, I didn't know of that. Thanks! So, I need to point this page to another dtd?
Dormilich's Avatar
Moderator
 
Join Date: Aug 2008
Location: Leipzig, Germany
Posts: 3,629
#8: 2 Weeks Ago

re: ParseException in .xhtml files


Quote:

Originally Posted by gtludwig View Post

So, I need to point this page to another dtd?

do you want to write it yourself? (there is no such DTD available)

you could be better off writing an XML Schema Definition (xhtml.xsd, see W3C) or you can use the HTML 5 DTD (which is pointless with regard to validation)
Newbie
 
Join Date: Nov 2009
Posts: 5
#9: 2 Weeks Ago

re: ParseException in .xhtml files


Since I'm not very fond of going that deep into DTDs. I tried getting another web project and it seems there's something wrong with my eclipse... dang! should I've discovered this before, my work on this project might've been finished.

Thanks for your time and insights!

GTLudwig
Reply

Tags
xml parse exception 503