W3C home > Mailing lists > Public > www-validator@w3.org > November 2005

Re: Validation of XHTML with other namespaces

From: Jirka Kosek <jirka@kosek.cz>
Date: Fri, 11 Nov 2005 21:56:22 +0100
Message-ID: <43750576.2000709@kosek.cz>
To: Bryce Nesbitt <bryce1@obviously.com>
Cc: www-validator@w3.org
Bryce Nesbitt wrote:

> I'm trying to get a document that uses Microsoft VML to validate, very
> similar to the Google Maps
> API example at http://www.google.com/apis/maps/documentation/simple.html
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
>  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml"
>       xmlns:v="urn:schemas-microsoft-com:vml">
>   <head>
>     <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
>     <title>Google Maps API Example - simple</title>
> How can we validate documents that specify a namespace?  

With the current W3C validator very hardly. The W3C validator is DTD 
based and DTDs doesn't play very well with namespaces. To validate 
namespaced documents it is better to use modern schema languages like 
RELAX NG or W3C XML Schema.

> Or, how can we
> rewrite these pages so the W3C validator will handle them?

Trying to satisfy W3C validator in this case is not way to go. You 
should use modern RELAX NG or W3C XML schema based validator to validate 
compound documents containing elements from several namespaces. There 
are several such validators:


For example Relaxed validator (http://badame.vse.cz/validator/) is able 
to validate the following types of documents.

1. XHTML 1.0 + any elements and attributes in namespace other then 
XHTML. This is useful in cases like your VML document. With this schema 
XHTML content is validated and the rest of the document (elements in 
other namespaces) is just checked for well-formdness, because we don't 
have schema for these foreign elements/attributes.

2. pure XHTML 1.0 -- foreign elements and attributes are forbidden and 
are reported as errors. You get behaviour which is very close to W3C 

3. XHTML + SVG + any elements/attributes from namespaces others than 
XHTML and SVG. This means that XHTML and SVG content is validated, rest 
is checked just for WF.

4. XHTML + SVG + MathML -- dtto

5. XHTML + MathML -- dtto



   Jirka Kosek     e-mail: jirka@kosek.cz     http://www.kosek.cz
   Profesionální školení a poradenství v oblasti technologií XML.
      Podívejte se na náš nově spuštěný web http://DocBook.cz
        Podrobný přehled školení http://xmlguru.cz/skoleni/
Nejbližší termíny školení: XML schémata (včetně RELAX NG) 7.-9.11.
          *** DocBook 5.-7.12. *** XSL-FO 19.-20.12. ***

Received on Friday, 11 November 2005 20:56:34 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:17:47 UTC