469,286 Members | 2,522 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,286 developers. It's quick & easy.

ParseException in .xhtml files

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 Images
File Type: jpg parseException.jpg (9.6 KB, 361 views)
Nov 3 '09 #1
8 3218
Dormilich
8,651 Expert Mod 8TB
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]
Nov 3 '09 #2
Dormilich
8,651 Expert Mod 8TB
what do you try to do?
Nov 4 '09 #4
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?
Nov 4 '09 #5
Dormilich
8,651 Expert Mod 8TB
@gtludwig
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.)
Nov 4 '09 #6
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?
Nov 4 '09 #7
Dormilich
8,651 Expert Mod 8TB
@gtludwig
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)
Nov 4 '09 #8
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
Nov 4 '09 #9

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

5 posts views Thread by Greg | last post: by
33 posts views Thread by Mark Tranchant | last post: by
10 posts views Thread by Leo Breebaart | last post: by
23 posts views Thread by Gustaf | last post: by
24 posts views Thread by Dan Jacobson | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.