Forum Moderators: open

Message Too Old, No Replies

Validating XHTML with target module

         

klogger

11:18 am on Aug 28, 2004 (gmt 0)

10+ Year Member



I am using the following piece of code:


<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//somecompany//DTD XHTML11-with Target//EN" "http://www.somecompany.co.uk/dtds/xhtml11-target.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

and then have a folder '/dtds' that holds the DTD driver bringing in the target module into the XHTML 1.1 strict doctype specification.

When I run it through the W3C validator it works fine but using the one provided by the WDG (In firefox with the developers toolbar click Validation => Validate Local HTML), it is available at htmlhelp => tools => validators.

I get a stack of errors saying that the targeting module is invalid. This is a problem as I am being refused entry into the GAWDS because of this.

According to the converstaion with GAWDS:


In short, the namespace you're referencing for your custom DTD doesn't exist.

So, before I go back to GAWDS, does anyone have an answer as to how to use the target module with the WDG validator?

encyclo

12:05 pm on Aug 28, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



In short, what is the namespace you are referencing in your custom DTD? ;)

And are you seriously saying that GAWDS won't let you in if you use a standard XHTML 1.0 Transitional doctype with the usual W3C DTD? You are using transitional attributes (ie. the target attribute), so is it a big problem to use the appropriate doctype? It would certainly mean avoiding the total overkill of custom DTDs for one measly attribute. If that is GAWDS's attitude, I find it rather pathetic.

klogger

12:26 pm on Aug 28, 2004 (gmt 0)

10+ Year Member



Nope it was be being anal. I never even considered dropping the doctype to transitional - but have now done so.

Thanks :)

encyclo

12:57 pm on Aug 28, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I sounded rather grumpy in my last post, so I apologize for that. Not enough sleep... ;)

I was just surprised at the GAWDS attitude, that's all - as a guild of accessible web designers, I would have hoped that they would have realized that validation is an important criterion for measuring accessibility, but it is not indispensable. As user agents aren't validating parsers, you could have ripped off the doctype completely and the page would not have been less accessible, even if it would have been invalid.

Also, XHTML 1.1 is actually inherently less accessible as a standard compared with XHTML 1.0: the lack of the

lang
and
name
attributes contributing to this. The difference is minor, I know, but worth taking into account.

klogger

1:33 pm on Aug 28, 2004 (gmt 0)

10+ Year Member



> I sounded rather grumpy in my last post, so I apologize for that. Not enough sleep... ;)
No problem, I was also annoyed and left very confused about some things in XHTML.

I assume (correct me if I am wrong) that the namespace is specified in the <html> tag so:


<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

If that is correct why did GAWDS tell me that the namespace didn't exist?

It also seems odd that

[ASSUMPTION] if my DTD was correct, the namespace was correct and I was using the correct Doctype [/ASSUMPTION]

that the WDG validator would fail it giving errors in the DTD referenced by my DTD driver (given partially below and taken from Juicy Studio tutorials):

[code]
<!--
Bring in the Target Module
-->
<!ENTITY % xhtml-target.module "INCLUDE">
<![%xhtml-target.module;[
<!ENTITY % xhtml-target.mod
PUBLIC "-//W3C//ELEMENTS XHTML Target Module//EN"
"http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-target-1.mod">
%xhtml-target.mod;]]>
[code]

The errors were:

# [w3.org...] line 45, character 55: invalid formal public identifier "-//W3C//NOTATIONS XHTML Notations 1.0//EN": invalid public text class
# [w3.org...] line 33, character 35: omitted tag minimization parameter can be omitted only if "OMITTAG NO" is specified on the SGML declaration

lots and lots of them! This seems to say there is an error in the 'xhtml-framework-1.mod' file which is not under my control.

So the question is:

a) Do I misunderstand the use of namespaces?
b) Is the WDG validator wrong?
c) or is there actually an error in the targetting module DTD (seems highly unlikly)?

encyclo

1:57 pm on Aug 28, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



invalid formal public identifier: "-//W3C//NOTATIONS XHTML Notations 1.0//EN"

OK, looking quickly and working from memory (so don't trust me on this!), shouldn't the above be?:

"-//W3C//[b]ELEMENTS[/b] XHTML Notations 1.0//EN"

klogger

2:32 pm on Aug 28, 2004 (gmt 0)

10+ Year Member



I think you are correct but that is actually what is in the DTD driver file already and the only mention of the 'NOTATIONS' is in the error message from the WDG.

Anyway, you have provided the solution to the problem by suggesting dropping the strict and going with transitional doctype and I think solving the problem of the errors with the WDG validator is a fruitless exercise and likly to be very hard to do, interesting though :)

Thanks again.