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

[bug] TargetPointer + improve the test files

From: Fredrik Liden <fliden@enlaso.com>
Date: Mon, 10 Dec 2012 16:08:14 -0700
To: Leroy Finn <finnle@tcd.ie>, Multilingual Web LT-TESTS Public <public-multilingualweb-lt-tests@w3.org>
Message-ID: <assp.0691c10c24.4236658BB877A542A66660614300B1858013D0F28C@orion.helios.local>
Leroy,

A few things for TargetPointer. See comparison below.


1.    The "Pointer" in TargetPointer is a bit different than the "Pointer" concept of the other categories. In the TargetPointer category "targetPointer" is the actual attribute and we're more interested in the path to the node than the content of the resolved node. We suggest to make an exception for this category and not renaming "targetPointer" to "target" and display the xpath expression instead of the resolved content. Any thoughts from other implementers?

2.    I'm not sure the test files are not clearly showing how to use the category according per spec, so we'll need to review them more closely. Example 70 in the draft is ok, Source and Target translations.

<file>
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="2.0">
<its:translateRule selector="/file" translate="no"/>
<its:translateRule selector="//source" translate="yes"/>
<its:targetPointerRule selector="//source" targetPointer="../target"/>
</its:rules>
<entry id="one">
<source>Remember last folder</source>
<target/>
</entry>
<entry id="two">
<source>Custom file filter:</source>
<target/>
</entry>
</file>


targetpointer1html.html:  Doesn't seem to make sense. <h4> as source and <b> as target.

<div id="one">
  <h4>Remember last folder</h4>
  <b>lastFolder</b>
</div>

How about something like:

<div id="one">
<p class="src">Source1 String</p>
  <p class="trg">Target1 String</p>
</div>

Or

  <tr>
    <td>Source1 String</td>
    <td>Target1 String</td>
  </tr>

Targetpointer2html.html: I don't think there should be two identical ids, first, first, second, second..

<div id="one">
   <h4>Remember last folder</h4>
   <span id="first">firstFolder</span>
   <span id="second">secondFolder</span>
</div>
<div id="two">
   <h4>Custom file filter:</h4>
   <span id="first">firstFile.txt</span>
   <span id="second">secondFile.txt</span>
</div>

Cheers,
Fredrik

Left base: Suggested
Right base: Current


File: targetpointer\html\targetpointer1htmloutput.txt
12

/html/body[1]/div[1]/h4[1]        targetPointer="../h:b"

<>

12

/html/body[1]/div[1]/h4[1]        target="lastFolder"



16

/html/body[1]/div[2]/h4[1]        targetPointer="../h:b"

<>

16

/html/body[1]/div[2]/h4[1]        target="testFile.txt"



File: targetpointer\html\targetpointer2htmloutput.txt
12

/html/body[1]/div[1]/h4[1]        targetPointer="../h:span[@id=$targetParam]"

<>

12

/html/body[1]/div[1]/h4[1]        target="secondFolder"



19

/html/body[1]/div[2]/h4[1]        targetPointer="../h:span[@id=$targetParam]"

<>

19

/html/body[1]/div[2]/h4[1]        target="secondFile.txt"



File: targetpointer\xml\targetpointer1xmloutput.txt
4

/file/its:rules[1]/its:targetPointerRule[1]

<>

4

/file/its:rules[1]/its:targetRule[1]

5

/file/its:rules[1]/its:targetPointerRule[1]/@selector



5

/file/its:rules[1]/its:targetRule[1]/@selector

6

/file/its:rules[1]/its:targetPointerRule[1]/@targetPointer



6

/file/its:rules[1]/its:targetRule[1]/@target



9

/file/entry[1]/source[1]        targetPointer="../target"

<>

9

/file/entry[1]/source[1]        target="lastFolder"



13

/file/entry[2]/source[1]        targetPointer="../target"

<>

13

/file/entry[2]/source[1]        target="testFile.txt"



File: targetpointer\xml\targetpointer2xmloutput.txt
7

/file/entry[1]/source[1]        targetPointer="../target"

<>

7

/file/entry[1]/source[1]        target="lastFolder"



11

/file/entry[2]/source[1]        targetPointer="../target"

<>

11

/file/entry[2]/source[1]        target="testFile.txt"



File: targetpointer\xml\targetpointer3xmloutput.txt
6

/file/its:rules[1]/its:targetPointerRule[1]

<>

6

/file/its:rules[1]/its:targetRule[1]

7

/file/its:rules[1]/its:targetPointerRule[1]/@selector



7

/file/its:rules[1]/its:targetRule[1]/@selector

8

/file/its:rules[1]/its:targetPointerRule[1]/@targetPointer



8

/file/its:rules[1]/its:targetRule[1]/@target



11

/file/entry[1]/source[1]        targetPointer="../target[@id=$targetParam]"

<>

11

/file/entry[1]/source[1]        target="secondFolder"



18

/file/entry[2]/source[1]        targetPointer="../target[@id=$targetParam]"

<>

18

/file/entry[2]/source[1]        target="secondFile.txt"



File: targetpointer\xml\targetpointer4xmloutput.txt
7

/file/entry[1]/source[1]        targetPointer="../target[@id=$targetParam]"

<>

7

/file/entry[1]/source[1]        target="secondFolder"



14

/file/entry[2]/source[1]        targetPointer="../target[@id=$targetParam]"

<>

14

/file/entry[2]/source[1]        target="secondFile.txt"
Received on Monday, 10 December 2012 23:09:18 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 10 December 2012 23:09:19 GMT