W3C home > Mailing lists > Public > public-multilingualweb-lt@w3.org > May 2012

Re: mlw-lt-track-ISSUE-20 (its-global-in-html5): Using ITS globally in HTML5 [MLW-LT Requirements Document]

From: Felix Sasaki <fsasaki@w3.org>
Date: Mon, 14 May 2012 11:29:30 +0200
Message-ID: <CAL58czr3nSfSuTmMO6-W=6A+1PyxLiOWZjuU-GEtnFxb7Mn+QQ@mail.gmail.com>
To: Jirka Kosek <jirka@kosek.cz>
Cc: MultilingualWeb-LT Working Group <public-multilingualweb-lt@w3.org>
Thanks, Jirka. If we go that way, when we just need to decide on a syntax
to refer to ITS rules from HTML5 documents, e.g. with a specific type for
the <link> element. Should that link type / relation then be registered in
the HTML5 spec? Sorry, I forgot the details about how link types are
handled in HTML5.


2012/5/14 Jirka Kosek <jirka@kosek.cz>

> On 14.5.2012 9:46, MultilingualWeb-LT Working Group Issue Tracker wrote:
> > One solution would be: not specifying a mechanism at all, but a link to
> external rules in the <head> element and a processing chain:
> > 1) convert the HTML5 to an XML serialization (XHTML5)
> > 2) do the ITS processing (defaults, globally, locally)
> > 3) convert the result in the original serialization from 1)
> > Drawback: we require XML processing and knowledge of XPath from users
> and implementors. That might hinder the adoption of ITS.
> Hi,
> actually there is no need to go back and forth between HTML and XML
> serialization. Result of HTML5 parsing algorithm is DOM where all HTML
> elements are in XHTML namespace. HTML5 specification then even slightly
> changes XPath 1.0 spec in order to make writing XPath queries easier
> (not dealing with namespaces), see
> http://www.w3.org/TR/html5/apis-in-html-documents.html#interactions-with-xpath-and-xslt
> So to sum up -- there is no need for XML processing. All current
> browsers are able to perform XPath over DOM constructed from parsing
> HTML page.
> XPath is quite easy when you just select elements/attributes with
> occasional primitive conditions.
> > We develop a different mechanism for global selection, e.g. relying on
> CSS selectors. CSS selectors are well known among web developers and
> related implementors, so adoption might be easier.
> > Drawback: we need to involve the right people in that mechanism and
> would have probably two mechanisms in place: the CSS selectors based one
> and the XPath one for people who want to process XML (still in scope as
> *one part* for ITS 2.0).
> CSS selectors are unusable for ITS. Overall they are very poor selection
> mechanism compared to XPath. The biggest limitation is that CSS selector
> can't match attribute node and given number of HTML attributes which can
> contain natural text attributes are very likely target of ITS rules for
> HTML documents.
> So I would suggest relying on XPath only. We can say that if ITS rules
> are linked from HTML document (not XML or XHTML) speacial XPath rules
> stated in the link above apply as well.
>                                        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
> ------------------------------------------------------------------

Felix Sasaki
DFKI / W3C Fellow
Received on Monday, 14 May 2012 09:30:17 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:31:44 UTC