W3C home > Mailing lists > Public > public-mobileok-checker@w3.org > July 2007

Re: F2F demo: html / xhtml namespace

From: Sean Owen <srowen@google.com>
Date: Wed, 18 Jul 2007 10:32:10 -0400
Message-ID: <e920a71c0707180732k7932a995l6fce215777ba16d7@mail.gmail.com>
To: "Roland Gülle" <roland@7val.com>
Cc: public-mobileok-checker <public-mobileok-checker@w3.org>
Hmm, the mobile page looks like it has a namespace. The main
google.com page (isn't very standards compliant and) isn't XHTML. But
that's not the point.

Yeah any mobile doc might not set the namespace correctly, which
throws off validation.

I suggest we, somehow, possibly in Java code, verify that the
namespace of every node in the parsed DOM is in the XHTML namespace,
and fail validation if any node isn't.

Sean

On 7/18/07, Roland Gülle <roland@7val.com> wrote:
>
> The google page hat an empty namespace,
> so we get the result:
> ...
>    <docContent>
>       <html xmlns="">
> ...
>
> With this structure, none of our //html:* xpath matches,
> because we use a namespace for the html doc:
> xmlns:html="http://www.w3.org/1999/xhtml"
>
> The first simple solution could be another check if:
> //docContent/html:html/html:body
> is available.
>
> But this is not the solution.
>
> A doc structure:
> <html xmlns:html="http://www.w3.org/1999/xhtml">
>   ...
>   <body>
>    <table>
>     <tr>
>      <td>
>       <table xmlns="">
>          ...
> returns a valid nested table test (same with all other document xpath
> checks).
>
> Some possible solutions:
> * remove all namespaces from the document in the preprocessor
> or
> * check all xpath with local name
> or
> * define rules at the BP about namespaces
> (and check them in a checkertest)
>
> Cheers,
>   Roland
>
>
>
Received on Wednesday, 18 July 2007 14:32:26 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:13:03 GMT