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

FW: issue-77 Rule parsing precedence

From: Mārcis Pinnis <marcis.pinnis@Tilde.lv>
Date: Fri, 11 Jan 2013 15:37:52 +0200
To: "public-multilingualweb-lt@w3.org" <public-multilingualweb-lt@w3.org>
CC: "Felix Sasaki (fsasaki@w3.org)" <fsasaki@w3.org>, Pēteris Ņikiforovs <peteris.nikiforovs@Tilde.lv>, Andis Lagzdiņš <andis.lagzdins@Tilde.lv>
Message-ID: <AC6FD4BB9BB02540AC7322091A6C3B5472B0D6B393@postal.Tilde.lv>
Hi all,

Just forwarding with some clarification to the list (didn’t do Reply All) ...

Best regards,
Mārcis ;o)

From: Mārcis Pinnis
Sent: Friday, January 11, 2013 3:20 PM
To: 'Felix Sasaki'
Subject: RE: issue-77 Rule parsing precedence

Hi Felix,

Maybe we should – just to make it clear (and limit interpretation possibilities).

But I think that a bigger question is the following:

Web Page designers and developers often deribelately place script tags at the very end of the <body> tag (just before </body>) in order to speed up loading times. In such scenarios the external rules would always be overriden by the inline rules and there would not be a possibility to use them in such loading time sensitive scenarios (thus also my concern on the limitation ...).

This raises the question – should we make that also clear – that rule containers are always top-down? And that the developers will have to find compromises between speed and functionality?

This is a tricky question, I understand, however by having a top-down rule we restrict the applicability of ITS 2.0  in certain conditions ...
Has anyone thought about such a question/issue before?

Best regards,
Mārcis ;o)

From: Felix Sasaki [mailto:fsasaki@w3.org]
Sent: Friday, January 11, 2013 2:35 PM
To: Mārcis Pinnis
Cc: public-multilingualweb-lt@w3.org<mailto:public-multilingualweb-lt@w3.org>; Pēteris Ņikiforovs; Andis Lagzdiņš
Subject: Re: issue-77 Rule parsing precedence

Hi Marcis,


sec 5.2.1 we say "The rules sections are to be read in document order". For HTML that would mean: first rules in "head", then in "body", if there are e.g. "div" in body with "rules" in them first the first "div", then the second etc.

Should we clarify in 5.2.1 that this also applies to HTML?



Am 11.01.13 12:19, schrieb Mārcis Pinnis:
Hi Felix, all,

One more thing that I forgot to add:

As rules only SHOULD (not MUST) be in the <head> tag of HTML documents, this also means that rules can be defined within <body> tags (which seems obvious and is a common practice to speed-up Web pages...).

This creates another question: does this affect the precedence?

That is, consider the previous situation, but now with some <script> tags in <body>:


<link ...

<script ...

<script ...

<link ...
                <script ...
<script ...

When rendering Web pages browsers read the <head> first and the <body> as the last part.
So ... obviously this should be the same with ITS rules (or not? Read further for: why this creates a limitation)?!

I am asking this as we had an internal discussion whether inline rules should be prioritized over external rules.

I myself think that a top-down approach (the last ones in the document are overriding previous ones) is more appropriate and also allows a sort of flexibility in the document <head>.

However, there is also a limitation – if prioritization is a top-down one, the external rules can never override global rules that are in <body> tags! Please correct me if I am mistaken here?!

Best regards,
Mārcis ;o)

From: Felix Sasaki [mailto:fsasaki@w3.org]
Sent: Friday, January 11, 2013 10:55 AM
To: Mārcis Pinnis
Cc: public-multilingualweb-lt@w3.org<mailto:public-multilingualweb-lt@w3.org>; Pēteris Ņikiforovs; Andis Lagzdiņš
Subject: issue-77 (Re: ACTION-334 - check use of "quote" and "val")

Hi Mārcis, all,

I filed an issue for this since it may need a change in the draft. At

we say "2. global selection in documents "(using mechanism of external global rules or inline global rules)", but we don't say what should happen if both external and inline rules are present. We probably should clarify this. While doing this we might also try to resolve the comment from Chase and Kevin, see



Am 11.01.13 09:35, schrieb Mārcis Pinnis:

Hi Felix and others,

Just a small clarification (yes/no) question regarding rule precedence.

Just to get some context:

ITS 2.0 in http://www.w3.org/TR/its20/#html5-global-rules specifies:

Link to external global rules is specified in href attribute of link element, with the link relation its-rules.

and also:

Inline global rules MUST<http://www.w3.org/TR/its20/#rfc2119> be specified inside script which has type attribute with the value application/its+xml. The script element itself SHOULD<http://www.w3.org/TR/its20/#rfc2119> be child of head element. Comments MUST NOT<http://www.w3.org/TR/its20/#rfc2119> be used inside global rules. Each script element MUST NOT<http://www.w3.org/TR/its20/#rfc2119> contain more than one rules element.

that is, we may have two types of rules – inline within script elements and external .

So ... now the question:

If we have several inline and external rules, for instance:

<link ...

<script ...


<link ...

Do we ignore that the script rules are inline (that is, there is no prioritization between inline and external rules other than the order in which they are defined within the HTML head tag) and do the last <link /> rules override any previous ones in the case of rule overlapping (seems obvious, however, I could not find a precise clarification of this in the current ITS 2.0 version)?

Yes – the last one overrides all previous.

no – it does override the first external rules, but does not override the script rules.

Best regards,

Mārcis ;o)

Received on Friday, 11 January 2013 13:38:26 UTC

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