W3C home > Mailing lists > Public > public-multilingualweb-lt-comments@w3.org > July 2013

Re: Comments on section 6.2 of ITS 2.0

From: Jirka Kosek <jirka@kosek.cz>
Date: Fri, 05 Jul 2013 17:58:07 +0200
Message-ID: <51D6ED0F.5000009@kosek.cz>
To: Daniel Glazman <daniel.glazman@disruptive-innovations.com>
CC: Felix Sasaki <fsasaki@w3.org>, public-multilingualweb-lt-comments@w3.org
On 5.7.2013 17:08, Daniel Glazman wrote:

> If we implement what I recommend with a CDATA section for XHTML docs,
> getting the ITS rules from any script element is ALWAYS a matter of two
> lines WHATEVER the flavor of HTML:

Whole point of recommending to use its-* attributes in XHTML is in order
to get consistent results if you process page with either HTML or XML
parser as users use wrong media type usually. Of course this will no
longer be true with XML fragment inside <script> as it is not parsed in
HTML but it gets parsed with XML parser.

If you will introduce CDATA sections inside <script> then you break
possibility of parsing content with HTML parser as HTML doesn't
recognize CDATA sections. So while solving one problem, you have
introduced another one -- resulting syntax is no more "polyglot compatible".

I really don't see elegant solution which will satisfy all constraints
here. We have to live with messy HTML parsing rules and sub-optimal HTML
and XML compatibility.

What about adding following into the spec:

"If HTML or XHTML document contains script element with
type=application/its+xml and such element does not contain any child
elements then ITS markup must be extracted from this node by applying
XML parsing on a content of the script element."

Would that resolve your objection? It will be pretty clear what to do,
and you can even use CDATA sections in XHTML if you think that makes sense.

Your code will then be just little more complex -- it will test for
presence of subelement -- if there will be some then all children of
<script> element will be treated as fragment of ITS otherwise you will
have first call parser on the text content of <script> node to get
fragment of ITS markup.


  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 rep.
    Bringing you XML Prague conference    http://xmlprague.cz

Received on Friday, 5 July 2013 15:58:34 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:32:28 UTC