summaryrefslogtreecommitdiff
path: root/tests/ITS-2.0-Testsuite/inputdata/translate/xml/translate1xml.xml
blob: 5649d70af492a44361500966c909fce2036192f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?xml version="1.0"?>
<myMetaDoc
      xmlns:cml="myChineseMakupLanguage">
 <head>
  <its:rules xmlns:its="http://www.w3.org/2005/11/its" version="2.0">
   <its:translateRule selector="//img/@alt" translate="yes"/>
   <its:translateRule selector="//*/@title" translate="yes"/>
   <its:translateRule selector="//verbatim" translate="no"/>
   <its:translateRule selector="//verbatim/@*" translate="no"/>
   <its:translateRule selector="//verbatim//*/@*" translate="no"/>
   <its:withinTextRule selector="//img|//verbatim" withinText="yes"/>
  </its:rules>
 </head>
 <body>
  <par>Text with an image: <img alt="Image description" src="img.png"/>.</par>
  <par id="100" title="Text">This is the first paragraph. It has some <verbatim>un-translatable 
   code with an image: <img src="test.png" alt="Image description"/></verbatim>.</par>
  <insert xmlns:z="myChineseMakupLanguage" xmlns:i="http://www.w3.org/2005/11/its">
   <z:书籍>
    <z:封面>
     <z:汇集>The Lord of the Rings</z:汇集>
     <z:标题>The Return of the King</z:标题>
     <z:作者>J.R.R. Tolkein</z:作者>
    </z:封面>
    <z:章节 数="1">
     <z:头注>Minas Tirith</z:头注>
     <z:段落识别 id="A34B"><z:姓名>Pippin</z:姓名> looked out from the shelter of <z:姓名>Gandalf</z:姓名>'s cloak.</z:段落识别>
    </z:章节>
    <z:躯>
     <i:rules version="2.0" xmlns:cml="myChineseMakupLanguage">
      <i:translateRule selector="//cml:作者" translate="no"/>
      <i:translateRule selector="//cml:姓名" translate="no"/>
      <i:withinTextRule selector="//cml:姓名" withinText="yes"/>
     </i:rules>
    </z:躯>
   </z:书籍>
  </insert>
 </body>
</myMetaDoc>