- From: Felix Sasaki <fsasaki@w3.org>
- Date: Sun, 26 Mar 2006 22:10:25 +0900
- To: Yves Savourel <yves@opentag.com>
- Cc: public-i18n-its@w3.org
- Message-ID: <442692C1.9050200@w3.org>
Hi Yves, Sorry, *I* missed s.t., see below. Yves Savourel wrote: > Felix, thanks for taking the time to write down the steps. > > I'm still a bit unclear on how you apply a rule to the children of the its selection node. > For example, in the case of p[2] you have: > > <p trans="false" its:translate-global-4="no">some text <code its:translate-global-2="no">code <textInCode > its:translate-global-1="yes">text in code</textInCode>code</code>.</p> > > That is: > > /myDoc/body/p[2]/: its:translate-global-4="no" > /myDoc/body/p[2]/code: its:translate-global-2="no" > /myDoc/body/p[2]/code/textInCode: its:translate-global-1="yes" > > Which means (looking at your description for p[1]) that the content of <textInCode> would be translated. > > But it's wrong since the trans='false' in <p> should overwrite it, if it is to behave like its:translate. > > Am I missing something? what I missed was to say: As a value is inherited, it looses the information about its origin: it is just an inherited value. Just FYI, I wrote the source of inheritance in brackets. /myDoc/body/p[2]/: its:translate-global-4="no" inherited-value="default" (no information available, hence: "default": elements are translated, attributes not) /myDoc/body/p[2]/code: its:translate-global-2="no" inherited-value="no" (taken from its:translate-global-4="no" at /myDoc/body/p[2]/) /myDoc/body/p[2]/code/textInCode: its:translate-global-1="yes" inherited-value="no" (taken from its:translate-global-2="no" at /myDoc/body/p[2]/code) Inherited values have less priority than directly assigned values. That is the reason why its:translate-global-4="no" from /myDoc/body/p[2]/ does not overwrite its:translate-global-1="yes" at /myDoc/body/p[2]/code/textInCode . the information about "xxx-global-1" versus "xxx-global-2" versus "..." only comes into play if they match both the same node *directly*, e.g. like //*[@trans='true']" (translate-global-3) and "//code" (translate-global-2). would that resolve the problem? I am really wondering what Sebastian thinks about all this, from the XSLT point of view. Cheers, Felix > > Cheers, > -yves > > >
Received on Sunday, 26 March 2006 13:10:41 UTC