Re: [all] Notes on the draft

On 17.10.2012 17:39, Shaun McCance wrote:

> Fascinating. I just tested. Both of the following work in Firefox 16:
> 
> <its:translateRule selector="//code" translate="no"/>
> 
> <its:translateRule selector="//html:code" translate="no"
>   xmlns:html="http://www.w3.org/1999/xhtml"/>
> 
> Is this correct? It hurts the part of my brain that likes XML. Does
> the same thing happens with CSS selectors?

Yes, HTML5 requires that during parsing all HTML elements are
automatically put into XHTML namespace. In order to retain backward
compatability XPath is modified by HTML5 spec (see
http://dev.w3.org/html5/spec/single-page.html#interactions-with-xpath-and-xslt)
to support default XHTML namespace (i.e. no need to use prefixes).

I ITS we don't have to maintain such backward compatibility so there is
note saying that XPath expression must deal with namespaces -- see
second note in
http://www.w3.org/International/multilingualweb/lt/drafts/its20/its20.html#html5-external-global-rules

For CSS it is similar. No need to use namespaces/prefixes for HTML even
if it appears as XHTML inside DOM.

     Jirka

-- 
------------------------------------------------------------------
  Jirka Kosek      e-mail: jirka@kosek.cz      http://xmlguru.cz
------------------------------------------------------------------
       Professional XML consulting and training services
  DocBook customization, custom XSLT/XSL-FO document processing
------------------------------------------------------------------
 OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 member
------------------------------------------------------------------

Received on Wednesday, 17 October 2012 15:51:29 UTC