- From: Yves Savourel <yves@opentag.com>
- Date: Sat, 11 Mar 2006 21:52:16 -0700
- To: <public-i18n-its@w3.org>
Hi all, I'm running into a question about what exactly the scope of the selector is, and I can't find the answer in the specification. This happens when you want to override rules. <myDoc> <!-- all element not translatable except <text> --> ... <entry id="1"> <text>TEXT <code>code</code> TEXT <code>code <sub>TEXT INSIDE CODE</sub> mode code</code> TEXT.</text> </entry> <entry id="2" localize="no"> <text>TEXT <code>code</code> TEXT <code>code <sub>TEXT INSIDE CODE</sub> mode code</code> TEXT.</text> </entry> </myDoc> In the document above imagine that none of the elements are translatable except <text>, inside <text> the element <code> is not translatable, inside <code> the element <sub> is translatable. This gives us: <its:translateRule its:selector="//*" its:translate="no"/> <its:translateRule its:selector="//text" its:translate="yes"/> <its:translateRule its:selector="//code" its:translate="no"/> <its:translateRule its:selector="//sub" its:translate="yes"/> No problem so far. Then I have to take in account a flag on the <text> element: if the attribute localize='no' then that <text> element is not transltable. So can I do simply this: <its:translateRule its:selector="//text" its:translate="yes"/> <its:translateRule its:selector="//code" its:translate="no"/> <its:translateRule its:selector="//sub" its:translate="yes"/> <its:translateRule its:selector="//text[@localize='no']" its:translate="yes"/> Or do I need to explicitely re-override all child elements of non-translatable <text> to be sure the <sub> elements do not get translated in such <text>? <its:translateRule its:selector="//text" its:translate="yes"/> <its:translateRule its:selector="//code" its:translate="no"/> <its:translateRule its:selector="//sub" its:translate="yes"/> <its:translateRule its:selector="//text[@localize='no']" its:translate="yes"/> <its:translateRule its:selector="//text[@localize='no']/*" its:translate="yes"/> In other words: the selector points to one or more nodes, we apply the ITS property there. If there are already ITS properties applied in some children of these nodes are they overriden or not? In some other words: When you do a selection which has its default that include child elements (like translatability) does it override any selection done before at the child elements level? Is this the precedence problem you talked about at Mandelieu and for which there is the Proposal 09? Cheers, -yves
Received on Sunday, 12 March 2006 04:52:41 UTC