summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xitstool.in573
-rw-r--r--tests/ExternalResource/Attr/ExternalResource1AttrXml.pot41
-rw-r--r--tests/ExternalResource/Attr/ExternalResource1AttrXml.xml24
-rw-r--r--tests/ExternalResource/Attr/ExternalResource2AttrRule.xml3
-rw-r--r--tests/ExternalResource/Attr/ExternalResource2AttrXml.pot41
-rw-r--r--tests/ExternalResource/Attr/ExternalResource2AttrXml.xml22
-rw-r--r--tests/ExternalResource/Attr/ExternalResource3AttrRule.xml3
-rw-r--r--tests/ExternalResource/Attr/ExternalResource3AttrXml.pot51
-rw-r--r--tests/ExternalResource/Attr/ExternalResource3AttrXml.xml28
-rw-r--r--tests/ExternalResource/Attr/movie-frame.gif1
-rw-r--r--tests/ExternalResource/Attr/movie.avi1
-rw-r--r--tests/ExternalResource/Attr/movie.mp31
-rw-r--r--tests/ExternalResource/ExternalResource1Xml.pot41
-rw-r--r--tests/ExternalResource/ExternalResource1Xml.xml24
-rw-r--r--tests/ExternalResource/ExternalResource2Rule.xml3
-rw-r--r--tests/ExternalResource/ExternalResource2Xml.pot41
-rw-r--r--tests/ExternalResource/ExternalResource2Xml.xml22
-rw-r--r--tests/ExternalResource/ExternalResource3Rule.xml3
-rw-r--r--tests/ExternalResource/ExternalResource3Xml.pot51
-rw-r--r--tests/ExternalResource/ExternalResource3Xml.xml28
-rw-r--r--tests/ExternalResource/movie-frame.gif1
-rw-r--r--tests/ExternalResource/movie.avi1
-rw-r--r--tests/ExternalResource/movie.mp31
-rw-r--r--tests/IT-externalRef1.ll.po31
-rw-r--r--tests/IT-externalRef1.ll.xml10
-rw-r--r--tests/IT-externalRef1.pot31
-rw-r--r--tests/IT-externalRef1.txt1
-rw-r--r--tests/IT-externalRef1.xml10
-rw-r--r--tests/IT-join-1.joined.xml (renamed from tests/IT-join-1.ll.xml)0
-rw-r--r--tests/IT-keep-entities-1.ll.po5
-rw-r--r--tests/IT-keep-entities-1.ll.xml2
-rw-r--r--tests/IT-keep-entities-1.pot5
-rw-r--r--tests/IT-locNote-inline.pot5
-rw-r--r--tests/IT-locNote-multiples.pot5
-rw-r--r--tests/IT-placeholder-1.ll.xml2
-rw-r--r--tests/IT-prefixes-1.ll.po16
-rw-r--r--tests/IT-prefixes-1.ll.xml7
-rw-r--r--tests/IT-prefixes-1.pot16
-rw-r--r--tests/IT-prefixes-1.xml5
-rw-r--r--tests/IT-uses-external-dtds.ll.po5
-rw-r--r--tests/IT-uses-external-dtds.ll.xml2
-rw-r--r--tests/IT-uses-external-dtds.pot5
-rw-r--r--tests/ITS-2.0-Testsuite/README1
-rw-r--r--tests/ITS-2.0-Testsuite/expected/elementswithintext/html/withintext1htmloutput.txt26
-rw-r--r--tests/ITS-2.0-Testsuite/expected/elementswithintext/html/withintext2htmloutput.txt10
-rw-r--r--tests/ITS-2.0-Testsuite/expected/elementswithintext/html/withintext3htmloutput.txt26
-rw-r--r--tests/ITS-2.0-Testsuite/expected/elementswithintext/html/withintext4htmloutput.txt26
-rw-r--r--tests/ITS-2.0-Testsuite/expected/elementswithintext/xml/withintext1xmloutput.txt17
-rw-r--r--tests/ITS-2.0-Testsuite/expected/elementswithintext/xml/withintext2xmloutput.txt28
-rw-r--r--tests/ITS-2.0-Testsuite/expected/elementswithintext/xml/withintext3xmloutput.txt15
-rw-r--r--tests/ITS-2.0-Testsuite/expected/elementswithintext/xml/withintext4xmloutput.txt15
-rw-r--r--tests/ITS-2.0-Testsuite/expected/elementswithintext/xml/withintext5xmloutput.txt20
-rw-r--r--tests/ITS-2.0-Testsuite/expected/elementswithintext/xml/withintext6xmloutput.txt13
-rw-r--r--tests/ITS-2.0-Testsuite/expected/externalresource/html/externalresource1htmloutput.txt18
-rw-r--r--tests/ITS-2.0-Testsuite/expected/externalresource/html/externalresource2htmloutput.txt20
-rw-r--r--tests/ITS-2.0-Testsuite/expected/externalresource/html/externalresource3htmloutput.txt17
-rw-r--r--tests/ITS-2.0-Testsuite/expected/externalresource/xml/externalresource1xmloutput.txt17
-rw-r--r--tests/ITS-2.0-Testsuite/expected/externalresource/xml/externalresource2xmloutput.txt15
-rw-r--r--tests/ITS-2.0-Testsuite/expected/externalresource/xml/externalresource3xmloutput.txt23
-rw-r--r--tests/ITS-2.0-Testsuite/expected/externalresource/xml/externalresource4xmloutput.txt19
-rw-r--r--tests/ITS-2.0-Testsuite/expected/externalresource/xml/externalresource5xmloutput.txt15
-rw-r--r--tests/ITS-2.0-Testsuite/expected/idvalue/html/idvalue1htmloutput.txt15
-rw-r--r--tests/ITS-2.0-Testsuite/expected/idvalue/html/idvalue2htmloutput.txt17
-rw-r--r--tests/ITS-2.0-Testsuite/expected/idvalue/html/idvalue3htmloutput.txt14
-rw-r--r--tests/ITS-2.0-Testsuite/expected/idvalue/xml/idvalue1xmloutput.txt18
-rw-r--r--tests/ITS-2.0-Testsuite/expected/idvalue/xml/idvalue2xmloutput.txt6
-rw-r--r--tests/ITS-2.0-Testsuite/expected/idvalue/xml/idvalue3xmloutput.txt14
-rw-r--r--tests/ITS-2.0-Testsuite/expected/idvalue/xml/idvalue4xmloutput.txt18
-rw-r--r--tests/ITS-2.0-Testsuite/expected/idvalue/xml/idvalue5xmloutput.txt22
-rw-r--r--tests/ITS-2.0-Testsuite/expected/localefilter/html/locale1htmloutput.txt12
-rw-r--r--tests/ITS-2.0-Testsuite/expected/localefilter/html/locale2htmloutput.txt10
-rw-r--r--tests/ITS-2.0-Testsuite/expected/localefilter/html/locale3htmloutput.txt12
-rw-r--r--tests/ITS-2.0-Testsuite/expected/localefilter/html/locale4htmloutput.txt11
-rw-r--r--tests/ITS-2.0-Testsuite/expected/localefilter/html/locale5htmloutput.txt21
-rw-r--r--tests/ITS-2.0-Testsuite/expected/localefilter/xml/locale1xmloutput.txt11
-rw-r--r--tests/ITS-2.0-Testsuite/expected/localefilter/xml/locale2xmloutput.txt6
-rw-r--r--tests/ITS-2.0-Testsuite/expected/localefilter/xml/locale3xmloutput.txt9
-rw-r--r--tests/ITS-2.0-Testsuite/expected/localefilter/xml/locale4xmloutput.txt17
-rw-r--r--tests/ITS-2.0-Testsuite/expected/localefilter/xml/locale5xmloutput.txt6
-rw-r--r--tests/ITS-2.0-Testsuite/expected/localefilter/xml/locale6xmloutput.txt15
-rw-r--r--tests/ITS-2.0-Testsuite/expected/localefilter/xml/locale7xmloutput.txt12
-rw-r--r--tests/ITS-2.0-Testsuite/expected/localefilter/xml/locale8xmloutput.txt19
-rw-r--r--tests/ITS-2.0-Testsuite/expected/localizationnote/html/locnote1htmloutput.txt11
-rw-r--r--tests/ITS-2.0-Testsuite/expected/localizationnote/html/locnote2htmloutput.txt17
-rw-r--r--tests/ITS-2.0-Testsuite/expected/localizationnote/html/locnote3htmloutput.txt11
-rw-r--r--tests/ITS-2.0-Testsuite/expected/localizationnote/html/locnote4htmloutput.txt17
-rw-r--r--tests/ITS-2.0-Testsuite/expected/localizationnote/html/locnote5htmloutput.txt21
-rw-r--r--tests/ITS-2.0-Testsuite/expected/localizationnote/html/locnote6htmloutput.txt21
-rw-r--r--tests/ITS-2.0-Testsuite/expected/localizationnote/html/locnote7htmloutput.txt11
-rw-r--r--tests/ITS-2.0-Testsuite/expected/localizationnote/html/locnote8htmloutput.txt21
-rw-r--r--tests/ITS-2.0-Testsuite/expected/localizationnote/html/locnote9htmloutput.txt11
-rw-r--r--tests/ITS-2.0-Testsuite/expected/localizationnote/xml/locnote10xmloutput.txt31
-rw-r--r--tests/ITS-2.0-Testsuite/expected/localizationnote/xml/locnote11xmloutput.txt19
-rw-r--r--tests/ITS-2.0-Testsuite/expected/localizationnote/xml/locnote1xmloutput.txt11
-rw-r--r--tests/ITS-2.0-Testsuite/expected/localizationnote/xml/locnote2xmloutput.txt20
-rw-r--r--tests/ITS-2.0-Testsuite/expected/localizationnote/xml/locnote3xmloutput.txt11
-rw-r--r--tests/ITS-2.0-Testsuite/expected/localizationnote/xml/locnote4xmloutput.txt17
-rw-r--r--tests/ITS-2.0-Testsuite/expected/localizationnote/xml/locnote5xmloutput.txt23
-rw-r--r--tests/ITS-2.0-Testsuite/expected/localizationnote/xml/locnote6xmloutput.txt29
-rw-r--r--tests/ITS-2.0-Testsuite/expected/localizationnote/xml/locnote7xmloutput.txt20
-rw-r--r--tests/ITS-2.0-Testsuite/expected/localizationnote/xml/locnote8xmloutput.txt20
-rw-r--r--tests/ITS-2.0-Testsuite/expected/localizationnote/xml/locnote9xmloutput.txt11
-rw-r--r--tests/ITS-2.0-Testsuite/expected/preservespace/xml/preservespace1xmloutput.txt9
-rw-r--r--tests/ITS-2.0-Testsuite/expected/preservespace/xml/preservespace2xmloutput.txt4
-rw-r--r--tests/ITS-2.0-Testsuite/expected/preservespace/xml/preservespace3xmloutput.txt7
-rw-r--r--tests/ITS-2.0-Testsuite/expected/preservespace/xml/preservespace4xmloutput.txt4
-rw-r--r--tests/ITS-2.0-Testsuite/expected/preservespace/xml/preservespace5xmloutput.txt12
-rw-r--r--tests/ITS-2.0-Testsuite/expected/preservespace/xml/preservespace6xmloutput.txt8
-rw-r--r--tests/ITS-2.0-Testsuite/expected/translate/html/translate1htmloutput.txt18
-rw-r--r--tests/ITS-2.0-Testsuite/expected/translate/html/translate2htmloutput.txt17
-rw-r--r--tests/ITS-2.0-Testsuite/expected/translate/html/translate3htmloutput.txt16
-rw-r--r--tests/ITS-2.0-Testsuite/expected/translate/html/translate4htmloutput.txt15
-rw-r--r--tests/ITS-2.0-Testsuite/expected/translate/html/translate5htmloutput.txt24
-rw-r--r--tests/ITS-2.0-Testsuite/expected/translate/html/translate6htmloutput.txt24
-rw-r--r--tests/ITS-2.0-Testsuite/expected/translate/html/translate7htmloutput.txt14
-rw-r--r--tests/ITS-2.0-Testsuite/expected/translate/xml/translate10xmloutput.txt17
-rw-r--r--tests/ITS-2.0-Testsuite/expected/translate/xml/translate1xmloutput.txt59
-rw-r--r--tests/ITS-2.0-Testsuite/expected/translate/xml/translate2xmloutput.txt11
-rw-r--r--tests/ITS-2.0-Testsuite/expected/translate/xml/translate3xmloutput.txt17
-rw-r--r--tests/ITS-2.0-Testsuite/expected/translate/xml/translate4xmloutput.txt15
-rw-r--r--tests/ITS-2.0-Testsuite/expected/translate/xml/translate5xmloutput.txt11
-rw-r--r--tests/ITS-2.0-Testsuite/expected/translate/xml/translate6xmloutput.txt22
-rw-r--r--tests/ITS-2.0-Testsuite/expected/translate/xml/translate7xmloutput.txt22
-rw-r--r--tests/ITS-2.0-Testsuite/expected/translate/xml/translate8xmloutput.txt28
-rw-r--r--tests/ITS-2.0-Testsuite/expected/translate/xml/translate9xmloutput.txt23
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/elementswithintext/html/withintext1html.html32
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/elementswithintext/html/withintext1htmlrules.xml4
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/elementswithintext/html/withintext2html.html10
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/elementswithintext/html/withintext3html.html32
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/elementswithintext/html/withintext3htmlrules.xml5
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/elementswithintext/html/withintext4html.html38
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/elementswithintext/xml/withintext1xml.xml12
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/elementswithintext/xml/withintext2xml.xml25
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/elementswithintext/xml/withintext2xmlrules.xml6
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/elementswithintext/xml/withintext3xml.xml11
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/elementswithintext/xml/withintext4xml.xml12
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/elementswithintext/xml/withintext5xml.xml25
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/elementswithintext/xml/withintext6xml.xml21
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/elementswithintext/xml/withintext6xmlrules.xml5
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/externalresource/html/externalresource1html.html15
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/externalresource/html/externalresource1htmlrules.xml4
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/externalresource/html/externalresource2html.html17
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/externalresource/html/externalresource2htmlrules.xml4
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/externalresource/html/externalresource3html.html20
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/externalresource/xml/externalresource1xml.xml24
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/externalresource/xml/externalresource2xml.xml22
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/externalresource/xml/externalresource2xmlrules.xml3
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/externalresource/xml/externalresource3xml.xml28
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/externalresource/xml/externalresource3xmlrules.xml3
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/externalresource/xml/externalresource4xml.xml25
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/externalresource/xml/externalresource5xml.xml20
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/externalresource/xml/externalresource5xmlrules.xml5
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/idvalue/html/idvalue1html.html16
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/idvalue/html/idvalue1htmlrules.xml6
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/idvalue/html/idvalue2html.html17
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/idvalue/html/idvalue2htmlrules.xml7
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/idvalue/html/idvalue3html.html22
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/idvalue/xml/idvalue1xml.xml20
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/idvalue/xml/idvalue2xml.xml4
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/idvalue/xml/idvalue3xml.xml13
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/idvalue/xml/idvalue3xmlrules.xml3
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/idvalue/xml/idvalue4xml.xml17
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/idvalue/xml/idvalue4xmlrules.xml4
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/idvalue/xml/idvalue5xml.xml20
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/localefilter/html/locale1html.html14
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/localefilter/html/locale1htmlrules.xml3
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/localefilter/html/locale2html.html12
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/localefilter/html/locale3html.html14
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/localefilter/html/locale3htmlrules.xml4
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/localefilter/html/locale4html.html18
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/localefilter/html/locale5html.html21
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/localefilter/xml/locale1xml.xml12
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/localefilter/xml/locale2xml.xml9
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/localefilter/xml/locale3xml.xml10
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/localefilter/xml/locale3xmlrules.xml3
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/localefilter/xml/locale4xml.xml16
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/localefilter/xml/locale4xmlrules.xml3
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/localefilter/xml/locale5xml.xml8
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/localefilter/xml/locale6xml.xml14
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/localefilter/xml/locale7xml.xml13
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/localefilter/xml/locale7xmlrules.xml4
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/localefilter/xml/locale8xml.xml18
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote1html.html11
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote1htmlrules.xml7
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote2html.html20
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote2htmlrules.xml4
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote3html.html12
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote3htmlrules.xml3
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote4html.html16
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote4htmlrules.xml3
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote5html.html21
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote5htmlrules.xml15
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote6html.html21
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote6htmlrules.xml15
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote7html.html10
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote8html.html21
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote8htmlrules.xml16
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote9html.html20
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/localizationnote/xml/locnote10xml.xml33
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/localizationnote/xml/locnote11xml.xml18
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/localizationnote/xml/locnote11xmlrules.xml16
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/localizationnote/xml/locnote1xml.xml13
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/localizationnote/xml/locnote2xml.xml19
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/localizationnote/xml/locnote3xml.xml12
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/localizationnote/xml/locnote4xml.xml16
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/localizationnote/xml/locnote5xml.xml15
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/localizationnote/xml/locnote5xmlrules.xml9
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/localizationnote/xml/locnote6xml.xml21
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/localizationnote/xml/locnote7xml.xml20
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/localizationnote/xml/locnote8xml.xml17
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/localizationnote/xml/locnote9xml.xml8
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/preservespace/xml/preservespace1xml.xml13
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/preservespace/xml/preservespace2xml.xml8
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/preservespace/xml/preservespace3xml.xml11
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/preservespace/xml/preservespace3xmlrules.xml3
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/preservespace/xml/preservespace4xml.xml8
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/preservespace/xml/preservespace5xml.xml14
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/preservespace/xml/preservespace6xml.xml9
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/preservespace/xml/preservespace6xmlrules.xml4
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/translate/html/translate1html.html17
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/translate/html/translate1htmlrules.xml4
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/translate/html/translate2html.html18
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/translate/html/translate3html.html23
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/translate/html/translate3htmlrules.xml4
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/translate/html/translate4html.html23
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/translate/html/translate4htmlrules.xml4
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/translate/html/translate5html.html34
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/translate/html/translate5htmlrules.xml4
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/translate/html/translate6html.html34
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/translate/html/translate6htmlrules.xml6
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/translate/html/translate7html.html19
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/translate/xml/translate10xml.xml7
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/translate/xml/translate10xmlrules.xml5
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/translate/xml/translate1xml.xml39
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/translate/xml/translate2xml.xml10
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/translate/xml/translate2xmlrules.xml5
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/translate/xml/translate3xml.xml13
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/translate/xml/translate3xmlrules.xml6
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/translate/xml/translate4xml.xml11
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/translate/xml/translate5xml.xml13
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/translate/xml/translate6xml.xml19
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/translate/xml/translate7xml.xml19
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/translate/xml/translate8xml.xml28
-rw-r--r--tests/ITS-2.0-Testsuite/inputdata/translate/xml/translate9xml.xml11
-rwxr-xr-xtests/ITS-2.0-Testsuite/run_tests.sh37
-rw-r--r--tests/IdValue/idvalue1xml.pot23
-rw-r--r--tests/IdValue/idvalue1xml.xml12
-rw-r--r--tests/IdValue/idvalue2xml.pot22
-rw-r--r--tests/IdValue/idvalue2xml.xml4
-rw-r--r--tests/IdValue/idvalue3XmlRule.xml4
-rw-r--r--tests/IdValue/idvalue3xml.pot23
-rw-r--r--tests/IdValue/idvalue3xml.xml11
-rw-r--r--tests/LocNote/EX-locNote-element-1.pot (renamed from tests/EX-locNote-element-1.pot)2
-rw-r--r--tests/LocNote/EX-locNote-element-1.xml (renamed from tests/EX-locNote-element-1.xml)0
-rw-r--r--tests/LocNote/EX-locNote-selector-2.pot (renamed from tests/EX-locNote-selector-2.pot)6
-rw-r--r--tests/LocNote/EX-locNote-selector-2.xml (renamed from tests/EX-locNote-selector-2.xml)0
-rw-r--r--tests/LocNote/EX-locNotePointer-attribute-1.pot (renamed from tests/EX-locNotePointer-attribute-1.pot)4
-rw-r--r--tests/LocNote/EX-locNotePointer-attribute-1.xml (renamed from tests/EX-locNotePointer-attribute-1.xml)0
-rw-r--r--tests/LocNote/EX-locNoteRef-attribute-1.pot (renamed from tests/EX-locNoteRef-attribute-1.pot)2
-rw-r--r--tests/LocNote/EX-locNoteRef-attribute-1.xml (renamed from tests/EX-locNoteRef-attribute-1.xml)0
-rw-r--r--tests/LocNote/EX-locNoteRefPointer-attribute-1.pot (renamed from tests/EX-locNoteRefPointer-attribute-1.pot)4
-rw-r--r--tests/LocNote/EX-locNoteRefPointer-attribute-1.xml (renamed from tests/EX-locNoteRefPointer-attribute-1.xml)0
-rw-r--r--tests/LocNote/LocNote1.pot (renamed from tests/LocNote1.pot)26
-rw-r--r--tests/LocNote/LocNote1.xml (renamed from tests/LocNote1.xml)0
-rw-r--r--tests/LocNote/LocNote2.pot (renamed from tests/LocNote2.pot)11
-rw-r--r--tests/LocNote/LocNote2.xml (renamed from tests/LocNote2.xml)0
-rw-r--r--tests/LocNote/LocNote2_LinkedRules.xml (renamed from tests/LocNote2_LinkedRules.xml)0
-rw-r--r--tests/LocNote/LocNote3.pot (renamed from tests/LocNote3.pot)8
-rw-r--r--tests/LocNote/LocNote3.xml (renamed from tests/LocNote3.xml)0
-rw-r--r--tests/LocNote/LocNote4.pot (renamed from tests/LocNote4.pot)8
-rw-r--r--tests/LocNote/LocNote4.xml (renamed from tests/LocNote4.xml)0
-rw-r--r--tests/LocaleFilter/Locale1Xml.fr_CA.po23
-rw-r--r--tests/LocaleFilter/Locale1Xml.fr_CA.xml13
-rw-r--r--tests/LocaleFilter/Locale1Xml.fr_CH.po23
-rw-r--r--tests/LocaleFilter/Locale1Xml.fr_CH.xml13
-rw-r--r--tests/LocaleFilter/Locale1Xml.fr_FR.po23
-rw-r--r--tests/LocaleFilter/Locale1Xml.fr_FR.xml10
-rw-r--r--tests/LocaleFilter/Locale1Xml.joined.xml21
-rw-r--r--tests/LocaleFilter/Locale1Xml.pot23
-rw-r--r--tests/LocaleFilter/Locale1Xml.xml20
-rw-r--r--tests/LocaleFilter/Locale2Xml.fr_CA.po23
-rw-r--r--tests/LocaleFilter/Locale2Xml.fr_CA.xml8
-rw-r--r--tests/LocaleFilter/Locale2Xml.fr_CH.po23
-rw-r--r--tests/LocaleFilter/Locale2Xml.fr_CH.xml8
-rw-r--r--tests/LocaleFilter/Locale2Xml.fr_FR.po23
-rw-r--r--tests/LocaleFilter/Locale2Xml.fr_FR.xml5
-rw-r--r--tests/LocaleFilter/Locale2Xml.joined.xml16
-rw-r--r--tests/LocaleFilter/Locale2Xml.pot23
-rw-r--r--tests/LocaleFilter/Locale2Xml.xml14
-rw-r--r--tests/LocaleFilter/Locale3Rule.xml5
-rw-r--r--tests/LocaleFilter/Locale3Xml.fr_CA.po23
-rw-r--r--tests/LocaleFilter/Locale3Xml.fr_CA.xml9
-rw-r--r--tests/LocaleFilter/Locale3Xml.fr_CH.po23
-rw-r--r--tests/LocaleFilter/Locale3Xml.fr_CH.xml9
-rw-r--r--tests/LocaleFilter/Locale3Xml.fr_FR.po23
-rw-r--r--tests/LocaleFilter/Locale3Xml.fr_FR.xml6
-rw-r--r--tests/LocaleFilter/Locale3Xml.joined.xml17
-rw-r--r--tests/LocaleFilter/Locale3Xml.pot23
-rw-r--r--tests/LocaleFilter/Locale3Xml.xml16
-rw-r--r--tests/LocaleFilter/Locale4Rule.xml3
-rw-r--r--tests/LocaleFilter/Locale4Xml.fr_CA.po23
-rw-r--r--tests/LocaleFilter/Locale4Xml.fr_CA.xml12
-rw-r--r--tests/LocaleFilter/Locale4Xml.fr_CH.po23
-rw-r--r--tests/LocaleFilter/Locale4Xml.fr_CH.xml12
-rw-r--r--tests/LocaleFilter/Locale4Xml.fr_FR.po23
-rw-r--r--tests/LocaleFilter/Locale4Xml.fr_FR.xml9
-rw-r--r--tests/LocaleFilter/Locale4Xml.joined.xml17
-rw-r--r--tests/LocaleFilter/Locale4Xml.pot23
-rw-r--r--tests/LocaleFilter/Locale4Xml.xml16
-rw-r--r--tests/LocaleFilter/Locale5Xml.fr_CA.po23
-rw-r--r--tests/LocaleFilter/Locale5Xml.fr_CA.xml8
-rw-r--r--tests/LocaleFilter/Locale5Xml.fr_CH.po23
-rw-r--r--tests/LocaleFilter/Locale5Xml.fr_CH.xml8
-rw-r--r--tests/LocaleFilter/Locale5Xml.fr_FR.po23
-rw-r--r--tests/LocaleFilter/Locale5Xml.fr_FR.xml5
-rw-r--r--tests/LocaleFilter/Locale5Xml.joined.xml16
-rw-r--r--tests/LocaleFilter/Locale5Xml.pot23
-rw-r--r--tests/LocaleFilter/Locale5Xml.xml13
-rw-r--r--tests/LocaleFilter/Locale6Xml.fr_CA.po22
-rw-r--r--tests/LocaleFilter/Locale6Xml.fr_CA.xml13
-rw-r--r--tests/LocaleFilter/Locale6Xml.fr_CH.po23
-rw-r--r--tests/LocaleFilter/Locale6Xml.fr_CH.xml13
-rw-r--r--tests/LocaleFilter/Locale6Xml.fr_FR.po22
-rw-r--r--tests/LocaleFilter/Locale6Xml.fr_FR.xml13
-rw-r--r--tests/LocaleFilter/Locale6Xml.joined.xml22
-rw-r--r--tests/LocaleFilter/Locale6Xml.pot23
-rw-r--r--tests/LocaleFilter/Locale6Xml.xml20
-rw-r--r--tests/Translate/Translate1.ll.po (renamed from tests/Translate1.ll.po)14
-rw-r--r--tests/Translate/Translate1.ll.xml (renamed from tests/Translate1.ll.xml)0
-rw-r--r--tests/Translate/Translate1.pot (renamed from tests/Translate1.pot)14
-rw-r--r--tests/Translate/Translate1.xml (renamed from tests/Translate1.xml)0
-rw-r--r--tests/Translate/Translate2.ll.po (renamed from tests/Translate2.ll.po)4
-rw-r--r--tests/Translate/Translate2.ll.xml (renamed from tests/Translate2.ll.xml)0
-rw-r--r--tests/Translate/Translate2.pot (renamed from tests/Translate2.pot)4
-rw-r--r--tests/Translate/Translate2.xml (renamed from tests/Translate2.xml)0
-rw-r--r--tests/Translate/Translate2_LinkedRules.xml (renamed from tests/Translate2_LinkedRules.xml)0
-rw-r--r--tests/Translate/Translate3.ll.po (renamed from tests/Translate3.ll.po)4
-rw-r--r--tests/Translate/Translate3.ll.wrong.po (renamed from tests/Translate3.ll.wrong.po)4
-rw-r--r--tests/Translate/Translate3.ll.wrong.xml (renamed from tests/Translate3.ll.wrong.xml)2
-rw-r--r--tests/Translate/Translate3.ll.xml (renamed from tests/Translate3.ll.xml)2
-rw-r--r--tests/Translate/Translate3.pot (renamed from tests/Translate3.pot)4
-rw-r--r--tests/Translate/Translate3.xml (renamed from tests/Translate3.xml)0
-rw-r--r--tests/Translate/Translate4.ll.po (renamed from tests/Translate4.ll.po)4
-rw-r--r--tests/Translate/Translate4.ll.xml (renamed from tests/Translate4.ll.xml)2
-rw-r--r--tests/Translate/Translate4.pot (renamed from tests/Translate4.pot)4
-rw-r--r--tests/Translate/Translate4.xml (renamed from tests/Translate4.xml)0
-rw-r--r--tests/Translate/Translate5.ll.po (renamed from tests/Translate5.ll.po)4
-rw-r--r--tests/Translate/Translate5.ll.xml (renamed from tests/Translate5.ll.xml)0
-rw-r--r--tests/Translate/Translate5.pot (renamed from tests/Translate5.pot)4
-rw-r--r--tests/Translate/Translate5.xml (renamed from tests/Translate5.xml)0
-rw-r--r--tests/Translate/Translate6.ll.po (renamed from tests/Translate6.ll.po)10
-rw-r--r--tests/Translate/Translate6.ll.xml (renamed from tests/Translate6.ll.xml)0
-rw-r--r--tests/Translate/Translate6.pot (renamed from tests/Translate6.pot)10
-rw-r--r--tests/Translate/Translate6.xml (renamed from tests/Translate6.xml)0
-rw-r--r--tests/Translate/Translate7.ll.po (renamed from tests/Translate7.ll.po)4
-rw-r--r--tests/Translate/Translate7.ll.xml (renamed from tests/Translate7.ll.xml)0
-rw-r--r--tests/Translate/Translate7.pot (renamed from tests/Translate7.pot)4
-rw-r--r--tests/Translate/Translate7.xml (renamed from tests/Translate7.xml)0
-rw-r--r--tests/Translate/TranslateGlobal.ll.po (renamed from tests/TranslateGlobal.ll.po)6
-rw-r--r--tests/Translate/TranslateGlobal.ll.xml (renamed from tests/TranslateGlobal.ll.xml)0
-rw-r--r--tests/Translate/TranslateGlobal.pot (renamed from tests/TranslateGlobal.pot)6
-rw-r--r--tests/Translate/TranslateGlobal.xml (renamed from tests/TranslateGlobal.xml)0
-rw-r--r--tests/Translate/TranslateGlobal_LinkedRules.xml (renamed from tests/TranslateGlobal_LinkedRules.xml)0
-rw-r--r--tests/elementwithintextLocalXml.ll.po16
-rw-r--r--tests/elementwithintextLocalXml.ll.xml6
-rw-r--r--tests/elementwithintextLocalXml.pot16
-rw-r--r--tests/elementwithintextLocalXml.xml8
-rw-r--r--tests/elementwithintextlocalitsSpanXml.ll.po16
-rw-r--r--tests/elementwithintextlocalitsSpanXml.ll.xml6
-rw-r--r--tests/elementwithintextlocalitsSpanXml.pot16
-rw-r--r--tests/elementwithintextlocalitsSpanXml.xml7
-rw-r--r--tests/preservespace1xml.pot23
-rw-r--r--tests/preservespace1xml.xml15
-rw-r--r--tests/preservespace2xml.pot23
-rw-r--r--tests/preservespace2xml.xml10
-rw-r--r--tests/preservespace3XmlRule.xml3
-rw-r--r--tests/preservespace3xml.pot23
-rw-r--r--tests/preservespace3xml.xml12
-rw-r--r--tests/preservespace4xml.pot23
-rw-r--r--tests/preservespace4xml.xml10
-rw-r--r--tests/run_tests.py237
381 files changed, 5612 insertions, 310 deletions
diff --git a/itstool.in b/itstool.in
index 9dc4a0b..671254c 100755
--- a/itstool.in
+++ b/itstool.in
@@ -34,6 +34,7 @@ NS_ITS = 'http://www.w3.org/2005/11/its'
NS_ITST = 'http://itstool.org/extensions/'
NS_BLANK = 'http://itstool.org/extensions/blank/'
NS_XLINK = 'http://www.w3.org/1999/xlink'
+NS_XML = 'http://www.w3.org/XML/1998/namespace'
class NoneTranslations:
def gettext(self, message):
@@ -94,8 +95,17 @@ class MessageList (object):
msgdict[key].add_marker(marker)
for comment in msg.get_comments():
msgdict[key].add_comment(comment)
+ for idvalue in msg.get_id_values():
+ msgdict[key].add_id_value(idvalue)
if msg.get_preserve_space():
msgdict[key].set_preserve_space()
+ if msg.get_locale_filter() is not None:
+ locale = msgdict[key].get_locale_filter()
+ if locale is not None:
+ msgdict[key].set_locale_filter('%s, %s' % (locale, msg.get_locale_filter()))
+ else:
+ msgdict[key].set_locale_filter(msg.get_locale_filter())
+
else:
msgs.append(msg)
msgdict[key] = msg
@@ -117,7 +127,7 @@ class MessageList (object):
class Comment (object):
def __init__ (self, text):
- self._text = text
+ self._text = str(text)
assert(text is not None)
self._markers = []
@@ -167,6 +177,8 @@ class Message (object):
self._placeholders = []
self._sources = []
self._markers = []
+ self._id_values = []
+ self._locale_filter = None
self._comments = []
self._preserve = False
@@ -213,21 +225,18 @@ class Message (object):
if len(self._message) == 0 or not(isinstance(self._message[-1], basestring)):
self._message.append('')
if node.ns() is not None and node.ns().name is not None:
- self._message[-1] += (u'<%s:%s' % (unicode(node.ns().name, 'utf-8'),
- unicode(node.name, 'utf-8')))
+ self._message[-1] += (u'<%s:%s' % (unicode(node.ns().name, 'utf-8'), unicode(node.name, 'utf-8')))
else:
self._message[-1] += (u'<%s' % unicode(node.name, 'utf-8'))
- if node.properties is not None:
- for prop in node.properties:
- if prop.type == 'attribute':
- name = prop.name
- if prop.ns() is not None:
- name = prop.ns().name + ':' + name
- atval = prop.content
- if not isinstance(atval, unicode):
- atval = unicode(atval, 'utf-8')
- atval = atval.replace('&', '&amp;').replace('<', '&lt;').replace('>', '&gt;').replace('"', '&quot;')
- self._message += " %s=\"%s\"" % (name, atval)
+ for prop in xml_attr_iter(node):
+ name = prop.name
+ if prop.ns() is not None:
+ name = prop.ns().name + ':' + name
+ atval = prop.content
+ if not isinstance(atval, unicode):
+ atval = unicode(atval, 'utf-8')
+ atval = atval.replace('&', '&amp;').replace('<', '&lt;').replace('>', '&gt;').replace('"', '&quot;')
+ self._message += " %s=\"%s\"" % (name, atval)
if node.children is not None:
self._message[-1] += '>'
else:
@@ -238,8 +247,7 @@ class Message (object):
if len(self._message) == 0 or not(isinstance(self._message[-1], basestring)):
self._message.append('')
if node.ns() is not None and node.ns().name is not None:
- self._message[-1] += (u'</%s:%s>' % (unicode(node.ns().name, 'utf-8'),
- unicode(node.name, 'utf-8')))
+ self._message[-1] += (u'</%s:%s>' % (unicode(node.ns().name, 'utf-8'), unicode(node.name, 'utf-8')))
else:
self._message[-1] += (u'</%s>' % unicode(node.name, 'utf-8'))
@@ -268,6 +276,12 @@ class Message (object):
def get_markers (self):
return self._markers
+ def add_id_value(self, id_value):
+ self._id_values.append(id_value)
+
+ def get_id_values(self):
+ return self._id_values
+
def add_comment (self, comment):
if comment is not None:
self._comments.append(comment)
@@ -294,6 +308,12 @@ class Message (object):
def set_preserve_space (self, preserve=True):
self._preserve = preserve
+ def get_locale_filter(self):
+ return self._locale_filter
+
+ def set_locale_filter(self, locale):
+ self._locale_filter = locale
+
def format (self):
ret = u''
markers = {}
@@ -301,6 +321,10 @@ class Message (object):
if not markers.has_key(marker):
ret += '#. (itstool) path: ' + marker + '\n'
markers[marker] = marker
+ for idvalue in self._id_values:
+ ret += '#. (itstool) id: ' + idvalue + '\n'
+ if self._locale_filter is not None:
+ ret += '#. (itstool) ' + self._locale_filter[1] + ' locale: ' + self._locale_filter[0] + '\n'
comments = []
commentsdict = {}
for comment in self._comments:
@@ -353,6 +377,34 @@ def xml_is_ns_name (node, ns, name):
return False
return node.name == name and node.ns() is not None and node.ns().content == ns
+def xml_get_node_path(node):
+ # The built-in nodePath() method only does numeric indexes
+ # when necessary for disambiguation. For various reasons,
+ # we prefer always using indexes.
+ name = node.name
+ if node.ns() is not None and node.ns().name is not None:
+ name = node.ns().name + ':' + name
+ if node.type == 'attribute':
+ name = '@' + name
+ name = '/' + name
+ if node.type == 'element' and node.parent.type == 'element':
+ count = 1
+ prev = node.previousElementSibling()
+ while prev is not None:
+ if prev.name == node.name:
+ if prev.ns() is None:
+ if node.ns() is None:
+ count += 1
+ else:
+ if node.ns() is not None:
+ if prev.ns().name == node.ns().name:
+ count += 1
+ prev = prev.previousElementSibling()
+ name = '%s[%i]' % (name, count)
+ if node.parent.type == 'element':
+ name = xml_get_node_path(node.parent) + name
+ return name
+
def xml_error_catcher(doc, error):
doc._xml_err += " %s" % error
@@ -371,6 +423,26 @@ def fix_node_ns (node, nsdefs):
fix_node_ns(child, childnsdefs)
+class LocNote (object):
+ def __init__(self, locnote=None, locnoteref=None, locnotetype=None, space=False):
+ self.locnote = locnote
+ self.locnoteref = locnoteref
+ self.locnotetype = locnotetype
+ if self.locnotetype != 'alert':
+ self.locnotetype = 'description'
+ self._preserve_space=space
+
+ def __repr__(self):
+ if self.locnote is not None:
+ if self._preserve_space:
+ return self.locnote
+ else:
+ return re.sub('\s+', ' ', self.locnote).strip()
+ elif self.locnoteref is not None:
+ return '(itstool) link: ' + re.sub('\s+', ' ', self.locnoteref).strip()
+ return ''
+
+
class Document (object):
def __init__ (self, filename, messages, load_dtd=False, keep_entities=False):
self._xml_err = ''
@@ -412,7 +484,7 @@ class Document (object):
else:
sys.stderr.write('Warning: ITS file %s missing version attribute\n' %
os.path.basename(href))
- if version is not None and version != '1.0':
+ if version is not None and version not in ('1.0', '2.0'):
sys.stderr.write('Warning: Skipping ITS file %s with unknown version %s\n' %
(os.path.basename(href), root.nsProp('version', None)))
else:
@@ -426,7 +498,7 @@ class Document (object):
version = root.nsProp('version', NS_ITS)
else:
sys.stderr.write('Warning: Local ITS rules missing version attribute\n')
- if version is not None and version != '1.0':
+ if version is not None and version not in ('1.0', '2.0'):
sys.stderr.write('Warning: Skipping local ITS rules with unknown version %s\n' %
version)
else:
@@ -441,19 +513,28 @@ class Document (object):
self._msgs = messages
self._its_translate_nodes = {}
self._its_within_text_nodes = {}
+ self._its_locale_filters = {}
+ self._its_id_values = {}
self._its_loc_notes = {}
- self._itst_preserve_space_nodes = {}
+ self._its_preserve_space_nodes = {}
self._itst_drop_nodes = {}
self._itst_contexts = {}
self._its_lang = {}
self._itst_lang_attr = {}
self._itst_credits = None
- self._itst_externals = []
+ self._its_externals = {}
def _check_errors(self):
if self._xml_err:
raise libxml2.parserError(self._xml_err)
+ def register_its_params(self, xpath, rules):
+ for child in xml_child_iter(rules):
+ if xml_is_ns_name(child, NS_ITS, 'param'):
+ name = child.nsProp('name', None)
+ value = child.getContent()
+ xpath.xpathRegisterVariable(name, None, value)
+
def apply_its_rule(self, rule, xpath):
if rule.type != 'element':
return
@@ -468,11 +549,48 @@ class Document (object):
elif xml_is_ns_name(rule, NS_ITST, 'preserveSpaceRule'):
if rule.nsProp('selector', None) is not None:
for node in self._try_xpath_eval(xpath, rule.nsProp('selector', None)):
- self._itst_preserve_space_nodes[node] = rule.nsProp('preserveSpace', None)
+ val = rule.nsProp('preserveSpace', None)
+ if val == 'yes':
+ self._its_preserve_space_nodes[node] = 'preserve'
+ elif xml_is_ns_name(rule, NS_ITS, 'preserveSpaceRule'):
+ if rule.nsProp('selector', None) is not None:
+ for node in self._try_xpath_eval(xpath, rule.nsProp('selector', None)):
+ self._its_preserve_space_nodes[node] = rule.nsProp('space', None)
+ elif xml_is_ns_name(rule, NS_ITS, 'localeFilterRule'):
+ if rule.nsProp('selector', None) is not None:
+ if rule.hasNsProp('localeFilterList', None):
+ lst = rule.nsProp('localeFilterList', None)
+ else:
+ lst = '*'
+ if rule.hasNsProp('localeFilterType', None):
+ typ = rule.nsProp('localeFilterType', None)
+ else:
+ typ = 'include'
+ for node in self._try_xpath_eval(xpath, rule.nsProp('selector', None)):
+ self._its_locale_filters[node] = (lst, typ)
elif xml_is_ns_name(rule, NS_ITST, 'dropRule'):
if rule.nsProp('selector', None) is not None:
for node in self._try_xpath_eval(xpath, rule.nsProp('selector', None)):
self._itst_drop_nodes[node] = rule.nsProp('drop', None)
+ elif xml_is_ns_name(rule, NS_ITS, 'idValueRule'):
+ sel = rule.nsProp('selector', None)
+ idv = rule.nsProp('idValue', None)
+ if sel is not None and idv is not None:
+ for node in self._try_xpath_eval(xpath, sel):
+ try:
+ oldnode = xpath.contextNode()
+ except:
+ oldnode = None
+ xpath.setContextNode(node)
+ idvalue = self._try_xpath_eval(xpath, idv)
+ if isinstance(idvalue, basestring):
+ self._its_id_values[node] = idvalue
+ else:
+ for val in idvalue:
+ self._its_id_values[node] = val.content
+ break
+ xpath.setContextNode(oldnode)
+ pass
elif xml_is_ns_name(rule, NS_ITST, 'contextRule'):
if rule.nsProp('selector', None) is not None:
for node in self._try_xpath_eval(xpath, rule.nsProp('selector', None)):
@@ -494,13 +612,14 @@ class Document (object):
xpath.setContextNode(oldnode)
elif xml_is_ns_name(rule, NS_ITS, 'locNoteRule'):
locnote = None
+ notetype = rule.nsProp('locNoteType', None)
for child in xml_child_iter(rule):
if xml_is_ns_name(child, NS_ITS, 'locNote'):
- locnote = re.sub('\s+', ' ', child.content).strip()
+ locnote = LocNote(locnote=child.content, locnotetype=notetype)
break
if locnote is None:
if rule.hasNsProp('locNoteRef', None):
- locnote = '(itstool) link: ' + re.sub('\s+', ' ', rule.nsProp('locNoteRef', None)).strip()
+ locnote = LocNote(locnoteref=rule.nsProp('locNoteRef', None), locnotetype=notetype)
if rule.nsProp('selector', None) is not None:
for node in self._try_xpath_eval(xpath, rule.nsProp('selector', None)):
if locnote is not None:
@@ -521,16 +640,19 @@ class Document (object):
xpath.setContextNode(node)
note = self._try_xpath_eval(xpath, sel)
if isinstance(note, basestring):
- self._its_loc_notes.setdefault(node, []).append(note)
+ if ref:
+ nodenote = LocNote(locnoteref=note, locnotetype=notetype)
+ else:
+ nodenote = LocNote(locnote=note, locnotetype=notetype)
+ self._its_loc_notes.setdefault(node, []).append(nodenote)
else:
for note in note:
- if self.get_preserve_space(note):
- cont = note.content
- else:
- cont = re.sub('\s+', ' ', note.content).strip()
if ref:
- cont = '(itstool) link: ' + cont
- self._its_loc_notes.setdefault(node, []).append(cont)
+ nodenote = LocNote(locnoteref=note.content, locnotetype=notetype)
+ else:
+ nodenote = LocNote(locnote=note.content, locnotetype=notetype,
+ space=self.get_preserve_space(note))
+ self._its_loc_notes.setdefault(node, []).append(nodenote)
break
xpath.setContextNode(oldnode)
elif xml_is_ns_name(rule, NS_ITS, 'langRule'):
@@ -556,41 +678,48 @@ class Document (object):
for node in self._try_xpath_eval(xpath, rule.nsProp('appendTo', None)):
self._itst_credits = (node, rule)
break
- elif xml_is_ns_name(rule, NS_ITST, 'externalRefRule'):
- if rule.nsProp('selector', None) is not None and rule.nsProp('refPointer', None) is not None:
- for node in self._try_xpath_eval(xpath, rule.nsProp('selector', None)):
+ elif (xml_is_ns_name(rule, NS_ITS, 'externalResourceRefRule') or
+ xml_is_ns_name(rule, NS_ITST, 'externalRefRule')):
+ sel = rule.nsProp('selector', None)
+ if xml_is_ns_name(rule, NS_ITS, 'externalResourceRefRule'):
+ ptr = rule.nsProp('externalResourceRefPointer', None)
+ else:
+ ptr = rule.nsProp('refPointer', None)
+ if sel is not None and ptr is not None:
+ for node in self._try_xpath_eval(xpath, sel):
try:
oldnode = xpath.contextNode()
except:
oldnode = None
xpath.setContextNode(node)
- res = self._try_xpath_eval(xpath, rule.nsProp('refPointer', None))
+ res = self._try_xpath_eval(xpath, ptr)
if len(res) > 0:
- self._itst_externals.append((node, res[0].content))
+ self._its_externals[node] = res[0].content
xpath.setContextNode(oldnode)
- def apply_its_rules (self):
- dirs = []
- ddir = os.getenv('XDG_DATA_HOME', '')
- if ddir == '':
- ddir = os.path.join(os.path.expanduser('~'), '.local', 'share')
- dirs.append(ddir)
- ddir = os.getenv('XDG_DATA_DIRS', '')
- if ddir == '':
- if DATADIR not in ('/usr/local/share', '/usr/share'):
- ddir += DATADIR + ':'
- ddir += '/usr/local/share:/usr/share'
- dirs.extend(ddir.split(':'))
- ddone = {}
- for ddir in dirs:
- itsdir = os.path.join(ddir, 'itstool', 'its')
- if not os.path.exists(itsdir):
- continue
- for dfile in os.listdir(itsdir):
- if dfile.endswith('.its'):
- if not ddone.get(dfile, False):
- self.apply_its_file(os.path.join(itsdir, dfile))
- ddone[dfile] = True
+ def apply_its_rules (self, builtins):
+ if builtins:
+ dirs = []
+ ddir = os.getenv('XDG_DATA_HOME', '')
+ if ddir == '':
+ ddir = os.path.join(os.path.expanduser('~'), '.local', 'share')
+ dirs.append(ddir)
+ ddir = os.getenv('XDG_DATA_DIRS', '')
+ if ddir == '':
+ if DATADIR not in ('/usr/local/share', '/usr/share'):
+ ddir += DATADIR + ':'
+ ddir += '/usr/local/share:/usr/share'
+ dirs.extend(ddir.split(':'))
+ ddone = {}
+ for ddir in dirs:
+ itsdir = os.path.join(ddir, 'itstool', 'its')
+ if not os.path.exists(itsdir):
+ continue
+ for dfile in os.listdir(itsdir):
+ if dfile.endswith('.its'):
+ if not ddone.get(dfile, False):
+ self.apply_its_file(os.path.join(itsdir, dfile))
+ ddone[dfile] = True
self.apply_local_its_rules()
def apply_its_file (self, filename):
@@ -604,7 +733,7 @@ class Document (object):
else:
sys.stderr.write('Warning: ITS file %s missing version attribute\n' %
os.path.basename(filename))
- if version is not None and version != '1.0':
+ if version is not None and version not in ('1.0', '2.0'):
sys.stderr.write('Warning: Skipping ITS file %s with unknown version %s\n' %
(os.path.basename(filename), root.nsProp('version', None)))
return
@@ -643,6 +772,7 @@ class Document (object):
xpath.xpathRegisterNs(nsdef.name, nsdef.content)
nsdef = nsdef.next
par = par.parent
+ self.register_its_params(xpath, root)
self.apply_its_rule(rule, xpath)
def apply_local_its_rules (self):
@@ -657,12 +787,14 @@ class Document (object):
nsdef = nsdef.next
xpath = self._doc.xpathNewContext()
reg_ns(xpath, rules)
+ self.register_its_params(xpath, rules)
for rule in xml_child_iter(rules):
if rule.type != 'element':
continue
if rule.nsDefs() is not None:
- rule_xpath = self._doc.xpathNewContent()
+ rule_xpath = self._doc.xpathNewContext()
reg_ns(rule_xpath, rule)
+ self.register_its_params(rule_xpath, rules)
else:
rule_xpath = xpath
self.apply_its_rule(rule, rule_xpath)
@@ -720,8 +852,7 @@ class Document (object):
node = self._doc.getRootElement()
if node is None or node.type != 'element':
return
- if ((node.hasNsProp('drop', NS_ITST) and node.nsProp('drop', NS_ITST) == 'yes') or
- self._itst_drop_nodes.get(node, 'no') == 'yes'):
+ if self.get_itst_drop(node) == 'yes':
prev = node.prev
node.unlinkNode()
node.freeNode()
@@ -742,6 +873,10 @@ class Document (object):
if re.sub('\s+', '', prevtext) == '':
prevnode = node.prev
for lang in sorted(translations.keys(), reverse=True):
+ locale = self.get_its_locale_filter(node)
+ lmatch = match_locale_list(locale[0], lang)
+ if (locale[1] == 'include' and not lmatch) or (locale[1] == 'exclude' and lmatch):
+ continue
newnode = self.get_translated(node, translations[lang], strict=strict, lang=lang)
if newnode != node:
newnode.setProp('xml:lang', lang)
@@ -763,8 +898,16 @@ class Document (object):
node = self._doc.getRootElement()
if node is None or node.type != 'element':
return
- if ((node.hasNsProp('drop', NS_ITST) and node.nsProp('drop', NS_ITST) == 'yes') or
- self._itst_drop_nodes.get(node, 'no') == 'yes'):
+ drop = False
+ locale = self.get_its_locale_filter(node)
+ if locale[1] == 'include':
+ if locale[0] != '*':
+ if not match_locale_list(locale[0], language):
+ drop = True
+ elif locale[1] == 'exclude':
+ if match_locale_list(locale[0], language):
+ drop = True
+ if self.get_itst_drop(node) == 'yes' or drop:
prev = node.prev
node.unlinkNode()
node.freeNode()
@@ -896,36 +1039,6 @@ class Document (object):
def generate_messages(self, comments=True):
if self._itst_credits is not None:
self._msgs.add_credits()
- for ext in self._itst_externals:
- translate = None
- node = ext[0]
- while node != None:
- translate = self.get_its_translate(node)
- if translate is not None:
- break
- node = node.parent
- if translate == 'no':
- continue
- msg = Message()
- try:
- fullfile = os.path.join(os.path.dirname(self._filename), ext[1])
- filefp = open(fullfile)
- filemd5 = hashlib.md5(filefp.read()).hexdigest()
- filefp.close()
- except:
- filemd5 = '__failed__'
- txt = "external ref='%s' md5='%s'" % (ext[1], filemd5)
- msg.set_context('_')
- msg.add_text(txt)
- msg.add_source('%s:%i' % (self._doc.name, ext[0].lineNo()))
- msg.add_marker(ext[0].name)
- msg.add_comment(Comment('This is a reference to an external file such as an image or'
- ' video. When the file changes, the md5 hash will change to'
- ' let you know you need to update your localized copy. The'
- ' msgstr is not used at all. Set it to whatever you like'
- ' once you have updated your copy of the file.'))
- self._msgs.add_message(msg, None)
- self._in_translatable = True
for child in xml_child_iter(self._doc):
if child.type == 'element':
self.generate_message(child, None, comments=comments)
@@ -943,14 +1056,12 @@ class Document (object):
return
if self._itst_drop_nodes.get(node, 'no') == 'yes':
return
+ locfil = self.get_its_locale_filter(node)
+ if locfil == ('', 'include') or locfil == ('*', 'exclude'):
+ return
if path is None:
path = ''
translate = self.get_its_translate(node)
- if translate is None:
- if self._in_translatable:
- translate = 'yes'
- else:
- translate = 'no'
withinText = False
if translate == 'no':
if msg is not None:
@@ -970,8 +1081,14 @@ class Document (object):
ctxt = self._itst_contexts.get(node)
if ctxt is not None:
msg.set_context(ctxt)
+ idvalue = self.get_its_id_value(node)
+ if idvalue is not None:
+ basename = os.path.basename(self._filename)
+ msg.add_id_value(basename + '#' + idvalue)
if self.get_preserve_space(node):
msg.set_preserve_space()
+ if self.get_its_locale_filter(node) != ('*', 'include'):
+ msg.set_locale_filter(self.get_its_locale_filter(node))
msg.add_source('%s:%i' % (self._doc.name, node.lineNo()))
msg.add_marker('%s/%s' % (node.parent.name, node.name))
else:
@@ -998,7 +1115,7 @@ class Document (object):
cnode = node
while cnode is not None:
hasnote = False
- for locnote in self.get_its_loc_notes(cnode):
+ for locnote in self.get_its_loc_notes(cnode, inherit=(not withinText)):
comment = Comment(locnote)
if withinText:
comment.add_marker('.%s/%s' % (path, cnode.name))
@@ -1008,13 +1125,18 @@ class Document (object):
break
cnode = cnode.parent
- in_translatable = self._in_translatable
- self._in_translatable = (translate == 'yes')
+ self.generate_external_resource_message(node)
+ for attr in xml_attr_iter(node):
+ self.generate_external_resource_message(attr)
+ idvalue = self.get_its_id_value(attr)
+ if idvalue is not None:
+ basename = os.path.basename(self._filename)
+ msg.add_id_value(basename + '#' + idvalue)
+
if withinText:
path = path + '/' + node.name
for child in xml_child_iter(node):
self.generate_message(child, msg, comments=comments, path=path)
- self._in_translatable = in_translatable
if translate:
if is_unit and not msg.is_empty():
@@ -1022,6 +1144,38 @@ class Document (object):
elif msg is not None:
msg.add_end_tag(node)
+ def generate_external_resource_message(self, node):
+ if not self._its_externals.has_key(node):
+ return
+ resref = self._its_externals[node]
+ if node.type == 'element':
+ translate = self.get_its_translate(node)
+ marker = '%s/%s' % (node.parent.name, node.name)
+ else:
+ translate = self.get_its_translate(node.parent)
+ marker = '%s/%s/@%s' % (node.parent.parent.name, node.parent.name, node.name)
+ if translate == 'no':
+ return
+ msg = Message()
+ try:
+ fullfile = os.path.join(os.path.dirname(self._filename), resref)
+ filefp = open(fullfile)
+ filemd5 = hashlib.md5(filefp.read()).hexdigest()
+ filefp.close()
+ except:
+ filemd5 = '__failed__'
+ txt = "external ref='%s' md5='%s'" % (resref, filemd5)
+ msg.set_context('_')
+ msg.add_text(txt)
+ msg.add_source('%s:%i' % (self._doc.name, node.lineNo()))
+ msg.add_marker(marker)
+ msg.add_comment(Comment('This is a reference to an external file such as an image or'
+ ' video. When the file changes, the md5 hash will change to'
+ ' let you know you need to update your localized copy. The'
+ ' msgstr is not used at all. Set it to whatever you like'
+ ' once you have updated your copy of the file.'))
+ self._msgs.add_message(msg, None)
+
def is_translation_unit (self, node):
return self.get_its_within_text(node) != 'yes'
@@ -1029,43 +1183,147 @@ class Document (object):
return len([child for child in xml_child_iter(node) if child.type=='element'])
def get_preserve_space (self, node):
- if node.getSpacePreserve() == 1:
- return True
- else:
- while node.type == 'element':
- if self._itst_preserve_space_nodes.has_key(node):
- return (self._itst_preserve_space_nodes[node] == 'yes')
- node = node.parent
+ while node.type in ('attribute', 'element'):
+ if node.getSpacePreserve() == 1:
+ return True
+ if self._its_preserve_space_nodes.has_key(node):
+ return (self._its_preserve_space_nodes[node] == 'preserve')
+ node = node.parent
return False
- def get_its_translate (self, node):
+ def get_its_translate(self, node):
+ val = None
if node.hasNsProp('translate', NS_ITS):
- return node.nsProp('translate', NS_ITS)
- if xml_is_ns_name(node, NS_ITS, 'span'):
- if node.hasNsProp('translate', None):
- return node.nsProp('translate', None)
- if self._its_translate_nodes.has_key(node):
- return self._its_translate_nodes[node]
- return None
+ val = node.nsProp('translate', NS_ITS)
+ elif xml_is_ns_name(node, NS_ITS, 'span') and node.hasNsProp('translate', None):
+ val = node.nsProp('translate', None)
+ elif self._its_translate_nodes.has_key(node):
+ val = self._its_translate_nodes[node]
+ if val is not None:
+ return val
+ if node.type == 'attribute':
+ return 'no'
+ if node.parent.type == 'element':
+ return self.get_its_translate(node.parent)
+ return 'yes'
+
+ def get_its_within_text(self, node):
+ if node.hasNsProp('withinText', NS_ITS):
+ val = node.nsProp('withinText', NS_ITS)
+ elif xml_is_ns_name(node, NS_ITS, 'span') and node.hasNsProp('withinText', None):
+ val = node.nsProp('withinText', None)
+ else:
+ return self._its_within_text_nodes.get(node, 'no')
+ if val in ('yes', 'nested'):
+ return val
+ return 'no'
+
+ def get_its_locale_filter(self, node):
+ if node.hasNsProp('localeFilterList', NS_ITS) or node.hasNsProp('localeFilterType', NS_ITS):
+ if node.hasNsProp('localeFilterList', NS_ITS):
+ lst = node.nsProp('localeFilterList', NS_ITS)
+ else:
+ lst = '*'
+ if node.hasNsProp('localeFilterType', NS_ITS):
+ typ = node.nsProp('localeFilterType', NS_ITS)
+ else:
+ typ = 'include'
+ return (lst, typ)
+ if (xml_is_ns_name(node, NS_ITS, 'span') and
+ (node.hasNsProp('localeFilterList', None) or node.hasNsProp('localeFilterType', None))):
+ if node.hasNsProp('localeFilterList', None):
+ lst = node.nsProp('localeFilterList', None)
+ else:
+ lst = '*'
+ if node.hasNsProp('localeFilterType', None):
+ typ = node.nsProp('localeFilterType', None)
+ else:
+ typ = 'include'
+ return (lst, typ)
+ if self._its_locale_filters.has_key(node):
+ return self._its_locale_filters[node]
+ if node.parent.type == 'element':
+ return self.get_its_locale_filter(node.parent)
+ return ('*', 'include')
+
+ def get_itst_drop(self, node):
+ if node.hasNsProp('drop', NS_ITST) and node.nsProp('drop', NS_ITST) == 'yes':
+ return 'yes'
+ if self._itst_drop_nodes.get(node, 'no') == 'yes':
+ return 'yes'
+ return 'no'
- def get_its_within_text (self, node):
- return self._its_within_text_nodes.get(node, 'no')
+ def get_its_id_value(self, node):
+ if node.hasNsProp('id', NS_XML):
+ return node.nsProp('id', NS_XML)
+ return self._its_id_values.get(node, None)
- def get_its_loc_notes (self, node):
+ def get_its_loc_notes(self, node, inherit=True):
ret = []
- if node.hasNsProp('locNote', NS_ITS):
- ret.append(re.sub('\s+', ' ', node.nsProp('locNote', NS_ITS)).strip())
- if node.hasNsProp('locNoteRef', NS_ITS):
- ret.append('(itstool) link: ' + re.sub('\s+', ' ', node.nsProp('locNoteRef', NS_ITS)).strip())
- if xml_is_ns_name(node, NS_ITS, 'span'):
- if node.hasNsProp('locNote', None):
- ret.append(re.sub('\s+', ' ', node.nsProp('locNote', None)).strip())
- if node.hasNsProp('locNoteRef', None):
- ret.append('(itstool) link: ' + re.sub('\s+', ' ', node.nsProp('locNoteRef', None)).strip())
- for locnote in self._its_loc_notes.get(node, []):
+ if node.hasNsProp('locNote', NS_ITS) or node.hasNsProp('locNoteRef', NS_ITS) or node.hasNsProp('locNoteType', NS_ITS):
+ notetype = node.nsProp('locNoteType', NS_ITS)
+ if node.hasNsProp('locNote', NS_ITS):
+ ret.append(LocNote(locnote=node.nsProp('locNote', NS_ITS), locnotetype=notetype))
+ elif node.hasNsProp('locNoteRef', NS_ITS):
+ ret.append(LocNote(locnoteref=node.nsProp('locNoteRef', NS_ITS), locnotetype=notetype))
+ elif xml_is_ns_name(node, NS_ITS, 'span'):
+ if node.hasNsProp('locNote', None) or node.hasNsProp('locNoteRef', None) or node.hasNsProp('locNoteType', None):
+ notetype = node.nsProp('locNoteType', None)
+ if node.hasNsProp('locNote', None):
+ ret.append(LocNote(locnote=node.nsProp('locNote', None), locnotetype=notetype))
+ elif node.hasNsProp('locNoteRef', None):
+ ret.append(LocNote(locnoteref=node.nsProp('locNoteRef', None), locnotetype=notetype))
+ for locnote in reversed(self._its_loc_notes.get(node, [])):
ret.append(locnote)
+ if (len(ret) == 0 and inherit and
+ node.type != 'attribute' and node.parent is not None and node.parent.type == 'element'):
+ return self.get_its_loc_notes(node.parent)
return ret
+ def output_test_data(self, category, out, node=None):
+ if node is None:
+ node = self._doc.getRootElement()
+ compval = ''
+ if category == 'translate':
+ compval = 'translate="%s"' % self.get_its_translate(node)
+ elif category == 'withinText':
+ if node.type != 'attribute':
+ compval = 'withinText="%s"' % self.get_its_within_text(node)
+ elif category == 'localeFilter':
+ compval = 'localeFilterList="%s"\tlocaleFilterType="%s"' % self.get_its_locale_filter(node)
+ elif category == 'locNote':
+ val = self.get_its_loc_notes(node)
+ if len(val) > 0:
+ if val[0].locnote is not None:
+ compval = 'locNote="%s"\tlocNoteType="%s"' % (str(val[0]), val[0].locnotetype)
+ elif val[0].locnoteref is not None:
+ compval = 'locNoteRef="%s"\tlocNoteType="%s"' % (val[0].locnoteref, val[0].locnotetype)
+ elif category == 'externalResourceRef':
+ val = self._its_externals.get(node, '')
+ if val != '':
+ compval = 'externalResourceRef="%s"' % val
+ elif category == 'idValue':
+ val = self.get_its_id_value(node)
+ if val is not None:
+ compval = 'idValue="%s"' % val
+ elif category == 'preserveSpace':
+ if self.get_preserve_space(node):
+ compval = 'space="preserve"'
+ else:
+ compval = 'space="default"'
+ else:
+ sys.stderr.write('Error: Unrecognized category %s\n' % category)
+ sys.exit(1)
+ if compval != '':
+ out.write('%s\t%s\r\n' % (xml_get_node_path(node), compval))
+ else:
+ out.write('%s\r\n' % (xml_get_node_path(node)))
+ for attr in sorted(xml_attr_iter(node), lambda x, y: cmp(str(x), str(y))):
+ self.output_test_data(category, out, attr)
+ for child in xml_child_iter(node):
+ if child.type == 'element':
+ self.output_test_data(category, out, child)
+
@staticmethod
def _try_xpath_eval (xpath, expr):
try:
@@ -1074,6 +1332,37 @@ class Document (object):
sys.stderr.write('Warning: Invalid XPath: %s\n' % expr)
return []
+def match_locale_list(extranges, locale):
+ if extranges.strip() == '':
+ return False
+ for extrange in [extrange.strip() for extrange in extranges.split(',')]:
+ if match_locale(extrange, locale):
+ return True
+ return False
+
+def match_locale(extrange, locale):
+ # Extended filtering for extended language ranges as
+ # defined by RFC4647, part of BCP47.
+ # http://tools.ietf.org/html/rfc4647#section-3.3.2
+ rangelist = [x.lower() for x in extrange.split('-')]
+ localelist = [x.lower() for x in locale.split('-')]
+ if rangelist[0] not in ('*', localelist[0]):
+ return False
+ rangei = localei = 0
+ while rangei < len(rangelist):
+ if rangelist[rangei] == '*':
+ rangei += 1
+ continue
+ if localei >= len(localelist):
+ return False
+ if rangelist[rangei] in ('*', localelist[localei]):
+ rangei += 1
+ localei += 1
+ continue
+ if len(localelist[localei]) == 1:
+ return False
+ localei += 1
+ return True
_locale_pattern = re.compile('([a-zA-Z0-9-]+)(_[A-Za-z0-9]+)?(@[A-Za-z0-9]+)?(\.[A-Za-z0-9]+)?')
def convert_locale (locale):
@@ -1123,6 +1412,11 @@ if __name__ == '__main__':
dest='merge',
metavar='FILE',
help='merge from a PO or MO file FILE and output XML files')
+ options.add_option('-n', '--no-builtins',
+ action='store_true',
+ dest='nobuiltins',
+ default=False,
+ help='do not apply the built-in ITS rules')
options.add_option('-o', '--output',
dest='output',
default=None,
@@ -1143,6 +1437,11 @@ if __name__ == '__main__':
dest='keep_entities',
default=False,
help='Keep entity reference unexpanded')
+ options.add_option('-t', '--test',
+ dest='test',
+ default=None,
+ metavar='CATEGORY',
+ help='generate conformance test output for CATEGORY')
options.add_option('-v', '--version',
action='store_true',
dest='version',
@@ -1158,11 +1457,12 @@ if __name__ == '__main__':
messages = MessageList()
for filename in args[1:]:
doc = Document(filename, messages, load_dtd=opts.load_dtd, keep_entities=opts.keep_entities)
- doc.apply_its_rules()
+ doc.apply_its_rules(not(opts.nobuiltins))
if opts.itsfile is not None:
for itsfile in opts.itsfile:
doc.apply_its_file(itsfile)
- doc.generate_messages()
+ if opts.test is None:
+ doc.generate_messages()
if opts.output is None or opts.output == '-':
out = sys.stdout
else:
@@ -1171,7 +1471,10 @@ if __name__ == '__main__':
except:
sys.stderr.write('Error: Cannot write to file %s\n' % opts.output)
sys.exit(1)
- messages.output(out)
+ if opts.test is not None:
+ doc.output_test_data(opts.test, out)
+ else:
+ messages.output(out)
elif opts.merge is not None:
try:
translations = gettext.GNUTranslations(open(opts.merge, 'rb'))
@@ -1196,7 +1499,7 @@ if __name__ == '__main__':
for filename in args[1:]:
messages = MessageList()
doc = Document(filename, messages, load_dtd=opts.load_dtd, keep_entities=opts.keep_entities)
- doc.apply_its_rules()
+ doc.apply_its_rules(not(opts.nobuiltins))
if opts.itsfile is not None:
for itsfile in opts.itsfile:
doc.apply_its_file(itsfile)
@@ -1228,7 +1531,7 @@ if __name__ == '__main__':
out = file(opts.output, 'w')
messages = MessageList()
doc = Document(opts.join, messages)
- doc.apply_its_rules()
+ doc.apply_its_rules(not(opts.nobuiltins))
doc.join_translations(translations, strict=opts.strict)
out.write(doc._doc.serialize('utf-8'))
if False:
diff --git a/tests/ExternalResource/Attr/ExternalResource1AttrXml.pot b/tests/ExternalResource/Attr/ExternalResource1AttrXml.pot
new file mode 100644
index 0000000..79304ff
--- /dev/null
+++ b/tests/ExternalResource/Attr/ExternalResource1AttrXml.pot
@@ -0,0 +1,41 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2012-09-19 16:09-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. (itstool) path: videoobject/videodata/@fileref
+#. This is a reference to an external file such as an image or video. When
+#. the file changes, the md5 hash will change to let you know you need to
+#. update your localized copy. The msgstr is not used at all. Set it to
+#. whatever you like once you have updated your copy of the file.
+#: tests/ExternalResource/Attr/ExternalResource1AttrXml.xml:9
+msgctxt "_"
+msgid "external ref='movie.avi' md5='2a8c7c38f728f5183233a6a2d23dfd22'"
+msgstr ""
+
+#. (itstool) path: imageobject/imagedata/@fileref
+#. This is a reference to an external file such as an image or video. When
+#. the file changes, the md5 hash will change to let you know you need to
+#. update your localized copy. The msgstr is not used at all. Set it to
+#. whatever you like once you have updated your copy of the file.
+#: tests/ExternalResource/Attr/ExternalResource1AttrXml.xml:12
+msgctxt "_"
+msgid "external ref='movie-frame.gif' md5='accdff2c3567073294db431130715b03'"
+msgstr ""
+
+#. (itstool) path: textobject/para
+#: tests/ExternalResource/Attr/ExternalResource1AttrXml.xml:15
+msgid "This video illustrates the proper way to assemble an inverting time distortion device."
+msgstr ""
+
+#. (itstool) path: warning/para
+#: tests/ExternalResource/Attr/ExternalResource1AttrXml.xml:18
+msgid "It is imperative that the primary and secondary temporal couplings not be mounted in the wrong order. Temporal catastrophe is the likely result. The future you destroy may be your own."
+msgstr ""
+
diff --git a/tests/ExternalResource/Attr/ExternalResource1AttrXml.xml b/tests/ExternalResource/Attr/ExternalResource1AttrXml.xml
new file mode 100644
index 0000000..23d509d
--- /dev/null
+++ b/tests/ExternalResource/Attr/ExternalResource1AttrXml.xml
@@ -0,0 +1,24 @@
+<doc
+ xmlns:its="http://www.w3.org/2005/11/its"
+ xmlns:dbk="http://docbook.org/ns/docbook" >
+ <its:rules version="2.0">
+ <its:externalResourceRefRule selector="//dbk:imagedata/@fileref | //dbk:audiodata/@fileref | //dbk:videodata/@fileref" externalResourceRefPointer="."/>
+ </its:rules>
+ <dbk:mediaobject>
+ <dbk:videoobject>
+ <dbk:videodata fileref="movie.avi"/>
+ </dbk:videoobject>
+ <dbk:imageobject>
+ <dbk:imagedata fileref="movie-frame.gif"/>
+ </dbk:imageobject>
+ <dbk:textobject>
+ <dbk:para>This video illustrates the proper way to assemble an inverting time distortion
+ device. </dbk:para>
+ <dbk:warning>
+ <dbk:para> It is imperative that the primary and secondary temporal couplings not be
+ mounted in the wrong order. Temporal catastrophe is the likely result. The
+ future you destroy may be your own. </dbk:para>
+ </dbk:warning>
+ </dbk:textobject>
+ </dbk:mediaobject>
+</doc>
diff --git a/tests/ExternalResource/Attr/ExternalResource2AttrRule.xml b/tests/ExternalResource/Attr/ExternalResource2AttrRule.xml
new file mode 100644
index 0000000..f29c8eb
--- /dev/null
+++ b/tests/ExternalResource/Attr/ExternalResource2AttrRule.xml
@@ -0,0 +1,3 @@
+<its:rules xmlns:its="http://www.w3.org/2005/11/its" xmlns:dbk="http://docbook.org/ns/docbook" version="2.0">
+ <its:externalResourceRefRule selector="//dbk:imagedata/@fileref | //dbk:audiodata/@fileref | //dbk:videodata/@fileref" externalResourceRefPointer="."/>
+ </its:rules>
diff --git a/tests/ExternalResource/Attr/ExternalResource2AttrXml.pot b/tests/ExternalResource/Attr/ExternalResource2AttrXml.pot
new file mode 100644
index 0000000..c182f9e
--- /dev/null
+++ b/tests/ExternalResource/Attr/ExternalResource2AttrXml.pot
@@ -0,0 +1,41 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2012-09-19 16:09-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. (itstool) path: videoobject/videodata/@fileref
+#. This is a reference to an external file such as an image or video. When
+#. the file changes, the md5 hash will change to let you know you need to
+#. update your localized copy. The msgstr is not used at all. Set it to
+#. whatever you like once you have updated your copy of the file.
+#: tests/ExternalResource/Attr/ExternalResource2AttrXml.xml:7
+msgctxt "_"
+msgid "external ref='movie.avi' md5='2a8c7c38f728f5183233a6a2d23dfd22'"
+msgstr ""
+
+#. (itstool) path: imageobject/imagedata/@fileref
+#. This is a reference to an external file such as an image or video. When
+#. the file changes, the md5 hash will change to let you know you need to
+#. update your localized copy. The msgstr is not used at all. Set it to
+#. whatever you like once you have updated your copy of the file.
+#: tests/ExternalResource/Attr/ExternalResource2AttrXml.xml:10
+msgctxt "_"
+msgid "external ref='movie-frame.gif' md5='accdff2c3567073294db431130715b03'"
+msgstr ""
+
+#. (itstool) path: textobject/para
+#: tests/ExternalResource/Attr/ExternalResource2AttrXml.xml:13
+msgid "This video illustrates the proper way to assemble an inverting time distortion device."
+msgstr ""
+
+#. (itstool) path: warning/para
+#: tests/ExternalResource/Attr/ExternalResource2AttrXml.xml:16
+msgid "It is imperative that the primary and secondary temporal couplings not be mounted in the wrong order. Temporal catastrophe is the likely result. The future you destroy may be your own."
+msgstr ""
+
diff --git a/tests/ExternalResource/Attr/ExternalResource2AttrXml.xml b/tests/ExternalResource/Attr/ExternalResource2AttrXml.xml
new file mode 100644
index 0000000..0669fb2
--- /dev/null
+++ b/tests/ExternalResource/Attr/ExternalResource2AttrXml.xml
@@ -0,0 +1,22 @@
+<doc
+ xmlns:its="http://www.w3.org/2005/11/its"
+ xmlns:dbk="http://docbook.org/ns/docbook" >
+ <its:rules xmlns:its="http://www.w3.org/2005/11/its" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.0" xlink:type="simple" xlink:href="ExternalResource2AttrRule.xml"/>
+ <dbk:mediaobject>
+ <dbk:videoobject>
+ <dbk:videodata fileref="movie.avi"/>
+ </dbk:videoobject>
+ <dbk:imageobject>
+ <dbk:imagedata fileref="movie-frame.gif"/>
+ </dbk:imageobject>
+ <dbk:textobject>
+ <dbk:para>This video illustrates the proper way to assemble an inverting time distortion
+ device. </dbk:para>
+ <dbk:warning>
+ <dbk:para> It is imperative that the primary and secondary temporal couplings not be
+ mounted in the wrong order. Temporal catastrophe is the likely result. The
+ future you destroy may be your own. </dbk:para>
+ </dbk:warning>
+ </dbk:textobject>
+ </dbk:mediaobject>
+</doc>
diff --git a/tests/ExternalResource/Attr/ExternalResource3AttrRule.xml b/tests/ExternalResource/Attr/ExternalResource3AttrRule.xml
new file mode 100644
index 0000000..3c7df89
--- /dev/null
+++ b/tests/ExternalResource/Attr/ExternalResource3AttrRule.xml
@@ -0,0 +1,3 @@
+<its:rules xmlns:its="http://www.w3.org/2005/11/its" xmlns:dbk="http://docbook.org/ns/docbook" version="2.0">
+ <its:externalResourceRefRule selector="//dbk:imagedata/@fileref | //dbk:videodata/@fileref" externalResourceRefPointer="."/>
+ </its:rules>
diff --git a/tests/ExternalResource/Attr/ExternalResource3AttrXml.pot b/tests/ExternalResource/Attr/ExternalResource3AttrXml.pot
new file mode 100644
index 0000000..52a3820
--- /dev/null
+++ b/tests/ExternalResource/Attr/ExternalResource3AttrXml.pot
@@ -0,0 +1,51 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2012-09-19 16:09-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. (itstool) path: videoobject/videodata/@fileref
+#. This is a reference to an external file such as an image or video. When
+#. the file changes, the md5 hash will change to let you know you need to
+#. update your localized copy. The msgstr is not used at all. Set it to
+#. whatever you like once you have updated your copy of the file.
+#: tests/ExternalResource/Attr/ExternalResource3AttrXml.xml:10
+msgctxt "_"
+msgid "external ref='movie.avi' md5='2a8c7c38f728f5183233a6a2d23dfd22'"
+msgstr ""
+
+#. (itstool) path: audioobject/audiodata/@fileref
+#. This is a reference to an external file such as an image or video. When
+#. the file changes, the md5 hash will change to let you know you need to
+#. update your localized copy. The msgstr is not used at all. Set it to
+#. whatever you like once you have updated your copy of the file.
+#: tests/ExternalResource/Attr/ExternalResource3AttrXml.xml:13
+msgctxt "_"
+msgid "external ref='movie.mp3' md5='8af2d557bdfbc6d8a9afa5828eea3547'"
+msgstr ""
+
+#. (itstool) path: imageobject/imagedata/@fileref
+#. This is a reference to an external file such as an image or video. When
+#. the file changes, the md5 hash will change to let you know you need to
+#. update your localized copy. The msgstr is not used at all. Set it to
+#. whatever you like once you have updated your copy of the file.
+#: tests/ExternalResource/Attr/ExternalResource3AttrXml.xml:16
+msgctxt "_"
+msgid "external ref='movie-frame.gif' md5='accdff2c3567073294db431130715b03'"
+msgstr ""
+
+#. (itstool) path: textobject/para
+#: tests/ExternalResource/Attr/ExternalResource3AttrXml.xml:19
+msgid "This video illustrates the proper way to assemble an inverting time distortion device."
+msgstr ""
+
+#. (itstool) path: warning/para
+#: tests/ExternalResource/Attr/ExternalResource3AttrXml.xml:22
+msgid "It is imperative that the primary and secondary temporal couplings not be mounted in the wrong order. Temporal catastrophe is the likely result. The future you destroy may be your own."
+msgstr ""
+
diff --git a/tests/ExternalResource/Attr/ExternalResource3AttrXml.xml b/tests/ExternalResource/Attr/ExternalResource3AttrXml.xml
new file mode 100644
index 0000000..d58792a
--- /dev/null
+++ b/tests/ExternalResource/Attr/ExternalResource3AttrXml.xml
@@ -0,0 +1,28 @@
+<doc
+ xmlns:its="http://www.w3.org/2005/11/its"
+ xmlns:dbk="http://docbook.org/ns/docbook" >
+ <its:rules xmlns:its="http://www.w3.org/2005/11/its" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.0" xlink:type="simple" xlink:href="ExternalResource2AttrRule.xml"/>
+ <its:rules xmlns:its="http://www.w3.org/2005/11/its" xmlns:dbk="http://docbook.org/ns/docbook" version="2.0">
+ <its:externalResourceRefRule selector="//dbk:audiodata/@fileref" externalResourceRefPointer="."/>
+ </its:rules>
+ <dbk:mediaobject>
+ <dbk:videoobject>
+ <dbk:videodata fileref="movie.avi"/>
+ </dbk:videoobject>
+ <dbk:audioobject>
+ <dbk:audiodata fileref="movie.mp3"/>
+ </dbk:audioobject>
+ <dbk:imageobject>
+ <dbk:imagedata fileref="movie-frame.gif"/>
+ </dbk:imageobject>
+ <dbk:textobject>
+ <dbk:para>This video illustrates the proper way to assemble an inverting time distortion
+ device. </dbk:para>
+ <dbk:warning>
+ <dbk:para> It is imperative that the primary and secondary temporal couplings not be
+ mounted in the wrong order. Temporal catastrophe is the likely result. The
+ future you destroy may be your own. </dbk:para>
+ </dbk:warning>
+ </dbk:textobject>
+ </dbk:mediaobject>
+</doc>
diff --git a/tests/ExternalResource/Attr/movie-frame.gif b/tests/ExternalResource/Attr/movie-frame.gif
new file mode 100644
index 0000000..65c0d08
--- /dev/null
+++ b/tests/ExternalResource/Attr/movie-frame.gif
@@ -0,0 +1 @@
+movie-frame.gif
diff --git a/tests/ExternalResource/Attr/movie.avi b/tests/ExternalResource/Attr/movie.avi
new file mode 100644
index 0000000..a32c425
--- /dev/null
+++ b/tests/ExternalResource/Attr/movie.avi
@@ -0,0 +1 @@
+movie.avi
diff --git a/tests/ExternalResource/Attr/movie.mp3 b/tests/ExternalResource/Attr/movie.mp3
new file mode 100644
index 0000000..34ee97e
--- /dev/null
+++ b/tests/ExternalResource/Attr/movie.mp3
@@ -0,0 +1 @@
+movie.mp3
diff --git a/tests/ExternalResource/ExternalResource1Xml.pot b/tests/ExternalResource/ExternalResource1Xml.pot
new file mode 100644
index 0000000..a0be75c
--- /dev/null
+++ b/tests/ExternalResource/ExternalResource1Xml.pot
@@ -0,0 +1,41 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2012-09-19 16:09-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. (itstool) path: videoobject/videodata
+#. This is a reference to an external file such as an image or video. When
+#. the file changes, the md5 hash will change to let you know you need to
+#. update your localized copy. The msgstr is not used at all. Set it to
+#. whatever you like once you have updated your copy of the file.
+#: tests/ExternalResource/ExternalResource1Xml.xml:9
+msgctxt "_"
+msgid "external ref='movie.avi' md5='2a8c7c38f728f5183233a6a2d23dfd22'"
+msgstr ""
+
+#. (itstool) path: imageobject/imagedata
+#. This is a reference to an external file such as an image or video. When
+#. the file changes, the md5 hash will change to let you know you need to
+#. update your localized copy. The msgstr is not used at all. Set it to
+#. whatever you like once you have updated your copy of the file.
+#: tests/ExternalResource/ExternalResource1Xml.xml:12
+msgctxt "_"
+msgid "external ref='movie-frame.gif' md5='accdff2c3567073294db431130715b03'"
+msgstr ""
+
+#. (itstool) path: textobject/para
+#: tests/ExternalResource/ExternalResource1Xml.xml:15
+msgid "This video illustrates the proper way to assemble an inverting time distortion device."
+msgstr ""
+
+#. (itstool) path: warning/para
+#: tests/ExternalResource/ExternalResource1Xml.xml:18
+msgid "It is imperative that the primary and secondary temporal couplings not be mounted in the wrong order. Temporal catastrophe is the likely result. The future you destroy may be your own."
+msgstr ""
+
diff --git a/tests/ExternalResource/ExternalResource1Xml.xml b/tests/ExternalResource/ExternalResource1Xml.xml
new file mode 100644
index 0000000..51b640e
--- /dev/null
+++ b/tests/ExternalResource/ExternalResource1Xml.xml
@@ -0,0 +1,24 @@
+<doc
+ xmlns:its="http://www.w3.org/2005/11/its"
+ xmlns:dbk="http://docbook.org/ns/docbook" >
+ <its:rules version="2.0">
+ <its:externalResourceRefRule selector="//dbk:imagedata | //dbk:audiodata | //dbk:videodata" externalResourceRefPointer="@fileref"/>
+ </its:rules>
+ <dbk:mediaobject>
+ <dbk:videoobject>
+ <dbk:videodata fileref="movie.avi"/>
+ </dbk:videoobject>
+ <dbk:imageobject>
+ <dbk:imagedata fileref="movie-frame.gif"/>
+ </dbk:imageobject>
+ <dbk:textobject>
+ <dbk:para>This video illustrates the proper way to assemble an inverting time distortion
+ device. </dbk:para>
+ <dbk:warning>
+ <dbk:para> It is imperative that the primary and secondary temporal couplings not be
+ mounted in the wrong order. Temporal catastrophe is the likely result. The
+ future you destroy may be your own. </dbk:para>
+ </dbk:warning>
+ </dbk:textobject>
+ </dbk:mediaobject>
+</doc>
diff --git a/tests/ExternalResource/ExternalResource2Rule.xml b/tests/ExternalResource/ExternalResource2Rule.xml
new file mode 100644
index 0000000..718135f
--- /dev/null
+++ b/tests/ExternalResource/ExternalResource2Rule.xml
@@ -0,0 +1,3 @@
+<its:rules xmlns:its="http://www.w3.org/2005/11/its" xmlns:dbk="http://docbook.org/ns/docbook" version="2.0">
+ <its:externalResourceRefRule selector="//dbk:imagedata | //dbk:audiodata | //dbk:videodata" externalResourceRefPointer="@fileref"/>
+ </its:rules>
diff --git a/tests/ExternalResource/ExternalResource2Xml.pot b/tests/ExternalResource/ExternalResource2Xml.pot
new file mode 100644
index 0000000..d439bcd
--- /dev/null
+++ b/tests/ExternalResource/ExternalResource2Xml.pot
@@ -0,0 +1,41 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2012-09-19 16:09-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. (itstool) path: videoobject/videodata
+#. This is a reference to an external file such as an image or video. When
+#. the file changes, the md5 hash will change to let you know you need to
+#. update your localized copy. The msgstr is not used at all. Set it to
+#. whatever you like once you have updated your copy of the file.
+#: tests/ExternalResource/ExternalResource2Xml.xml:7
+msgctxt "_"
+msgid "external ref='movie.avi' md5='2a8c7c38f728f5183233a6a2d23dfd22'"
+msgstr ""
+
+#. (itstool) path: imageobject/imagedata
+#. This is a reference to an external file such as an image or video. When
+#. the file changes, the md5 hash will change to let you know you need to
+#. update your localized copy. The msgstr is not used at all. Set it to
+#. whatever you like once you have updated your copy of the file.
+#: tests/ExternalResource/ExternalResource2Xml.xml:10
+msgctxt "_"
+msgid "external ref='movie-frame.gif' md5='accdff2c3567073294db431130715b03'"
+msgstr ""
+
+#. (itstool) path: textobject/para
+#: tests/ExternalResource/ExternalResource2Xml.xml:13
+msgid "This video illustrates the proper way to assemble an inverting time distortion device."
+msgstr ""
+
+#. (itstool) path: warning/para
+#: tests/ExternalResource/ExternalResource2Xml.xml:16
+msgid "It is imperative that the primary and secondary temporal couplings not be mounted in the wrong order. Temporal catastrophe is the likely result. The future you destroy may be your own."
+msgstr ""
+
diff --git a/tests/ExternalResource/ExternalResource2Xml.xml b/tests/ExternalResource/ExternalResource2Xml.xml
new file mode 100644
index 0000000..0120546
--- /dev/null
+++ b/tests/ExternalResource/ExternalResource2Xml.xml
@@ -0,0 +1,22 @@
+<doc
+ xmlns:its="http://www.w3.org/2005/11/its"
+ xmlns:dbk="http://docbook.org/ns/docbook" >
+ <its:rules xmlns:its="http://www.w3.org/2005/11/its" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.0" xlink:type="simple" xlink:href="ExternalResource2Rule.xml"/>
+ <dbk:mediaobject>
+ <dbk:videoobject>
+ <dbk:videodata fileref="movie.avi"/>
+ </dbk:videoobject>
+ <dbk:imageobject>
+ <dbk:imagedata fileref="movie-frame.gif"/>
+ </dbk:imageobject>
+ <dbk:textobject>
+ <dbk:para>This video illustrates the proper way to assemble an inverting time distortion
+ device. </dbk:para>
+ <dbk:warning>
+ <dbk:para> It is imperative that the primary and secondary temporal couplings not be
+ mounted in the wrong order. Temporal catastrophe is the likely result. The
+ future you destroy may be your own. </dbk:para>
+ </dbk:warning>
+ </dbk:textobject>
+ </dbk:mediaobject>
+</doc>
diff --git a/tests/ExternalResource/ExternalResource3Rule.xml b/tests/ExternalResource/ExternalResource3Rule.xml
new file mode 100644
index 0000000..383781c
--- /dev/null
+++ b/tests/ExternalResource/ExternalResource3Rule.xml
@@ -0,0 +1,3 @@
+<its:rules xmlns:its="http://www.w3.org/2005/11/its" xmlns:dbk="http://docbook.org/ns/docbook" version="2.0">
+ <its:externalResourceRefRule selector="//dbk:imagedata | //dbk:videodata" externalResourceRefPointer="@fileref"/>
+ </its:rules>
diff --git a/tests/ExternalResource/ExternalResource3Xml.pot b/tests/ExternalResource/ExternalResource3Xml.pot
new file mode 100644
index 0000000..c1b2a90
--- /dev/null
+++ b/tests/ExternalResource/ExternalResource3Xml.pot
@@ -0,0 +1,51 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2012-09-19 16:09-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. (itstool) path: videoobject/videodata
+#. This is a reference to an external file such as an image or video. When
+#. the file changes, the md5 hash will change to let you know you need to
+#. update your localized copy. The msgstr is not used at all. Set it to
+#. whatever you like once you have updated your copy of the file.
+#: tests/ExternalResource/ExternalResource3Xml.xml:10
+msgctxt "_"
+msgid "external ref='movie.avi' md5='2a8c7c38f728f5183233a6a2d23dfd22'"
+msgstr ""
+
+#. (itstool) path: audioobject/audiodata
+#. This is a reference to an external file such as an image or video. When
+#. the file changes, the md5 hash will change to let you know you need to
+#. update your localized copy. The msgstr is not used at all. Set it to
+#. whatever you like once you have updated your copy of the file.
+#: tests/ExternalResource/ExternalResource3Xml.xml:13
+msgctxt "_"
+msgid "external ref='movie.mp3' md5='8af2d557bdfbc6d8a9afa5828eea3547'"
+msgstr ""
+
+#. (itstool) path: imageobject/imagedata
+#. This is a reference to an external file such as an image or video. When
+#. the file changes, the md5 hash will change to let you know you need to
+#. update your localized copy. The msgstr is not used at all. Set it to
+#. whatever you like once you have updated your copy of the file.
+#: tests/ExternalResource/ExternalResource3Xml.xml:16
+msgctxt "_"
+msgid "external ref='movie-frame.gif' md5='accdff2c3567073294db431130715b03'"
+msgstr ""
+
+#. (itstool) path: textobject/para
+#: tests/ExternalResource/ExternalResource3Xml.xml:19
+msgid "This video illustrates the proper way to assemble an inverting time distortion device."
+msgstr ""
+
+#. (itstool) path: warning/para
+#: tests/ExternalResource/ExternalResource3Xml.xml:22
+msgid "It is imperative that the primary and secondary temporal couplings not be mounted in the wrong order. Temporal catastrophe is the likely result. The future you destroy may be your own."
+msgstr ""
+
diff --git a/tests/ExternalResource/ExternalResource3Xml.xml b/tests/ExternalResource/ExternalResource3Xml.xml
new file mode 100644
index 0000000..0384a58
--- /dev/null
+++ b/tests/ExternalResource/ExternalResource3Xml.xml
@@ -0,0 +1,28 @@
+<doc
+ xmlns:its="http://www.w3.org/2005/11/its"
+ xmlns:dbk="http://docbook.org/ns/docbook" >
+ <its:rules xmlns:its="http://www.w3.org/2005/11/its" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.0" xlink:type="simple" xlink:href="ExternalResource2Rule.xml"/>
+ <its:rules xmlns:its="http://www.w3.org/2005/11/its" xmlns:dbk="http://docbook.org/ns/docbook" version="2.0">
+ <its:externalResourceRefRule selector="//dbk:audiodata" externalResourceRefPointer="@fileref"/>
+ </its:rules>
+ <dbk:mediaobject>
+ <dbk:videoobject>
+ <dbk:videodata fileref="movie.avi"/>
+ </dbk:videoobject>
+ <dbk:audioobject>
+ <dbk:audiodata fileref="movie.mp3"/>
+ </dbk:audioobject>
+ <dbk:imageobject>
+ <dbk:imagedata fileref="movie-frame.gif"/>
+ </dbk:imageobject>
+ <dbk:textobject>
+ <dbk:para>This video illustrates the proper way to assemble an inverting time distortion
+ device. </dbk:para>
+ <dbk:warning>
+ <dbk:para> It is imperative that the primary and secondary temporal couplings not be
+ mounted in the wrong order. Temporal catastrophe is the likely result. The
+ future you destroy may be your own. </dbk:para>
+ </dbk:warning>
+ </dbk:textobject>
+ </dbk:mediaobject>
+</doc>
diff --git a/tests/ExternalResource/movie-frame.gif b/tests/ExternalResource/movie-frame.gif
new file mode 100644
index 0000000..65c0d08
--- /dev/null
+++ b/tests/ExternalResource/movie-frame.gif
@@ -0,0 +1 @@
+movie-frame.gif
diff --git a/tests/ExternalResource/movie.avi b/tests/ExternalResource/movie.avi
new file mode 100644
index 0000000..a32c425
--- /dev/null
+++ b/tests/ExternalResource/movie.avi
@@ -0,0 +1 @@
+movie.avi
diff --git a/tests/ExternalResource/movie.mp3 b/tests/ExternalResource/movie.mp3
new file mode 100644
index 0000000..34ee97e
--- /dev/null
+++ b/tests/ExternalResource/movie.mp3
@@ -0,0 +1 @@
+movie.mp3
diff --git a/tests/IT-externalRef1.ll.po b/tests/IT-externalRef1.ll.po
new file mode 100644
index 0000000..eb26d94
--- /dev/null
+++ b/tests/IT-externalRef1.ll.po
@@ -0,0 +1,31 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2012-09-19 14:02-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. (itstool) path: doc/p
+#: tests/IT-externalRef1.xml:6
+msgid "This is a test of the externalRefRule extension."
+msgstr "Ceci est un test de l'extension externalRefRule."
+
+#. (itstool) path: doc/external
+#. This is a reference to an external file such as an image or video. When
+#. the file changes, the md5 hash will change to let you know you need to
+#. update your localized copy. The msgstr is not used at all. Set it to
+#. whatever you like once you have updated your copy of the file.
+#: tests/IT-externalRef1.xml:7
+msgctxt "_"
+msgid "external ref='IT-externalRef1.txt' md5='9cb75ee59c2c7a70be17c5887517a34b'"
+msgstr "external ref='IT-externalRef1.txt' md5='9cb75ee59c2c7a70be17c5887517a34b'"
+
+#. (itstool) path: doc/p
+#: tests/IT-externalRef1.xml:9
+msgid "This has been a test."
+msgstr "Cela a été un test."
+
diff --git a/tests/IT-externalRef1.ll.xml b/tests/IT-externalRef1.ll.xml
new file mode 100644
index 0000000..9f8e4c4
--- /dev/null
+++ b/tests/IT-externalRef1.ll.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<doc xmlns:its="http://www.w3.org/2005/11/its" xmlns:itst="http://itstool.org/extensions/">
+ <its:rules version="1.0">
+ <itst:externalRefRule selector="//external" refPointer="@src"/>
+ </its:rules>
+ <p>Ceci est un test de l'extension externalRefRule.</p>
+ <external src="IT-externalRef1.txt"/>
+ <external its:translate="no" src="devnull"/>
+ <p>Cela a été un test.</p>
+</doc>
diff --git a/tests/IT-externalRef1.pot b/tests/IT-externalRef1.pot
new file mode 100644
index 0000000..901b280
--- /dev/null
+++ b/tests/IT-externalRef1.pot
@@ -0,0 +1,31 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2012-09-19 14:02-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. (itstool) path: doc/p
+#: tests/IT-externalRef1.xml:6
+msgid "This is a test of the externalRefRule extension."
+msgstr ""
+
+#. (itstool) path: doc/external
+#. This is a reference to an external file such as an image or video. When
+#. the file changes, the md5 hash will change to let you know you need to
+#. update your localized copy. The msgstr is not used at all. Set it to
+#. whatever you like once you have updated your copy of the file.
+#: tests/IT-externalRef1.xml:7
+msgctxt "_"
+msgid "external ref='IT-externalRef1.txt' md5='9cb75ee59c2c7a70be17c5887517a34b'"
+msgstr ""
+
+#. (itstool) path: doc/p
+#: tests/IT-externalRef1.xml:9
+msgid "This has been a test."
+msgstr ""
+
diff --git a/tests/IT-externalRef1.txt b/tests/IT-externalRef1.txt
new file mode 100644
index 0000000..5adc0ef
--- /dev/null
+++ b/tests/IT-externalRef1.txt
@@ -0,0 +1 @@
+IT-externalRef1
diff --git a/tests/IT-externalRef1.xml b/tests/IT-externalRef1.xml
new file mode 100644
index 0000000..9bc36e0
--- /dev/null
+++ b/tests/IT-externalRef1.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<doc xmlns:its="http://www.w3.org/2005/11/its" xmlns:itst="http://itstool.org/extensions/">
+ <its:rules version="1.0">
+ <itst:externalRefRule selector="//external" refPointer="@src"/>
+ </its:rules>
+ <p>This is a test of the externalRefRule extension.</p>
+ <external src="IT-externalRef1.txt"/>
+ <external its:translate="no" src="devnull"/>
+ <p>This has been a test.</p>
+</doc>
diff --git a/tests/IT-join-1.ll.xml b/tests/IT-join-1.joined.xml
index f1cd11e..f1cd11e 100644
--- a/tests/IT-join-1.ll.xml
+++ b/tests/IT-join-1.joined.xml
diff --git a/tests/IT-keep-entities-1.ll.po b/tests/IT-keep-entities-1.ll.po
index 5fac279..780f4cc 100644
--- a/tests/IT-keep-entities-1.ll.po
+++ b/tests/IT-keep-entities-1.ll.po
@@ -9,11 +9,6 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#. Put one translator per line, in the form NAME <EMAIL>, YEAR1, YEAR2
-msgctxt "_"
-msgid "translator-credits"
-msgstr ""
-
#. (itstool) path: bookinfo/title
#: IT-keep-entities-1.xml:5
msgid "The history of Leonard &ldquo;Bones&rdquo; McCoy"
diff --git a/tests/IT-keep-entities-1.ll.xml b/tests/IT-keep-entities-1.ll.xml
index 2255308..31b70dc 100644
--- a/tests/IT-keep-entities-1.ll.xml
+++ b/tests/IT-keep-entities-1.ll.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
-<book lang="test">
+<book>
<bookinfo id="startrek">
<title>La historia de Leonard &ldquo;Bones&rdquo; McCoy</title>
</bookinfo>
diff --git a/tests/IT-keep-entities-1.pot b/tests/IT-keep-entities-1.pot
index 1768341..6df55c9 100644
--- a/tests/IT-keep-entities-1.pot
+++ b/tests/IT-keep-entities-1.pot
@@ -9,11 +9,6 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#. Put one translator per line, in the form NAME <EMAIL>, YEAR1, YEAR2
-msgctxt "_"
-msgid "translator-credits"
-msgstr ""
-
#. (itstool) path: bookinfo/title
#: tests/IT-keep-entities-1.xml:5
msgid "The history of Leonard &ldquo;Bones&rdquo; McCoy"
diff --git a/tests/IT-locNote-inline.pot b/tests/IT-locNote-inline.pot
index be1ab7c..cb29c26 100644
--- a/tests/IT-locNote-inline.pot
+++ b/tests/IT-locNote-inline.pot
@@ -9,6 +9,11 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+#. (itstool) path: locNoteRule/locNote
+#: tests/IT-locNote-inline.xml:6
+msgid "This is the inline comment."
+msgstr ""
+
#. (itstool) path: body/block
#. This is the block comment
#.
diff --git a/tests/IT-locNote-multiples.pot b/tests/IT-locNote-multiples.pot
index d67538d..fa2b62b 100644
--- a/tests/IT-locNote-multiples.pot
+++ b/tests/IT-locNote-multiples.pot
@@ -9,6 +9,11 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+#. (itstool) path: locNoteRule/locNote
+#: tests/IT-locNote-multiples.xml:6
+msgid "This is the generic block comment"
+msgstr ""
+
#. (itstool) path: block/block
#. Specific comment #1
#.
diff --git a/tests/IT-placeholder-1.ll.xml b/tests/IT-placeholder-1.ll.xml
index 986cd19..efb529e 100644
--- a/tests/IT-placeholder-1.ll.xml
+++ b/tests/IT-placeholder-1.ll.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<book xmlns:its="http://www.w3.org/2005/11/its" its:version="1.0" lang="test">
+<book xmlns:its="http://www.w3.org/2005/11/its" its:version="1.0">
<body>
<p>Voici le premier paragraphe. Il contient une note liée à son dernier mot<note><p>Voici une note.</p></note>.</p>
</body>
diff --git a/tests/IT-prefixes-1.ll.po b/tests/IT-prefixes-1.ll.po
index b73a067..fd29dc6 100644
--- a/tests/IT-prefixes-1.ll.po
+++ b/tests/IT-prefixes-1.ll.po
@@ -9,28 +9,18 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#. (itstool) path: media
-#. This is a reference to an external file such as an image or video. When
-#. the file changes, the md5 hash will change to let you know you need to
-#. update your localized copy. The msgstr is not used at all. Set it to
-#. whatever you like once you have updated your copy of the file.
-#: tests/IT-prefixes-1.xml:7
-msgctxt "_"
-msgid "external ref='movie.avi' md5='__failed__'"
-msgstr "external ref='movie.avi' md5='__failed__'"
-
#. (itstool) path: page/p
-#: tests/IT-prefixes-1.xml:6
+#: tests/IT-prefixes-1.xml:11
msgid "This is a test of namespace <its:span>prefixes</its:span>"
msgstr "Ceci est un test de <its:span>préfixes</its:span> d'espace de noms."
#. (itstool) path: div/p
-#: tests/IT-prefixes-1.xml:11
+#: tests/IT-prefixes-1.xml:16
msgid "Drag <tt:span>pieces</tt:span> from the right to the left."
msgstr "Faites glisser des <tt:span>pièces</tt:span> de la gauche vers la droite."
#. (itstool) path: div/p
-#: tests/IT-prefixes-1.xml:14
+#: tests/IT-prefixes-1.xml:19
msgid "Hold down <mal:key>Ctrl</mal:key>."
msgstr "Maintenez la touche <mal:key>Ctrl</mal:key>."
diff --git a/tests/IT-prefixes-1.ll.xml b/tests/IT-prefixes-1.ll.xml
index a7c0e3d..6dd1f30 100644
--- a/tests/IT-prefixes-1.ll.xml
+++ b/tests/IT-prefixes-1.ll.xml
@@ -1,5 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
-<page xmlns="http://projectmallard.org/1.0/" xmlns:mal="http://projectmallard.org/1.0/" xmlns:its="http://www.w3.org/2005/11/its" xmlns:tt="http://www.w3.org/ns/ttml" xml:lang="test">
+<page xmlns="http://projectmallard.org/1.0/" xmlns:mal="http://projectmallard.org/1.0/" xmlns:its="http://www.w3.org/2005/11/its" xmlns:tt="http://www.w3.org/ns/ttml">
+ <info>
+ <its:rules version="1.0">
+ <its:withinTextRule selector="//mal:p//* | //tt:p//*" withinText="yes"/>
+ </its:rules>
+ </info>
<p>Ceci est un test de <its:span>préfixes</its:span> d'espace de noms.</p>
<media type="video" src="movie.avi">
<tt:tt>
diff --git a/tests/IT-prefixes-1.pot b/tests/IT-prefixes-1.pot
index a529797..547978f 100644
--- a/tests/IT-prefixes-1.pot
+++ b/tests/IT-prefixes-1.pot
@@ -9,28 +9,18 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#. (itstool) path: media
-#. This is a reference to an external file such as an image or video. When
-#. the file changes, the md5 hash will change to let you know you need to
-#. update your localized copy. The msgstr is not used at all. Set it to
-#. whatever you like once you have updated your copy of the file.
-#: tests/IT-prefixes-1.xml:7
-msgctxt "_"
-msgid "external ref='movie.avi' md5='__failed__'"
-msgstr ""
-
#. (itstool) path: page/p
-#: tests/IT-prefixes-1.xml:6
+#: tests/IT-prefixes-1.xml:11
msgid "This is a test of namespace <its:span>prefixes</its:span>"
msgstr ""
#. (itstool) path: div/p
-#: tests/IT-prefixes-1.xml:11
+#: tests/IT-prefixes-1.xml:16
msgid "Drag <tt:span>pieces</tt:span> from the right to the left."
msgstr ""
#. (itstool) path: div/p
-#: tests/IT-prefixes-1.xml:14
+#: tests/IT-prefixes-1.xml:19
msgid "Hold down <mal:key>Ctrl</mal:key>."
msgstr ""
diff --git a/tests/IT-prefixes-1.xml b/tests/IT-prefixes-1.xml
index c0aaf80..7530ccd 100644
--- a/tests/IT-prefixes-1.xml
+++ b/tests/IT-prefixes-1.xml
@@ -3,6 +3,11 @@
xmlns:mal="http://projectmallard.org/1.0/"
xmlns:its="http://www.w3.org/2005/11/its"
xmlns:tt="http://www.w3.org/ns/ttml">
+ <info>
+ <its:rules version="1.0">
+ <its:withinTextRule selector="//mal:p//* | //tt:p//*" withinText="yes"/>
+ </its:rules>
+ </info>
<p>This is a test of namespace <its:span>prefixes</its:span></p>
<media type="video" src="movie.avi">
<tt:tt>
diff --git a/tests/IT-uses-external-dtds.ll.po b/tests/IT-uses-external-dtds.ll.po
index aef9716..3748474 100644
--- a/tests/IT-uses-external-dtds.ll.po
+++ b/tests/IT-uses-external-dtds.ll.po
@@ -9,11 +9,6 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#. Put one translator per line, in the form NAME <EMAIL>, YEAR1, YEAR2
-msgctxt "_"
-msgid "translator-credits"
-msgstr ""
-
#. (itstool) path: bookinfo/title
#: IT-uses-external-dtds.xml:5
msgid "The history of Leonard “Bones” McCoy"
diff --git a/tests/IT-uses-external-dtds.ll.xml b/tests/IT-uses-external-dtds.ll.xml
index e445a60..3643188 100644
--- a/tests/IT-uses-external-dtds.ll.xml
+++ b/tests/IT-uses-external-dtds.ll.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
-<book lang="test">
+<book>
<bookinfo id="startrek">
<title>La historia de Leonard “Bones” McCoy</title>
</bookinfo>
diff --git a/tests/IT-uses-external-dtds.pot b/tests/IT-uses-external-dtds.pot
index bc8afaf..8814cda 100644
--- a/tests/IT-uses-external-dtds.pot
+++ b/tests/IT-uses-external-dtds.pot
@@ -9,11 +9,6 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#. Put one translator per line, in the form NAME <EMAIL>, YEAR1, YEAR2
-msgctxt "_"
-msgid "translator-credits"
-msgstr ""
-
#. (itstool) path: bookinfo/title
#: tests/IT-uses-external-dtds.xml:5
msgid "The history of Leonard “Bones” McCoy"
diff --git a/tests/ITS-2.0-Testsuite/README b/tests/ITS-2.0-Testsuite/README
new file mode 100644
index 0000000..1698dc7
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/README
@@ -0,0 +1 @@
+https://github.com/finnle/ITS-2.0-Testsuite
diff --git a/tests/ITS-2.0-Testsuite/expected/elementswithintext/html/withintext1htmloutput.txt b/tests/ITS-2.0-Testsuite/expected/elementswithintext/html/withintext1htmloutput.txt
new file mode 100644
index 0000000..512ceff
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/elementswithintext/html/withintext1htmloutput.txt
@@ -0,0 +1,26 @@
+/html withinText="no"
+/html/head[1] withinText="no"
+/html/head[1]/meta[1] withinText="no"
+/html/head[1]/meta[1]/@charset
+/html/head[1]/link[1] withinText="no"
+/html/head[1]/link[1]/@href
+/html/head[1]/link[1]/@rel
+/html/head[1]/title[1] withinText="no"
+/html/body[1] withinText="no"
+/html/body[1]/section[1] withinText="no"
+/html/body[1]/section[1]/@itemscope
+/html/body[1]/section[1]/span[1] withinText="yes"
+/html/body[1]/section[1]/span[1]/@itemprop
+/html/body[1]/section[1]/span[2] withinText="yes"
+/html/body[1]/section[1]/span[2]/@itemprop
+/html/body[1]/p[1] withinText="no"
+/html/body[1]/p[1]/@itemscope
+/html/body[1]/p[1]/cite[1] withinText="nested"
+/html/body[1]/p[1]/span[1] withinText="yes"
+/html/body[1]/p[1]/span[1]/@itemprop
+/html/body[1]/p[2] withinText="no"
+/html/body[1]/p[2]/img[1] withinText="yes"
+/html/body[1]/p[2]/img[1]/@alt
+/html/body[1]/p[2]/img[1]/@src
+/html/body[1]/p[3] withinText="no"
+/html/body[1]/p[3]/em[1] withinText="yes"
diff --git a/tests/ITS-2.0-Testsuite/expected/elementswithintext/html/withintext2htmloutput.txt b/tests/ITS-2.0-Testsuite/expected/elementswithintext/html/withintext2htmloutput.txt
new file mode 100644
index 0000000..e1e535e
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/elementswithintext/html/withintext2htmloutput.txt
@@ -0,0 +1,10 @@
+/html withinText="no"
+/html/@lang
+/html/head[1] withinText="no"
+/html/head[1]/meta[1] withinText="no"
+/html/head[1]/meta[1]/@charset
+/html/head[1]/title[1] withinText="no"
+/html/body[1] withinText="no"
+/html/body[1]/p[1] withinText="no"
+/html/body[1]/p[1]/span[1] withinText="yes"
+/html/body[1]/p[1]/span[1]/@its-within-text
diff --git a/tests/ITS-2.0-Testsuite/expected/elementswithintext/html/withintext3htmloutput.txt b/tests/ITS-2.0-Testsuite/expected/elementswithintext/html/withintext3htmloutput.txt
new file mode 100644
index 0000000..2a17954
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/elementswithintext/html/withintext3htmloutput.txt
@@ -0,0 +1,26 @@
+/html withinText="no"
+/html/head[1] withinText="no"
+/html/head[1]/meta[1] withinText="no"
+/html/head[1]/meta[1]/@charset
+/html/head[1]/link[1] withinText="no"
+/html/head[1]/link[1]/@href
+/html/head[1]/link[1]/@rel
+/html/head[1]/title[1] withinText="no"
+/html/body[1] withinText="no"
+/html/body[1]/section[1] withinText="no"
+/html/body[1]/section[1]/@itemscope
+/html/body[1]/section[1]/span[1] withinText="no"
+/html/body[1]/section[1]/span[1]/@itemprop
+/html/body[1]/section[1]/span[2] withinText="yes"
+/html/body[1]/section[1]/span[2]/@itemprop
+/html/body[1]/p[1] withinText="no"
+/html/body[1]/p[1]/@itemscope
+/html/body[1]/p[1]/cite[1] withinText="nested"
+/html/body[1]/p[1]/span[1] withinText="yes"
+/html/body[1]/p[1]/span[1]/@itemprop
+/html/body[1]/p[2] withinText="no"
+/html/body[1]/p[2]/img[1] withinText="yes"
+/html/body[1]/p[2]/img[1]/@alt
+/html/body[1]/p[2]/img[1]/@src
+/html/body[1]/p[3] withinText="no"
+/html/body[1]/p[3]/em[1] withinText="yes"
diff --git a/tests/ITS-2.0-Testsuite/expected/elementswithintext/html/withintext4htmloutput.txt b/tests/ITS-2.0-Testsuite/expected/elementswithintext/html/withintext4htmloutput.txt
new file mode 100644
index 0000000..c71064d
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/elementswithintext/html/withintext4htmloutput.txt
@@ -0,0 +1,26 @@
+/html withinText="no"
+/html/head[1] withinText="no"
+/html/head[1]/script[1] withinText="nested"
+/html/head[1]/script[1]/@type
+/html/head[1]/meta[1] withinText="no"
+/html/head[1]/meta[1]/@charset
+/html/head[1]/title[1] withinText="no"
+/html/body[1] withinText="no"
+/html/body[1]/section[1] withinText="no"
+/html/body[1]/section[1]/@itemscope
+/html/body[1]/section[1]/span[1] withinText="yes"
+/html/body[1]/section[1]/span[1]/@itemprop
+/html/body[1]/section[1]/span[2] withinText="yes"
+/html/body[1]/section[1]/span[2]/@itemprop
+/html/body[1]/p[1] withinText="no"
+/html/body[1]/p[1]/@itemscope
+/html/body[1]/p[1]/cite[1] withinText="nested"
+/html/body[1]/p[1]/span[1] withinText="yes"
+/html/body[1]/p[1]/span[1]/@itemprop
+/html/body[1]/p[2] withinText="no"
+/html/body[1]/p[2]/img[1] withinText="yes"
+/html/body[1]/p[2]/img[1]/@alt
+/html/body[1]/p[2]/img[1]/@src
+/html/body[1]/p[3] withinText="yes"
+/html/body[1]/p[3]/@id
+/html/body[1]/p[3]/em[1] withinText="yes"
diff --git a/tests/ITS-2.0-Testsuite/expected/elementswithintext/xml/withintext1xmloutput.txt b/tests/ITS-2.0-Testsuite/expected/elementswithintext/xml/withintext1xmloutput.txt
new file mode 100644
index 0000000..d1531d0
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/elementswithintext/xml/withintext1xmloutput.txt
@@ -0,0 +1,17 @@
+/doc withinText="no"
+/doc/head[1] withinText="no"
+/doc/head[1]/its:rules[1] withinText="no"
+/doc/head[1]/its:rules[1]/@version
+/doc/head[1]/its:rules[1]/its:withinTextRule[1] withinText="no"
+/doc/head[1]/its:rules[1]/its:withinTextRule[1]/@selector
+/doc/head[1]/its:rules[1]/its:withinTextRule[1]/@withinText
+/doc/head[1]/its:rules[1]/its:withinTextRule[2] withinText="no"
+/doc/head[1]/its:rules[1]/its:withinTextRule[2]/@selector
+/doc/head[1]/its:rules[1]/its:withinTextRule[2]/@withinText
+/doc/body[1] withinText="no"
+/doc/body[1]/p[1] withinText="no"
+/doc/body[1]/p[1]/b[1] withinText="yes"
+/doc/body[1]/p[1]/i[1] withinText="yes"
+/doc/body[1]/p[1]/u[1] withinText="yes"
+/doc/body[1]/p[2] withinText="no"
+/doc/body[1]/p[2]/fn[1] withinText="nested"
diff --git a/tests/ITS-2.0-Testsuite/expected/elementswithintext/xml/withintext2xmloutput.txt b/tests/ITS-2.0-Testsuite/expected/elementswithintext/xml/withintext2xmloutput.txt
new file mode 100644
index 0000000..2b90e8e
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/elementswithintext/xml/withintext2xmloutput.txt
@@ -0,0 +1,28 @@
+/myDocument withinText="no"
+/myDocument/@xml:lang
+/myDocument/prolog[1] withinText="no"
+/myDocument/prolog[1]/its:rules[1] withinText="no"
+/myDocument/prolog[1]/its:rules[1]/@version
+/myDocument/prolog[1]/its:rules[1]/@xlink:href
+/myDocument/prolog[1]/its:rules[1]/its:withinTextRule[1] withinText="no"
+/myDocument/prolog[1]/its:rules[1]/its:withinTextRule[1]/@selector
+/myDocument/prolog[1]/its:rules[1]/its:withinTextRule[1]/@withinText
+/myDocument/prolog[1]/author[1] withinText="no"
+/myDocument/prolog[1]/version[1] withinText="no"
+/myDocument/prolog[1]/keywords[1] withinText="no"
+/myDocument/prolog[1]/keywords[1]/kw[1] withinText="no"
+/myDocument/prolog[1]/keywords[1]/kw[2] withinText="no"
+/myDocument/prolog[1]/storageKey[1] withinText="no"
+/myDocument/content[1] withinText="no"
+/myDocument/content[1]/section[1] withinText="no"
+/myDocument/content[1]/section[1]/title[1] withinText="no"
+/myDocument/content[1]/section[1]/p[1] withinText="no"
+/myDocument/content[1]/section[1]/p[1]/fnote[1] withinText="nested"
+/myDocument/content[1]/section[1]/p[1]/kw[1] withinText="yes"
+/myDocument/content[1]/section[1]/p[2] withinText="no"
+/myDocument/content[1]/section[1]/p[2]/img[1] withinText="yes"
+/myDocument/content[1]/section[1]/p[2]/img[1]/@alt
+/myDocument/content[1]/section[1]/p[2]/img[1]/@src
+/myDocument/content[1]/footer[1] withinText="no"
+/myDocument/content[1]/footer[1]/p[1] withinText="no"
+/myDocument/content[1]/footer[1]/p[1]/em[1] withinText="yes"
diff --git a/tests/ITS-2.0-Testsuite/expected/elementswithintext/xml/withintext3xmloutput.txt b/tests/ITS-2.0-Testsuite/expected/elementswithintext/xml/withintext3xmloutput.txt
new file mode 100644
index 0000000..5ff5c95
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/elementswithintext/xml/withintext3xmloutput.txt
@@ -0,0 +1,15 @@
+/text withinText="no"
+/text/@its:version
+/text/prolog[1] withinText="no"
+/text/prolog[1]/title[1] withinText="no"
+/text/prolog[1]/title[1]/@its:withinText
+/text/prolog[1]/author[1] withinText="no"
+/text/prolog[1]/author[1]/@its:withinText
+/text/prolog[1]/keywords[1] withinText="no"
+/text/prolog[1]/keywords[1]/@its:withinText
+/text/body[1] withinText="no"
+/text/body[1]/p[1] withinText="no"
+/text/body[1]/p[1]/title[1] withinText="yes"
+/text/body[1]/p[1]/title[1]/@its:withinText
+/text/body[1]/p[1]/author[1] withinText="yes"
+/text/body[1]/p[1]/author[1]/@its:withinText
diff --git a/tests/ITS-2.0-Testsuite/expected/elementswithintext/xml/withintext4xmloutput.txt b/tests/ITS-2.0-Testsuite/expected/elementswithintext/xml/withintext4xmloutput.txt
new file mode 100644
index 0000000..9c31705
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/elementswithintext/xml/withintext4xmloutput.txt
@@ -0,0 +1,15 @@
+/text withinText="no"
+/text/@its:version
+/text/prolog[1] withinText="no"
+/text/prolog[1]/its:span[1] withinText="no"
+/text/prolog[1]/its:span[1]/@withinText
+/text/prolog[1]/its:span[2] withinText="no"
+/text/prolog[1]/its:span[2]/@withinText
+/text/prolog[1]/its:span[3] withinText="no"
+/text/prolog[1]/its:span[3]/@withinText
+/text/body[1] withinText="no"
+/text/body[1]/p[1] withinText="no"
+/text/body[1]/p[1]/its:span[1] withinText="yes"
+/text/body[1]/p[1]/its:span[1]/@withinText
+/text/body[1]/p[1]/its:span[2] withinText="yes"
+/text/body[1]/p[1]/its:span[2]/@withinText
diff --git a/tests/ITS-2.0-Testsuite/expected/elementswithintext/xml/withintext5xmloutput.txt b/tests/ITS-2.0-Testsuite/expected/elementswithintext/xml/withintext5xmloutput.txt
new file mode 100644
index 0000000..c452beb
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/elementswithintext/xml/withintext5xmloutput.txt
@@ -0,0 +1,20 @@
+/doc withinText="no"
+/doc/head[1] withinText="no"
+/doc/head[1]/its:rules[1] withinText="no"
+/doc/head[1]/its:rules[1]/@version
+/doc/head[1]/its:rules[1]/its:param[1] withinText="no"
+/doc/head[1]/its:rules[1]/its:param[1]/@name
+/doc/head[1]/its:rules[1]/its:withinTextRule[1] withinText="no"
+/doc/head[1]/its:rules[1]/its:withinTextRule[1]/@selector
+/doc/head[1]/its:rules[1]/its:withinTextRule[1]/@withinText
+/doc/head[1]/its:rules[1]/its:withinTextRule[2] withinText="no"
+/doc/head[1]/its:rules[1]/its:withinTextRule[2]/@selector
+/doc/head[1]/its:rules[1]/its:withinTextRule[2]/@withinText
+/doc/body[1] withinText="no"
+/doc/body[1]/p[1] withinText="no"
+/doc/body[1]/p[1]/b[1] withinText="yes"
+/doc/body[1]/p[1]/i[1] withinText="yes"
+/doc/body[1]/p[1]/u[1] withinText="yes"
+/doc/body[1]/p[2] withinText="no"
+/doc/body[1]/p[2]/fn[1] withinText="nested"
+/doc/body[1]/p[2]/fn[1]/@id
diff --git a/tests/ITS-2.0-Testsuite/expected/elementswithintext/xml/withintext6xmloutput.txt b/tests/ITS-2.0-Testsuite/expected/elementswithintext/xml/withintext6xmloutput.txt
new file mode 100644
index 0000000..bbbfaab
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/elementswithintext/xml/withintext6xmloutput.txt
@@ -0,0 +1,13 @@
+/doc withinText="no"
+/doc/head[1] withinText="no"
+/doc/head[1]/its:rules[1] withinText="no"
+/doc/head[1]/its:rules[1]/@version
+/doc/head[1]/its:rules[1]/@xlink:href
+/doc/body[1] withinText="no"
+/doc/body[1]/p[1] withinText="no"
+/doc/body[1]/p[1]/b[1] withinText="yes"
+/doc/body[1]/p[1]/i[1] withinText="yes"
+/doc/body[1]/p[1]/u[1] withinText="yes"
+/doc/body[1]/p[2] withinText="no"
+/doc/body[1]/p[2]/fn[1] withinText="nested"
+/doc/body[1]/p[2]/fn[1]/@id
diff --git a/tests/ITS-2.0-Testsuite/expected/externalresource/html/externalresource1htmloutput.txt b/tests/ITS-2.0-Testsuite/expected/externalresource/html/externalresource1htmloutput.txt
new file mode 100644
index 0000000..00f0a71
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/externalresource/html/externalresource1htmloutput.txt
@@ -0,0 +1,18 @@
+/html
+/html/@lang
+/html/head[1]
+/html/head[1]/meta[1]
+/html/head[1]/meta[1]/@charset
+/html/head[1]/link[1]
+/html/head[1]/link[1]/@href
+/html/head[1]/link[1]/@rel
+/html/head[1]/title[1]
+/html/body[1]
+/html/body[1]/video[1]
+/html/body[1]/video[1]/@height
+/html/body[1]/video[1]/@poster externalResourceRef="video-image.png"
+/html/body[1]/video[1]/@src externalResourceRef="http://www.example.com/video/v2.mp"
+/html/body[1]/video[1]/@width
+/html/body[1]/video[1]/code[1]
+/html/body[1]/video[1]/a[1]
+/html/body[1]/video[1]/a[1]/@href
diff --git a/tests/ITS-2.0-Testsuite/expected/externalresource/html/externalresource2htmloutput.txt b/tests/ITS-2.0-Testsuite/expected/externalresource/html/externalresource2htmloutput.txt
new file mode 100644
index 0000000..d753b88
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/externalresource/html/externalresource2htmloutput.txt
@@ -0,0 +1,20 @@
+/html
+/html/@lang
+/html/head[1]
+/html/head[1]/meta[1]
+/html/head[1]/meta[1]/@charset
+/html/head[1]/link[1]
+/html/head[1]/link[1]/@href
+/html/head[1]/link[1]/@rel
+/html/head[1]/title[1]
+/html/body[1]
+/html/body[1]/p[1]
+/html/body[1]/p[1]/@id
+/html/body[1]/p[1]/video[1] externalResourceRef="video-image.png"
+/html/body[1]/p[1]/video[1]/@height
+/html/body[1]/p[1]/video[1]/@poster
+/html/body[1]/p[1]/video[1]/@src
+/html/body[1]/p[1]/video[1]/@width
+/html/body[1]/p[1]/video[1]/code[1]
+/html/body[1]/p[1]/video[1]/a[1]
+/html/body[1]/p[1]/video[1]/a[1]/@href
diff --git a/tests/ITS-2.0-Testsuite/expected/externalresource/html/externalresource3htmloutput.txt b/tests/ITS-2.0-Testsuite/expected/externalresource/html/externalresource3htmloutput.txt
new file mode 100644
index 0000000..d32f37f
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/externalresource/html/externalresource3htmloutput.txt
@@ -0,0 +1,17 @@
+/html
+/html/@lang
+/html/head[1]
+/html/head[1]/script[1]
+/html/head[1]/script[1]/@type
+/html/head[1]/meta[1]
+/html/head[1]/meta[1]/@charset
+/html/head[1]/title[1]
+/html/body[1]
+/html/body[1]/video[1] externalResourceRef="http://www.example.com/video/v2.mp"
+/html/body[1]/video[1]/@height
+/html/body[1]/video[1]/@poster
+/html/body[1]/video[1]/@src
+/html/body[1]/video[1]/@width
+/html/body[1]/video[1]/code[1]
+/html/body[1]/video[1]/a[1]
+/html/body[1]/video[1]/a[1]/@href
diff --git a/tests/ITS-2.0-Testsuite/expected/externalresource/xml/externalresource1xmloutput.txt b/tests/ITS-2.0-Testsuite/expected/externalresource/xml/externalresource1xmloutput.txt
new file mode 100644
index 0000000..c683f99
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/externalresource/xml/externalresource1xmloutput.txt
@@ -0,0 +1,17 @@
+/doc
+/doc/its:rules[1]
+/doc/its:rules[1]/@version
+/doc/its:rules[1]/its:externalResourceRefRule[1]
+/doc/its:rules[1]/its:externalResourceRefRule[1]/@externalResourceRefPointer
+/doc/its:rules[1]/its:externalResourceRefRule[1]/@selector
+/doc/dbk:mediaobject[1]
+/doc/dbk:mediaobject[1]/dbk:videoobject[1]
+/doc/dbk:mediaobject[1]/dbk:videoobject[1]/dbk:videodata[1] externalResourceRef="movie.avi"
+/doc/dbk:mediaobject[1]/dbk:videoobject[1]/dbk:videodata[1]/@fileref
+/doc/dbk:mediaobject[1]/dbk:imageobject[1]
+/doc/dbk:mediaobject[1]/dbk:imageobject[1]/dbk:imagedata[1] externalResourceRef="movie-frame.gif"
+/doc/dbk:mediaobject[1]/dbk:imageobject[1]/dbk:imagedata[1]/@fileref
+/doc/dbk:mediaobject[1]/dbk:textobject[1]
+/doc/dbk:mediaobject[1]/dbk:textobject[1]/dbk:para[1]
+/doc/dbk:mediaobject[1]/dbk:textobject[1]/dbk:warning[1]
+/doc/dbk:mediaobject[1]/dbk:textobject[1]/dbk:warning[1]/dbk:para[1]
diff --git a/tests/ITS-2.0-Testsuite/expected/externalresource/xml/externalresource2xmloutput.txt b/tests/ITS-2.0-Testsuite/expected/externalresource/xml/externalresource2xmloutput.txt
new file mode 100644
index 0000000..8833434
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/externalresource/xml/externalresource2xmloutput.txt
@@ -0,0 +1,15 @@
+/doc
+/doc/its:rules[1]
+/doc/its:rules[1]/@version
+/doc/its:rules[1]/@xlink:href
+/doc/dbk:mediaobject[1]
+/doc/dbk:mediaobject[1]/dbk:videoobject[1]
+/doc/dbk:mediaobject[1]/dbk:videoobject[1]/dbk:videodata[1] externalResourceRef="movie.avi"
+/doc/dbk:mediaobject[1]/dbk:videoobject[1]/dbk:videodata[1]/@fileref
+/doc/dbk:mediaobject[1]/dbk:imageobject[1]
+/doc/dbk:mediaobject[1]/dbk:imageobject[1]/dbk:imagedata[1] externalResourceRef="movie-frame.gif"
+/doc/dbk:mediaobject[1]/dbk:imageobject[1]/dbk:imagedata[1]/@fileref
+/doc/dbk:mediaobject[1]/dbk:textobject[1]
+/doc/dbk:mediaobject[1]/dbk:textobject[1]/dbk:para[1]
+/doc/dbk:mediaobject[1]/dbk:textobject[1]/dbk:warning[1]
+/doc/dbk:mediaobject[1]/dbk:textobject[1]/dbk:warning[1]/dbk:para[1]
diff --git a/tests/ITS-2.0-Testsuite/expected/externalresource/xml/externalresource3xmloutput.txt b/tests/ITS-2.0-Testsuite/expected/externalresource/xml/externalresource3xmloutput.txt
new file mode 100644
index 0000000..93cc320
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/externalresource/xml/externalresource3xmloutput.txt
@@ -0,0 +1,23 @@
+/doc
+/doc/its:rules[1]
+/doc/its:rules[1]/@version
+/doc/its:rules[1]/@xlink:href
+/doc/its:rules[2]
+/doc/its:rules[2]/@version
+/doc/its:rules[2]/its:externalResourceRefRule[1]
+/doc/its:rules[2]/its:externalResourceRefRule[1]/@externalResourceRefPointer
+/doc/its:rules[2]/its:externalResourceRefRule[1]/@selector
+/doc/dbk:mediaobject[1]
+/doc/dbk:mediaobject[1]/dbk:videoobject[1]
+/doc/dbk:mediaobject[1]/dbk:videoobject[1]/dbk:videodata[1] externalResourceRef="movie.avi"
+/doc/dbk:mediaobject[1]/dbk:videoobject[1]/dbk:videodata[1]/@fileref
+/doc/dbk:mediaobject[1]/dbk:audioobject[1]
+/doc/dbk:mediaobject[1]/dbk:audioobject[1]/dbk:audiodata[1] externalResourceRef="movie.mp3"
+/doc/dbk:mediaobject[1]/dbk:audioobject[1]/dbk:audiodata[1]/@fileref
+/doc/dbk:mediaobject[1]/dbk:imageobject[1]
+/doc/dbk:mediaobject[1]/dbk:imageobject[1]/dbk:imagedata[1] externalResourceRef="movie-frame.gif"
+/doc/dbk:mediaobject[1]/dbk:imageobject[1]/dbk:imagedata[1]/@fileref
+/doc/dbk:mediaobject[1]/dbk:textobject[1]
+/doc/dbk:mediaobject[1]/dbk:textobject[1]/dbk:para[1]
+/doc/dbk:mediaobject[1]/dbk:textobject[1]/dbk:warning[1]
+/doc/dbk:mediaobject[1]/dbk:textobject[1]/dbk:warning[1]/dbk:para[1]
diff --git a/tests/ITS-2.0-Testsuite/expected/externalresource/xml/externalresource4xmloutput.txt b/tests/ITS-2.0-Testsuite/expected/externalresource/xml/externalresource4xmloutput.txt
new file mode 100644
index 0000000..8f420d2
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/externalresource/xml/externalresource4xmloutput.txt
@@ -0,0 +1,19 @@
+/doc
+/doc/its:rules[1]
+/doc/its:rules[1]/@version
+/doc/its:rules[1]/its:param[1]
+/doc/its:rules[1]/its:param[1]/@name
+/doc/its:rules[1]/its:externalResourceRefRule[1]
+/doc/its:rules[1]/its:externalResourceRefRule[1]/@externalResourceRefPointer
+/doc/its:rules[1]/its:externalResourceRefRule[1]/@selector
+/doc/dbk:mediaobject[1]
+/doc/dbk:mediaobject[1]/dbk:videoobject[1]
+/doc/dbk:mediaobject[1]/dbk:videoobject[1]/dbk:videodata[1]
+/doc/dbk:mediaobject[1]/dbk:videoobject[1]/dbk:videodata[1]/@fileref
+/doc/dbk:mediaobject[1]/dbk:imageobject[1]
+/doc/dbk:mediaobject[1]/dbk:imageobject[1]/dbk:imagedata[1] externalResourceRef="movie-frame.gif"
+/doc/dbk:mediaobject[1]/dbk:imageobject[1]/dbk:imagedata[1]/@fileref
+/doc/dbk:mediaobject[1]/dbk:textobject[1]
+/doc/dbk:mediaobject[1]/dbk:textobject[1]/dbk:para[1]
+/doc/dbk:mediaobject[1]/dbk:textobject[1]/dbk:warning[1]
+/doc/dbk:mediaobject[1]/dbk:textobject[1]/dbk:warning[1]/dbk:para[1]
diff --git a/tests/ITS-2.0-Testsuite/expected/externalresource/xml/externalresource5xmloutput.txt b/tests/ITS-2.0-Testsuite/expected/externalresource/xml/externalresource5xmloutput.txt
new file mode 100644
index 0000000..79ce5c9
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/externalresource/xml/externalresource5xmloutput.txt
@@ -0,0 +1,15 @@
+/doc
+/doc/its:rules[1]
+/doc/its:rules[1]/@version
+/doc/its:rules[1]/@xlink:href
+/doc/dbk:mediaobject[1]
+/doc/dbk:mediaobject[1]/dbk:videoobject[1]
+/doc/dbk:mediaobject[1]/dbk:videoobject[1]/dbk:videodata[1]
+/doc/dbk:mediaobject[1]/dbk:videoobject[1]/dbk:videodata[1]/@fileref
+/doc/dbk:mediaobject[1]/dbk:imageobject[1]
+/doc/dbk:mediaobject[1]/dbk:imageobject[1]/dbk:imagedata[1] externalResourceRef="movie-frame.gif"
+/doc/dbk:mediaobject[1]/dbk:imageobject[1]/dbk:imagedata[1]/@fileref
+/doc/dbk:mediaobject[1]/dbk:textobject[1]
+/doc/dbk:mediaobject[1]/dbk:textobject[1]/dbk:para[1]
+/doc/dbk:mediaobject[1]/dbk:textobject[1]/dbk:warning[1]
+/doc/dbk:mediaobject[1]/dbk:textobject[1]/dbk:warning[1]/dbk:para[1]
diff --git a/tests/ITS-2.0-Testsuite/expected/idvalue/html/idvalue1htmloutput.txt b/tests/ITS-2.0-Testsuite/expected/idvalue/html/idvalue1htmloutput.txt
new file mode 100644
index 0000000..cb19ed9
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/idvalue/html/idvalue1htmloutput.txt
@@ -0,0 +1,15 @@
+/html
+/html/head[1]
+/html/head[1]/meta[1]
+/html/head[1]/meta[1]/@charset
+/html/head[1]/title[1]
+/html/head[1]/link[1]
+/html/head[1]/link[1]/@href
+/html/head[1]/link[1]/@rel
+/html/body[1]
+/html/body[1]/p[1] idValue="settingsMissing"
+/html/body[1]/p[1]/@id
+/html/body[1]/p[1]/b[1] idValue="text"
+/html/body[1]/p[1]/b[1]/@id
+/html/body[1]/p[1]/var[1] idValue="desc"
+/html/body[1]/p[1]/var[1]/@id
diff --git a/tests/ITS-2.0-Testsuite/expected/idvalue/html/idvalue2htmloutput.txt b/tests/ITS-2.0-Testsuite/expected/idvalue/html/idvalue2htmloutput.txt
new file mode 100644
index 0000000..9f6264e
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/idvalue/html/idvalue2htmloutput.txt
@@ -0,0 +1,17 @@
+/html
+/html/head[1]
+/html/head[1]/meta[1]
+/html/head[1]/meta[1]/@charset
+/html/head[1]/title[1]
+/html/head[1]/link[1]
+/html/head[1]/link[1]/@href
+/html/head[1]/link[1]/@rel
+/html/body[1]
+/html/body[1]/p[1] idValue="settingsMissing"
+/html/body[1]/p[1]/@id
+/html/body[1]/p[1]/b[1] idValue="text"
+/html/body[1]/p[1]/b[1]/@id
+/html/body[1]/p[1]/var[1] idValue="desc"
+/html/body[1]/p[1]/var[1]/@id
+/html/body[1]/p[1]/b[2] idValue="crashtext"
+/html/body[1]/p[1]/b[2]/@id
diff --git a/tests/ITS-2.0-Testsuite/expected/idvalue/html/idvalue3htmloutput.txt b/tests/ITS-2.0-Testsuite/expected/idvalue/html/idvalue3htmloutput.txt
new file mode 100644
index 0000000..b1d3cb6
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/idvalue/html/idvalue3htmloutput.txt
@@ -0,0 +1,14 @@
+/html
+/html/head[1]
+/html/head[1]/script[1]
+/html/head[1]/script[1]/@type
+/html/head[1]/meta[1]
+/html/head[1]/meta[1]/@charset
+/html/head[1]/title[1]
+/html/body[1]
+/html/body[1]/p[1] idValue="settingsMissing"
+/html/body[1]/p[1]/@id
+/html/body[1]/p[1]/b[1] idValue="text"
+/html/body[1]/p[1]/b[1]/@id
+/html/body[1]/p[1]/var[1] idValue="desc"
+/html/body[1]/p[1]/var[1]/@id
diff --git a/tests/ITS-2.0-Testsuite/expected/idvalue/xml/idvalue1xmloutput.txt b/tests/ITS-2.0-Testsuite/expected/idvalue/xml/idvalue1xmloutput.txt
new file mode 100644
index 0000000..60aa545
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/idvalue/xml/idvalue1xmloutput.txt
@@ -0,0 +1,18 @@
+/resource
+/resource/its:rules[1]
+/resource/its:rules[1]/@version
+/resource/its:rules[1]/its:idValueRule[1]
+/resource/its:rules[1]/its:idValueRule[1]/@idValue
+/resource/its:rules[1]/its:idValueRule[1]/@selector
+/resource/webform[1]
+/resource/webform[1]/entry[1]
+/resource/webform[1]/entry[1]/@name
+/resource/webform[1]/entry[1]/text[1] idValue="btn.OK"
+/resource/webform[1]/entry[1]/pos[1]
+/resource/webform[1]/entry[1]/trig[1]
+/resource/webform[2]
+/resource/webform[2]/entry[1]
+/resource/webform[2]/entry[1]/@name
+/resource/webform[2]/entry[1]/text[1] idValue="btn.CANCEL"
+/resource/webform[2]/entry[1]/pos[1]
+/resource/webform[2]/entry[1]/trig[1]
diff --git a/tests/ITS-2.0-Testsuite/expected/idvalue/xml/idvalue2xmloutput.txt b/tests/ITS-2.0-Testsuite/expected/idvalue/xml/idvalue2xmloutput.txt
new file mode 100644
index 0000000..cb1a0f0
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/idvalue/xml/idvalue2xmloutput.txt
@@ -0,0 +1,6 @@
+/file
+/file/res[1] idValue="btnAgain"
+/file/res[1]/@name
+/file/res[1]/@xml:id
+/file/res[2]
+/file/res[2]/@name
diff --git a/tests/ITS-2.0-Testsuite/expected/idvalue/xml/idvalue3xmloutput.txt b/tests/ITS-2.0-Testsuite/expected/idvalue/xml/idvalue3xmloutput.txt
new file mode 100644
index 0000000..70f569a
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/idvalue/xml/idvalue3xmloutput.txt
@@ -0,0 +1,14 @@
+/resource
+/resource/its:rules[1]
+/resource/its:rules[1]/@version
+/resource/its:rules[1]/@xlink:href
+/resource/entry[1] idValue="btn.OK"
+/resource/entry[1]/@name
+/resource/entry[1]/text[1]
+/resource/entry[1]/pos[1]
+/resource/entry[1]/trig[1]
+/resource/entry[2] idValue="btn.CANCEL"
+/resource/entry[2]/@name
+/resource/entry[2]/text[1]
+/resource/entry[2]/pos[1]
+/resource/entry[2]/trig[1]
diff --git a/tests/ITS-2.0-Testsuite/expected/idvalue/xml/idvalue4xmloutput.txt b/tests/ITS-2.0-Testsuite/expected/idvalue/xml/idvalue4xmloutput.txt
new file mode 100644
index 0000000..43a3d44
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/idvalue/xml/idvalue4xmloutput.txt
@@ -0,0 +1,18 @@
+/resource
+/resource/its:rules[1]
+/resource/its:rules[1]/@version
+/resource/its:rules[1]/@xlink:href
+/resource/webform[1]
+/resource/webform[1]/@id
+/resource/webform[1]/entry[1] idValue="btn.OK"
+/resource/webform[1]/entry[1]/@name
+/resource/webform[1]/entry[1]/text[1]
+/resource/webform[1]/entry[1]/pos[1]
+/resource/webform[1]/entry[1]/trig[1]
+/resource/webform[2]
+/resource/webform[2]/@id
+/resource/webform[2]/entry[1]
+/resource/webform[2]/entry[1]/@name
+/resource/webform[2]/entry[1]/text[1]
+/resource/webform[2]/entry[1]/pos[1]
+/resource/webform[2]/entry[1]/trig[1]
diff --git a/tests/ITS-2.0-Testsuite/expected/idvalue/xml/idvalue5xmloutput.txt b/tests/ITS-2.0-Testsuite/expected/idvalue/xml/idvalue5xmloutput.txt
new file mode 100644
index 0000000..fb07c55
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/idvalue/xml/idvalue5xmloutput.txt
@@ -0,0 +1,22 @@
+/resource
+/resource/its:rules[1]
+/resource/its:rules[1]/@version
+/resource/its:rules[1]/its:param[1]
+/resource/its:rules[1]/its:param[1]/@name
+/resource/its:rules[1]/its:idValueRule[1]
+/resource/its:rules[1]/its:idValueRule[1]/@idValue
+/resource/its:rules[1]/its:idValueRule[1]/@selector
+/resource/webform[1]
+/resource/webform[1]/@id
+/resource/webform[1]/entry[1] idValue="btn.OK"
+/resource/webform[1]/entry[1]/@name
+/resource/webform[1]/entry[1]/text[1]
+/resource/webform[1]/entry[1]/pos[1]
+/resource/webform[1]/entry[1]/trig[1]
+/resource/webform[2]
+/resource/webform[2]/@id
+/resource/webform[2]/entry[1]
+/resource/webform[2]/entry[1]/@name
+/resource/webform[2]/entry[1]/text[1]
+/resource/webform[2]/entry[1]/pos[1]
+/resource/webform[2]/entry[1]/trig[1]
diff --git a/tests/ITS-2.0-Testsuite/expected/localefilter/html/locale1htmloutput.txt b/tests/ITS-2.0-Testsuite/expected/localefilter/html/locale1htmloutput.txt
new file mode 100644
index 0000000..c4f99d0
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/localefilter/html/locale1htmloutput.txt
@@ -0,0 +1,12 @@
+/html localeFilterList="*" localeFilterType="include"
+/html/head[1] localeFilterList="*" localeFilterType="include"
+/html/head[1]/meta[1] localeFilterList="*" localeFilterType="include"
+/html/head[1]/meta[1]/@charset localeFilterList="*" localeFilterType="include"
+/html/head[1]/title[1] localeFilterList="*" localeFilterType="include"
+/html/head[1]/link[1] localeFilterList="*" localeFilterType="include"
+/html/head[1]/link[1]/@href localeFilterList="*" localeFilterType="include"
+/html/head[1]/link[1]/@rel localeFilterList="*" localeFilterType="include"
+/html/body[1] localeFilterList="*" localeFilterType="include"
+/html/body[1]/div[1] localeFilterList="en-CA, fr-CA" localeFilterType="include"
+/html/body[1]/div[1]/@id localeFilterList="en-CA, fr-CA" localeFilterType="include"
+/html/body[1]/div[1]/p[1] localeFilterList="en-CA, fr-CA" localeFilterType="include"
diff --git a/tests/ITS-2.0-Testsuite/expected/localefilter/html/locale2htmloutput.txt b/tests/ITS-2.0-Testsuite/expected/localefilter/html/locale2htmloutput.txt
new file mode 100644
index 0000000..b0e1336
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/localefilter/html/locale2htmloutput.txt
@@ -0,0 +1,10 @@
+/html localeFilterList="*" localeFilterType="include"
+/html/head[1] localeFilterList="*" localeFilterType="include"
+/html/head[1]/meta[1] localeFilterList="*" localeFilterType="include"
+/html/head[1]/meta[1]/@charset localeFilterList="*" localeFilterType="include"
+/html/head[1]/title[1] localeFilterList="*" localeFilterType="include"
+/html/body[1] localeFilterList="*" localeFilterType="include"
+/html/body[1]/div[1] localeFilterList="en-CA, fr-CA" localeFilterType="include"
+/html/body[1]/div[1]/@id localeFilterList="en-CA, fr-CA" localeFilterType="include"
+/html/body[1]/div[1]/@its-locale-filter-list localeFilterList="en-CA, fr-CA" localeFilterType="include"
+/html/body[1]/div[1]/p[1] localeFilterList="en-CA, fr-CA" localeFilterType="include"
diff --git a/tests/ITS-2.0-Testsuite/expected/localefilter/html/locale3htmloutput.txt b/tests/ITS-2.0-Testsuite/expected/localefilter/html/locale3htmloutput.txt
new file mode 100644
index 0000000..c4f99d0
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/localefilter/html/locale3htmloutput.txt
@@ -0,0 +1,12 @@
+/html localeFilterList="*" localeFilterType="include"
+/html/head[1] localeFilterList="*" localeFilterType="include"
+/html/head[1]/meta[1] localeFilterList="*" localeFilterType="include"
+/html/head[1]/meta[1]/@charset localeFilterList="*" localeFilterType="include"
+/html/head[1]/title[1] localeFilterList="*" localeFilterType="include"
+/html/head[1]/link[1] localeFilterList="*" localeFilterType="include"
+/html/head[1]/link[1]/@href localeFilterList="*" localeFilterType="include"
+/html/head[1]/link[1]/@rel localeFilterList="*" localeFilterType="include"
+/html/body[1] localeFilterList="*" localeFilterType="include"
+/html/body[1]/div[1] localeFilterList="en-CA, fr-CA" localeFilterType="include"
+/html/body[1]/div[1]/@id localeFilterList="en-CA, fr-CA" localeFilterType="include"
+/html/body[1]/div[1]/p[1] localeFilterList="en-CA, fr-CA" localeFilterType="include"
diff --git a/tests/ITS-2.0-Testsuite/expected/localefilter/html/locale4htmloutput.txt b/tests/ITS-2.0-Testsuite/expected/localefilter/html/locale4htmloutput.txt
new file mode 100644
index 0000000..b0f1f16
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/localefilter/html/locale4htmloutput.txt
@@ -0,0 +1,11 @@
+/html localeFilterList="*" localeFilterType="include"
+/html/head[1] localeFilterList="*" localeFilterType="include"
+/html/head[1]/script[1] localeFilterList="*" localeFilterType="include"
+/html/head[1]/script[1]/@type localeFilterList="*" localeFilterType="include"
+/html/head[1]/meta[1] localeFilterList="*" localeFilterType="include"
+/html/head[1]/meta[1]/@charset localeFilterList="*" localeFilterType="include"
+/html/head[1]/title[1] localeFilterList="*" localeFilterType="include"
+/html/body[1] localeFilterList="*" localeFilterType="include"
+/html/body[1]/div[1] localeFilterList="en-CA, fr-CA" localeFilterType="include"
+/html/body[1]/div[1]/@id localeFilterList="en-CA, fr-CA" localeFilterType="include"
+/html/body[1]/div[1]/p[1] localeFilterList="en-CA, fr-CA" localeFilterType="include"
diff --git a/tests/ITS-2.0-Testsuite/expected/localefilter/html/locale5htmloutput.txt b/tests/ITS-2.0-Testsuite/expected/localefilter/html/locale5htmloutput.txt
new file mode 100644
index 0000000..5873400
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/localefilter/html/locale5htmloutput.txt
@@ -0,0 +1,21 @@
+/html localeFilterList="*" localeFilterType="include"
+/html/head[1] localeFilterList="*" localeFilterType="include"
+/html/head[1]/meta[1] localeFilterList="*" localeFilterType="include"
+/html/head[1]/meta[1]/@charset localeFilterList="*" localeFilterType="include"
+/html/head[1]/title[1] localeFilterList="*" localeFilterType="include"
+/html/body[1] localeFilterList="*" localeFilterType="include"
+/html/body[1]/div[1] localeFilterList="*-ca" localeFilterType="include"
+/html/body[1]/div[1]/@its-locale-filter-list localeFilterList="*-ca" localeFilterType="include"
+/html/body[1]/div[1]/p[1] localeFilterList="*-ca" localeFilterType="include"
+/html/body[1]/div[2] localeFilterList="*-ca" localeFilterType="exclude"
+/html/body[1]/div[2]/@its-locale-filter-list localeFilterList="*-ca" localeFilterType="exclude"
+/html/body[1]/div[2]/@its-locale-filter-type localeFilterList="*-ca" localeFilterType="exclude"
+/html/body[1]/div[2]/p[1] localeFilterList="*-ca" localeFilterType="exclude"
+/html/body[1]/div[3] localeFilterList="*" localeFilterType="exclude"
+/html/body[1]/div[3]/@its-locale-filter-list localeFilterList="*" localeFilterType="exclude"
+/html/body[1]/div[3]/@its-locale-filter-type localeFilterList="*" localeFilterType="exclude"
+/html/body[1]/div[3]/p[1] localeFilterList="*" localeFilterType="exclude"
+/html/body[1]/div[4] localeFilterList="" localeFilterType="exclude"
+/html/body[1]/div[4]/@its-locale-filter-list localeFilterList="" localeFilterType="exclude"
+/html/body[1]/div[4]/@its-locale-filter-type localeFilterList="" localeFilterType="exclude"
+/html/body[1]/div[4]/p[1] localeFilterList="" localeFilterType="exclude"
diff --git a/tests/ITS-2.0-Testsuite/expected/localefilter/xml/locale1xmloutput.txt b/tests/ITS-2.0-Testsuite/expected/localefilter/xml/locale1xmloutput.txt
new file mode 100644
index 0000000..455864b
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/localefilter/xml/locale1xmloutput.txt
@@ -0,0 +1,11 @@
+/book localeFilterList="*" localeFilterType="include"
+/book/@its:version localeFilterList="*" localeFilterType="include"
+/book/info[1] localeFilterList="*" localeFilterType="include"
+/book/info[1]/its:rules[1] localeFilterList="*" localeFilterType="include"
+/book/info[1]/its:rules[1]/@version localeFilterList="*" localeFilterType="include"
+/book/info[1]/its:rules[1]/its:localeFilterRule[1] localeFilterList="*" localeFilterType="include"
+/book/info[1]/its:rules[1]/its:localeFilterRule[1]/@localeFilterList localeFilterList="*" localeFilterType="include"
+/book/info[1]/its:rules[1]/its:localeFilterRule[1]/@selector localeFilterList="*" localeFilterType="include"
+/book/info[1]/legalnotice[1] localeFilterList="en-CA, fr-CA" localeFilterType="include"
+/book/info[1]/legalnotice[1]/@role localeFilterList="en-CA, fr-CA" localeFilterType="include"
+/book/info[1]/legalnotice[1]/para[1] localeFilterList="en-CA, fr-CA" localeFilterType="include"
diff --git a/tests/ITS-2.0-Testsuite/expected/localefilter/xml/locale2xmloutput.txt b/tests/ITS-2.0-Testsuite/expected/localefilter/xml/locale2xmloutput.txt
new file mode 100644
index 0000000..b2ed3e1
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/localefilter/xml/locale2xmloutput.txt
@@ -0,0 +1,6 @@
+/book localeFilterList="*" localeFilterType="include"
+/book/@its:version localeFilterList="*" localeFilterType="include"
+/book/info[1] localeFilterList="*" localeFilterType="include"
+/book/info[1]/legalnotice[1] localeFilterList="en-CA, fr-CA" localeFilterType="include"
+/book/info[1]/legalnotice[1]/@its:localeFilterList localeFilterList="en-CA, fr-CA" localeFilterType="include"
+/book/info[1]/legalnotice[1]/para[1] localeFilterList="en-CA, fr-CA" localeFilterType="include"
diff --git a/tests/ITS-2.0-Testsuite/expected/localefilter/xml/locale3xmloutput.txt b/tests/ITS-2.0-Testsuite/expected/localefilter/xml/locale3xmloutput.txt
new file mode 100644
index 0000000..c3124af
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/localefilter/xml/locale3xmloutput.txt
@@ -0,0 +1,9 @@
+/book localeFilterList="*" localeFilterType="include"
+/book/@its:version localeFilterList="*" localeFilterType="include"
+/book/info[1] localeFilterList="*" localeFilterType="include"
+/book/info[1]/its:rules[1] localeFilterList="*" localeFilterType="include"
+/book/info[1]/its:rules[1]/@version localeFilterList="*" localeFilterType="include"
+/book/info[1]/its:rules[1]/@xlink:href localeFilterList="*" localeFilterType="include"
+/book/info[1]/legalnotice[1] localeFilterList="en-CA, fr-CA" localeFilterType="include"
+/book/info[1]/legalnotice[1]/@role localeFilterList="en-CA, fr-CA" localeFilterType="include"
+/book/info[1]/legalnotice[1]/para[1] localeFilterList="en-CA, fr-CA" localeFilterType="include"
diff --git a/tests/ITS-2.0-Testsuite/expected/localefilter/xml/locale4xmloutput.txt b/tests/ITS-2.0-Testsuite/expected/localefilter/xml/locale4xmloutput.txt
new file mode 100644
index 0000000..4960df4
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/localefilter/xml/locale4xmloutput.txt
@@ -0,0 +1,17 @@
+/book localeFilterList="*" localeFilterType="include"
+/book/@its:version localeFilterList="*" localeFilterType="include"
+/book/info[1] localeFilterList="*" localeFilterType="include"
+/book/info[1]/its:rules[1] localeFilterList="*" localeFilterType="include"
+/book/info[1]/its:rules[1]/@version localeFilterList="*" localeFilterType="include"
+/book/info[1]/its:rules[1]/@xlink:href localeFilterList="*" localeFilterType="include"
+/book/info[1]/its:rules[2] localeFilterList="*" localeFilterType="include"
+/book/info[1]/its:rules[2]/@version localeFilterList="*" localeFilterType="include"
+/book/info[1]/its:rules[2]/its:localeFilterRule[1] localeFilterList="*" localeFilterType="include"
+/book/info[1]/its:rules[2]/its:localeFilterRule[1]/@localeFilterList localeFilterList="*" localeFilterType="include"
+/book/info[1]/its:rules[2]/its:localeFilterRule[1]/@selector localeFilterList="*" localeFilterType="include"
+/book/info[1]/legalnotice[1] localeFilterList="en-CA, fr-CA" localeFilterType="include"
+/book/info[1]/legalnotice[1]/@role localeFilterList="en-CA, fr-CA" localeFilterType="include"
+/book/info[1]/legalnotice[1]/para[1] localeFilterList="en-CA, fr-CA" localeFilterType="include"
+/book/info[1]/legalnotice[2] localeFilterList="de-DE" localeFilterType="include"
+/book/info[1]/legalnotice[2]/@role localeFilterList="de-DE" localeFilterType="include"
+/book/info[1]/legalnotice[2]/para[1] localeFilterList="de-DE" localeFilterType="include"
diff --git a/tests/ITS-2.0-Testsuite/expected/localefilter/xml/locale5xmloutput.txt b/tests/ITS-2.0-Testsuite/expected/localefilter/xml/locale5xmloutput.txt
new file mode 100644
index 0000000..41ec233
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/localefilter/xml/locale5xmloutput.txt
@@ -0,0 +1,6 @@
+/book localeFilterList="*" localeFilterType="include"
+/book/@its:version localeFilterList="*" localeFilterType="include"
+/book/info[1] localeFilterList="*" localeFilterType="include"
+/book/info[1]/its:span[1] localeFilterList="en-CA, fr-CA" localeFilterType="include"
+/book/info[1]/its:span[1]/@localeFilterList localeFilterList="en-CA, fr-CA" localeFilterType="include"
+/book/info[1]/its:span[1]/para[1] localeFilterList="en-CA, fr-CA" localeFilterType="include"
diff --git a/tests/ITS-2.0-Testsuite/expected/localefilter/xml/locale6xmloutput.txt b/tests/ITS-2.0-Testsuite/expected/localefilter/xml/locale6xmloutput.txt
new file mode 100644
index 0000000..e569e43
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/localefilter/xml/locale6xmloutput.txt
@@ -0,0 +1,15 @@
+/book localeFilterList="*" localeFilterType="include"
+/book/info[1] localeFilterList="*" localeFilterType="include"
+/book/info[1]/its:rules[1] localeFilterList="*" localeFilterType="include"
+/book/info[1]/its:rules[1]/@version localeFilterList="*" localeFilterType="include"
+/book/info[1]/its:rules[1]/its:param[1] localeFilterList="*" localeFilterType="include"
+/book/info[1]/its:rules[1]/its:param[1]/@name localeFilterList="*" localeFilterType="include"
+/book/info[1]/its:rules[1]/its:localeFilterRule[1] localeFilterList="*" localeFilterType="include"
+/book/info[1]/its:rules[1]/its:localeFilterRule[1]/@localeFilterList localeFilterList="*" localeFilterType="include"
+/book/info[1]/its:rules[1]/its:localeFilterRule[1]/@selector localeFilterList="*" localeFilterType="include"
+/book/info[1]/legalnotice[1] localeFilterList="*" localeFilterType="include"
+/book/info[1]/legalnotice[1]/@role localeFilterList="*" localeFilterType="include"
+/book/info[1]/legalnotice[1]/para[1] localeFilterList="*" localeFilterType="include"
+/book/info[1]/legalnotice[2] localeFilterList="de-DE" localeFilterType="include"
+/book/info[1]/legalnotice[2]/@role localeFilterList="de-DE" localeFilterType="include"
+/book/info[1]/legalnotice[2]/para[1] localeFilterList="de-DE" localeFilterType="include"
diff --git a/tests/ITS-2.0-Testsuite/expected/localefilter/xml/locale7xmloutput.txt b/tests/ITS-2.0-Testsuite/expected/localefilter/xml/locale7xmloutput.txt
new file mode 100644
index 0000000..077e94b
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/localefilter/xml/locale7xmloutput.txt
@@ -0,0 +1,12 @@
+/book localeFilterList="*" localeFilterType="include"
+/book/@its:version localeFilterList="*" localeFilterType="include"
+/book/info[1] localeFilterList="*" localeFilterType="include"
+/book/info[1]/its:rules[1] localeFilterList="*" localeFilterType="include"
+/book/info[1]/its:rules[1]/@version localeFilterList="*" localeFilterType="include"
+/book/info[1]/its:rules[1]/@xlink:href localeFilterList="*" localeFilterType="include"
+/book/info[1]/legalnotice[1] localeFilterList="*" localeFilterType="include"
+/book/info[1]/legalnotice[1]/@role localeFilterList="*" localeFilterType="include"
+/book/info[1]/legalnotice[1]/para[1] localeFilterList="*" localeFilterType="include"
+/book/info[1]/legalnotice[2] localeFilterList="de-DE" localeFilterType="include"
+/book/info[1]/legalnotice[2]/@role localeFilterList="de-DE" localeFilterType="include"
+/book/info[1]/legalnotice[2]/para[1] localeFilterList="de-DE" localeFilterType="include"
diff --git a/tests/ITS-2.0-Testsuite/expected/localefilter/xml/locale8xmloutput.txt b/tests/ITS-2.0-Testsuite/expected/localefilter/xml/locale8xmloutput.txt
new file mode 100644
index 0000000..4e30862
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/localefilter/xml/locale8xmloutput.txt
@@ -0,0 +1,19 @@
+/book localeFilterList="*" localeFilterType="include"
+/book/@its:version localeFilterList="*" localeFilterType="include"
+/book/info[1] localeFilterList="*" localeFilterType="include"
+/book/info[1]/legalnotice[1] localeFilterList="*-CA" localeFilterType="include"
+/book/info[1]/legalnotice[1]/@its:localeFilterList localeFilterList="*-CA" localeFilterType="include"
+/book/info[1]/legalnotice[1]/@its:localeFilterType localeFilterList="*-CA" localeFilterType="include"
+/book/info[1]/legalnotice[1]/para[1] localeFilterList="*-CA" localeFilterType="include"
+/book/info[1]/legalnotice[2] localeFilterList="*-CA" localeFilterType="exclude"
+/book/info[1]/legalnotice[2]/@its:localeFilterList localeFilterList="*-CA" localeFilterType="exclude"
+/book/info[1]/legalnotice[2]/@its:localeFilterType localeFilterList="*-CA" localeFilterType="exclude"
+/book/info[1]/legalnotice[2]/para[1] localeFilterList="*-CA" localeFilterType="exclude"
+/book/info[1]/legalnotice[3] localeFilterList="*" localeFilterType="exclude"
+/book/info[1]/legalnotice[3]/@its:localeFilterList localeFilterList="*" localeFilterType="exclude"
+/book/info[1]/legalnotice[3]/@its:localeFilterType localeFilterList="*" localeFilterType="exclude"
+/book/info[1]/legalnotice[3]/para[1] localeFilterList="*" localeFilterType="exclude"
+/book/info[1]/legalnotice[4] localeFilterList="" localeFilterType="exclude"
+/book/info[1]/legalnotice[4]/@its:localeFilterList localeFilterList="" localeFilterType="exclude"
+/book/info[1]/legalnotice[4]/@its:localeFilterType localeFilterList="" localeFilterType="exclude"
+/book/info[1]/legalnotice[4]/para[1] localeFilterList="" localeFilterType="exclude"
diff --git a/tests/ITS-2.0-Testsuite/expected/localizationnote/html/locnote1htmloutput.txt b/tests/ITS-2.0-Testsuite/expected/localizationnote/html/locnote1htmloutput.txt
new file mode 100644
index 0000000..8987328
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/localizationnote/html/locnote1htmloutput.txt
@@ -0,0 +1,11 @@
+/html
+/html/head[1]
+/html/head[1]/meta[1]
+/html/head[1]/meta[1]/@charset
+/html/head[1]/title[1]
+/html/head[1]/link[1]
+/html/head[1]/link[1]/@href
+/html/head[1]/link[1]/@rel
+/html/body[1]
+/html/body[1]/span[1] locNote="The variable {0} has three possible values: 'printer', 'stacker' and 'stapler options'." locNoteType="alert"
+/html/body[1]/span[1]/@id
diff --git a/tests/ITS-2.0-Testsuite/expected/localizationnote/html/locnote2htmloutput.txt b/tests/ITS-2.0-Testsuite/expected/localizationnote/html/locnote2htmloutput.txt
new file mode 100644
index 0000000..c81c18e
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/localizationnote/html/locnote2htmloutput.txt
@@ -0,0 +1,17 @@
+/html
+/html/head[1]
+/html/head[1]/meta[1]
+/html/head[1]/meta[1]/@charset
+/html/head[1]/title[1]
+/html/head[1]/link[1]
+/html/head[1]/link[1]/@href
+/html/head[1]/link[1]/@rel
+/html/body[1]
+/html/body[1]/section[1]
+/html/body[1]/section[1]/@id
+/html/body[1]/section[1]/p[1]
+/html/body[1]/section[1]/span[1] locNote="Indicates that the resource file {0} could not be loaded." locNoteType="description"
+/html/body[1]/section[2]
+/html/body[1]/section[2]/@id
+/html/body[1]/section[2]/p[1]
+/html/body[1]/section[2]/span[1] locNote="A division by 0 was going to be computed." locNoteType="description"
diff --git a/tests/ITS-2.0-Testsuite/expected/localizationnote/html/locnote3htmloutput.txt b/tests/ITS-2.0-Testsuite/expected/localizationnote/html/locnote3htmloutput.txt
new file mode 100644
index 0000000..3c68000
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/localizationnote/html/locnote3htmloutput.txt
@@ -0,0 +1,11 @@
+/html
+/html/head[1]
+/html/head[1]/meta[1]
+/html/head[1]/meta[1]/@charset
+/html/head[1]/title[1]
+/html/head[1]/link[1]
+/html/head[1]/link[1]/@href
+/html/head[1]/link[1]/@rel
+/html/body[1]
+/html/body[1]/span[1] locNoteRef="ErrorsInfo.html/#NotFound" locNoteType="description"
+/html/body[1]/span[1]/@id
diff --git a/tests/ITS-2.0-Testsuite/expected/localizationnote/html/locnote4htmloutput.txt b/tests/ITS-2.0-Testsuite/expected/localizationnote/html/locnote4htmloutput.txt
new file mode 100644
index 0000000..16d30c8
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/localizationnote/html/locnote4htmloutput.txt
@@ -0,0 +1,17 @@
+/html
+/html/head[1]
+/html/head[1]/meta[1]
+/html/head[1]/meta[1]/@charset
+/html/head[1]/title[1]
+/html/head[1]/link[1]
+/html/head[1]/link[1]/@href
+/html/head[1]/link[1]/@rel
+/html/body[1]
+/html/body[1]/p[1]
+/html/body[1]/p[1]/@id
+/html/body[1]/p[1]/@title
+/html/body[1]/p[1]/span[1] locNoteRef="Comments.html#FileNotFound" locNoteType="description"
+/html/body[1]/p[2]
+/html/body[1]/p[2]/@id
+/html/body[1]/p[2]/@title
+/html/body[1]/p[2]/span[1] locNoteRef="Comments.html#DivByZero" locNoteType="description"
diff --git a/tests/ITS-2.0-Testsuite/expected/localizationnote/html/locnote5htmloutput.txt b/tests/ITS-2.0-Testsuite/expected/localizationnote/html/locnote5htmloutput.txt
new file mode 100644
index 0000000..349ba68
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/localizationnote/html/locnote5htmloutput.txt
@@ -0,0 +1,21 @@
+/html
+/html/head[1]
+/html/head[1]/meta[1]
+/html/head[1]/meta[1]/@charset
+/html/head[1]/link[1]
+/html/head[1]/link[1]/@href
+/html/head[1]/link[1]/@rel
+/html/head[1]/title[1]
+/html/body[1]
+/html/body[1]/p[1]
+/html/body[1]/p[1]/@id
+/html/body[1]/p[1]/img[1]
+/html/body[1]/p[1]/img[1]/@alt locNote="Do not translate the word "Chobe"" locNoteType="alert"
+/html/body[1]/p[1]/img[1]/@src
+/html/body[1]/p[2]
+/html/body[1]/p[2]/@id
+/html/body[1]/p[2]/img[1]
+/html/body[1]/p[2]/img[1]/@alt locNote="This text will be displayed over the image." locNoteType="description"
+/html/body[1]/p[2]/img[1]/@src
+/html/body[1]/p[3] locNote="The variable {0} has three possible values: 'printer', 'stacker' and 'stapler options'." locNoteType="alert"
+/html/body[1]/p[3]/@id
diff --git a/tests/ITS-2.0-Testsuite/expected/localizationnote/html/locnote6htmloutput.txt b/tests/ITS-2.0-Testsuite/expected/localizationnote/html/locnote6htmloutput.txt
new file mode 100644
index 0000000..b603e77
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/localizationnote/html/locnote6htmloutput.txt
@@ -0,0 +1,21 @@
+/html
+/html/head[1]
+/html/head[1]/meta[1]
+/html/head[1]/meta[1]/@charset
+/html/head[1]/title[1]
+/html/head[1]/link[1]
+/html/head[1]/link[1]/@href
+/html/head[1]/link[1]/@rel
+/html/body[1]
+/html/body[1]/span[1]
+/html/body[1]/span[1]/@id
+/html/body[1]/span[1]/img[1]
+/html/body[1]/span[1]/img[1]/@alt locNote="Do not translate the word "Chobe"" locNoteType="alert"
+/html/body[1]/span[1]/img[1]/@src
+/html/body[1]/span[2]
+/html/body[1]/span[2]/@id
+/html/body[1]/span[2]/img[1]
+/html/body[1]/span[2]/img[1]/@alt locNote="This text will be displayed over the image." locNoteType="description"
+/html/body[1]/span[2]/img[1]/@src
+/html/body[1]/span[3] locNote="The variable {0} has three possible values: 'printer', 'stacker' and 'stapler options'." locNoteType="alert"
+/html/body[1]/span[3]/@id
diff --git a/tests/ITS-2.0-Testsuite/expected/localizationnote/html/locnote7htmloutput.txt b/tests/ITS-2.0-Testsuite/expected/localizationnote/html/locnote7htmloutput.txt
new file mode 100644
index 0000000..0dd1ef8
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/localizationnote/html/locnote7htmloutput.txt
@@ -0,0 +1,11 @@
+/html
+/html/@lang
+/html/head[1]
+/html/head[1]/meta[1]
+/html/head[1]/meta[1]/@charset
+/html/head[1]/title[1]
+/html/body[1]
+/html/body[1]/p[1]
+/html/body[1]/p[1]/span[1] locNote="Check with terminology engineer" locNoteType="alert"
+/html/body[1]/p[1]/span[1]/@its-loc-note
+/html/body[1]/p[1]/span[1]/@its-loc-note-type
diff --git a/tests/ITS-2.0-Testsuite/expected/localizationnote/html/locnote8htmloutput.txt b/tests/ITS-2.0-Testsuite/expected/localizationnote/html/locnote8htmloutput.txt
new file mode 100644
index 0000000..b603e77
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/localizationnote/html/locnote8htmloutput.txt
@@ -0,0 +1,21 @@
+/html
+/html/head[1]
+/html/head[1]/meta[1]
+/html/head[1]/meta[1]/@charset
+/html/head[1]/title[1]
+/html/head[1]/link[1]
+/html/head[1]/link[1]/@href
+/html/head[1]/link[1]/@rel
+/html/body[1]
+/html/body[1]/span[1]
+/html/body[1]/span[1]/@id
+/html/body[1]/span[1]/img[1]
+/html/body[1]/span[1]/img[1]/@alt locNote="Do not translate the word "Chobe"" locNoteType="alert"
+/html/body[1]/span[1]/img[1]/@src
+/html/body[1]/span[2]
+/html/body[1]/span[2]/@id
+/html/body[1]/span[2]/img[1]
+/html/body[1]/span[2]/img[1]/@alt locNote="This text will be displayed over the image." locNoteType="description"
+/html/body[1]/span[2]/img[1]/@src
+/html/body[1]/span[3] locNote="The variable {0} has three possible values: 'printer', 'stacker' and 'stapler options'." locNoteType="alert"
+/html/body[1]/span[3]/@id
diff --git a/tests/ITS-2.0-Testsuite/expected/localizationnote/html/locnote9htmloutput.txt b/tests/ITS-2.0-Testsuite/expected/localizationnote/html/locnote9htmloutput.txt
new file mode 100644
index 0000000..807c6c2
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/localizationnote/html/locnote9htmloutput.txt
@@ -0,0 +1,11 @@
+/html
+/html/@lang
+/html/head[1]
+/html/head[1]/script[1]
+/html/head[1]/script[1]/@type
+/html/head[1]/meta[1]
+/html/head[1]/meta[1]/@charset
+/html/head[1]/title[1]
+/html/body[1]
+/html/body[1]/p[1] locNote="The variable {0} has three possible values: 'printer', 'stacker' and 'stapler options'." locNoteType="alert"
+/html/body[1]/p[1]/@id
diff --git a/tests/ITS-2.0-Testsuite/expected/localizationnote/xml/locnote10xmloutput.txt b/tests/ITS-2.0-Testsuite/expected/localizationnote/xml/locnote10xmloutput.txt
new file mode 100644
index 0000000..7c7c1f3
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/localizationnote/xml/locnote10xmloutput.txt
@@ -0,0 +1,31 @@
+/msgList
+/msgList/head[1]
+/msgList/head[1]/its:rules[1]
+/msgList/head[1]/its:rules[1]/@version
+/msgList/head[1]/its:rules[1]/its:param[1]
+/msgList/head[1]/its:rules[1]/its:param[1]/@name
+/msgList/head[1]/its:rules[1]/its:locNoteRule[1]
+/msgList/head[1]/its:rules[1]/its:locNoteRule[1]/@locNoteType
+/msgList/head[1]/its:rules[1]/its:locNoteRule[1]/@selector
+/msgList/head[1]/its:rules[1]/its:locNoteRule[1]/its:locNote[1]
+/msgList/head[1]/its:rules[1]/its:locNoteRule[2]
+/msgList/head[1]/its:rules[1]/its:locNoteRule[2]/@locNoteType
+/msgList/head[1]/its:rules[1]/its:locNoteRule[2]/@selector
+/msgList/head[1]/its:rules[1]/its:locNoteRule[2]/its:locNote[1]
+/msgList/head[1]/its:rules[1]/its:locNoteRule[3]
+/msgList/head[1]/its:rules[1]/its:locNoteRule[3]/@locNoteType
+/msgList/head[1]/its:rules[1]/its:locNoteRule[3]/@selector
+/msgList/head[1]/its:rules[1]/its:locNoteRule[3]/its:locNote[1]
+/msgList/body[1]
+/msgList/body[1]/msg[1]
+/msgList/body[1]/msg[1]/@id
+/msgList/body[1]/msg[1]/img[1]
+/msgList/body[1]/msg[1]/img[1]/@alt locNote="Do not translate the word "Chobe"" locNoteType="alert"
+/msgList/body[1]/msg[1]/img[1]/@src
+/msgList/body[1]/msg[2]
+/msgList/body[1]/msg[2]/@id
+/msgList/body[1]/msg[2]/img[1]
+/msgList/body[1]/msg[2]/img[1]/@alt locNote="This text will be displayed over the image." locNoteType="description"
+/msgList/body[1]/msg[2]/img[1]/@src
+/msgList/body[1]/msg[3] locNote="The variable {0} has three possible values: 'printer', 'stacker' and 'stapler options'." locNoteType="alert"
+/msgList/body[1]/msg[3]/@id
diff --git a/tests/ITS-2.0-Testsuite/expected/localizationnote/xml/locnote11xmloutput.txt b/tests/ITS-2.0-Testsuite/expected/localizationnote/xml/locnote11xmloutput.txt
new file mode 100644
index 0000000..33df8db
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/localizationnote/xml/locnote11xmloutput.txt
@@ -0,0 +1,19 @@
+/msgList
+/msgList/head[1]
+/msgList/head[1]/its:rules[1]
+/msgList/head[1]/its:rules[1]/@version
+/msgList/head[1]/its:rules[1]/@xlink:href
+/msgList/head[1]/its:rules[1]/@xlink:type
+/msgList/body[1]
+/msgList/body[1]/msg[1]
+/msgList/body[1]/msg[1]/@id
+/msgList/body[1]/msg[1]/img[1]
+/msgList/body[1]/msg[1]/img[1]/@alt locNote="Do not translate the word "Chobe"" locNoteType="alert"
+/msgList/body[1]/msg[1]/img[1]/@src
+/msgList/body[1]/msg[2]
+/msgList/body[1]/msg[2]/@id
+/msgList/body[1]/msg[2]/img[1]
+/msgList/body[1]/msg[2]/img[1]/@alt locNote="This text will be displayed over the image." locNoteType="description"
+/msgList/body[1]/msg[2]/img[1]/@src
+/msgList/body[1]/msg[3] locNote="The variable {0} has three possible values: 'printer', 'stacker' and 'stapler options'." locNoteType="alert"
+/msgList/body[1]/msg[3]/@id
diff --git a/tests/ITS-2.0-Testsuite/expected/localizationnote/xml/locnote1xmloutput.txt b/tests/ITS-2.0-Testsuite/expected/localizationnote/xml/locnote1xmloutput.txt
new file mode 100644
index 0000000..1cee566
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/localizationnote/xml/locnote1xmloutput.txt
@@ -0,0 +1,11 @@
+/myRes
+/myRes/head[1]
+/myRes/head[1]/its:rules[1]
+/myRes/head[1]/its:rules[1]/@version
+/myRes/head[1]/its:rules[1]/its:locNoteRule[1]
+/myRes/head[1]/its:rules[1]/its:locNoteRule[1]/@locNoteType
+/myRes/head[1]/its:rules[1]/its:locNoteRule[1]/@selector
+/myRes/head[1]/its:rules[1]/its:locNoteRule[1]/its:locNote[1]
+/myRes/body[1]
+/myRes/body[1]/msg[1] locNote="The variable {0} has three possible values: 'printer', 'stacker' and 'stapler options'." locNoteType="alert"
+/myRes/body[1]/msg[1]/@id
diff --git a/tests/ITS-2.0-Testsuite/expected/localizationnote/xml/locnote2xmloutput.txt b/tests/ITS-2.0-Testsuite/expected/localizationnote/xml/locnote2xmloutput.txt
new file mode 100644
index 0000000..14449fc
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/localizationnote/xml/locnote2xmloutput.txt
@@ -0,0 +1,20 @@
+/Res
+/Res/prolog[1]
+/Res/prolog[1]/its:rules[1]
+/Res/prolog[1]/its:rules[1]/@version
+/Res/prolog[1]/its:rules[1]/its:translateRule[1]
+/Res/prolog[1]/its:rules[1]/its:translateRule[1]/@selector
+/Res/prolog[1]/its:rules[1]/its:translateRule[1]/@translate
+/Res/prolog[1]/its:rules[1]/its:locNoteRule[1]
+/Res/prolog[1]/its:rules[1]/its:locNoteRule[1]/@locNotePointer
+/Res/prolog[1]/its:rules[1]/its:locNoteRule[1]/@locNoteType
+/Res/prolog[1]/its:rules[1]/its:locNoteRule[1]/@selector
+/Res/body[1]
+/Res/body[1]/msg[1]
+/Res/body[1]/msg[1]/@id
+/Res/body[1]/msg[1]/notes[1]
+/Res/body[1]/msg[1]/data[1] locNote="Indicates that the resource file {0} could not be loaded." locNoteType="description"
+/Res/body[1]/msg[2]
+/Res/body[1]/msg[2]/@id
+/Res/body[1]/msg[2]/notes[1]
+/Res/body[1]/msg[2]/data[1] locNote="A division by 0 was going to be computed." locNoteType="description"
diff --git a/tests/ITS-2.0-Testsuite/expected/localizationnote/xml/locnote3xmloutput.txt b/tests/ITS-2.0-Testsuite/expected/localizationnote/xml/locnote3xmloutput.txt
new file mode 100644
index 0000000..4f16005
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/localizationnote/xml/locnote3xmloutput.txt
@@ -0,0 +1,11 @@
+/myRes
+/myRes/head[1]
+/myRes/head[1]/its:rules[1]
+/myRes/head[1]/its:rules[1]/@version
+/myRes/head[1]/its:rules[1]/its:locNoteRule[1]
+/myRes/head[1]/its:rules[1]/its:locNoteRule[1]/@locNoteRef
+/myRes/head[1]/its:rules[1]/its:locNoteRule[1]/@locNoteType
+/myRes/head[1]/its:rules[1]/its:locNoteRule[1]/@selector
+/myRes/body[1]
+/myRes/body[1]/msg[1] locNoteRef="ErrorsInfo.html/#NotFound" locNoteType="description"
+/myRes/body[1]/msg[1]/@id
diff --git a/tests/ITS-2.0-Testsuite/expected/localizationnote/xml/locnote4xmloutput.txt b/tests/ITS-2.0-Testsuite/expected/localizationnote/xml/locnote4xmloutput.txt
new file mode 100644
index 0000000..2e889b4
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/localizationnote/xml/locnote4xmloutput.txt
@@ -0,0 +1,17 @@
+/dataFile
+/dataFile/prolog[1]
+/dataFile/prolog[1]/its:rules[1]
+/dataFile/prolog[1]/its:rules[1]/@version
+/dataFile/prolog[1]/its:rules[1]/its:locNoteRule[1]
+/dataFile/prolog[1]/its:rules[1]/its:locNoteRule[1]/@locNoteRefPointer
+/dataFile/prolog[1]/its:rules[1]/its:locNoteRule[1]/@locNoteType
+/dataFile/prolog[1]/its:rules[1]/its:locNoteRule[1]/@selector
+/dataFile/body[1]
+/dataFile/body[1]/string[1]
+/dataFile/body[1]/string[1]/@id
+/dataFile/body[1]/string[1]/@noteFile
+/dataFile/body[1]/string[1]/data[1] locNoteRef="Comments.html#FileNotFound" locNoteType="description"
+/dataFile/body[1]/string[2]
+/dataFile/body[1]/string[2]/@id
+/dataFile/body[1]/string[2]/@noteFile
+/dataFile/body[1]/string[2]/data[1] locNoteRef="Comments.html#DivByZero" locNoteType="description"
diff --git a/tests/ITS-2.0-Testsuite/expected/localizationnote/xml/locnote5xmloutput.txt b/tests/ITS-2.0-Testsuite/expected/localizationnote/xml/locnote5xmloutput.txt
new file mode 100644
index 0000000..4245c44
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/localizationnote/xml/locnote5xmloutput.txt
@@ -0,0 +1,23 @@
+/msgList
+/msgList/head[1]
+/msgList/head[1]/its:rules[1]
+/msgList/head[1]/its:rules[1]/@version
+/msgList/head[1]/its:rules[1]/@xlink:href
+/msgList/head[1]/its:rules[1]/@xlink:type
+/msgList/head[1]/its:rules[1]/its:locNoteRule[1]
+/msgList/head[1]/its:rules[1]/its:locNoteRule[1]/@locNoteType
+/msgList/head[1]/its:rules[1]/its:locNoteRule[1]/@selector
+/msgList/head[1]/its:rules[1]/its:locNoteRule[1]/its:locNote[1]
+/msgList/body[1]
+/msgList/body[1]/msg[1]
+/msgList/body[1]/msg[1]/@id
+/msgList/body[1]/msg[1]/img[1]
+/msgList/body[1]/msg[1]/img[1]/@alt locNote="Do not translate the word "Chobe"" locNoteType="alert"
+/msgList/body[1]/msg[1]/img[1]/@src
+/msgList/body[1]/msg[2]
+/msgList/body[1]/msg[2]/@id
+/msgList/body[1]/msg[2]/img[1]
+/msgList/body[1]/msg[2]/img[1]/@alt locNote="This text will be displayed over the image." locNoteType="description"
+/msgList/body[1]/msg[2]/img[1]/@src
+/msgList/body[1]/msg[3] locNote="The variable {0} has three possible values: 'printer', 'stacker' and 'stapler options'." locNoteType="alert"
+/msgList/body[1]/msg[3]/@id
diff --git a/tests/ITS-2.0-Testsuite/expected/localizationnote/xml/locnote6xmloutput.txt b/tests/ITS-2.0-Testsuite/expected/localizationnote/xml/locnote6xmloutput.txt
new file mode 100644
index 0000000..2f114f4
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/localizationnote/xml/locnote6xmloutput.txt
@@ -0,0 +1,29 @@
+/msgList
+/msgList/head[1]
+/msgList/head[1]/its:rules[1]
+/msgList/head[1]/its:rules[1]/@version
+/msgList/head[1]/its:rules[1]/its:locNoteRule[1]
+/msgList/head[1]/its:rules[1]/its:locNoteRule[1]/@locNoteType
+/msgList/head[1]/its:rules[1]/its:locNoteRule[1]/@selector
+/msgList/head[1]/its:rules[1]/its:locNoteRule[1]/its:locNote[1]
+/msgList/head[1]/its:rules[1]/its:locNoteRule[2]
+/msgList/head[1]/its:rules[1]/its:locNoteRule[2]/@locNoteType
+/msgList/head[1]/its:rules[1]/its:locNoteRule[2]/@selector
+/msgList/head[1]/its:rules[1]/its:locNoteRule[2]/its:locNote[1]
+/msgList/head[1]/its:rules[1]/its:locNoteRule[3]
+/msgList/head[1]/its:rules[1]/its:locNoteRule[3]/@locNoteType
+/msgList/head[1]/its:rules[1]/its:locNoteRule[3]/@selector
+/msgList/head[1]/its:rules[1]/its:locNoteRule[3]/its:locNote[1]
+/msgList/body[1]
+/msgList/body[1]/msg[1]
+/msgList/body[1]/msg[1]/@id
+/msgList/body[1]/msg[1]/img[1]
+/msgList/body[1]/msg[1]/img[1]/@alt locNote="Do not translate the word "Chobe"" locNoteType="alert"
+/msgList/body[1]/msg[1]/img[1]/@src
+/msgList/body[1]/msg[2]
+/msgList/body[1]/msg[2]/@id
+/msgList/body[1]/msg[2]/img[1]
+/msgList/body[1]/msg[2]/img[1]/@alt locNote="This text will be displayed over the image." locNoteType="description"
+/msgList/body[1]/msg[2]/img[1]/@src
+/msgList/body[1]/msg[3] locNote="The variable {0} has three possible values: 'printer', 'stacker' and 'stapler options'." locNoteType="alert"
+/msgList/body[1]/msg[3]/@id
diff --git a/tests/ITS-2.0-Testsuite/expected/localizationnote/xml/locnote7xmloutput.txt b/tests/ITS-2.0-Testsuite/expected/localizationnote/xml/locnote7xmloutput.txt
new file mode 100644
index 0000000..14449fc
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/localizationnote/xml/locnote7xmloutput.txt
@@ -0,0 +1,20 @@
+/Res
+/Res/prolog[1]
+/Res/prolog[1]/its:rules[1]
+/Res/prolog[1]/its:rules[1]/@version
+/Res/prolog[1]/its:rules[1]/its:translateRule[1]
+/Res/prolog[1]/its:rules[1]/its:translateRule[1]/@selector
+/Res/prolog[1]/its:rules[1]/its:translateRule[1]/@translate
+/Res/prolog[1]/its:rules[1]/its:locNoteRule[1]
+/Res/prolog[1]/its:rules[1]/its:locNoteRule[1]/@locNotePointer
+/Res/prolog[1]/its:rules[1]/its:locNoteRule[1]/@locNoteType
+/Res/prolog[1]/its:rules[1]/its:locNoteRule[1]/@selector
+/Res/body[1]
+/Res/body[1]/msg[1]
+/Res/body[1]/msg[1]/@id
+/Res/body[1]/msg[1]/notes[1]
+/Res/body[1]/msg[1]/data[1] locNote="Indicates that the resource file {0} could not be loaded." locNoteType="description"
+/Res/body[1]/msg[2]
+/Res/body[1]/msg[2]/@id
+/Res/body[1]/msg[2]/notes[1]
+/Res/body[1]/msg[2]/data[1] locNote="A division by 0 was going to be computed." locNoteType="description"
diff --git a/tests/ITS-2.0-Testsuite/expected/localizationnote/xml/locnote8xmloutput.txt b/tests/ITS-2.0-Testsuite/expected/localizationnote/xml/locnote8xmloutput.txt
new file mode 100644
index 0000000..0f1f04c
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/localizationnote/xml/locnote8xmloutput.txt
@@ -0,0 +1,20 @@
+/Res
+/Res/@its:version
+/Res/body[1] locNote="The variable {0} is the name of the host." locNoteType="description"
+/Res/body[1]/@its:locNote
+/Res/body[1]/msg[1] locNote="The variable {0} is the name of the host." locNoteType="description"
+/Res/body[1]/msg[1]/@id
+/Res/body[1]/msg[1]/data[1] locNote="The variable {0} is the name of the host." locNoteType="description"
+/Res/body[1]/msg[2] locNote="The variable {0} is the name of the host." locNoteType="description"
+/Res/body[1]/msg[2]/@id
+/Res/body[1]/msg[2]/data[1] locNote="The variable {0} is the name of the host." locNoteType="description"
+/Res/body[1]/msg[3] locNote="The variable {0} is the name of the host." locNoteType="description"
+/Res/body[1]/msg[3]/@id
+/Res/body[1]/msg[3]/data[1] locNote="{0} is a filename" locNoteType="alert"
+/Res/body[1]/msg[3]/data[1]/@its:locNote
+/Res/body[1]/msg[3]/data[1]/@its:locNoteType
+/Res/body[1]/msg[4] locNote="The variable {0} is the name of the host." locNoteType="description"
+/Res/body[1]/msg[4]/@id
+/Res/body[1]/msg[4]/data[1] locNoteRef="myLocNotes.htm#CannotLog" locNoteType="alert"
+/Res/body[1]/msg[4]/data[1]/@its:locNoteRef
+/Res/body[1]/msg[4]/data[1]/@its:locNoteType
diff --git a/tests/ITS-2.0-Testsuite/expected/localizationnote/xml/locnote9xmloutput.txt b/tests/ITS-2.0-Testsuite/expected/localizationnote/xml/locnote9xmloutput.txt
new file mode 100644
index 0000000..600872d
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/localizationnote/xml/locnote9xmloutput.txt
@@ -0,0 +1,11 @@
+/Doc
+/Doc/@its:version
+/Doc/body[1]
+/Doc/body[1]/p[1]
+/Doc/body[1]/p[1]/its:span[1] locNote="If possible keep the non-English terms in the translated version too" locNoteType="description"
+/Doc/body[1]/p[1]/its:span[1]/@locNote
+/Doc/body[1]/p[1]/its:span[1]/its:span[1] locNoteRef="http://en.wikipedia.org/wiki/Doppelganger" locNoteType="description"
+/Doc/body[1]/p[1]/its:span[1]/its:span[1]/@locNoteRef
+/Doc/body[1]/p[1]/its:span[1]/b[1] locNote="If possible keep the non-English terms in the translated version too" locNoteType="description"
+/Doc/body[1]/p[1]/its:span[1]/its:span[2] locNoteRef="http://en.wikipedia.org/wiki/Aficionado" locNoteType="description"
+/Doc/body[1]/p[1]/its:span[1]/its:span[2]/@locNoteRef
diff --git a/tests/ITS-2.0-Testsuite/expected/preservespace/xml/preservespace1xmloutput.txt b/tests/ITS-2.0-Testsuite/expected/preservespace/xml/preservespace1xmloutput.txt
new file mode 100644
index 0000000..08ad0a1
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/preservespace/xml/preservespace1xmloutput.txt
@@ -0,0 +1,9 @@
+/book space="default"
+/book/@its:version space="default"
+/book/info[1] space="default"
+/book/info[1]/its:rules[1] space="default"
+/book/info[1]/its:rules[1]/@version space="default"
+/book/info[1]/its:rules[1]/its:preserveSpaceRule[1] space="default"
+/book/info[1]/its:rules[1]/its:preserveSpaceRule[1]/@selector space="default"
+/book/info[1]/its:rules[1]/its:preserveSpaceRule[1]/@space space="default"
+/book/verse[1] space="preserve"
diff --git a/tests/ITS-2.0-Testsuite/expected/preservespace/xml/preservespace2xmloutput.txt b/tests/ITS-2.0-Testsuite/expected/preservespace/xml/preservespace2xmloutput.txt
new file mode 100644
index 0000000..208dbe9
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/preservespace/xml/preservespace2xmloutput.txt
@@ -0,0 +1,4 @@
+/book space="default"
+/book/@its:version space="default"
+/book/verse[1] space="preserve"
+/book/verse[1]/@xml:space space="preserve"
diff --git a/tests/ITS-2.0-Testsuite/expected/preservespace/xml/preservespace3xmloutput.txt b/tests/ITS-2.0-Testsuite/expected/preservespace/xml/preservespace3xmloutput.txt
new file mode 100644
index 0000000..ad764ba
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/preservespace/xml/preservespace3xmloutput.txt
@@ -0,0 +1,7 @@
+/book space="default"
+/book/@its:version space="default"
+/book/info[1] space="default"
+/book/info[1]/its:rules[1] space="default"
+/book/info[1]/its:rules[1]/@version space="default"
+/book/info[1]/its:rules[1]/@xlink:href space="default"
+/book/verse[1] space="preserve"
diff --git a/tests/ITS-2.0-Testsuite/expected/preservespace/xml/preservespace4xmloutput.txt b/tests/ITS-2.0-Testsuite/expected/preservespace/xml/preservespace4xmloutput.txt
new file mode 100644
index 0000000..c42316f
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/preservespace/xml/preservespace4xmloutput.txt
@@ -0,0 +1,4 @@
+/book space="default"
+/book/@its:version space="default"
+/book/its:span[1] space="preserve"
+/book/its:span[1]/@xml:space space="preserve"
diff --git a/tests/ITS-2.0-Testsuite/expected/preservespace/xml/preservespace5xmloutput.txt b/tests/ITS-2.0-Testsuite/expected/preservespace/xml/preservespace5xmloutput.txt
new file mode 100644
index 0000000..a0fa6b8
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/preservespace/xml/preservespace5xmloutput.txt
@@ -0,0 +1,12 @@
+/book space="default"
+/book/@its:version space="default"
+/book/info[1] space="default"
+/book/info[1]/its:rules[1] space="default"
+/book/info[1]/its:rules[1]/@version space="default"
+/book/info[1]/its:rules[1]/its:param[1] space="default"
+/book/info[1]/its:rules[1]/its:param[1]/@name space="default"
+/book/info[1]/its:rules[1]/its:preserveSpaceRule[1] space="default"
+/book/info[1]/its:rules[1]/its:preserveSpaceRule[1]/@selector space="default"
+/book/info[1]/its:rules[1]/its:preserveSpaceRule[1]/@space space="default"
+/book/verse[1] space="preserve"
+/book/verse[1]/@id space="preserve"
diff --git a/tests/ITS-2.0-Testsuite/expected/preservespace/xml/preservespace6xmloutput.txt b/tests/ITS-2.0-Testsuite/expected/preservespace/xml/preservespace6xmloutput.txt
new file mode 100644
index 0000000..4bb6e0d
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/preservespace/xml/preservespace6xmloutput.txt
@@ -0,0 +1,8 @@
+/book space="default"
+/book/@its:version space="default"
+/book/its:rules[1] space="default"
+/book/its:rules[1]/@version space="default"
+/book/its:rules[1]/@xlink:href space="default"
+/book/its:rules[1]/@xlink:type space="default"
+/book/verse[1] space="preserve"
+/book/verse[1]/@id space="preserve"
diff --git a/tests/ITS-2.0-Testsuite/expected/translate/html/translate1htmloutput.txt b/tests/ITS-2.0-Testsuite/expected/translate/html/translate1htmloutput.txt
new file mode 100644
index 0000000..e0b7ee9
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/translate/html/translate1htmloutput.txt
@@ -0,0 +1,18 @@
+/html translate="yes"
+/html/head[1] translate="yes"
+/html/head[1]/meta[1] translate="yes"
+/html/head[1]/meta[1]/@charset translate="no"
+/html/head[1]/title[1] translate="yes"
+/html/head[1]/link[1] translate="no"
+/html/head[1]/link[1]/@href translate="no"
+/html/head[1]/link[1]/@rel translate="no"
+/html/body[1] translate="yes"
+/html/body[1]/img[1] translate="yes"
+/html/body[1]/img[1]/@alt translate="yes"
+/html/body[1]/img[1]/@height translate="no"
+/html/body[1]/img[1]/@src translate="no"
+/html/body[1]/img[1]/@width translate="no"
+/html/body[1]/p[1] translate="yes"
+/html/body[1]/p[1]/@id translate="no"
+/html/body[1]/p[1]/@title translate="yes"
+/html/body[1]/p[1]/code[1] translate="no"
diff --git a/tests/ITS-2.0-Testsuite/expected/translate/html/translate2htmloutput.txt b/tests/ITS-2.0-Testsuite/expected/translate/html/translate2htmloutput.txt
new file mode 100644
index 0000000..f8281c6
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/translate/html/translate2htmloutput.txt
@@ -0,0 +1,17 @@
+/html translate="yes"
+/html/@lang translate="yes"
+/html/head[1] translate="yes"
+/html/head[1]/meta[1] translate="yes"
+/html/head[1]/meta[1]/@charset translate="no"
+/html/head[1]/title[1] translate="yes"
+/html/body[1] translate="yes"
+/html/body[1]/p[1] translate="yes"
+/html/body[1]/p[1]/img[1] translate="yes"
+/html/body[1]/p[1]/img[1]/@alt translate="yes"
+/html/body[1]/p[1]/img[1]/@height translate="no"
+/html/body[1]/p[1]/img[1]/@src translate="no"
+/html/body[1]/p[1]/img[1]/@width translate="no"
+/html/body[1]/p[1]/span[1] translate="no"
+/html/body[1]/p[1]/span[1]/@translate translate="no"
+/html/body[1]/p[1]/span[2] translate="no"
+/html/body[1]/p[1]/span[2]/@translate translate="no"
diff --git a/tests/ITS-2.0-Testsuite/expected/translate/html/translate3htmloutput.txt b/tests/ITS-2.0-Testsuite/expected/translate/html/translate3htmloutput.txt
new file mode 100644
index 0000000..daecaee
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/translate/html/translate3htmloutput.txt
@@ -0,0 +1,16 @@
+/html translate="no"
+/html/head[1] translate="no"
+/html/head[1]/meta[1] translate="no"
+/html/head[1]/meta[1]/@charset translate="no"
+/html/head[1]/title[1] translate="no"
+/html/head[1]/link[1] translate="no"
+/html/head[1]/link[1]/@href translate="no"
+/html/head[1]/link[1]/@rel translate="no"
+/html/body[1] translate="no"
+/html/body[1]/span[1] translate="yes"
+/html/body[1]/span[1]/@translate translate="no"
+/html/body[1]/section[1] translate="no"
+/html/body[1]/section[1]/@title translate="no"
+/html/body[1]/section[1]/p[1] translate="yes"
+/html/body[1]/section[1]/p[1]/span[1] translate="no"
+/html/body[1]/section[1]/p[1]/span[2] translate="no"
diff --git a/tests/ITS-2.0-Testsuite/expected/translate/html/translate4htmloutput.txt b/tests/ITS-2.0-Testsuite/expected/translate/html/translate4htmloutput.txt
new file mode 100644
index 0000000..0d34fed
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/translate/html/translate4htmloutput.txt
@@ -0,0 +1,15 @@
+/html translate="no"
+/html/head[1] translate="no"
+/html/head[1]/meta[1] translate="no"
+/html/head[1]/meta[1]/@charset translate="no"
+/html/head[1]/title[1] translate="no"
+/html/head[1]/link[1] translate="no"
+/html/head[1]/link[1]/@href translate="no"
+/html/head[1]/link[1]/@rel translate="no"
+/html/body[1] translate="no"
+/html/body[1]/span[1] translate="yes"
+/html/body[1]/span[1]/@translate translate="no"
+/html/body[1]/section[1] translate="no"
+/html/body[1]/section[1]/p[1] translate="yes"
+/html/body[1]/section[1]/p[1]/span[1] translate="yes"
+/html/body[1]/section[1]/p[1]/span[2] translate="yes"
diff --git a/tests/ITS-2.0-Testsuite/expected/translate/html/translate5htmloutput.txt b/tests/ITS-2.0-Testsuite/expected/translate/html/translate5htmloutput.txt
new file mode 100644
index 0000000..9f94f11
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/translate/html/translate5htmloutput.txt
@@ -0,0 +1,24 @@
+/html translate="no"
+/html/head[1] translate="no"
+/html/head[1]/meta[1] translate="no"
+/html/head[1]/meta[1]/@charset translate="no"
+/html/head[1]/title[1] translate="no"
+/html/head[1]/link[1] translate="no"
+/html/head[1]/link[1]/@href translate="no"
+/html/head[1]/link[1]/@rel translate="no"
+/html/body[1] translate="no"
+/html/body[1]/section[1] translate="no"
+/html/body[1]/section[1]/span[1] translate="no"
+/html/body[1]/section[1]/span[1]/@id translate="no"
+/html/body[1]/section[1]/span[1]/b[1] translate="no"
+/html/body[1]/section[1]/span[1]/cite[1] translate="no"
+/html/body[1]/section[1]/span[1]/cite[1]/i[1] translate="no"
+/html/body[1]/p[1] translate="yes"
+/html/body[1]/ul[1] translate="no"
+/html/body[1]/ul[1]/li[1] translate="no"
+/html/body[1]/ul[1]/li[2] translate="no"
+/html/body[1]/ul[1]/li[3] translate="no"
+/html/body[1]/ul[1]/li[4] translate="no"
+/html/body[1]/p[2] translate="yes"
+/html/body[1]/p[2]/span[1] translate="no"
+/html/body[1]/p[2]/span[1]/@lang translate="no"
diff --git a/tests/ITS-2.0-Testsuite/expected/translate/html/translate6htmloutput.txt b/tests/ITS-2.0-Testsuite/expected/translate/html/translate6htmloutput.txt
new file mode 100644
index 0000000..31b1c29
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/translate/html/translate6htmloutput.txt
@@ -0,0 +1,24 @@
+/html translate="no"
+/html/head[1] translate="no"
+/html/head[1]/meta[1] translate="no"
+/html/head[1]/meta[1]/@charset translate="no"
+/html/head[1]/title[1] translate="no"
+/html/head[1]/link[1] translate="no"
+/html/head[1]/link[1]/@href translate="no"
+/html/head[1]/link[1]/@rel translate="no"
+/html/body[1] translate="no"
+/html/body[1]/section[1] translate="no"
+/html/body[1]/section[1]/span[1] translate="yes"
+/html/body[1]/section[1]/span[1]/@id translate="no"
+/html/body[1]/section[1]/span[1]/b[1] translate="no"
+/html/body[1]/section[1]/span[1]/cite[1] translate="no"
+/html/body[1]/section[1]/span[1]/cite[1]/i[1] translate="no"
+/html/body[1]/p[1] translate="yes"
+/html/body[1]/ul[1] translate="no"
+/html/body[1]/ul[1]/li[1] translate="no"
+/html/body[1]/ul[1]/li[2] translate="no"
+/html/body[1]/ul[1]/li[3] translate="no"
+/html/body[1]/ul[1]/li[4] translate="no"
+/html/body[1]/p[2] translate="yes"
+/html/body[1]/p[2]/span[1] translate="no"
+/html/body[1]/p[2]/span[1]/@lang translate="no"
diff --git a/tests/ITS-2.0-Testsuite/expected/translate/html/translate7htmloutput.txt b/tests/ITS-2.0-Testsuite/expected/translate/html/translate7htmloutput.txt
new file mode 100644
index 0000000..b328e5c
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/translate/html/translate7htmloutput.txt
@@ -0,0 +1,14 @@
+/html translate="yes"
+/html/@lang translate="yes"
+/html/head[1] translate="yes"
+/html/head[1]/script[1] translate="yes"
+/html/head[1]/script[1]/@type translate="no"
+/html/head[1]/meta[1] translate="yes"
+/html/head[1]/meta[1]/@charset translate="no"
+/html/head[1]/title[1] translate="yes"
+/html/body[1] translate="yes"
+/html/body[1]/@title translate="yes"
+/html/body[1]/p[1] translate="yes"
+/html/body[1]/p[1]/@style translate="yes"
+/html/body[1]/p[1]/code[1] translate="no"
+/html/body[1]/p[1]/code[1]/@id translate="no"
diff --git a/tests/ITS-2.0-Testsuite/expected/translate/xml/translate10xmloutput.txt b/tests/ITS-2.0-Testsuite/expected/translate/xml/translate10xmloutput.txt
new file mode 100644
index 0000000..6268884
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/translate/xml/translate10xmloutput.txt
@@ -0,0 +1,17 @@
+/doc translate="no"
+/doc/its:rules[1] translate="no"
+/doc/its:rules[1]/@version translate="no"
+/doc/its:rules[1]/@xlink:href translate="no"
+/doc/its:rules[1]/@xlink:type translate="no"
+/doc/msg[1] translate="yes"
+/doc/msg[1]/@lcid translate="no"
+/doc/msg[1]/@num translate="no"
+/doc/msg[2] translate="no"
+/doc/msg[2]/@lcid translate="no"
+/doc/msg[2]/@num translate="no"
+/doc/msg[3] translate="no"
+/doc/msg[3]/@lcid translate="no"
+/doc/msg[3]/@num translate="no"
+/doc/msg[4] translate="no"
+/doc/msg[4]/@lcid translate="no"
+/doc/msg[4]/@num translate="no"
diff --git a/tests/ITS-2.0-Testsuite/expected/translate/xml/translate1xmloutput.txt b/tests/ITS-2.0-Testsuite/expected/translate/xml/translate1xmloutput.txt
new file mode 100644
index 0000000..2e9eb33
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/translate/xml/translate1xmloutput.txt
@@ -0,0 +1,59 @@
+/myMetaDoc translate="yes"
+/myMetaDoc/head[1] translate="yes"
+/myMetaDoc/head[1]/its:rules[1] translate="yes"
+/myMetaDoc/head[1]/its:rules[1]/@version translate="no"
+/myMetaDoc/head[1]/its:rules[1]/its:translateRule[1] translate="yes"
+/myMetaDoc/head[1]/its:rules[1]/its:translateRule[1]/@selector translate="no"
+/myMetaDoc/head[1]/its:rules[1]/its:translateRule[1]/@translate translate="no"
+/myMetaDoc/head[1]/its:rules[1]/its:translateRule[2] translate="yes"
+/myMetaDoc/head[1]/its:rules[1]/its:translateRule[2]/@selector translate="no"
+/myMetaDoc/head[1]/its:rules[1]/its:translateRule[2]/@translate translate="no"
+/myMetaDoc/head[1]/its:rules[1]/its:translateRule[3] translate="yes"
+/myMetaDoc/head[1]/its:rules[1]/its:translateRule[3]/@selector translate="no"
+/myMetaDoc/head[1]/its:rules[1]/its:translateRule[3]/@translate translate="no"
+/myMetaDoc/head[1]/its:rules[1]/its:translateRule[4] translate="yes"
+/myMetaDoc/head[1]/its:rules[1]/its:translateRule[4]/@selector translate="no"
+/myMetaDoc/head[1]/its:rules[1]/its:translateRule[4]/@translate translate="no"
+/myMetaDoc/head[1]/its:rules[1]/its:translateRule[5] translate="yes"
+/myMetaDoc/head[1]/its:rules[1]/its:translateRule[5]/@selector translate="no"
+/myMetaDoc/head[1]/its:rules[1]/its:translateRule[5]/@translate translate="no"
+/myMetaDoc/head[1]/its:rules[1]/its:withinTextRule[1] translate="yes"
+/myMetaDoc/head[1]/its:rules[1]/its:withinTextRule[1]/@selector translate="no"
+/myMetaDoc/head[1]/its:rules[1]/its:withinTextRule[1]/@withinText translate="no"
+/myMetaDoc/body[1] translate="yes"
+/myMetaDoc/body[1]/par[1] translate="yes"
+/myMetaDoc/body[1]/par[1]/img[1] translate="yes"
+/myMetaDoc/body[1]/par[1]/img[1]/@alt translate="yes"
+/myMetaDoc/body[1]/par[1]/img[1]/@src translate="no"
+/myMetaDoc/body[1]/par[2] translate="yes"
+/myMetaDoc/body[1]/par[2]/@id translate="no"
+/myMetaDoc/body[1]/par[2]/@title translate="yes"
+/myMetaDoc/body[1]/par[2]/verbatim[1] translate="no"
+/myMetaDoc/body[1]/par[2]/verbatim[1]/img[1] translate="no"
+/myMetaDoc/body[1]/par[2]/verbatim[1]/img[1]/@alt translate="no"
+/myMetaDoc/body[1]/par[2]/verbatim[1]/img[1]/@src translate="no"
+/myMetaDoc/body[1]/insert[1] translate="yes"
+/myMetaDoc/body[1]/insert[1]/z:书籍[1] translate="yes"
+/myMetaDoc/body[1]/insert[1]/z:书籍[1]/z:封面[1] translate="yes"
+/myMetaDoc/body[1]/insert[1]/z:书籍[1]/z:封面[1]/z:汇集[1] translate="yes"
+/myMetaDoc/body[1]/insert[1]/z:书籍[1]/z:封面[1]/z:标题[1] translate="yes"
+/myMetaDoc/body[1]/insert[1]/z:书籍[1]/z:封面[1]/z:作者[1] translate="no"
+/myMetaDoc/body[1]/insert[1]/z:书籍[1]/z:章节[1] translate="yes"
+/myMetaDoc/body[1]/insert[1]/z:书籍[1]/z:章节[1]/@数 translate="no"
+/myMetaDoc/body[1]/insert[1]/z:书籍[1]/z:章节[1]/z:头注[1] translate="yes"
+/myMetaDoc/body[1]/insert[1]/z:书籍[1]/z:章节[1]/z:段落识别[1] translate="yes"
+/myMetaDoc/body[1]/insert[1]/z:书籍[1]/z:章节[1]/z:段落识别[1]/@id translate="no"
+/myMetaDoc/body[1]/insert[1]/z:书籍[1]/z:章节[1]/z:段落识别[1]/z:姓名[1] translate="no"
+/myMetaDoc/body[1]/insert[1]/z:书籍[1]/z:章节[1]/z:段落识别[1]/z:姓名[2] translate="no"
+/myMetaDoc/body[1]/insert[1]/z:书籍[1]/z:躯[1] translate="yes"
+/myMetaDoc/body[1]/insert[1]/z:书籍[1]/z:躯[1]/i:rules[1] translate="yes"
+/myMetaDoc/body[1]/insert[1]/z:书籍[1]/z:躯[1]/i:rules[1]/@version translate="no"
+/myMetaDoc/body[1]/insert[1]/z:书籍[1]/z:躯[1]/i:rules[1]/i:translateRule[1] translate="yes"
+/myMetaDoc/body[1]/insert[1]/z:书籍[1]/z:躯[1]/i:rules[1]/i:translateRule[1]/@selector translate="no"
+/myMetaDoc/body[1]/insert[1]/z:书籍[1]/z:躯[1]/i:rules[1]/i:translateRule[1]/@translate translate="no"
+/myMetaDoc/body[1]/insert[1]/z:书籍[1]/z:躯[1]/i:rules[1]/i:translateRule[2] translate="yes"
+/myMetaDoc/body[1]/insert[1]/z:书籍[1]/z:躯[1]/i:rules[1]/i:translateRule[2]/@selector translate="no"
+/myMetaDoc/body[1]/insert[1]/z:书籍[1]/z:躯[1]/i:rules[1]/i:translateRule[2]/@translate translate="no"
+/myMetaDoc/body[1]/insert[1]/z:书籍[1]/z:躯[1]/i:rules[1]/i:withinTextRule[1] translate="yes"
+/myMetaDoc/body[1]/insert[1]/z:书籍[1]/z:躯[1]/i:rules[1]/i:withinTextRule[1]/@selector translate="no"
+/myMetaDoc/body[1]/insert[1]/z:书籍[1]/z:躯[1]/i:rules[1]/i:withinTextRule[1]/@withinText translate="no"
diff --git a/tests/ITS-2.0-Testsuite/expected/translate/xml/translate2xmloutput.txt b/tests/ITS-2.0-Testsuite/expected/translate/xml/translate2xmloutput.txt
new file mode 100644
index 0000000..a11576f
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/translate/xml/translate2xmloutput.txt
@@ -0,0 +1,11 @@
+/myDoc translate="yes"
+/myDoc/head[1] translate="yes"
+/myDoc/head[1]/its:rules[1] translate="yes"
+/myDoc/head[1]/its:rules[1]/@version translate="no"
+/myDoc/head[1]/its:rules[1]/@xlink:href translate="no"
+/myDoc/head[1]/its:rules[1]/@xlink:type translate="no"
+/myDoc/body[1] translate="yes"
+/myDoc/body[1]/par[1] translate="yes"
+/myDoc/body[1]/par[1]/@id translate="no"
+/myDoc/body[1]/par[1]/@title translate="yes"
+/myDoc/body[1]/par[1]/code[1] translate="no"
diff --git a/tests/ITS-2.0-Testsuite/expected/translate/xml/translate3xmloutput.txt b/tests/ITS-2.0-Testsuite/expected/translate/xml/translate3xmloutput.txt
new file mode 100644
index 0000000..6755ec8
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/translate/xml/translate3xmloutput.txt
@@ -0,0 +1,17 @@
+/myDoc translate="yes"
+/myDoc/head[1] translate="no"
+/myDoc/head[1]/its:rules[1] translate="no"
+/myDoc/head[1]/its:rules[1]/@version translate="no"
+/myDoc/head[1]/its:rules[1]/@xlink:href translate="no"
+/myDoc/head[1]/its:rules[1]/@xlink:type translate="no"
+/myDoc/head[1]/its:rules[1]/its:translateRule[1] translate="no"
+/myDoc/head[1]/its:rules[1]/its:translateRule[1]/@selector translate="no"
+/myDoc/head[1]/its:rules[1]/its:translateRule[1]/@translate translate="no"
+/myDoc/body[1] translate="yes"
+/myDoc/body[1]/par[1] translate="yes"
+/myDoc/body[1]/par[1]/@id translate="no"
+/myDoc/body[1]/par[1]/@title translate="yes"
+/myDoc/body[1]/par[1]/code[1] translate="no"
+/myDoc/body[1]/par[2] translate="yes"
+/myDoc/body[1]/par[2]/@id translate="no"
+/myDoc/body[1]/par[2]/@title translate="no"
diff --git a/tests/ITS-2.0-Testsuite/expected/translate/xml/translate4xmloutput.txt b/tests/ITS-2.0-Testsuite/expected/translate/xml/translate4xmloutput.txt
new file mode 100644
index 0000000..99b3b9a
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/translate/xml/translate4xmloutput.txt
@@ -0,0 +1,15 @@
+/book translate="yes"
+/book/@its:version translate="no"
+/book/head[1] translate="yes"
+/book/head[1]/title[1] translate="yes"
+/book/body[1] translate="yes"
+/book/body[1]/img[1] translate="yes"
+/book/body[1]/img[1]/@alt translate="no"
+/book/body[1]/img[1]/@height translate="no"
+/book/body[1]/img[1]/@src translate="no"
+/book/body[1]/img[1]/@width translate="no"
+/book/body[1]/p[1] translate="yes"
+/book/body[1]/p[1]/fexp[1] translate="no"
+/book/body[1]/p[1]/fexp[1]/@its:translate translate="no"
+/book/body[1]/p[1]/fexp[2] translate="no"
+/book/body[1]/p[1]/fexp[2]/@its:translate translate="no"
diff --git a/tests/ITS-2.0-Testsuite/expected/translate/xml/translate5xmloutput.txt b/tests/ITS-2.0-Testsuite/expected/translate/xml/translate5xmloutput.txt
new file mode 100644
index 0000000..8c92f46
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/translate/xml/translate5xmloutput.txt
@@ -0,0 +1,11 @@
+/book translate="yes"
+/book/@its:version translate="no"
+/book/@xsi:noNamespaceSchemaLocation translate="no"
+/book/head[1] translate="yes"
+/book/head[1]/title[1] translate="yes"
+/book/body[1] translate="yes"
+/book/body[1]/p[1] translate="yes"
+/book/body[1]/p[1]/its:span[1] translate="no"
+/book/body[1]/p[1]/its:span[1]/@translate translate="no"
+/book/body[1]/p[1]/its:span[2] translate="no"
+/book/body[1]/p[1]/its:span[2]/@translate translate="no"
diff --git a/tests/ITS-2.0-Testsuite/expected/translate/xml/translate6xmloutput.txt b/tests/ITS-2.0-Testsuite/expected/translate/xml/translate6xmloutput.txt
new file mode 100644
index 0000000..4ae42e5
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/translate/xml/translate6xmloutput.txt
@@ -0,0 +1,22 @@
+/doc translate="no"
+/doc/@its:version translate="no"
+/doc/head[1] translate="no"
+/doc/head[1]/its:rules[1] translate="no"
+/doc/head[1]/its:rules[1]/@version translate="no"
+/doc/head[1]/its:rules[1]/its:translateRule[1] translate="no"
+/doc/head[1]/its:rules[1]/its:translateRule[1]/@selector translate="no"
+/doc/head[1]/its:rules[1]/its:translateRule[1]/@translate translate="no"
+/doc/head[1]/its:rules[1]/its:translateRule[2] translate="no"
+/doc/head[1]/its:rules[1]/its:translateRule[2]/@selector translate="no"
+/doc/head[1]/its:rules[1]/its:translateRule[2]/@translate translate="no"
+/doc/info[1] translate="no"
+/doc/info[1]/item[1] translate="yes"
+/doc/info[1]/item[1]/@its:translate translate="no"
+/doc/info[1]/item[1]/@type translate="no"
+/doc/info[1]/item[1]/b[1] translate="no"
+/doc/info[1]/item[2] translate="no"
+/doc/info[1]/item[2]/@type translate="no"
+/doc/content[1] translate="no"
+/doc/content[1]/p[1] translate="yes"
+/doc/content[1]/p[1]/span[1] translate="no"
+/doc/content[1]/p[1]/span[2] translate="no"
diff --git a/tests/ITS-2.0-Testsuite/expected/translate/xml/translate7xmloutput.txt b/tests/ITS-2.0-Testsuite/expected/translate/xml/translate7xmloutput.txt
new file mode 100644
index 0000000..8361cd3
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/translate/xml/translate7xmloutput.txt
@@ -0,0 +1,22 @@
+/doc translate="no"
+/doc/@its:version translate="no"
+/doc/head[1] translate="no"
+/doc/head[1]/its:rules[1] translate="no"
+/doc/head[1]/its:rules[1]/@version translate="no"
+/doc/head[1]/its:rules[1]/its:translateRule[1] translate="no"
+/doc/head[1]/its:rules[1]/its:translateRule[1]/@selector translate="no"
+/doc/head[1]/its:rules[1]/its:translateRule[1]/@translate translate="no"
+/doc/head[1]/its:rules[1]/its:translateRule[2] translate="no"
+/doc/head[1]/its:rules[1]/its:translateRule[2]/@selector translate="no"
+/doc/head[1]/its:rules[1]/its:translateRule[2]/@translate translate="no"
+/doc/info[1] translate="no"
+/doc/info[1]/item[1] translate="yes"
+/doc/info[1]/item[1]/@its:translate translate="no"
+/doc/info[1]/item[1]/@type translate="no"
+/doc/info[1]/item[1]/b[1] translate="yes"
+/doc/info[1]/item[2] translate="no"
+/doc/info[1]/item[2]/@type translate="no"
+/doc/content[1] translate="no"
+/doc/content[1]/p[1] translate="yes"
+/doc/content[1]/p[1]/span[1] translate="yes"
+/doc/content[1]/p[1]/span[2] translate="yes"
diff --git a/tests/ITS-2.0-Testsuite/expected/translate/xml/translate8xmloutput.txt b/tests/ITS-2.0-Testsuite/expected/translate/xml/translate8xmloutput.txt
new file mode 100644
index 0000000..68c3737
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/translate/xml/translate8xmloutput.txt
@@ -0,0 +1,28 @@
+/topic translate="no"
+/topic/@id translate="no"
+/topic/title[1] translate="no"
+/topic/prolog[1] translate="no"
+/topic/prolog[1]/its:rules[1] translate="no"
+/topic/prolog[1]/its:rules[1]/@version translate="no"
+/topic/prolog[1]/its:rules[1]/its:translateRule[1] translate="no"
+/topic/prolog[1]/its:rules[1]/its:translateRule[1]/@selector translate="no"
+/topic/prolog[1]/its:rules[1]/its:translateRule[1]/@translate translate="no"
+/topic/prolog[1]/its:rules[1]/its:translateRule[2] translate="no"
+/topic/prolog[1]/its:rules[1]/its:translateRule[2]/@selector translate="no"
+/topic/prolog[1]/its:rules[1]/its:translateRule[2]/@translate translate="no"
+/topic/body[1] translate="no"
+/topic/body[1]/dl[1] translate="no"
+/topic/body[1]/dl[1]/dlentry[1] translate="no"
+/topic/body[1]/dl[1]/dlentry[1]/@id translate="no"
+/topic/body[1]/dl[1]/dlentry[1]/dt[1] translate="no"
+/topic/body[1]/dl[1]/dlentry[1]/dd[1] translate="no"
+/topic/body[1]/dl[1]/dlentry[1]/dd[1]/term[1] translate="no"
+/topic/body[1]/p[1] translate="yes"
+/topic/body[1]/ul[1] translate="no"
+/topic/body[1]/ul[1]/li[1] translate="no"
+/topic/body[1]/ul[1]/li[2] translate="no"
+/topic/body[1]/ul[1]/li[3] translate="no"
+/topic/body[1]/ul[1]/li[4] translate="no"
+/topic/body[1]/p[2] translate="yes"
+/topic/body[1]/p[2]/ph[1] translate="no"
+/topic/body[1]/p[2]/ph[1]/@xml:lang translate="no"
diff --git a/tests/ITS-2.0-Testsuite/expected/translate/xml/translate9xmloutput.txt b/tests/ITS-2.0-Testsuite/expected/translate/xml/translate9xmloutput.txt
new file mode 100644
index 0000000..760822e
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/expected/translate/xml/translate9xmloutput.txt
@@ -0,0 +1,23 @@
+/doc translate="no"
+/doc/its:rules[1] translate="no"
+/doc/its:rules[1]/@version translate="no"
+/doc/its:rules[1]/its:param[1] translate="no"
+/doc/its:rules[1]/its:param[1]/@name translate="no"
+/doc/its:rules[1]/its:translateRule[1] translate="no"
+/doc/its:rules[1]/its:translateRule[1]/@selector translate="no"
+/doc/its:rules[1]/its:translateRule[1]/@translate translate="no"
+/doc/its:rules[1]/its:translateRule[2] translate="no"
+/doc/its:rules[1]/its:translateRule[2]/@selector translate="no"
+/doc/its:rules[1]/its:translateRule[2]/@translate translate="no"
+/doc/msg[1] translate="yes"
+/doc/msg[1]/@lcid translate="no"
+/doc/msg[1]/@num translate="no"
+/doc/msg[2] translate="no"
+/doc/msg[2]/@lcid translate="no"
+/doc/msg[2]/@num translate="no"
+/doc/msg[3] translate="no"
+/doc/msg[3]/@lcid translate="no"
+/doc/msg[3]/@num translate="no"
+/doc/msg[4] translate="no"
+/doc/msg[4]/@lcid translate="no"
+/doc/msg[4]/@num translate="no"
diff --git a/tests/ITS-2.0-Testsuite/inputdata/elementswithintext/html/withintext1html.html b/tests/ITS-2.0-Testsuite/inputdata/elementswithintext/html/withintext1html.html
new file mode 100644
index 0000000..3becf81
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/elementswithintext/html/withintext1html.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+ <html>
+ <head>
+ <meta charset=utf-8>
+ <link href="withintext1htmlrules.xml" rel="its-rules"/>
+ <title>Appaloosa</title>
+ </head>
+ <body>
+ <section itemscope>
+ <span itemprop="keyword">horse</span>
+ <span itemprop="keyword">appaloosa</span>
+ </section>
+ <p itemscope>
+ The Appaloosa
+ <cite>
+ The name comes from "Palouse horse" in reference to the Palouse River in Northern Idaho.
+ </cite>
+ are rugged horses originally breed by the
+ <span itemprop="keyword">Nez-Perce</span>
+ tribe in the US Northwest.
+ </p>
+ <p>
+ They are often characterized by their spotted coats, as shown here:
+ <img src="appaloosa.png" alt="Appaloosa horses"/>
+ </p>
+<!--footer-->
+ <p>
+ Copyright:
+ <em>Zebulon Inc.</em>
+ </p>
+ </body>
+ </html>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/elementswithintext/html/withintext1htmlrules.xml b/tests/ITS-2.0-Testsuite/inputdata/elementswithintext/html/withintext1htmlrules.xml
new file mode 100644
index 0000000..5d49bbc
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/elementswithintext/html/withintext1htmlrules.xml
@@ -0,0 +1,4 @@
+<its:rules xmlns:its="http://www.w3.org/2005/11/its" xmlns:h="http://www.w3.org/1999/xhtml" version="2.0">
+<its:withinTextRule selector="//h:cite" withinText="nested"/>
+</its:rules>
+
diff --git a/tests/ITS-2.0-Testsuite/inputdata/elementswithintext/html/withintext2html.html b/tests/ITS-2.0-Testsuite/inputdata/elementswithintext/html/withintext2html.html
new file mode 100644
index 0000000..ed7e060
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/elementswithintext/html/withintext2html.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset=utf-8>
+ <title>Within text test: Default</title>
+ </head>
+ <body>
+ <p>Text with <span its-within-text="YES">bold</span>.</p>
+ </body>
+</html>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/elementswithintext/html/withintext3html.html b/tests/ITS-2.0-Testsuite/inputdata/elementswithintext/html/withintext3html.html
new file mode 100644
index 0000000..6a68ae8
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/elementswithintext/html/withintext3html.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+ <html>
+ <head>
+ <meta charset=utf-8>
+ <link href="withintext3htmlrules.xml" rel="its-rules"/>
+ <title>Appaloosa</title>
+ </head>
+ <body>
+ <section itemscope>
+ <span itemprop="firstkeyword">horse</span>
+ <span itemprop="secondkeyword">appaloosa</span>
+ </section>
+ <p itemscope>
+ The Appaloosa
+ <cite>
+ The name comes from "Palouse horse" in reference to the Palouse River in Northern Idaho.
+ </cite>
+ are rugged horses originally breed by the
+ <span itemprop="keyword">Nez-Perce</span>
+ tribe in the US Northwest.
+ </p>
+ <p>
+ They are often characterized by their spotted coats, as shown here:
+ <img src="appaloosa.png" alt="Appaloosa horses"/>
+ </p>
+<!--footer-->
+ <p>
+ Copyright:
+ <em>Zebulon Inc.</em>
+ </p>
+ </body>
+ </html>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/elementswithintext/html/withintext3htmlrules.xml b/tests/ITS-2.0-Testsuite/inputdata/elementswithintext/html/withintext3htmlrules.xml
new file mode 100644
index 0000000..127dea6
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/elementswithintext/html/withintext3htmlrules.xml
@@ -0,0 +1,5 @@
+<its:rules xmlns:its="http://www.w3.org/2005/11/its" xmlns:h="http://www.w3.org/1999/xhtml" version="2.0">
+<its:param name="withinTextParam">firstkeyword</its:param>
+<its:withinTextRule selector="//h:cite" withinText="nested"/>
+<its:withinTextRule selector="//h:section/h:span[@itemprop=$withinTextParam]" withinText="no"/>
+</its:rules>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/elementswithintext/html/withintext4html.html b/tests/ITS-2.0-Testsuite/inputdata/elementswithintext/html/withintext4html.html
new file mode 100644
index 0000000..a89eefb
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/elementswithintext/html/withintext4html.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+ <html>
+ <head>
+<script type="application/its+xml">
+<its:rules xmlns:its="http://www.w3.org/2005/11/its" xmlns:h="http://www.w3.org/1999/xhtml" version="2.0">
+<its:param name="withinparam">copyright</its:param>
+<its:withinTextRule selector="//h:cite" withinText="nested"/>
+<its:withinTextRule selector="//h:p[@id=$withinparam]" withinText="yes"/>
+</its:rules>
+</script>
+ <meta charset=utf-8>
+ <title>Appaloosa</title>
+ </head>
+ <body>
+ <section itemscope>
+ <span itemprop="keyword">horse</span>
+ <span itemprop="keyword">appaloosa</span>
+ </section>
+ <p itemscope>
+ The Appaloosa
+ <cite>
+ The name comes from "Palouse horse" in reference to the Palouse River in Northern Idaho.
+ </cite>
+ are rugged horses originally breed by the
+ <span itemprop="keyword">Nez-Perce</span>
+ tribe in the US Northwest.
+ </p>
+ <p>
+ They are often characterized by their spotted coats, as shown here:
+ <img src="appaloosa.png" alt="Appaloosa horses"/>
+ </p>
+<!--footer-->
+ <p id="copyright">
+ Copyright:
+ <em>Zebulon Inc.</em>
+ </p>
+ </body>
+ </html>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/elementswithintext/xml/withintext1xml.xml b/tests/ITS-2.0-Testsuite/inputdata/elementswithintext/xml/withintext1xml.xml
new file mode 100644
index 0000000..c4a44fc
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/elementswithintext/xml/withintext1xml.xml
@@ -0,0 +1,12 @@
+<doc>
+ <head>
+ <its:rules version="2.0" xmlns:its="http://www.w3.org/2005/11/its">
+ <its:withinTextRule withinText="yes" selector="//b|//u|//i"/>
+ <its:withinTextRule withinText="nested" selector="//fn"/>
+ </its:rules>
+ </head>
+ <body>
+ <p>This is a paragraph with <b>bold</b>, <i>italic</i>, and <u>underlined</u>.</p>
+ <p>This is a paragraph with a footnote<fn>This is the text of the footnote</fn> at the middle.</p>
+ </body>
+ </doc>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/elementswithintext/xml/withintext2xml.xml b/tests/ITS-2.0-Testsuite/inputdata/elementswithintext/xml/withintext2xml.xml
new file mode 100644
index 0000000..c0d0810
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/elementswithintext/xml/withintext2xml.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<myDocument xmlns="http://my.DocumentURI/" xml:lang="en">
+ <prolog>
+<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="2.0"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="withintext2xmlrules.xml"
+ xmlns:d="http://my.DocumentURI/">
+ <its:withinTextRule selector="//d:keywords/d:kw" withinText="no"/>
+</its:rules>
+ <author>Zebulon Fairfield</author>
+ <version>version 12, revision 2 - 2006-08-14</version>
+ <keywords><kw>horse</kw><kw>appaloosa</kw></keywords>
+ <storageKey>articles-6D272BA9-3B89CAD8</storageKey>
+ </prolog>
+ <content>
+ <section>
+ <title>Appaloosa</title>
+ <p>The Appaloosa<fnote>The name comes from "Palouse horse" in reference
+ to the Palouse River in Northern Idaho.</fnote> are rugged horses
+ originally breed by the <kw>Nez-Perce</kw> tribe in the US Northwest.</p>
+ <p>They are often characterized by their spotted coats, as shown
+ here: <img src="appaloosa.png" alt="Appaloosa horses"/></p>
+ </section>
+ <footer><p>Copyright: <em>Zebulon Inc.</em></p></footer>
+ </content>
+</myDocument>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/elementswithintext/xml/withintext2xmlrules.xml b/tests/ITS-2.0-Testsuite/inputdata/elementswithintext/xml/withintext2xmlrules.xml
new file mode 100644
index 0000000..539af5b
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/elementswithintext/xml/withintext2xmlrules.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="2.0"
+ xmlns:d="http://my.DocumentURI/">
+ <its:withinTextRule selector="//d:kw|//d:img|//d:em" withinText="yes"/>
+ <its:withinTextRule selector="//d:fnote" withinText="nested"/>
+</its:rules>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/elementswithintext/xml/withintext3xml.xml b/tests/ITS-2.0-Testsuite/inputdata/elementswithintext/xml/withintext3xml.xml
new file mode 100644
index 0000000..66debdc
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/elementswithintext/xml/withintext3xml.xml
@@ -0,0 +1,11 @@
+<text xmlns:its="http://www.w3.org/2005/11/its" its:version="2.0">
+ <prolog>
+ <title its:withinText="no">Designing User Interfaces</title>
+ <author its:withinText="no">Janice Prakash</author>
+ <keywords its:withinText="no">user interface, ui, software interface</keywords>
+ </prolog>
+ <body>
+ <p>The book <title its:withinText="yes">Of Mice and Screens</title> by <author its:withinText="yes">Aldus
+ Brandywine</author> is one of the best introductions to the vast topic of designing user interfaces.</p>
+ </body>
+</text>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/elementswithintext/xml/withintext4xml.xml b/tests/ITS-2.0-Testsuite/inputdata/elementswithintext/xml/withintext4xml.xml
new file mode 100644
index 0000000..1a4b372
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/elementswithintext/xml/withintext4xml.xml
@@ -0,0 +1,12 @@
+<text xmlns:its="http://www.w3.org/2005/11/its" its:version="2.0">
+ <prolog>
+ <its:span withinText="no">Designing User Interfaces</its:span>
+ <its:span withinText="no">Janice Prakash</its:span>
+ <its:span withinText="no">user interface, ui, software interface</its:span>
+ </prolog>
+ <body>
+ <p>The book <its:span withinText="yes">Of Mice and Screens</its:span> by <its:span withinText="yes">Aldus
+ Brandywine</its:span> is one of the best introductions to the vast topic of designing user interfaces.</p>
+ </body>
+</text>
+
diff --git a/tests/ITS-2.0-Testsuite/inputdata/elementswithintext/xml/withintext5xml.xml b/tests/ITS-2.0-Testsuite/inputdata/elementswithintext/xml/withintext5xml.xml
new file mode 100644
index 0000000..37db106
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/elementswithintext/xml/withintext5xml.xml
@@ -0,0 +1,25 @@
+<doc>
+<head>
+<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="2.0">
+<its:param name="withinTextParam">footnote</its:param>
+<its:withinTextRule withinText="yes" selector="//b|//u|//i"/>
+<its:withinTextRule withinText="nested" selector="//fn[@id=$withinTextParam]"/>
+</its:rules>
+</head>
+<body>
+<p>
+This is a paragraph with
+<b>bold</b>
+,
+<i>italic</i>
+, and
+<u>underlined</u>
+.
+</p>
+<p>
+This is a paragraph with a footnote
+<fn id="footnote">This is the text of the footnote</fn>
+at the middle.
+</p>
+</body>
+</doc>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/elementswithintext/xml/withintext6xml.xml b/tests/ITS-2.0-Testsuite/inputdata/elementswithintext/xml/withintext6xml.xml
new file mode 100644
index 0000000..b96c3e9
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/elementswithintext/xml/withintext6xml.xml
@@ -0,0 +1,21 @@
+<doc>
+<head>
+<its:rules xmlns:its="http://www.w3.org/2005/11/its" xmlns:xlink="http://www.w3.org/1999/xlink" version="2.0" xlink:href="withintext6xmlrules.xml"/>
+</head>
+<body>
+<p>
+This is a paragraph with
+<b>bold</b>
+,
+<i>italic</i>
+, and
+<u>underlined</u>
+.
+</p>
+<p>
+This is a paragraph with a footnote
+<fn id="footnote">This is the text of the footnote</fn>
+at the middle.
+</p>
+</body>
+</doc>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/elementswithintext/xml/withintext6xmlrules.xml b/tests/ITS-2.0-Testsuite/inputdata/elementswithintext/xml/withintext6xmlrules.xml
new file mode 100644
index 0000000..6f41dd0
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/elementswithintext/xml/withintext6xmlrules.xml
@@ -0,0 +1,5 @@
+<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="2.0">
+<its:param name="withinTextParam">footnote</its:param>
+<its:withinTextRule withinText="yes" selector="//b|//u|//i"/>
+<its:withinTextRule withinText="nested" selector="//fn[@id=$withinTextParam]"/>
+</its:rules>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/externalresource/html/externalresource1html.html b/tests/ITS-2.0-Testsuite/inputdata/externalresource/html/externalresource1html.html
new file mode 100644
index 0000000..2b03a25
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/externalresource/html/externalresource1html.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html lang=en>
+ <head>
+ <meta charset=utf-8>
+ <link href="externalresource1htmlrules.xml" rel="its-rules"/>
+ <title>Video element example</title>
+ </head>
+ <body>
+ <video
+ width="640"
+ height="360"
+ src="http://www.example.com/video/v2.mp"
+ poster="video-image.png">If your browser doesn't support the <code>video</code> element, you can <a href="http://www.example.com/video/v2.mp">download the video</a> instead.</video>
+ </body>
+</html>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/externalresource/html/externalresource1htmlrules.xml b/tests/ITS-2.0-Testsuite/inputdata/externalresource/html/externalresource1htmlrules.xml
new file mode 100644
index 0000000..21608ed
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/externalresource/html/externalresource1htmlrules.xml
@@ -0,0 +1,4 @@
+<its:rules xmlns:its="http://www.w3.org/2005/11/its" xmlns:h="http://www.w3.org/1999/xhtml" version="2.0">
+ <its:externalResourceRefRule selector="//h:video/@src" externalResourceRefPointer="."/>
+ <its:externalResourceRefRule selector="//h:video/@poster" externalResourceRefPointer="."/>
+</its:rules>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/externalresource/html/externalresource2html.html b/tests/ITS-2.0-Testsuite/inputdata/externalresource/html/externalresource2html.html
new file mode 100644
index 0000000..17e7983
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/externalresource/html/externalresource2html.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html lang=en>
+ <head>
+ <meta charset=utf-8>
+ <link href="externalresource2htmlrules.xml" rel="its-rules"/>
+ <title>Video element example</title>
+ </head>
+ <body>
+ <p id='1'>
+ <video
+ width="640"
+ height="360"
+ src="http://www.example.com/video/v2.mp3"
+ poster="video-image.png">If your browser doesn't support the <code>video</code> element, you can <a href="http://www.example.com/video/v2.mp3">download the video</a> instead.</video>
+ </p>
+ </body>
+</html>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/externalresource/html/externalresource2htmlrules.xml b/tests/ITS-2.0-Testsuite/inputdata/externalresource/html/externalresource2htmlrules.xml
new file mode 100644
index 0000000..34c66b5
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/externalresource/html/externalresource2htmlrules.xml
@@ -0,0 +1,4 @@
+<its:rules xmlns:its="http://www.w3.org/2005/11/its" xmlns:h="http://www.w3.org/1999/xhtml" version="2.0">
+ <its:param name="externalresourceParam">1</its:param>
+ <its:externalResourceRefRule selector="//h:p[@id=$externalresourceParam]/h:video" externalResourceRefPointer="@poster"/>
+</its:rules>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/externalresource/html/externalresource3html.html b/tests/ITS-2.0-Testsuite/inputdata/externalresource/html/externalresource3html.html
new file mode 100644
index 0000000..98c13a1
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/externalresource/html/externalresource3html.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html lang=en>
+ <head>
+ <script type="application/its+xml">
+ <its:rules xmlns:its="http://www.w3.org/2005/11/its" xmlns:h="http://www.w3.org/1999/xhtml" version="2.0">
+ <its:param name="externalresourceParam">video-image.png</its:param>
+ <its:externalResourceRefRule selector="//h:video[@poster=$externalresourceParam]" externalResourceRefPointer="@src"/>
+ </its:rules>
+ </script>
+ <meta charset=utf-8>
+ <title>Video element example</title>
+ </head>
+ <body>
+ <video
+ width="640"
+ height="360"
+ src="http://www.example.com/video/v2.mp"
+ poster="video-image.png">If your browser doesn't support the <code>video</code> element, you can <a href="http://www.example.com/video/v2.mp">download the video</a> instead.</video>
+ </body>
+</html>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/externalresource/xml/externalresource1xml.xml b/tests/ITS-2.0-Testsuite/inputdata/externalresource/xml/externalresource1xml.xml
new file mode 100644
index 0000000..51b640e
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/externalresource/xml/externalresource1xml.xml
@@ -0,0 +1,24 @@
+<doc
+ xmlns:its="http://www.w3.org/2005/11/its"
+ xmlns:dbk="http://docbook.org/ns/docbook" >
+ <its:rules version="2.0">
+ <its:externalResourceRefRule selector="//dbk:imagedata | //dbk:audiodata | //dbk:videodata" externalResourceRefPointer="@fileref"/>
+ </its:rules>
+ <dbk:mediaobject>
+ <dbk:videoobject>
+ <dbk:videodata fileref="movie.avi"/>
+ </dbk:videoobject>
+ <dbk:imageobject>
+ <dbk:imagedata fileref="movie-frame.gif"/>
+ </dbk:imageobject>
+ <dbk:textobject>
+ <dbk:para>This video illustrates the proper way to assemble an inverting time distortion
+ device. </dbk:para>
+ <dbk:warning>
+ <dbk:para> It is imperative that the primary and secondary temporal couplings not be
+ mounted in the wrong order. Temporal catastrophe is the likely result. The
+ future you destroy may be your own. </dbk:para>
+ </dbk:warning>
+ </dbk:textobject>
+ </dbk:mediaobject>
+</doc>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/externalresource/xml/externalresource2xml.xml b/tests/ITS-2.0-Testsuite/inputdata/externalresource/xml/externalresource2xml.xml
new file mode 100644
index 0000000..818766d
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/externalresource/xml/externalresource2xml.xml
@@ -0,0 +1,22 @@
+<doc
+ xmlns:its="http://www.w3.org/2005/11/its"
+ xmlns:dbk="http://docbook.org/ns/docbook" >
+ <its:rules xmlns:its="http://www.w3.org/2005/11/its" xmlns:xlink="http://www.w3.org/1999/xlink" version="2.0" xlink:href="externalresource2xmlrules.xml"/>
+ <dbk:mediaobject>
+ <dbk:videoobject>
+ <dbk:videodata fileref="movie.avi"/>
+ </dbk:videoobject>
+ <dbk:imageobject>
+ <dbk:imagedata fileref="movie-frame.gif"/>
+ </dbk:imageobject>
+ <dbk:textobject>
+ <dbk:para>This video illustrates the proper way to assemble an inverting time distortion
+ device. </dbk:para>
+ <dbk:warning>
+ <dbk:para> It is imperative that the primary and secondary temporal couplings not be
+ mounted in the wrong order. Temporal catastrophe is the likely result. The
+ future you destroy may be your own. </dbk:para>
+ </dbk:warning>
+ </dbk:textobject>
+ </dbk:mediaobject>
+</doc>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/externalresource/xml/externalresource2xmlrules.xml b/tests/ITS-2.0-Testsuite/inputdata/externalresource/xml/externalresource2xmlrules.xml
new file mode 100644
index 0000000..718135f
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/externalresource/xml/externalresource2xmlrules.xml
@@ -0,0 +1,3 @@
+<its:rules xmlns:its="http://www.w3.org/2005/11/its" xmlns:dbk="http://docbook.org/ns/docbook" version="2.0">
+ <its:externalResourceRefRule selector="//dbk:imagedata | //dbk:audiodata | //dbk:videodata" externalResourceRefPointer="@fileref"/>
+ </its:rules>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/externalresource/xml/externalresource3xml.xml b/tests/ITS-2.0-Testsuite/inputdata/externalresource/xml/externalresource3xml.xml
new file mode 100644
index 0000000..0528bb9
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/externalresource/xml/externalresource3xml.xml
@@ -0,0 +1,28 @@
+<doc
+ xmlns:its="http://www.w3.org/2005/11/its"
+ xmlns:dbk="http://docbook.org/ns/docbook" >
+ <its:rules xmlns:its="http://www.w3.org/2005/11/its" xmlns:xlink="http://www.w3.org/1999/xlink" version="2.0" xlink:href="externalresource3xmlrules.xml"/>
+ <its:rules xmlns:its="http://www.w3.org/2005/11/its" xmlns:dbk="http://docbook.org/ns/docbook" version="2.0">
+ <its:externalResourceRefRule selector="//dbk:audiodata" externalResourceRefPointer="@fileref"/>
+ </its:rules>
+ <dbk:mediaobject>
+ <dbk:videoobject>
+ <dbk:videodata fileref="movie.avi"/>
+ </dbk:videoobject>
+ <dbk:audioobject>
+ <dbk:audiodata fileref="movie.mp3"/>
+ </dbk:audioobject>
+ <dbk:imageobject>
+ <dbk:imagedata fileref="movie-frame.gif"/>
+ </dbk:imageobject>
+ <dbk:textobject>
+ <dbk:para>This video illustrates the proper way to assemble an inverting time distortion
+ device. </dbk:para>
+ <dbk:warning>
+ <dbk:para> It is imperative that the primary and secondary temporal couplings not be
+ mounted in the wrong order. Temporal catastrophe is the likely result. The
+ future you destroy may be your own. </dbk:para>
+ </dbk:warning>
+ </dbk:textobject>
+ </dbk:mediaobject>
+</doc>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/externalresource/xml/externalresource3xmlrules.xml b/tests/ITS-2.0-Testsuite/inputdata/externalresource/xml/externalresource3xmlrules.xml
new file mode 100644
index 0000000..383781c
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/externalresource/xml/externalresource3xmlrules.xml
@@ -0,0 +1,3 @@
+<its:rules xmlns:its="http://www.w3.org/2005/11/its" xmlns:dbk="http://docbook.org/ns/docbook" version="2.0">
+ <its:externalResourceRefRule selector="//dbk:imagedata | //dbk:videodata" externalResourceRefPointer="@fileref"/>
+ </its:rules>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/externalresource/xml/externalresource4xml.xml b/tests/ITS-2.0-Testsuite/inputdata/externalresource/xml/externalresource4xml.xml
new file mode 100644
index 0000000..76df2cc
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/externalresource/xml/externalresource4xml.xml
@@ -0,0 +1,25 @@
+<doc
+ xmlns:its="http://www.w3.org/2005/11/its"
+ xmlns:dbk="http://docbook.org/ns/docbook" >
+ <its:rules version="2.0">
+ <its:param name="externalResourceParam">movie-frame.gif</its:param>
+ <its:externalResourceRefRule selector="//dbk:imagedata[@fileref=$externalResourceParam]" externalResourceRefPointer="@fileref"/>
+ </its:rules>
+ <dbk:mediaobject>
+ <dbk:videoobject>
+ <dbk:videodata fileref="movie.avi"/>
+ </dbk:videoobject>
+ <dbk:imageobject>
+ <dbk:imagedata fileref="movie-frame.gif"/>
+ </dbk:imageobject>
+ <dbk:textobject>
+ <dbk:para>This video illustrates the proper way to assemble an inverting time distortion
+ device. </dbk:para>
+ <dbk:warning>
+ <dbk:para> It is imperative that the primary and secondary temporal couplings not be
+ mounted in the wrong order. Temporal catastrophe is the likely result. The
+ future you destroy may be your own. </dbk:para>
+ </dbk:warning>
+ </dbk:textobject>
+ </dbk:mediaobject>
+</doc>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/externalresource/xml/externalresource5xml.xml b/tests/ITS-2.0-Testsuite/inputdata/externalresource/xml/externalresource5xml.xml
new file mode 100644
index 0000000..d3e3764
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/externalresource/xml/externalresource5xml.xml
@@ -0,0 +1,20 @@
+<doc xmlns:dbk="http://docbook.org/ns/docbook" >
+ <its:rules xmlns:its="http://www.w3.org/2005/11/its" xmlns:xlink="http://www.w3.org/1999/xlink" version="2.0" xlink:href="externalresource5xmlrules.xml"/>
+ <dbk:mediaobject>
+ <dbk:videoobject>
+ <dbk:videodata fileref="movie.avi"/>
+ </dbk:videoobject>
+ <dbk:imageobject>
+ <dbk:imagedata fileref="movie-frame.gif"/>
+ </dbk:imageobject>
+ <dbk:textobject>
+ <dbk:para>This video illustrates the proper way to assemble an inverting time distortion
+ device. </dbk:para>
+ <dbk:warning>
+ <dbk:para> It is imperative that the primary and secondary temporal couplings not be
+ mounted in the wrong order. Temporal catastrophe is the likely result. The
+ future you destroy may be your own. </dbk:para>
+ </dbk:warning>
+ </dbk:textobject>
+ </dbk:mediaobject>
+</doc>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/externalresource/xml/externalresource5xmlrules.xml b/tests/ITS-2.0-Testsuite/inputdata/externalresource/xml/externalresource5xmlrules.xml
new file mode 100644
index 0000000..0120973
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/externalresource/xml/externalresource5xmlrules.xml
@@ -0,0 +1,5 @@
+<its:rules version="2.0" xmlns:its="http://www.w3.org/2005/11/its"
+ xmlns:dbk="http://docbook.org/ns/docbook">
+ <its:param name="externalResourceParam">movie-frame.gif</its:param>
+ <its:externalResourceRefRule selector="//dbk:imagedata[@fileref=$externalResourceParam]" externalResourceRefPointer="@fileref"/>
+ </its:rules>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/idvalue/html/idvalue1html.html b/tests/ITS-2.0-Testsuite/inputdata/idvalue/html/idvalue1html.html
new file mode 100644
index 0000000..b345f20
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/idvalue/html/idvalue1html.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset=utf-8>
+ <title>Id Value</title>
+ <link href="idvalue1htmlrules.xml" rel="its-rules"/>
+</head>
+<body>
+ <p id="settingsMissing">
+ <b id="text">Can't find settings file.</b>
+ <var id="desc">The module cannot find the default settings file.
+ You need to re-initialize the system.</var>
+ </p>
+</body>
+</html>
+
diff --git a/tests/ITS-2.0-Testsuite/inputdata/idvalue/html/idvalue1htmlrules.xml b/tests/ITS-2.0-Testsuite/inputdata/idvalue/html/idvalue1htmlrules.xml
new file mode 100644
index 0000000..fb04999
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/idvalue/html/idvalue1htmlrules.xml
@@ -0,0 +1,6 @@
+<its:rules xmlns:its="http://www.w3.org/2005/11/its" xmlns:h="http://www.w3.org/1999/xhtml" version="2.0">
+ <its:idValueRule selector="//h:p" idValue="@id"/>
+ <its:idValueRule selector="//h:b" idValue="@id"/>
+ <its:idValueRule selector="//h:var" idValue="@id"/>
+</its:rules>
+
diff --git a/tests/ITS-2.0-Testsuite/inputdata/idvalue/html/idvalue2html.html b/tests/ITS-2.0-Testsuite/inputdata/idvalue/html/idvalue2html.html
new file mode 100644
index 0000000..8b53d3d
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/idvalue/html/idvalue2html.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset=utf-8>
+ <title>Id Value</title>
+ <link href="idvalue2htmlrules.xml" rel="its-rules"/>
+</head>
+<body>
+ <p id="settingsMissing">
+ <b id="text">Can't find settings file.</b>
+ <var id="desc">The module cannot find the default settings file.
+ You need to re-initialize the system.</var>
+ <b id="crashtext">This computer is now crashing GOODBYE!!</b>
+ </p>
+</body>
+</html>
+
diff --git a/tests/ITS-2.0-Testsuite/inputdata/idvalue/html/idvalue2htmlrules.xml b/tests/ITS-2.0-Testsuite/inputdata/idvalue/html/idvalue2htmlrules.xml
new file mode 100644
index 0000000..942af0d
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/idvalue/html/idvalue2htmlrules.xml
@@ -0,0 +1,7 @@
+<its:rules xmlns:its="http://www.w3.org/2005/11/its" xmlns:h="http://www.w3.org/1999/xhtml" version="2.0">
+ <its:param name="idvalueparam">text</its:param>
+ <its:idValueRule selector="//h:p" idValue="@id"/>
+ <its:idValueRule selector="//h:b[@id=$idvalueparam]" idValue="@id"/>
+ <its:idValueRule selector="//h:b[@id='crashtext']" idValue="@id"/>
+ <its:idValueRule selector="//h:var" idValue="@id"/>
+</its:rules>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/idvalue/html/idvalue3html.html b/tests/ITS-2.0-Testsuite/inputdata/idvalue/html/idvalue3html.html
new file mode 100644
index 0000000..4030307
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/idvalue/html/idvalue3html.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <script type="application/its+xml">
+ <its:rules xmlns:its="http://www.w3.org/2005/11/its" xmlns:h="http://www.w3.org/1999/xhtml" version="2.0">
+ <its:param name="idvalueparam">text</its:param>
+ <its:idValueRule selector="//h:p" idValue="@id"/>
+ <its:idValueRule selector="//h:b[@id=$idvalueparam]" idValue="@id"/>
+ <its:idValueRule selector="//h:var" idValue="@id"/>
+ </its:rules>
+ </script>
+ <meta charset=utf-8>
+ <title>Id Value</title>
+</head>
+<body>
+ <p id="settingsMissing">
+ <b id="text">Can't find settings file.</b>
+ <var id="desc">The module cannot find the default settings file.
+ You need to re-initialize the system.</var>
+ </p>
+</body>
+</html>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/idvalue/xml/idvalue1xml.xml b/tests/ITS-2.0-Testsuite/inputdata/idvalue/xml/idvalue1xml.xml
new file mode 100644
index 0000000..8b2869b
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/idvalue/xml/idvalue1xml.xml
@@ -0,0 +1,20 @@
+<resource
+ xmlns:its="http://www.w3.org/2005/11/its" >
+ <its:rules version="2.0">
+ <its:idValueRule selector="//text" idValue="../@name"/>
+ </its:rules>
+<webform>
+ <entry name="btn.OK">
+ <text>OK</text>
+ <pos>1, 1</pos>
+ <trig>sendOK</trig>
+ </entry>
+</webform>
+<webform>
+ <entry name="btn.CANCEL">
+ <text>Cancel</text>
+ <pos>2, 1</pos>
+ <trig>cancelAll</trig>
+ </entry>
+</webform>
+</resource>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/idvalue/xml/idvalue2xml.xml b/tests/ITS-2.0-Testsuite/inputdata/idvalue/xml/idvalue2xml.xml
new file mode 100644
index 0000000..a27ad31
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/idvalue/xml/idvalue2xml.xml
@@ -0,0 +1,4 @@
+<file>
+ <res name="retryBtn" xml:id="btnAgain">Try Again</res>
+ <res name="retryTip">click this to re-run the process with the current settings.</res>
+</file>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/idvalue/xml/idvalue3xml.xml b/tests/ITS-2.0-Testsuite/inputdata/idvalue/xml/idvalue3xml.xml
new file mode 100644
index 0000000..6b19c63
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/idvalue/xml/idvalue3xml.xml
@@ -0,0 +1,13 @@
+<resource>
+<its:rules xmlns:its="http://www.w3.org/2005/11/its" xmlns:xlink="http://www.w3.org/1999/xlink" version="2.0" xlink:href="idvalue3xmlrules.xml"/>
+ <entry name="btn.OK">
+ <text>OK</text>
+ <pos>1, 1</pos>
+ <trig>sendOK</trig>
+ </entry>
+ <entry name="btn.CANCEL">
+ <text>Cancel</text>
+ <pos>2, 1</pos>
+ <trig>cancelAll</trig>
+ </entry>
+</resource>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/idvalue/xml/idvalue3xmlrules.xml b/tests/ITS-2.0-Testsuite/inputdata/idvalue/xml/idvalue3xmlrules.xml
new file mode 100644
index 0000000..5ff498f
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/idvalue/xml/idvalue3xmlrules.xml
@@ -0,0 +1,3 @@
+ <its:rules xmlns:its="http://www.w3.org/2005/11/its" version="2.0">
+ <its:idValueRule selector="//entry" idValue="@name"/>
+ </its:rules>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/idvalue/xml/idvalue4xml.xml b/tests/ITS-2.0-Testsuite/inputdata/idvalue/xml/idvalue4xml.xml
new file mode 100644
index 0000000..909bfd2
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/idvalue/xml/idvalue4xml.xml
@@ -0,0 +1,17 @@
+<resource>
+<its:rules xmlns:its="http://www.w3.org/2005/11/its" xmlns:xlink="http://www.w3.org/1999/xlink" version="2.0" xlink:href="idvalue4xmlrules.xml"/>
+ <webform id="1">
+ <entry name="btn.OK">
+ <text>OK</text>
+ <pos>1, 1</pos>
+ <trig>sendOK</trig>
+ </entry>
+ </webform>
+ <webform id="2">
+ <entry name="btn.CANCEL">
+ <text>Cancel</text>
+ <pos>2, 1</pos>
+ <trig>cancelAll</trig>
+ </entry>
+ </webform>
+</resource>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/idvalue/xml/idvalue4xmlrules.xml b/tests/ITS-2.0-Testsuite/inputdata/idvalue/xml/idvalue4xmlrules.xml
new file mode 100644
index 0000000..59e7325
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/idvalue/xml/idvalue4xmlrules.xml
@@ -0,0 +1,4 @@
+ <its:rules xmlns:its="http://www.w3.org/2005/11/its" version="2.0">
+ <its:param name="idvalueParam">1</its:param>
+ <its:idValueRule selector="//webform[@id=$idvalueParam]/entry" idValue="@name"/>
+ </its:rules>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/idvalue/xml/idvalue5xml.xml b/tests/ITS-2.0-Testsuite/inputdata/idvalue/xml/idvalue5xml.xml
new file mode 100644
index 0000000..4b356b0
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/idvalue/xml/idvalue5xml.xml
@@ -0,0 +1,20 @@
+<resource>
+ <its:rules xmlns:its="http://www.w3.org/2005/11/its" version="2.0">
+ <its:param name="idvalueParam">1</its:param>
+ <its:idValueRule selector="//webform[@id=$idvalueParam]/entry" idValue="@name"/>
+ </its:rules>
+ <webform id="1">
+ <entry name="btn.OK">
+ <text>OK</text>
+ <pos>1, 1</pos>
+ <trig>sendOK</trig>
+ </entry>
+ </webform>
+ <webform id="2">
+ <entry name="btn.CANCEL">
+ <text>Cancel</text>
+ <pos>2, 1</pos>
+ <trig>cancelAll</trig>
+ </entry>
+ </webform>
+</resource>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/localefilter/html/locale1html.html b/tests/ITS-2.0-Testsuite/inputdata/localefilter/html/locale1html.html
new file mode 100644
index 0000000..72f9604
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/localefilter/html/locale1html.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset=utf-8>
+ <title>Locale filter</title>
+ <link href="locale1htmlrules.xml" rel="its-rules"/>
+ </head>
+ <body>
+ <div id="Canada">
+ <p>This legal notice is only for Canadian locales.</p>
+ </div>
+ </body>
+</html>
+
diff --git a/tests/ITS-2.0-Testsuite/inputdata/localefilter/html/locale1htmlrules.xml b/tests/ITS-2.0-Testsuite/inputdata/localefilter/html/locale1htmlrules.xml
new file mode 100644
index 0000000..d87c7f9
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/localefilter/html/locale1htmlrules.xml
@@ -0,0 +1,3 @@
+<its:rules xmlns:its="http://www.w3.org/2005/11/its" xmlns:h="http://www.w3.org/1999/xhtml" version="2.0">
+ <its:localeFilterRule selector="//h:div[@id='Canada']" localeFilterList="en-CA, fr-CA"/>
+</its:rules>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/localefilter/html/locale2html.html b/tests/ITS-2.0-Testsuite/inputdata/localefilter/html/locale2html.html
new file mode 100644
index 0000000..6e2870f
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/localefilter/html/locale2html.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset=utf-8>
+ <title>Locale filter</title>
+ </head>
+ <body>
+ <div its-locale-filter-list="en-CA, fr-CA" id="Canada">
+ <p>This legal notice is only for Canadian locales.</p>
+ </div>
+ </body>
+</html>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/localefilter/html/locale3html.html b/tests/ITS-2.0-Testsuite/inputdata/localefilter/html/locale3html.html
new file mode 100644
index 0000000..5f84080
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/localefilter/html/locale3html.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8"/>
+ <title>Locale filter</title>
+ <link href="locale3htmlrules.xml" rel="its-rules"/>
+ </head>
+ <body>
+ <div id="Canada">
+ <p>This legal notice is only for Canadian locales.</p>
+ </div>
+ </body>
+</html>
+
diff --git a/tests/ITS-2.0-Testsuite/inputdata/localefilter/html/locale3htmlrules.xml b/tests/ITS-2.0-Testsuite/inputdata/localefilter/html/locale3htmlrules.xml
new file mode 100644
index 0000000..9f44ede
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/localefilter/html/locale3htmlrules.xml
@@ -0,0 +1,4 @@
+<its:rules xmlns:its="http://www.w3.org/2005/11/its" xmlns:h="http://www.w3.org/1999/xhtml" version="2.0">
+ <its:param name="localeParam">Canada</its:param>
+ <its:localeFilterRule selector="//h:div[@id=$localeParam]" localeFilterList="en-CA, fr-CA"/>
+</its:rules>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/localefilter/html/locale4html.html b/tests/ITS-2.0-Testsuite/inputdata/localefilter/html/locale4html.html
new file mode 100644
index 0000000..d8effcd
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/localefilter/html/locale4html.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <script type="application/its+xml">
+ <its:rules xmlns:its="http://www.w3.org/2005/11/its" xmlns:h="http://www.w3.org/1999/xhtml" version="2.0">
+ <its:param name="localeParam">Canada</its:param>
+ <its:localeFilterRule selector="//h:div[@id=$localeParam]" localeFilterList="en-CA, fr-CA"/>
+ </its:rules>
+ </script>
+ <meta charset=utf-8>
+ <title>Locale filter</title>
+ </head>
+ <body>
+ <div id="Canada">
+ <p>This legal notice is only for Canadian locales.</p>
+ </div>
+ </body>
+</html>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/localefilter/html/locale5html.html b/tests/ITS-2.0-Testsuite/inputdata/localefilter/html/locale5html.html
new file mode 100644
index 0000000..fe5b016
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/localefilter/html/locale5html.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset=utf-8>
+ <title>Locale filter</title>
+ </head>
+ <body>
+ <div its-locale-filter-list="*-ca">
+ <p>Text for Canadian locales.</p>
+ </div>
+ <div its-locale-filter-list="*-ca" its-locale-filter-type="exclude">
+ <p>Text for non-Canadian locales.</p>
+ </div>
+ <div its-locale-filter-list="*" its-locale-filter-type="ExCluDE">
+ <p>Text for no locales.</p>
+ </div>
+ <div its-locale-filter-list="" its-locale-filter-type="EXCLude">
+ <p>Text for all locales.</p>
+ </div>
+ </body>
+</html>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/localefilter/xml/locale1xml.xml b/tests/ITS-2.0-Testsuite/inputdata/localefilter/xml/locale1xml.xml
new file mode 100644
index 0000000..fbb4c61
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/localefilter/xml/locale1xml.xml
@@ -0,0 +1,12 @@
+<book
+ xmlns:its="http://www.w3.org/2005/11/its"
+ its:version="2.0">
+ <info>
+ <its:rules version="2.0">
+ <its:localeFilterRule selector="//legalnotice[@role='Canada']" localeFilterList="en-CA, fr-CA"/>
+ </its:rules>
+ <legalnotice role="Canada">
+ <para>This legal notice is only for Canadian locales.</para>
+ </legalnotice>
+ </info>
+</book>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/localefilter/xml/locale2xml.xml b/tests/ITS-2.0-Testsuite/inputdata/localefilter/xml/locale2xml.xml
new file mode 100644
index 0000000..a97c8ac
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/localefilter/xml/locale2xml.xml
@@ -0,0 +1,9 @@
+<book
+ xmlns:its="http://www.w3.org/2005/11/its" its:version="2.0">
+ <info>
+ <legalnotice
+ its:localeFilterList="en-CA, fr-CA">
+ <para>This legal notice is only for Canadian locales.</para>
+ </legalnotice>
+ </info>
+</book>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/localefilter/xml/locale3xml.xml b/tests/ITS-2.0-Testsuite/inputdata/localefilter/xml/locale3xml.xml
new file mode 100644
index 0000000..7a99e2d
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/localefilter/xml/locale3xml.xml
@@ -0,0 +1,10 @@
+<book
+ xmlns:its="http://www.w3.org/2005/11/its"
+ its:version="2.0">
+ <info>
+ <its:rules xmlns:its="http://www.w3.org/2005/11/its" xmlns:xlink="http://www.w3.org/1999/xlink" version="2.0" xlink:href="locale3xmlrules.xml"/>
+ <legalnotice role="Canada">
+ <para>This legal notice is only for Canadian locales.</para>
+ </legalnotice>
+ </info>
+</book>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/localefilter/xml/locale3xmlrules.xml b/tests/ITS-2.0-Testsuite/inputdata/localefilter/xml/locale3xmlrules.xml
new file mode 100644
index 0000000..5eda8cc
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/localefilter/xml/locale3xmlrules.xml
@@ -0,0 +1,3 @@
+<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="2.0">
+ <its:localeFilterRule selector="//legalnotice[@role='Canada']" localeFilterList="en-CA, fr-CA"/>
+</its:rules>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/localefilter/xml/locale4xml.xml b/tests/ITS-2.0-Testsuite/inputdata/localefilter/xml/locale4xml.xml
new file mode 100644
index 0000000..d3eda11
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/localefilter/xml/locale4xml.xml
@@ -0,0 +1,16 @@
+<book
+ xmlns:its="http://www.w3.org/2005/11/its"
+ its:version="2.0">
+ <info>
+ <its:rules xmlns:its="http://www.w3.org/2005/11/its" xmlns:xlink="http://www.w3.org/1999/xlink" version="2.0" xlink:href="locale4xmlrules.xml"/>
+ <its:rules xmlns:its="http://www.w3.org/2005/11/its" version="2.0">
+ <its:localeFilterRule selector="//legalnotice[@role='Germany']" localeFilterList="de-DE"/>
+</its:rules>
+ <legalnotice role="Canada">
+ <para>This legal notice is only for Canadian locales.</para>
+ </legalnotice>
+ <legalnotice role="Germany">
+ <para>This legal notice is only for German locales.</para>
+ </legalnotice>
+ </info>
+</book>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/localefilter/xml/locale4xmlrules.xml b/tests/ITS-2.0-Testsuite/inputdata/localefilter/xml/locale4xmlrules.xml
new file mode 100644
index 0000000..5eda8cc
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/localefilter/xml/locale4xmlrules.xml
@@ -0,0 +1,3 @@
+<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="2.0">
+ <its:localeFilterRule selector="//legalnotice[@role='Canada']" localeFilterList="en-CA, fr-CA"/>
+</its:rules>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/localefilter/xml/locale5xml.xml b/tests/ITS-2.0-Testsuite/inputdata/localefilter/xml/locale5xml.xml
new file mode 100644
index 0000000..8e2e84a
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/localefilter/xml/locale5xml.xml
@@ -0,0 +1,8 @@
+
+<book xmlns:its="http://www.w3.org/2005/11/its" its:version="2.0">
+<info>
+<its:span localeFilterList="en-CA, fr-CA">
+<para>This legal notice is only for Canadian locales.</para>
+</its:span>
+</info>
+</book>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/localefilter/xml/locale6xml.xml b/tests/ITS-2.0-Testsuite/inputdata/localefilter/xml/locale6xml.xml
new file mode 100644
index 0000000..e0881f2
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/localefilter/xml/locale6xml.xml
@@ -0,0 +1,14 @@
+<book>
+ <info>
+ <its:rules xmlns:its="http://www.w3.org/2005/11/its" version="2.0">
+ <its:param name="localeParam">Germany</its:param>
+ <its:localeFilterRule selector="//legalnotice[@role='Germany']" localeFilterList="de-DE"/>
+</its:rules>
+ <legalnotice role="Canada">
+ <para>This legal notice is only for Canadian locales.</para>
+ </legalnotice>
+ <legalnotice role="Germany">
+ <para>This legal notice is only for German locales.</para>
+ </legalnotice>
+ </info>
+</book> \ No newline at end of file
diff --git a/tests/ITS-2.0-Testsuite/inputdata/localefilter/xml/locale7xml.xml b/tests/ITS-2.0-Testsuite/inputdata/localefilter/xml/locale7xml.xml
new file mode 100644
index 0000000..fb11bf9
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/localefilter/xml/locale7xml.xml
@@ -0,0 +1,13 @@
+<book
+ xmlns:its="http://www.w3.org/2005/11/its"
+ its:version="2.0">
+ <info>
+ <its:rules xmlns:its="http://www.w3.org/2005/11/its" xmlns:xlink="http://www.w3.org/1999/xlink" version="2.0" xlink:href="locale7xmlrules.xml"/>
+ <legalnotice role="Canada">
+ <para>This legal notice is only for Canadian locales.</para>
+ </legalnotice>
+ <legalnotice role="Germany">
+ <para>This legal notice is only for German locales.</para>
+ </legalnotice>
+ </info>
+</book>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/localefilter/xml/locale7xmlrules.xml b/tests/ITS-2.0-Testsuite/inputdata/localefilter/xml/locale7xmlrules.xml
new file mode 100644
index 0000000..3d851a2
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/localefilter/xml/locale7xmlrules.xml
@@ -0,0 +1,4 @@
+<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="2.0">
+ <its:param name="localeParam">Germany</its:param>
+ <its:localeFilterRule selector="//legalnotice[@role=$localeParam]" localeFilterList="de-DE"/>
+</its:rules>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/localefilter/xml/locale8xml.xml b/tests/ITS-2.0-Testsuite/inputdata/localefilter/xml/locale8xml.xml
new file mode 100644
index 0000000..ff77119
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/localefilter/xml/locale8xml.xml
@@ -0,0 +1,18 @@
+<book
+ xmlns:its="http://www.w3.org/2005/11/its"
+ its:version="2.0">
+ <info>
+ <legalnotice its:localeFilterList="*-CA" its:localeFilterType="include">
+ <para>Text only for Canadian locales.</para>
+ </legalnotice>
+ <legalnotice its:localeFilterList="*-CA" its:localeFilterType="exclude">
+ <para>Text for non-Canadian locales.</para>
+ </legalnotice>
+ <legalnotice its:localeFilterList="*" its:localeFilterType="exclude">
+ <para>Text for no locales.</para>
+ </legalnotice>
+ <legalnotice its:localeFilterList="" its:localeFilterType="exclude">
+ <para>Text for all locales.</para>
+ </legalnotice>
+ </info>
+</book>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote1html.html b/tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote1html.html
new file mode 100644
index 0000000..6c33dd2
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote1html.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+ <html>
+ <head>
+ <meta charset=utf-8>
+ <title>Example</title>
+ <link href="locnote1htmlrules.xml" rel="its-rules"/>
+ </head>
+ <body>
+ <span id="DisableInfo">The {0} has been disabled.</span>
+ </body>
+ </html>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote1htmlrules.xml b/tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote1htmlrules.xml
new file mode 100644
index 0000000..87b8415
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote1htmlrules.xml
@@ -0,0 +1,7 @@
+<its:rules xmlns:its="http://www.w3.org/2005/11/its" xmlns:h="http://www.w3.org/1999/xhtml" version="2.0">
+<its:locNoteRule locNoteType="alert" selector="//h:span[@id='DisableInfo']">
+<its:locNote>
+The variable {0} has three possible values: 'printer', 'stacker' and 'stapler options'.
+</its:locNote>
+</its:locNoteRule>
+</its:rules>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote2html.html b/tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote2html.html
new file mode 100644
index 0000000..c865bc9
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote2html.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+ <html>
+ <head>
+ <meta charset=utf-8>
+ <title>Example</title>
+ <link href="locnote2htmlrules.xml" rel="its-rules"/>
+ </head>
+ <body>
+ <section id="FileNotFound">
+ <p>
+ Indicates that the resource file {0} could not be loaded.
+ </p>
+ <span>Cannot find the file {0}.</span>
+ </section>
+ <section id="DivByZero">
+ <p>A division by 0 was going to be computed.</p>
+ <span>Invalid parameter.</span>
+ </section>
+ </body>
+ </html>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote2htmlrules.xml b/tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote2htmlrules.xml
new file mode 100644
index 0000000..2da2d20
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote2htmlrules.xml
@@ -0,0 +1,4 @@
+<its:rules xmlns:its="http://www.w3.org/2005/11/its" xmlns:h="http://www.w3.org/1999/xhtml" version="2.0">
+<its:translateRule selector="//h:section/h:p" translate="no"/>
+<its:locNoteRule locNoteType="description" selector="//h:section/h:span" locNotePointer="../h:p"/>
+</its:rules>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote3html.html b/tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote3html.html
new file mode 100644
index 0000000..380ab5f
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote3html.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+ <html>
+ <head>
+ <meta charset=utf-8>
+ <title>EXAMPLE</title>
+ <link href="locnote3htmlrules.xml" rel="its-rules"/>
+ </head>
+ <body>
+ <span id="NotFound">Cannot find {0} on {1}.</span>
+ </body>
+ </html>
+
diff --git a/tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote3htmlrules.xml b/tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote3htmlrules.xml
new file mode 100644
index 0000000..898225e
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote3htmlrules.xml
@@ -0,0 +1,3 @@
+<its:rules xmlns:its="http://www.w3.org/2005/11/its" xmlns:h="http://www.w3.org/1999/xhtml" version="2.0">
+<its:locNoteRule locNoteType="description" selector="//h:span[@id='NotFound']" locNoteRef="ErrorsInfo.html/#NotFound"/>
+</its:rules>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote4html.html b/tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote4html.html
new file mode 100644
index 0000000..8cc2ffe
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote4html.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+ <html>
+ <head>
+ <meta charset=utf-8>
+ <title>EXAMPLE</title>
+ <link href="locnote4htmlrules.xml" rel="its-rules"/>
+ </head>
+ <body>
+ <p id="FileNotFound" title="Comments.html#FileNotFound">
+ <span>Cannot find the file {0}.</span>
+ </p>
+ <p id="DivByZero" title="Comments.html#DivByZero">
+ <span>Invalid parameter.</span>
+ </p>
+ </body>
+ </html>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote4htmlrules.xml b/tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote4htmlrules.xml
new file mode 100644
index 0000000..2e0f117
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote4htmlrules.xml
@@ -0,0 +1,3 @@
+<its:rules xmlns:its="http://www.w3.org/2005/11/its" xmlns:h="http://www.w3.org/1999/xhtml" version="2.0">
+<its:locNoteRule locNoteType="description" selector="//h:body/h:p/h:span" locNoteRefPointer="../@title"/>
+</its:rules>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote5html.html b/tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote5html.html
new file mode 100644
index 0000000..1db258a
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote5html.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+ <html>
+ <head>
+ <meta charset=utf-8>
+ <link href="locnote5htmlrules.xml" rel="its-rules"/>
+ <title>EXAMPLE</title>
+ </head>
+ <body>
+ <p id="1">
+ This is a hippoptamus:
+ <img src="hippo.png" alt="Hippo in the Chobe River"/>
+ .
+ </p>
+ <p id="2">
+ This is an elephant:
+ <img src="elephants.png" alt="Elephants taking a mud bath"/>
+ .
+ </p>
+ <p id="DisableInfo">The {0} has been disabled.</p>
+ </body>
+ </html>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote5htmlrules.xml b/tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote5htmlrules.xml
new file mode 100644
index 0000000..c9d0086
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote5htmlrules.xml
@@ -0,0 +1,15 @@
+<its:rules xmlns:its="http://www.w3.org/2005/11/its" xmlns:h="http://www.w3.org/1999/xhtml" version="2.0">
+<its:locNoteRule selector="//h:p[@id='1']/h:img/@alt" locNoteType="alert">
+<its:locNote>Do not translate the word "Chobe"</its:locNote>
+</its:locNoteRule>
+<its:locNoteRule selector="//h:p[@id='2']/h:img/@alt" locNoteType="description">
+<its:locNote>This text will be displayed over the image.</its:locNote>
+</its:locNoteRule>
+<its:locNoteRule locNoteType="alert" selector="//h:p[@id='DisableInfo']">
+<its:locNote>
+The variable
+{0}
+has three possible values: 'printer', 'stacker' and 'stapler options'.
+</its:locNote>
+</its:locNoteRule>
+</its:rules>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote6html.html b/tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote6html.html
new file mode 100644
index 0000000..eea2ad9
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote6html.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+ <html>
+ <head>
+ <meta charset=utf-8>
+ <title>EXAMPLE</title>
+ <link href="locnote6htmlrules.xml" rel="its-rules"/>
+ </head>
+ <body>
+ <span id="1">
+ This is a hippoptamus:
+ <img src="hippo.png" alt="Hippo in the Chobe River"/>
+ .
+ </span>
+ <span id="2">
+ This is an elephant:
+ <img src="elephants.png" alt="Elephants taking a mud bath"/>
+ .
+ </span>
+ <span id="DisableInfo">The {0} has been disabled.</span>
+ </body>
+ </html>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote6htmlrules.xml b/tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote6htmlrules.xml
new file mode 100644
index 0000000..d8a1ee4
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote6htmlrules.xml
@@ -0,0 +1,15 @@
+<its:rules xmlns:its="http://www.w3.org/2005/11/its" xmlns:h="http://www.w3.org/1999/xhtml" version="2.0">
+<its:locNoteRule selector="//@alt" locNoteType="description">
+<its:locNote>This text will be displayed over the image.</its:locNote>
+</its:locNoteRule>
+<its:locNoteRule selector="//h:span[@id='1']/h:img/@alt" locNoteType="alert">
+<its:locNote>Do not translate the word "Chobe"</its:locNote>
+</its:locNoteRule>
+<its:locNoteRule locNoteType="alert" selector="//h:span[@id='DisableInfo']">
+<its:locNote>
+The variable
+{0}
+has three possible values: 'printer', 'stacker' and 'stapler options'.
+</its:locNote>
+</its:locNoteRule>
+</its:rules>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote7html.html b/tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote7html.html
new file mode 100644
index 0000000..4741c32
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote7html.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset=utf-8>
+ <title>LocNote test: Default</title>
+ </head>
+ <body>
+ <p>This is a <span its-loc-note="Check with terminology engineer" its-loc-note-type="ALERT">motherboard</span>.</p>
+ </body>
+</html>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote8html.html b/tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote8html.html
new file mode 100644
index 0000000..8913b8e
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote8html.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+ <html>
+ <head>
+ <meta charset=utf-8>
+ <title>EXAMPLE</title>
+ <link href="locnote8htmlrules.xml" rel="its-rules"/>
+ </head>
+ <body>
+ <span id="1">
+ This is a hippoptamus:
+ <img src="hippo.png" alt="Hippo in the Chobe River"/>
+ .
+ </span>
+ <span id="2">
+ This is an elephant:
+ <img src="elephants.png" alt="Elephants taking a mud bath"/>
+ .
+ </span>
+ <span id="DisableInfo">The {0} has been disabled.</span>
+ </body>
+ </html>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote8htmlrules.xml b/tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote8htmlrules.xml
new file mode 100644
index 0000000..7d6c81f
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote8htmlrules.xml
@@ -0,0 +1,16 @@
+<its:rules xmlns:its="http://www.w3.org/2005/11/its" xmlns:h="http://www.w3.org/1999/xhtml" version="2.0">
+<its:param name="spanIdParam">DisableInfo</its:param>
+<its:locNoteRule selector="//@alt" locNoteType="description">
+<its:locNote>This text will be displayed over the image.</its:locNote>
+</its:locNoteRule>
+<its:locNoteRule selector="//h:span[@id='1']/h:img/@alt" locNoteType="alert">
+<its:locNote>Do not translate the word "Chobe"</its:locNote>
+</its:locNoteRule>
+<its:locNoteRule locNoteType="alert" selector="//h:span[@id=$spanIdParam]">
+<its:locNote>
+The variable
+{0}
+has three possible values: 'printer', 'stacker' and 'stapler options'.
+</its:locNote>
+</its:locNoteRule>
+</its:rules>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote9html.html b/tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote9html.html
new file mode 100644
index 0000000..9adbbcd
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/localizationnote/html/locnote9html.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html lang=en>
+ <head>
+<script type="application/its+xml">
+ <its:rules xmlns:its="http://www.w3.org/2005/11/its" xmlns:h="http://www.w3.org/1999/xhtml" version="2.0">
+ <its:param name="locnoteparam">DisableInfo</its:param>
+ <its:locNoteRule locNoteType="alert" selector="//h:p[@id=$locnoteparam]">
+ <its:locNote>The variable {0} has three possible values: 'printer',
+ 'stacker' and 'stapler options'.</its:locNote>
+ </its:locNoteRule>
+ </its:rules>
+</script>
+ <meta charset=utf-8>
+ <title>Example</title>
+ </head>
+<body>
+ <p id="DisableInfo">The {0} has been disabled.</p>
+ </body>
+</html>
+
diff --git a/tests/ITS-2.0-Testsuite/inputdata/localizationnote/xml/locnote10xml.xml b/tests/ITS-2.0-Testsuite/inputdata/localizationnote/xml/locnote10xml.xml
new file mode 100644
index 0000000..aefe57b
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/localizationnote/xml/locnote10xml.xml
@@ -0,0 +1,33 @@
+<msgList>
+<head>
+<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="2.0">
+<its:param name="DisableInfoParam">DisableInfo</its:param>
+<its:locNoteRule selector="//@alt" locNoteType="description">
+<its:locNote>This text will be displayed over the image.</its:locNote>
+</its:locNoteRule>
+<its:locNoteRule selector="//msg[@id='1']/img/@alt" locNoteType="alert">
+<its:locNote>Do not translate the word "Chobe"</its:locNote>
+</its:locNoteRule>
+<its:locNoteRule locNoteType="alert" selector="//msg[@id=$DisableInfoParam]">
+<its:locNote>
+The variable
+{0}
+has three possible values: 'printer', 'stacker' and 'stapler options'.
+</its:locNote>
+</its:locNoteRule>
+</its:rules>
+</head>
+<body>
+<msg id="1">
+This is a hippoptamus:
+<img src="hippo.png" alt="Hippo in the Chobe River"/>
+.
+</msg>
+<msg id="2">
+This is an elephant:
+<img src="elephants.png" alt="Elephants taking a mud bath"/>
+.
+</msg>
+<msg id="DisableInfo">The {0} has been disabled.</msg>
+</body>
+</msgList>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/localizationnote/xml/locnote11xml.xml b/tests/ITS-2.0-Testsuite/inputdata/localizationnote/xml/locnote11xml.xml
new file mode 100644
index 0000000..20a697e
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/localizationnote/xml/locnote11xml.xml
@@ -0,0 +1,18 @@
+<msgList>
+<head>
+<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="2.0" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="locnote11xmlrules.xml"/>
+</head>
+<body>
+<msg id="1">
+This is a hippoptamus:
+<img src="hippo.png" alt="Hippo in the Chobe River"/>
+.
+</msg>
+<msg id="2">
+This is an elephant:
+<img src="elephants.png" alt="Elephants taking a mud bath"/>
+.
+</msg>
+<msg id="DisableInfo">The {0} has been disabled.</msg>
+</body>
+</msgList>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/localizationnote/xml/locnote11xmlrules.xml b/tests/ITS-2.0-Testsuite/inputdata/localizationnote/xml/locnote11xmlrules.xml
new file mode 100644
index 0000000..43b00c7
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/localizationnote/xml/locnote11xmlrules.xml
@@ -0,0 +1,16 @@
+<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="2.0">
+<its:param name="DisableInfoParam">DisableInfo</its:param>
+<its:locNoteRule selector="//@alt" locNoteType="description">
+<its:locNote>This text will be displayed over the image.</its:locNote>
+</its:locNoteRule>
+<its:locNoteRule selector="//msg[@id='1']/img/@alt" locNoteType="alert">
+<its:locNote>Do not translate the word "Chobe"</its:locNote>
+</its:locNoteRule>
+<its:locNoteRule locNoteType="alert" selector="//msg[@id=$DisableInfoParam]">
+<its:locNote>
+The variable
+{0}
+has three possible values: 'printer', 'stacker' and 'stapler options'.
+</its:locNote>
+</its:locNoteRule>
+</its:rules>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/localizationnote/xml/locnote1xml.xml b/tests/ITS-2.0-Testsuite/inputdata/localizationnote/xml/locnote1xml.xml
new file mode 100644
index 0000000..4b50997
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/localizationnote/xml/locnote1xml.xml
@@ -0,0 +1,13 @@
+<myRes>
+ <head>
+ <its:rules xmlns:its="http://www.w3.org/2005/11/its" version="2.0">
+ <its:locNoteRule locNoteType="alert" selector="//msg[@id='DisableInfo']">
+ <its:locNote>The variable {0} has three possible values: 'printer',
+ 'stacker' and 'stapler options'.</its:locNote>
+ </its:locNoteRule>
+ </its:rules>
+ </head>
+ <body>
+ <msg id="DisableInfo">The {0} has been disabled.</msg>
+ </body>
+</myRes>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/localizationnote/xml/locnote2xml.xml b/tests/ITS-2.0-Testsuite/inputdata/localizationnote/xml/locnote2xml.xml
new file mode 100644
index 0000000..166215d
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/localizationnote/xml/locnote2xml.xml
@@ -0,0 +1,19 @@
+<Res>
+ <prolog>
+ <its:rules xmlns:its="http://www.w3.org/2005/11/its" version="2.0">
+ <its:translateRule selector="//msg/notes" translate="no"/>
+ <its:locNoteRule locNoteType="description" selector="//msg/data"
+ locNotePointer="../notes"/>
+ </its:rules>
+ </prolog>
+ <body>
+ <msg id="FileNotFound">
+ <notes>Indicates that the resource file {0} could not be loaded.</notes>
+ <data>Cannot find the file {0}.</data>
+ </msg>
+ <msg id="DivByZero">
+ <notes>A division by 0 was going to be computed.</notes>
+ <data>Invalid parameter.</data>
+ </msg>
+ </body>
+</Res>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/localizationnote/xml/locnote3xml.xml b/tests/ITS-2.0-Testsuite/inputdata/localizationnote/xml/locnote3xml.xml
new file mode 100644
index 0000000..3336af3
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/localizationnote/xml/locnote3xml.xml
@@ -0,0 +1,12 @@
+<myRes>
+ <head>
+ <its:rules xmlns:its="http://www.w3.org/2005/11/its" version="2.0">
+ <its:locNoteRule locNoteType="description"
+ selector="//msg[@id='NotFound']"
+ locNoteRef="ErrorsInfo.html/#NotFound" />
+ </its:rules>
+ </head>
+ <body>
+ <msg id="NotFound">Cannot find {0} on {1}.</msg>
+ </body>
+</myRes>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/localizationnote/xml/locnote4xml.xml b/tests/ITS-2.0-Testsuite/inputdata/localizationnote/xml/locnote4xml.xml
new file mode 100644
index 0000000..a98b30e
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/localizationnote/xml/locnote4xml.xml
@@ -0,0 +1,16 @@
+<dataFile>
+ <prolog>
+ <its:rules xmlns:its="http://www.w3.org/2005/11/its" version="2.0">
+ <its:locNoteRule locNoteType="description" selector="//body/string/data"
+ locNoteRefPointer="../@noteFile" />
+ </its:rules>
+ </prolog>
+ <body>
+ <string id="FileNotFound" noteFile="Comments.html#FileNotFound">
+ <data>Cannot find the file {0}.</data>
+ </string>
+ <string id="DivByZero" noteFile="Comments.html#DivByZero">
+ <data>Invalid parameter.</data>
+ </string>
+ </body>
+</dataFile>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/localizationnote/xml/locnote5xml.xml b/tests/ITS-2.0-Testsuite/inputdata/localizationnote/xml/locnote5xml.xml
new file mode 100644
index 0000000..dac3607
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/localizationnote/xml/locnote5xml.xml
@@ -0,0 +1,15 @@
+<msgList>
+ <head>
+ <its:rules xmlns:its="http://www.w3.org/2005/11/its" version="2.0"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="locnote5xmlrules.xml">
+ <its:locNoteRule selector="//msg[@id='1']/img/@alt" locNoteType="alert">
+ <its:locNote>Do not translate the word "Chobe"</its:locNote>
+ </its:locNoteRule>
+ </its:rules>
+ </head>
+ <body>
+ <msg id="1">This is a hippoptamus: <img src="hippo.png" alt="Hippo in the Chobe River"/>.</msg>
+ <msg id="2">This is an elephant: <img src="elephants.png" alt="Elephants taking a mud bath"/>.</msg>
+ <msg id="DisableInfo">The {0} has been disabled.</msg>
+ </body>
+</msgList>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/localizationnote/xml/locnote5xmlrules.xml b/tests/ITS-2.0-Testsuite/inputdata/localizationnote/xml/locnote5xmlrules.xml
new file mode 100644
index 0000000..8eb7b34
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/localizationnote/xml/locnote5xmlrules.xml
@@ -0,0 +1,9 @@
+<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="2.0">
+ <its:locNoteRule selector="//@alt" locNoteType="description">
+ <its:locNote>This text will be displayed over the image.</its:locNote>
+ </its:locNoteRule>
+ <its:locNoteRule locNoteType="alert" selector="//msg[@id='DisableInfo']">
+ <its:locNote>The variable {0} has three possible values: 'printer',
+ 'stacker' and 'stapler options'.</its:locNote>
+ </its:locNoteRule>
+</its:rules>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/localizationnote/xml/locnote6xml.xml b/tests/ITS-2.0-Testsuite/inputdata/localizationnote/xml/locnote6xml.xml
new file mode 100644
index 0000000..2df8838
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/localizationnote/xml/locnote6xml.xml
@@ -0,0 +1,21 @@
+<msgList>
+ <head>
+ <its:rules xmlns:its="http://www.w3.org/2005/11/its" version="2.0">
+ <its:locNoteRule selector="//@alt" locNoteType="description">
+ <its:locNote>This text will be displayed over the image.</its:locNote>
+ </its:locNoteRule>
+ <its:locNoteRule selector="//msg[@id='1']/img/@alt" locNoteType="alert">
+ <its:locNote>Do not translate the word "Chobe"</its:locNote>
+ </its:locNoteRule>
+ <its:locNoteRule locNoteType="alert" selector="//msg[@id='DisableInfo']">
+ <its:locNote>The variable {0} has three possible values: 'printer',
+ 'stacker' and 'stapler options'.</its:locNote>
+ </its:locNoteRule>
+ </its:rules>
+ </head>
+ <body>
+ <msg id="1">This is a hippoptamus: <img src="hippo.png" alt="Hippo in the Chobe River"/>.</msg>
+ <msg id="2">This is an elephant: <img src="elephants.png" alt="Elephants taking a mud bath"/>.</msg>
+ <msg id="DisableInfo">The {0} has been disabled.</msg>
+ </body>
+</msgList>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/localizationnote/xml/locnote7xml.xml b/tests/ITS-2.0-Testsuite/inputdata/localizationnote/xml/locnote7xml.xml
new file mode 100644
index 0000000..65021f8
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/localizationnote/xml/locnote7xml.xml
@@ -0,0 +1,20 @@
+<Res>
+<prolog>
+<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="2.0">
+<its:translateRule selector="//msg/notes" translate="no"/>
+<its:locNoteRule locNoteType="description" selector="//msg/data" locNotePointer="../notes"/>
+</its:rules>
+</prolog>
+<body>
+<msg id="FileNotFound">
+<notes>
+Indicates that the resource file {0} could not be loaded.
+</notes>
+<data>Cannot find the file {0}.</data>
+</msg>
+<msg id="DivByZero">
+<notes>A division by 0 was going to be computed.</notes>
+<data>Invalid parameter.</data>
+</msg>
+</body>
+</Res>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/localizationnote/xml/locnote8xml.xml b/tests/ITS-2.0-Testsuite/inputdata/localizationnote/xml/locnote8xml.xml
new file mode 100644
index 0000000..41049c9
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/localizationnote/xml/locnote8xml.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<Res xmlns:its="http://www.w3.org/2005/11/its" its:version="2.0">
+ <body its:locNote="The variable {0} is the name of the host.">
+ <msg id="HostNotFound">
+ <data>Host {0} cannot be found.</data>
+ </msg>
+ <msg id="HostDisconnected">
+ <data>The connection with {0} has been lost.</data>
+ </msg>
+ <msg id="FileNotFound">
+ <data its:locNote="{0} is a filename" its:locNoteType="alert">{0} not found.</data>
+ </msg>
+ <msg id="CannotLog">
+ <data its:locNoteRef="myLocNotes.htm#CannotLog" its:locNoteType="alert">Cannot log with this username.</data>
+ </msg>
+ </body>
+</Res>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/localizationnote/xml/locnote9xml.xml b/tests/ITS-2.0-Testsuite/inputdata/localizationnote/xml/locnote9xml.xml
new file mode 100644
index 0000000..c726ea1
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/localizationnote/xml/locnote9xml.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<Doc xmlns:its="http://www.w3.org/2005/11/its" its:version="2.0">
+ <body>
+ <p><its:span locNote="If possible keep the non-English terms in the translated version too">Everything started when
+ Zebulon discovered that he had a <its:span locNoteRef="http://en.wikipedia.org/wiki/Doppelganger">doppelgänger</its:span>
+ who was a <b>serious</b> baseball <its:span locNoteRef="http://en.wikipedia.org/wiki/Aficionado">aficionado</its:span>.</its:span></p>
+ </body>
+</Doc>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/preservespace/xml/preservespace1xml.xml b/tests/ITS-2.0-Testsuite/inputdata/preservespace/xml/preservespace1xml.xml
new file mode 100644
index 0000000..16330a2
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/preservespace/xml/preservespace1xml.xml
@@ -0,0 +1,13 @@
+<book xmlns:its="http://www.w3.org/2005/11/its" its:version="2.0">
+ <info>
+ <its:rules version="2.0">
+ <its:preserveSpaceRule selector="//verse" space="preserve"/>
+ </its:rules>
+ </info>
+ <verse>
+ 'Twas brillig, and the slithy toves
+ Did gyre and gimble in the wabe;
+ All mimsy were the borogoves,
+ And the mome raths outgrabe.
+ </verse>
+</book>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/preservespace/xml/preservespace2xml.xml b/tests/ITS-2.0-Testsuite/inputdata/preservespace/xml/preservespace2xml.xml
new file mode 100644
index 0000000..b131356
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/preservespace/xml/preservespace2xml.xml
@@ -0,0 +1,8 @@
+<book xmlns:its="http://www.w3.org/2005/11/its" its:version="2.0">
+ <verse xml:space="preserve">
+ 'Twas brillig, and the slithy toves
+ Did gyre and gimble in the wabe;
+ All mimsy were the borogoves,
+ And the mome raths outgrabe.
+ </verse>
+</book>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/preservespace/xml/preservespace3xml.xml b/tests/ITS-2.0-Testsuite/inputdata/preservespace/xml/preservespace3xml.xml
new file mode 100644
index 0000000..e16d438
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/preservespace/xml/preservespace3xml.xml
@@ -0,0 +1,11 @@
+<book xmlns:its="http://www.w3.org/2005/11/its" its:version="2.0" >
+ <info>
+ <its:rules xmlns:its="http://www.w3.org/2005/11/its" xmlns:xlink="http://www.w3.org/1999/xlink" version="2.0" xlink:href="preservespace3xmlrules.xml"/>
+ </info>
+ <verse>
+'Twas brillig, and the slithy toves
+ Did gyre and gimble in the wabe;
+ All mimsy were the borogoves,
+ And the mome raths outgrabe.
+ </verse>
+</book>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/preservespace/xml/preservespace3xmlrules.xml b/tests/ITS-2.0-Testsuite/inputdata/preservespace/xml/preservespace3xmlrules.xml
new file mode 100644
index 0000000..8b05d41
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/preservespace/xml/preservespace3xmlrules.xml
@@ -0,0 +1,3 @@
+<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="2.0">
+ <its:preserveSpaceRule selector="//verse" space="preserve"/>
+ </its:rules>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/preservespace/xml/preservespace4xml.xml b/tests/ITS-2.0-Testsuite/inputdata/preservespace/xml/preservespace4xml.xml
new file mode 100644
index 0000000..a9d919d
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/preservespace/xml/preservespace4xml.xml
@@ -0,0 +1,8 @@
+<book xmlns:its="http://www.w3.org/2005/11/its" its:version="2.0">
+ <its:span xml:space="preserve">
+ 'Twas brillig, and the slithy toves
+ Did gyre and gimble in the wabe;
+ All mimsy were the borogoves,
+ And the mome raths outgrabe.
+ </its:span >
+</book>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/preservespace/xml/preservespace5xml.xml b/tests/ITS-2.0-Testsuite/inputdata/preservespace/xml/preservespace5xml.xml
new file mode 100644
index 0000000..57b47e1
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/preservespace/xml/preservespace5xml.xml
@@ -0,0 +1,14 @@
+<book xmlns:its="http://www.w3.org/2005/11/its" its:version="2.0">
+ <info>
+ <its:rules version="2.0">
+ <its:param name="preserverspaceParam">firstverse</its:param>
+ <its:preserveSpaceRule selector="//verse[@id=$preserverspaceParam]" space="preserve"/>
+ </its:rules>
+ </info>
+ <verse id="firstverse">
+ 'Twas brillig, and the slithy toves
+ Did gyre and gimble in the wabe;
+ All mimsy were the borogoves,
+ And the mome raths outgrabe.
+ </verse>
+</book>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/preservespace/xml/preservespace6xml.xml b/tests/ITS-2.0-Testsuite/inputdata/preservespace/xml/preservespace6xml.xml
new file mode 100644
index 0000000..ac3cc62
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/preservespace/xml/preservespace6xml.xml
@@ -0,0 +1,9 @@
+<book xmlns:its="http://www.w3.org/2005/11/its" its:version="2.0">
+<its:rules xmlns:its="http://www.w3.org/2005/11/its" xmlns:xlink="http://www.w3.org/1999/xlink" version="2.0" xlink:type="simple" xlink:href="preservespace6xmlrules.xml"/>
+ <verse id="firstverse">
+ 'Twas brillig, and the slithy toves
+ Did gyre and gimble in the wabe;
+ All mimsy were the borogoves,
+ And the mome raths outgrabe.
+ </verse>
+</book>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/preservespace/xml/preservespace6xmlrules.xml b/tests/ITS-2.0-Testsuite/inputdata/preservespace/xml/preservespace6xmlrules.xml
new file mode 100644
index 0000000..d626b57
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/preservespace/xml/preservespace6xmlrules.xml
@@ -0,0 +1,4 @@
+<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="2.0">
+ <its:param name="preserverspaceParam">firstverse</its:param>
+ <its:preserveSpaceRule selector="//verse[@id=$preserverspaceParam]" space="preserve"/>
+ </its:rules>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/translate/html/translate1html.html b/tests/ITS-2.0-Testsuite/inputdata/translate/html/translate1html.html
new file mode 100644
index 0000000..e31fcae
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/translate/html/translate1html.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset=utf-8>
+ <title>HTML Link Example</title>
+ <link href="translate1htmlrules.xml" rel="its-rules"/>
+ </head>
+ <body>
+ <img src="smiley.gif" alt="Smiley face" width="42" height="42"/>
+ <p id="100" title="Text">
+ This is the first paragraph. It has some
+ <code>un-translatable code</code>
+ .
+ </p>
+ </body>
+</html>
+
diff --git a/tests/ITS-2.0-Testsuite/inputdata/translate/html/translate1htmlrules.xml b/tests/ITS-2.0-Testsuite/inputdata/translate/html/translate1htmlrules.xml
new file mode 100644
index 0000000..bd51763
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/translate/html/translate1htmlrules.xml
@@ -0,0 +1,4 @@
+<its:rules xmlns:its="http://www.w3.org/2005/11/its" xmlns:h="http://www.w3.org/1999/xhtml" version="2.0">
+ <its:translateRule selector="//h:code" translate="no"/>
+ <its:translateRule selector="//h:link" translate="no"/>
+</its:rules>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/translate/html/translate2html.html b/tests/ITS-2.0-Testsuite/inputdata/translate/html/translate2html.html
new file mode 100644
index 0000000..576eaea
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/translate/html/translate2html.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+ <html lang="en">
+ <head>
+ <meta charset=utf-8>
+ <title>The Life of a Simple Man</title>
+ </head>
+ <body>
+ <p>
+ <img src="smiley.gif" alt="Smiley face" width="42" height="42"/>
+ Everything started when Zebulon discovered that he had a
+ <span translate="NO">doppelgänger</span>
+ who was a serious baseball
+ <span translate="nO">aficionado</span>
+ .
+ </p>
+ </body>
+</html>
+
diff --git a/tests/ITS-2.0-Testsuite/inputdata/translate/html/translate3html.html b/tests/ITS-2.0-Testsuite/inputdata/translate/html/translate3html.html
new file mode 100644
index 0000000..eece21e
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/translate/html/translate3html.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+ <html>
+ <head>
+ <meta charset=utf-8>
+ <title>EXAMPLE</title>
+ <link href="translate3htmlrules.xml" rel="its-rules"/>
+ </head>
+ <body>
+ <span translate="yes">The Life of a Simple Man</span>
+ <!--
+ Note that the contents of <b> and <span> should end up *not* translatable with these settings
+ -->
+ <section title="section one">
+ <p>
+ Everything started when Zebulon discovered that he had a
+ <span>doppelgänger</span>
+ who was a serious baseball
+ <span>aficionado</span>
+ .
+ </p>
+ </section>
+ </body>
+ </html>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/translate/html/translate3htmlrules.xml b/tests/ITS-2.0-Testsuite/inputdata/translate/html/translate3htmlrules.xml
new file mode 100644
index 0000000..6193ec0
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/translate/html/translate3htmlrules.xml
@@ -0,0 +1,4 @@
+<its:rules xmlns:its="http://www.w3.org/2005/11/its" xmlns:h="http://www.w3.org/1999/xhtml" version="2.0">
+<its:translateRule selector="//h:*" translate="no"/>
+<its:translateRule selector="//h:p" translate="yes"/>
+</its:rules>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/translate/html/translate4html.html b/tests/ITS-2.0-Testsuite/inputdata/translate/html/translate4html.html
new file mode 100644
index 0000000..4baa943
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/translate/html/translate4html.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+ <html>
+ <head>
+ <meta charset=utf-8>
+ <title>EXAMPLE</title>
+ <link href="translate4htmlrules.xml" rel="its-rules"/>
+ </head>
+ <body>
+ <span translate="yes">The Life of a Simple Man</span>
+ <!--
+ Note that the contents of <b> and <span> should end up *not* translatable with these settings
+ -->
+ <section>
+ <p>
+ Everything started when Zebulon discovered that he had a
+ <span>doppelgänger</span>
+ who was a serious baseball
+ <span>aficionado</span>
+ .
+ </p>
+ </section>
+ </body>
+ </html>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/translate/html/translate4htmlrules.xml b/tests/ITS-2.0-Testsuite/inputdata/translate/html/translate4htmlrules.xml
new file mode 100644
index 0000000..c252a2d
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/translate/html/translate4htmlrules.xml
@@ -0,0 +1,4 @@
+<its:rules xmlns:its="http://www.w3.org/2005/11/its" xmlns:h="http://www.w3.org/1999/xhtml" version="2.0">
+<its:translateRule selector="/h:html" translate="no"/>
+<its:translateRule selector="//h:p" translate="yes"/>
+</its:rules>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/translate/html/translate5html.html b/tests/ITS-2.0-Testsuite/inputdata/translate/html/translate5html.html
new file mode 100644
index 0000000..c95d116
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/translate/html/translate5html.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+ <html>
+ <head>
+ <meta charset=utf-8>
+ <title>The ITS Topic</title>
+ <link href="translate5htmlrules.xml" rel="its-rules"/>
+ </head>
+ <body>
+ <section>
+ <span id="tDataCat">
+ <b>Data category</b>
+ <cite>
+ ITS defines
+ <i>data category</i>
+ as an abstract concept for a particular type of information for internationalization and localization of XML schemas and documents.
+ </cite>
+ </span>
+ </section>
+ <p>
+ For the implementation of ITS, apply the rules in the order:
+ </p>
+ <ul>
+ <li>Default</li>
+ <li>Rules in the schema</li>
+ <li>Rules in the document instance</li>
+ <li>Local attributes</li>
+ </ul>
+ <p>
+ <span lang="fr">Et voila !</span>
+ The last rule wins.
+ </p>
+ </body>
+ </html>
+
diff --git a/tests/ITS-2.0-Testsuite/inputdata/translate/html/translate5htmlrules.xml b/tests/ITS-2.0-Testsuite/inputdata/translate/html/translate5htmlrules.xml
new file mode 100644
index 0000000..6193ec0
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/translate/html/translate5htmlrules.xml
@@ -0,0 +1,4 @@
+<its:rules xmlns:its="http://www.w3.org/2005/11/its" xmlns:h="http://www.w3.org/1999/xhtml" version="2.0">
+<its:translateRule selector="//h:*" translate="no"/>
+<its:translateRule selector="//h:p" translate="yes"/>
+</its:rules>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/translate/html/translate6html.html b/tests/ITS-2.0-Testsuite/inputdata/translate/html/translate6html.html
new file mode 100644
index 0000000..a55f8d7
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/translate/html/translate6html.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+ <html>
+ <head>
+ <meta charset=utf-8>
+ <title>The ITS Topic</title>
+ <link href="translate6htmlrules.xml" rel="its-rules"/>
+ </head>
+ <body>
+ <section>
+ <span id="tDataCat">
+ <b>Data category</b>
+ <cite>
+ ITS defines
+ <i>data category</i>
+ as an abstract concept for a particular type of information for internationalization and localization of XML schemas and documents.
+ </cite>
+ </span>
+ </section>
+ <p>
+ For the implementation of ITS, apply the rules in the order:
+ </p>
+ <ul>
+ <li>Default</li>
+ <li>Rules in the schema</li>
+ <li>Rules in the document instance</li>
+ <li>Local attributes</li>
+ </ul>
+ <p>
+ <span lang="fr">Et voila !</span>
+ The last rule wins.
+ </p>
+ </body>
+ </html>
+
diff --git a/tests/ITS-2.0-Testsuite/inputdata/translate/html/translate6htmlrules.xml b/tests/ITS-2.0-Testsuite/inputdata/translate/html/translate6htmlrules.xml
new file mode 100644
index 0000000..dadbad1
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/translate/html/translate6htmlrules.xml
@@ -0,0 +1,6 @@
+<its:rules xmlns:its="http://www.w3.org/2005/11/its" xmlns:h="http://www.w3.org/1999/xhtml" version="2.0">
+<its:param name="tDataCatParam">tDataCat</its:param>
+<its:translateRule selector="//h:*" translate="no"/>
+<its:translateRule selector="//h:p" translate="yes"/>
+<its:translateRule selector="//h:span[@id=$tDataCatParam]" translate="yes"/>
+</its:rules>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/translate/html/translate7html.html b/tests/ITS-2.0-Testsuite/inputdata/translate/html/translate7html.html
new file mode 100644
index 0000000..c17322d
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/translate/html/translate7html.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html lang=en>
+ <head>
+<script type="application/its+xml">
+ <its:rules xmlns:its="http://www.w3.org/2005/11/its" xmlns:h="http://www.w3.org/1999/xhtml" version="2.0">
+ <its:param name="translateparam">name</its:param>
+ <its:translateRule selector="//h:*[@id=$translateparam]" translate="no"/>
+ </its:rules>
+</script>
+ <meta charset="utf-8"/>
+ <title>Example</title>
+ </head>
+ <body title="login details">
+<p style="color:green">Login names can only use letters from A to Z (upper or lowercase)
+ For example: <code id="name">Huck_Finn</code>.</p>
+ </body>
+</html>
+
+
diff --git a/tests/ITS-2.0-Testsuite/inputdata/translate/xml/translate10xml.xml b/tests/ITS-2.0-Testsuite/inputdata/translate/xml/translate10xml.xml
new file mode 100644
index 0000000..0559c51
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/translate/xml/translate10xml.xml
@@ -0,0 +1,7 @@
+<doc>
+ <its:rules xmlns:its="http://www.w3.org/2005/11/its" xmlns:xlink="http://www.w3.org/1999/xlink" version="2.0" xlink:type="simple" xlink:href="translate10xmlrules.xml"/>
+ <msg lcid="409" num="1">Create a folder</msg>
+ <msg lcid="411" num="1">フォルダーを作成する</msg>
+ <msg lcid="407" num="1">Erstellen Sie einen Ordner</msg>
+ <msg lcid="408" num="1">Créer un dossier</msg>
+</doc>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/translate/xml/translate10xmlrules.xml b/tests/ITS-2.0-Testsuite/inputdata/translate/xml/translate10xmlrules.xml
new file mode 100644
index 0000000..5b32c69
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/translate/xml/translate10xmlrules.xml
@@ -0,0 +1,5 @@
+ <its:rules version="2.0" xmlns:its="http://www.w3.org/2005/11/its">
+ <its:param name="LCID">409</its:param>
+ <its:translateRule selector="/doc" translate="no"/>
+ <its:translateRule selector="//msg[@lcid=$LCID]" translate="yes"/>
+ </its:rules>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/translate/xml/translate1xml.xml b/tests/ITS-2.0-Testsuite/inputdata/translate/xml/translate1xml.xml
new file mode 100644
index 0000000..5649d70
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/translate/xml/translate1xml.xml
@@ -0,0 +1,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>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/translate/xml/translate2xml.xml b/tests/ITS-2.0-Testsuite/inputdata/translate/xml/translate2xml.xml
new file mode 100644
index 0000000..68bfd3f
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/translate/xml/translate2xml.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<myDoc>
+ <head>
+ <its:rules xmlns:its="http://www.w3.org/2005/11/its" version="2.0"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="translate2xmlrules.xml"/>
+ </head>
+ <body>
+ <par id="100" title="Text">This is the first paragraph. It has some <code>un-translatable code</code>.</par>
+ </body>
+</myDoc>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/translate/xml/translate2xmlrules.xml b/tests/ITS-2.0-Testsuite/inputdata/translate/xml/translate2xmlrules.xml
new file mode 100644
index 0000000..69de855
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/translate/xml/translate2xmlrules.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="2.0">
+ <its:translateRule selector="//code" translate="no"/>
+ <its:translateRule selector="//*/@title" translate="yes"/>
+</its:rules>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/translate/xml/translate3xml.xml b/tests/ITS-2.0-Testsuite/inputdata/translate/xml/translate3xml.xml
new file mode 100644
index 0000000..fcccc69
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/translate/xml/translate3xml.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<myDoc>
+ <head>
+ <its:rules xmlns:its="http://www.w3.org/2005/11/its" version="2.0"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="translate3xmlrules.xml">
+ <its:translateRule selector="//par[@id='101']/@title" translate="no"/>
+ </its:rules>
+ </head>
+ <body>
+ <par id="100" title="Text">This is the first paragraph. It has some <code>un-translatable code</code>.</par>
+ <par id="101" title="Not extractable text">Some additional text.</par>
+ </body>
+</myDoc>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/translate/xml/translate3xmlrules.xml b/tests/ITS-2.0-Testsuite/inputdata/translate/xml/translate3xmlrules.xml
new file mode 100644
index 0000000..0a45c97
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/translate/xml/translate3xmlrules.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="2.0">
+ <its:translateRule selector="//head" translate="no"/>
+ <its:translateRule selector="//code" translate="no"/>
+ <its:translateRule selector="//*/@title" translate="yes"/>
+</its:rules>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/translate/xml/translate4xml.xml b/tests/ITS-2.0-Testsuite/inputdata/translate/xml/translate4xml.xml
new file mode 100644
index 0000000..ac26ccc
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/translate/xml/translate4xml.xml
@@ -0,0 +1,11 @@
+<book xmlns:its="http://www.w3.org/2005/11/its" its:version="2.0">
+ <head>
+ <title>The Life of a Simple Man</title>
+ </head>
+ <body>
+ <img src="smiley.gif" alt="Smiley face" width="42" height="42"/>
+ <p>Everything started when Zebulon discovered that he had
+ a <fexp its:translate="no">doppelgänger</fexp> who was a
+ serious baseball <fexp its:translate="no">aficionado</fexp>.</p>
+ </body>
+</book>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/translate/xml/translate5xml.xml b/tests/ITS-2.0-Testsuite/inputdata/translate/xml/translate5xml.xml
new file mode 100644
index 0000000..19acae2
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/translate/xml/translate5xml.xml
@@ -0,0 +1,13 @@
+<book xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="EX-ways-to-use-its-5.xsd"
+ xmlns:its="http://www.w3.org/2005/11/its"
+ its:version="2.0">
+ <head>
+ <title>The Life of a Simple Man</title>
+ </head>
+ <body>
+ <p>Everything started when Zebulon discovered that he had
+ a <its:span translate="no">doppelgänger</its:span> who was a
+ serious baseball <its:span translate="no">aficionado</its:span>.</p>
+ </body>
+</book>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/translate/xml/translate6xml.xml b/tests/ITS-2.0-Testsuite/inputdata/translate/xml/translate6xml.xml
new file mode 100644
index 0000000..28bbea1
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/translate/xml/translate6xml.xml
@@ -0,0 +1,19 @@
+<doc xmlns:its="http://www.w3.org/2005/11/its" its:version="2.0">
+ <head>
+ <its:rules version="2.0">
+ <its:translateRule selector="//*" translate="no"/>
+ <its:translateRule selector="//p" translate="yes"/>
+ </its:rules>
+ </head>
+ <info>
+ <item type="title" its:translate="yes">The Life of a <b>Simple Man</b></item>
+ <!-- Note that the contents of <b> and <span> should end up
+ *not* translatable with these settings -->
+ <item type="date-main">Dec-05-2006</item>
+ </info>
+ <content>
+ <p>Everything started when Zebulon discovered that he had
+ a <span>doppelgänger</span> who was a
+ serious baseball <span>aficionado</span>.</p>
+ </content>
+</doc>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/translate/xml/translate7xml.xml b/tests/ITS-2.0-Testsuite/inputdata/translate/xml/translate7xml.xml
new file mode 100644
index 0000000..20e9ea7
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/translate/xml/translate7xml.xml
@@ -0,0 +1,19 @@
+<doc xmlns:its="http://www.w3.org/2005/11/its" its:version="2.0">
+ <head>
+ <its:rules version="2.0">
+ <its:translateRule selector="/doc" translate="no"/>
+ <its:translateRule selector="//p" translate="yes"/>
+ </its:rules>
+ </head>
+ <info>
+ <item type="title" its:translate="yes">The Life of a <b>Simple Man</b></item>
+ <!-- Note that the contents of <b> and <span> should end up
+ translatable with these settings -->
+ <item type="date-main">Dec-05-2006</item>
+ </info>
+ <content>
+ <p>Everything started when Zebulon discovered that he had
+ a <span>doppelgänger</span> who was a
+ serious baseball <span>aficionado</span>.</p>
+ </content>
+</doc>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/translate/xml/translate8xml.xml b/tests/ITS-2.0-Testsuite/inputdata/translate/xml/translate8xml.xml
new file mode 100644
index 0000000..78f6cd5
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/translate/xml/translate8xml.xml
@@ -0,0 +1,28 @@
+<topic id="myTopic">
+ <title>The ITS Topic</title>
+ <prolog>
+ <its:rules xmlns:its="http://www.w3.org/2005/11/its" version="2.0">
+ <its:translateRule selector="//*" translate="no"/>
+ <its:translateRule selector="//p" translate="yes"/>
+ <!-- With these rules only the text "For the implementation of ITS, apply the rules in the order:"
+ and " The last rule wins." should end up translatable -->
+ </its:rules>
+ </prolog>
+ <body>
+ <dl>
+ <dlentry id="tDataCat">
+ <dt>Data category</dt>
+ <dd>ITS defines <term>data category</term> as an abstract concept for a particular
+ type of information for internationalization and localization of XML schemas and documents.</dd>
+ </dlentry>
+ </dl>
+ <p>For the implementation of ITS, apply the rules in the order:</p>
+ <ul>
+ <li>Default</li>
+ <li>Rules in the schema</li>
+ <li>Rules in the document instance</li>
+ <li>Local attributes</li>
+ </ul>
+ <p><ph xml:lang="fr">Et voilà !</ph> The last rule wins.</p>
+ </body>
+</topic>
diff --git a/tests/ITS-2.0-Testsuite/inputdata/translate/xml/translate9xml.xml b/tests/ITS-2.0-Testsuite/inputdata/translate/xml/translate9xml.xml
new file mode 100644
index 0000000..f8606b6
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/inputdata/translate/xml/translate9xml.xml
@@ -0,0 +1,11 @@
+<doc>
+ <its:rules xmlns:its="http://www.w3.org/2005/11/its" version="2.0">
+ <its:param name="LCID">409</its:param>
+ <its:translateRule selector="/doc" translate="no"/>
+ <its:translateRule selector="//msg[@lcid=$LCID]" translate="yes"/>
+ </its:rules>
+ <msg lcid="409" num="1">Create a folder</msg>
+ <msg lcid="411" num="1">フォルダーを作成する</msg>
+ <msg lcid="407" num="1">Erstellen Sie einen Ordner</msg>
+ <msg lcid="40c" num="1">Créer un dossier</msg>
+</doc>
diff --git a/tests/ITS-2.0-Testsuite/run_tests.sh b/tests/ITS-2.0-Testsuite/run_tests.sh
new file mode 100755
index 0000000..f8e33d9
--- /dev/null
+++ b/tests/ITS-2.0-Testsuite/run_tests.sh
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+testdata="
+elementswithintext/withintext/withinText
+externalresource/externalresource/externalResourceRef
+idvalue/idvalue/idValue
+localefilter/locale/localeFilter
+localizationnote/locnote/locNote
+preservespace/preservespace/preserveSpace
+translate/translate/translate
+"
+
+for datum in $testdata; do
+ for format in xml; do
+ testdir=`echo $datum | cut -d/ -f1`
+ testbase=`echo $datum | cut -d/ -f2`
+ testcat=`echo $datum | cut -d/ -f3`
+ testpre="inputdata/$testdir/$format/$testbase"
+ for testfile in `ls ${testpre}*${format}.${format}`; do
+ testnum=`basename ${testfile:${#testpre}} ${format}.${format}`
+ skip=0
+ #for ex in $exclude; do
+ # if [ "$testbase$testnum$format" = "$ex" ]; then skip=1; break; fi;
+ #done
+ if [ "$skip" = "0" ]; then
+ expected="expected/$testdir/$format/$testbase$testnum${format}output.txt"
+ realout="realout/$testdir/$format/$testbase$testnum${format}output.txt"
+ mkdir -p "realout/$testdir/$format"
+ python ../../itstool.in -n -t $testcat -o $realout $testfile
+ if ! cmp "$expected" "$realout"; then
+ echo "$expected";
+ exit 1;
+ fi
+ fi
+ done
+ done
+done
diff --git a/tests/IdValue/idvalue1xml.pot b/tests/IdValue/idvalue1xml.pot
new file mode 100644
index 0000000..0b7c66f
--- /dev/null
+++ b/tests/IdValue/idvalue1xml.pot
@@ -0,0 +1,23 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2012-09-26 07:25-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. (itstool) path: msg/text
+#. (itstool) id: idvalue1xml.xml#settingsMissing_t
+#: tests/IdValue/idvalue1xml.xml:8
+msgid "Can't find settings file."
+msgstr ""
+
+#. (itstool) path: msg/desc
+#. (itstool) id: idvalue1xml.xml#settingsMissing_d
+#: tests/IdValue/idvalue1xml.xml:9
+msgid "The module cannot find the default settings file. You need to re-initialize the system."
+msgstr ""
+
diff --git a/tests/IdValue/idvalue1xml.xml b/tests/IdValue/idvalue1xml.xml
new file mode 100644
index 0000000..a9de49d
--- /dev/null
+++ b/tests/IdValue/idvalue1xml.xml
@@ -0,0 +1,12 @@
+<doc
+ xmlns:its="http://www.w3.org/2005/11/its" >
+ <its:rules version="2.0">
+ <its:idValueRule selector="//text" idValue="concat(../@name, '_t')"/>
+ <its:idValueRule selector="//desc" idValue="concat(../@name, '_d')"/>
+ </its:rules>
+ <msg name="settingsMissing">
+ <text>Can't find settings file.</text>
+ <desc>The module cannot find the default settings file.
+ You need to re-initialize the system.</desc>
+ </msg>
+</doc>
diff --git a/tests/IdValue/idvalue2xml.pot b/tests/IdValue/idvalue2xml.pot
new file mode 100644
index 0000000..d35df0e
--- /dev/null
+++ b/tests/IdValue/idvalue2xml.pot
@@ -0,0 +1,22 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2012-09-26 07:28-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. (itstool) path: file/res
+#. (itstool) id: idvalue2xml.xml#btnAgain
+#: tests/IdValue/idvalue2xml.xml:2
+msgid "Try Again"
+msgstr ""
+
+#. (itstool) path: file/res
+#: tests/IdValue/idvalue2xml.xml:3
+msgid "click this to re-run the process with the current settings."
+msgstr ""
+
diff --git a/tests/IdValue/idvalue2xml.xml b/tests/IdValue/idvalue2xml.xml
new file mode 100644
index 0000000..a27ad31
--- /dev/null
+++ b/tests/IdValue/idvalue2xml.xml
@@ -0,0 +1,4 @@
+<file>
+ <res name="retryBtn" xml:id="btnAgain">Try Again</res>
+ <res name="retryTip">click this to re-run the process with the current settings.</res>
+</file>
diff --git a/tests/IdValue/idvalue3XmlRule.xml b/tests/IdValue/idvalue3XmlRule.xml
new file mode 100644
index 0000000..35bcaaa
--- /dev/null
+++ b/tests/IdValue/idvalue3XmlRule.xml
@@ -0,0 +1,4 @@
+<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="2.0">
+ <its:idValueRule selector="//text" idValue="concat(../@name, '_t')"/>
+ <its:idValueRule selector="//desc" idValue="concat(../@name, '_d')"/>
+ </its:rules>
diff --git a/tests/IdValue/idvalue3xml.pot b/tests/IdValue/idvalue3xml.pot
new file mode 100644
index 0000000..c5e43c6
--- /dev/null
+++ b/tests/IdValue/idvalue3xml.pot
@@ -0,0 +1,23 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2012-09-26 07:29-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. (itstool) path: msg/text
+#. (itstool) id: idvalue3xml.xml#settingsMissing_t
+#: tests/IdValue/idvalue3xml.xml:5
+msgid "Can't find settings file."
+msgstr ""
+
+#. (itstool) path: msg/desc
+#. (itstool) id: idvalue3xml.xml#settingsMissing_d
+#: tests/IdValue/idvalue3xml.xml:6
+msgid "The module cannot find the default settings file. You need to re-initialize the system."
+msgstr ""
+
diff --git a/tests/IdValue/idvalue3xml.xml b/tests/IdValue/idvalue3xml.xml
new file mode 100644
index 0000000..bd7834a
--- /dev/null
+++ b/tests/IdValue/idvalue3xml.xml
@@ -0,0 +1,11 @@
+<doc
+ xmlns:its="http://www.w3.org/2005/11/its" >
+ <its:rules xmlns:its="http://www.w3.org/2005/11/its" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.0" xlink:type="simple" xlink:href="idvalue3XmlRule.xml"/>
+ <msg name="settingsMissing">
+ <text>Can't find settings file.</text>
+ <desc>The module cannot find the default settings file.
+ You need to re-initialize the system.</desc>
+ </msg>
+</doc>
+
+
diff --git a/tests/EX-locNote-element-1.pot b/tests/LocNote/EX-locNote-element-1.pot
index df06564..f889052 100644
--- a/tests/EX-locNote-element-1.pot
+++ b/tests/LocNote/EX-locNote-element-1.pot
@@ -12,7 +12,7 @@ msgstr ""
#. (itstool) path: body/msg
#. The variable {0} has three possible values: 'printer', 'stacker' and
#. 'stapler options'.
-#: tests/EX-locNote-element-1.xml:12
+#: tests/LocNote/EX-locNote-element-1.xml:12
msgid "The {0} has been disabled."
msgstr ""
diff --git a/tests/EX-locNote-element-1.xml b/tests/LocNote/EX-locNote-element-1.xml
index ee04041..ee04041 100644
--- a/tests/EX-locNote-element-1.xml
+++ b/tests/LocNote/EX-locNote-element-1.xml
diff --git a/tests/EX-locNote-selector-2.pot b/tests/LocNote/EX-locNote-selector-2.pot
index 4ea79df..6932284 100644
--- a/tests/EX-locNote-selector-2.pot
+++ b/tests/LocNote/EX-locNote-selector-2.pot
@@ -11,7 +11,7 @@ msgstr ""
#. (itstool) path: data/value
#. Keep the leading space!
-#: tests/EX-locNote-selector-2.xml:5
+#: tests/LocNote/EX-locNote-selector-2.xml:5
#, no-wrap
msgid ""
" Variant {0} = {1} ({2})"
@@ -20,7 +20,7 @@ msgstr ""
#. (itstool) path: value/span
#. %1\$s is the original text's date in the format YYYY-MM-DD HH:MM always
#. in GMT
-#: tests/EX-locNote-selector-2.xml:8
+#: tests/LocNote/EX-locNote-selector-2.xml:8
#, no-wrap
msgid ""
"%1\\$s"
@@ -29,7 +29,7 @@ msgstr ""
#. (itstool) path: data/value
#. %1\$s is the original text's date in the format YYYY-MM-DD HH:MM always
#. in GMT
-#: tests/EX-locNote-selector-2.xml:8
+#: tests/LocNote/EX-locNote-selector-2.xml:8
#, no-wrap
msgid ""
"Translated from English content dated <_:span-1/> GMT."
diff --git a/tests/EX-locNote-selector-2.xml b/tests/LocNote/EX-locNote-selector-2.xml
index 4b38f6a..4b38f6a 100644
--- a/tests/EX-locNote-selector-2.xml
+++ b/tests/LocNote/EX-locNote-selector-2.xml
diff --git a/tests/EX-locNotePointer-attribute-1.pot b/tests/LocNote/EX-locNotePointer-attribute-1.pot
index 178b2a1..7233c02 100644
--- a/tests/EX-locNotePointer-attribute-1.pot
+++ b/tests/LocNote/EX-locNotePointer-attribute-1.pot
@@ -11,13 +11,13 @@ msgstr ""
#. (itstool) path: msg/data
#. Indicates that the resource file {0} could not be loaded.
-#: tests/EX-locNotePointer-attribute-1.xml:12
+#: tests/LocNote/EX-locNotePointer-attribute-1.xml:12
msgid "Cannot find the file {0}."
msgstr ""
#. (itstool) path: msg/data
#. A division by 0 was going to be computed.
-#: tests/EX-locNotePointer-attribute-1.xml:16
+#: tests/LocNote/EX-locNotePointer-attribute-1.xml:16
msgid "Invalid parameter."
msgstr ""
diff --git a/tests/EX-locNotePointer-attribute-1.xml b/tests/LocNote/EX-locNotePointer-attribute-1.xml
index c897140..c897140 100644
--- a/tests/EX-locNotePointer-attribute-1.xml
+++ b/tests/LocNote/EX-locNotePointer-attribute-1.xml
diff --git a/tests/EX-locNoteRef-attribute-1.pot b/tests/LocNote/EX-locNoteRef-attribute-1.pot
index 05367fe..aba63f0 100644
--- a/tests/EX-locNoteRef-attribute-1.pot
+++ b/tests/LocNote/EX-locNoteRef-attribute-1.pot
@@ -11,7 +11,7 @@ msgstr ""
#. (itstool) path: body/msg
#. (itstool) link: ErrorsInfo.html/#NotFound
-#: tests/EX-locNoteRef-attribute-1.xml:10
+#: tests/LocNote/EX-locNoteRef-attribute-1.xml:10
msgid "Cannot find {0} on {1}."
msgstr ""
diff --git a/tests/EX-locNoteRef-attribute-1.xml b/tests/LocNote/EX-locNoteRef-attribute-1.xml
index 2a645a4..2a645a4 100644
--- a/tests/EX-locNoteRef-attribute-1.xml
+++ b/tests/LocNote/EX-locNoteRef-attribute-1.xml
diff --git a/tests/EX-locNoteRefPointer-attribute-1.pot b/tests/LocNote/EX-locNoteRefPointer-attribute-1.pot
index 4ed7edc..94b8ab1 100644
--- a/tests/EX-locNoteRefPointer-attribute-1.pot
+++ b/tests/LocNote/EX-locNoteRefPointer-attribute-1.pot
@@ -11,13 +11,13 @@ msgstr ""
#. (itstool) path: string/data
#. (itstool) link: Comments.html#FileNotFound
-#: tests/EX-locNoteRefPointer-attribute-1.xml:10
+#: tests/LocNote/EX-locNoteRefPointer-attribute-1.xml:10
msgid "Cannot find the file {0}."
msgstr ""
#. (itstool) path: string/data
#. (itstool) link: Comments.html#DivByZero
-#: tests/EX-locNoteRefPointer-attribute-1.xml:13
+#: tests/LocNote/EX-locNoteRefPointer-attribute-1.xml:13
msgid "Invalid parameter."
msgstr ""
diff --git a/tests/EX-locNoteRefPointer-attribute-1.xml b/tests/LocNote/EX-locNoteRefPointer-attribute-1.xml
index 8039812..8039812 100644
--- a/tests/EX-locNoteRefPointer-attribute-1.xml
+++ b/tests/LocNote/EX-locNoteRefPointer-attribute-1.xml
diff --git a/tests/LocNote1.pot b/tests/LocNote/LocNote1.pot
index c2ae789..31951e3 100644
--- a/tests/LocNote1.pot
+++ b/tests/LocNote/LocNote1.pot
@@ -9,20 +9,40 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+#. (itstool) path: locNoteRule/locNote
+#: tests/LocNote/LocNote1.xml:5
+msgid "This text will be displayed over the image."
+msgstr ""
+
+#. (itstool) path: locNoteRule/locNote
+#: tests/LocNote/LocNote1.xml:8
+msgid "Do not translate the word \"Chobe\""
+msgstr ""
+
+#. (itstool) path: locNote/code
+#: tests/LocNote/LocNote1.xml:11
+msgid "{0}"
+msgstr ""
+
+#. (itstool) path: locNoteRule/locNote
+#: tests/LocNote/LocNote1.xml:11
+msgid "The variable <_:code-1/> has three possible values: 'printer', 'stacker' and 'stapler options'."
+msgstr ""
+
#. (itstool) path: body/msg
-#: tests/LocNote1.xml:17
+#: tests/LocNote/LocNote1.xml:17
msgid "This is a hippoptamus: <_:img-1/>."
msgstr ""
#. (itstool) path: body/msg
-#: tests/LocNote1.xml:18
+#: tests/LocNote/LocNote1.xml:18
msgid "This is an elephant: <_:img-1/>."
msgstr ""
#. (itstool) path: body/msg
#. The variable {0} has three possible values: 'printer', 'stacker' and
#. 'stapler options'.
-#: tests/LocNote1.xml:19
+#: tests/LocNote/LocNote1.xml:19
msgid "The {0} has been disabled."
msgstr ""
diff --git a/tests/LocNote1.xml b/tests/LocNote/LocNote1.xml
index 80ac98d..80ac98d 100644
--- a/tests/LocNote1.xml
+++ b/tests/LocNote/LocNote1.xml
diff --git a/tests/LocNote2.pot b/tests/LocNote/LocNote2.pot
index 8ab05e9..06e5ecc 100644
--- a/tests/LocNote2.pot
+++ b/tests/LocNote/LocNote2.pot
@@ -9,20 +9,25 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+#. (itstool) path: locNoteRule/locNote
+#: tests/LocNote/LocNote2.xml:6
+msgid "Do not translate the word \"Chobe\""
+msgstr ""
+
#. (itstool) path: body/msg
-#: tests/LocNote2.xml:11
+#: tests/LocNote/LocNote2.xml:11
msgid "This is a hippoptamus: <_:img-1/>."
msgstr ""
#. (itstool) path: body/msg
-#: tests/LocNote2.xml:12
+#: tests/LocNote/LocNote2.xml:12
msgid "This is an elephant: <_:img-1/>."
msgstr ""
#. (itstool) path: body/msg
#. The variable {0} has three possible values: 'printer', 'stacker' and
#. 'stapler options'.
-#: tests/LocNote2.xml:13
+#: tests/LocNote/LocNote2.xml:13
msgid "The {0} has been disabled."
msgstr ""
diff --git a/tests/LocNote2.xml b/tests/LocNote/LocNote2.xml
index ba59ce3..ba59ce3 100644
--- a/tests/LocNote2.xml
+++ b/tests/LocNote/LocNote2.xml
diff --git a/tests/LocNote2_LinkedRules.xml b/tests/LocNote/LocNote2_LinkedRules.xml
index 51ecaaa..51ecaaa 100644
--- a/tests/LocNote2_LinkedRules.xml
+++ b/tests/LocNote/LocNote2_LinkedRules.xml
diff --git a/tests/LocNote3.pot b/tests/LocNote/LocNote3.pot
index 61996a0..3d5c420 100644
--- a/tests/LocNote3.pot
+++ b/tests/LocNote/LocNote3.pot
@@ -11,25 +11,25 @@ msgstr ""
#. (itstool) path: msg/data
#. The variable {0} is the name of the host.
-#: tests/LocNote3.xml:5
+#: tests/LocNote/LocNote3.xml:5
msgid "Host {0} cannot be found."
msgstr ""
#. (itstool) path: msg/data
#. The variable {0} is the name of the host.
-#: tests/LocNote3.xml:8
+#: tests/LocNote/LocNote3.xml:8
msgid "The connection with {0} has been lost."
msgstr ""
#. (itstool) path: msg/data
#. {0} is a filename
-#: tests/LocNote3.xml:11
+#: tests/LocNote/LocNote3.xml:11
msgid "{0} not found."
msgstr ""
#. (itstool) path: msg/data
#. (itstool) link: myLocNotes.htm#CannotLog
-#: tests/LocNote3.xml:14
+#: tests/LocNote/LocNote3.xml:14
msgid "Cannot log with this username."
msgstr ""
diff --git a/tests/LocNote3.xml b/tests/LocNote/LocNote3.xml
index 1deab5c..1deab5c 100644
--- a/tests/LocNote3.xml
+++ b/tests/LocNote/LocNote3.xml
diff --git a/tests/LocNote4.pot b/tests/LocNote/LocNote4.pot
index 9d8beb0..16b00f9 100644
--- a/tests/LocNote4.pot
+++ b/tests/LocNote/LocNote4.pot
@@ -11,25 +11,25 @@ msgstr ""
#. (itstool) path: span/span
#. (itstool) link: http://en.wikipedia.org/wiki/Doppelganger
-#: tests/LocNote4.xml:5
+#: tests/LocNote/LocNote4.xml:5
msgid "doppelgänger"
msgstr ""
#. (itstool) path: span/b
#. If possible keep the non-English terms in the translated version too
-#: tests/LocNote4.xml:6
+#: tests/LocNote/LocNote4.xml:6
msgid "serious"
msgstr ""
#. (itstool) path: span/span
#. (itstool) link: http://en.wikipedia.org/wiki/Aficionado
-#: tests/LocNote4.xml:6
+#: tests/LocNote/LocNote4.xml:6
msgid "aficionado"
msgstr ""
#. (itstool) path: p/span
#. If possible keep the non-English terms in the translated version too
-#: tests/LocNote4.xml:4
+#: tests/LocNote/LocNote4.xml:4
msgid "Everything started when Zebulon discovered that he had a <_:span-1/> who was a <_:b-2/> baseball <_:span-3/>."
msgstr ""
diff --git a/tests/LocNote4.xml b/tests/LocNote/LocNote4.xml
index 2a0d252..2a0d252 100644
--- a/tests/LocNote4.xml
+++ b/tests/LocNote/LocNote4.xml
diff --git a/tests/LocaleFilter/Locale1Xml.fr_CA.po b/tests/LocaleFilter/Locale1Xml.fr_CA.po
new file mode 100644
index 0000000..c57c307
--- /dev/null
+++ b/tests/LocaleFilter/Locale1Xml.fr_CA.po
@@ -0,0 +1,23 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2012-09-11 10:58-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. (itstool) path: legalnotice/para
+#. (itstool) include locale: en-CA, fr-CA
+#: tests/LocaleFilter/Locale1Xml.xml:11
+msgid "This legal notice is only for Canadian locales."
+msgstr "Cet avis juridique est seulement pour les locales canadiennes."
+
+#. (itstool) path: legalnotice/para
+#. (itstool) include locale: *-CH
+#: tests/LocaleFilter/Locale1Xml.xml:14
+msgid "This legal notice is only for Swiss locales."
+msgstr "Cet avis juridique est seulement pour les locales suisses."
+
diff --git a/tests/LocaleFilter/Locale1Xml.fr_CA.xml b/tests/LocaleFilter/Locale1Xml.fr_CA.xml
new file mode 100644
index 0000000..edb0cb9
--- /dev/null
+++ b/tests/LocaleFilter/Locale1Xml.fr_CA.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<book xmlns:its="http://www.w3.org/2005/11/its" its:version="2.0">
+ <info>
+ <its:rules version="2.0">
+ <its:localeFilterRule selector="//legalnotice[@role='Canada']" localeFilterList="en-CA, fr-CA"/>
+ <its:localeFilterRule selector="//legalnotice[@role='Switzerland']" localeFilterList="*-CH"/>
+ <its:localeFilterRule selector="//remark" localeFilterList=""/>
+ </its:rules>
+ <legalnotice role="Canada">
+ <para>Cet avis juridique est seulement pour les locales canadiennes.</para>
+ </legalnotice>
+ </info>
+</book>
diff --git a/tests/LocaleFilter/Locale1Xml.fr_CH.po b/tests/LocaleFilter/Locale1Xml.fr_CH.po
new file mode 100644
index 0000000..c57c307
--- /dev/null
+++ b/tests/LocaleFilter/Locale1Xml.fr_CH.po
@@ -0,0 +1,23 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2012-09-11 10:58-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. (itstool) path: legalnotice/para
+#. (itstool) include locale: en-CA, fr-CA
+#: tests/LocaleFilter/Locale1Xml.xml:11
+msgid "This legal notice is only for Canadian locales."
+msgstr "Cet avis juridique est seulement pour les locales canadiennes."
+
+#. (itstool) path: legalnotice/para
+#. (itstool) include locale: *-CH
+#: tests/LocaleFilter/Locale1Xml.xml:14
+msgid "This legal notice is only for Swiss locales."
+msgstr "Cet avis juridique est seulement pour les locales suisses."
+
diff --git a/tests/LocaleFilter/Locale1Xml.fr_CH.xml b/tests/LocaleFilter/Locale1Xml.fr_CH.xml
new file mode 100644
index 0000000..f084c4a
--- /dev/null
+++ b/tests/LocaleFilter/Locale1Xml.fr_CH.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<book xmlns:its="http://www.w3.org/2005/11/its" its:version="2.0">
+ <info>
+ <its:rules version="2.0">
+ <its:localeFilterRule selector="//legalnotice[@role='Canada']" localeFilterList="en-CA, fr-CA"/>
+ <its:localeFilterRule selector="//legalnotice[@role='Switzerland']" localeFilterList="*-CH"/>
+ <its:localeFilterRule selector="//remark" localeFilterList=""/>
+ </its:rules>
+ <legalnotice role="Switzerland">
+ <para>Cet avis juridique est seulement pour les locales suisses.</para>
+ </legalnotice>
+ </info>
+</book>
diff --git a/tests/LocaleFilter/Locale1Xml.fr_FR.po b/tests/LocaleFilter/Locale1Xml.fr_FR.po
new file mode 100644
index 0000000..c57c307
--- /dev/null
+++ b/tests/LocaleFilter/Locale1Xml.fr_FR.po
@@ -0,0 +1,23 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2012-09-11 10:58-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. (itstool) path: legalnotice/para
+#. (itstool) include locale: en-CA, fr-CA
+#: tests/LocaleFilter/Locale1Xml.xml:11
+msgid "This legal notice is only for Canadian locales."
+msgstr "Cet avis juridique est seulement pour les locales canadiennes."
+
+#. (itstool) path: legalnotice/para
+#. (itstool) include locale: *-CH
+#: tests/LocaleFilter/Locale1Xml.xml:14
+msgid "This legal notice is only for Swiss locales."
+msgstr "Cet avis juridique est seulement pour les locales suisses."
+
diff --git a/tests/LocaleFilter/Locale1Xml.fr_FR.xml b/tests/LocaleFilter/Locale1Xml.fr_FR.xml
new file mode 100644
index 0000000..51bc1d2
--- /dev/null
+++ b/tests/LocaleFilter/Locale1Xml.fr_FR.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<book xmlns:its="http://www.w3.org/2005/11/its" its:version="2.0">
+ <info>
+ <its:rules version="2.0">
+ <its:localeFilterRule selector="//legalnotice[@role='Canada']" localeFilterList="en-CA, fr-CA"/>
+ <its:localeFilterRule selector="//legalnotice[@role='Switzerland']" localeFilterList="*-CH"/>
+ <its:localeFilterRule selector="//remark" localeFilterList=""/>
+ </its:rules>
+ </info>
+</book>
diff --git a/tests/LocaleFilter/Locale1Xml.joined.xml b/tests/LocaleFilter/Locale1Xml.joined.xml
new file mode 100644
index 0000000..c29d234
--- /dev/null
+++ b/tests/LocaleFilter/Locale1Xml.joined.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<book xmlns:its="http://www.w3.org/2005/11/its" its:version="2.0">
+ <info>
+ <its:rules version="2.0">
+ <its:localeFilterRule selector="//legalnotice[@role='Canada']" localeFilterList="en-CA, fr-CA"/>
+ <its:localeFilterRule selector="//legalnotice[@role='Switzerland']" localeFilterList="*-CH"/>
+ <its:localeFilterRule selector="//remark" localeFilterList=""/>
+ </its:rules>
+ <legalnotice role="Canada">
+ <para>This legal notice is only for Canadian locales.</para>
+ <para xml:lang="fr-CA">Cet avis juridique est seulement pour les locales canadiennes.</para>
+ </legalnotice>
+ <legalnotice role="Switzerland">
+ <para>This legal notice is only for Swiss locales.</para>
+ <para xml:lang="fr-CH">Cet avis juridique est seulement pour les locales suisses.</para>
+ </legalnotice>
+ <remark>
+ This remark appears in no translations.
+ </remark>
+ </info>
+</book>
diff --git a/tests/LocaleFilter/Locale1Xml.pot b/tests/LocaleFilter/Locale1Xml.pot
new file mode 100644
index 0000000..073b96a
--- /dev/null
+++ b/tests/LocaleFilter/Locale1Xml.pot
@@ -0,0 +1,23 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2012-09-11 10:58-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. (itstool) path: legalnotice/para
+#. (itstool) include locale: en-CA, fr-CA
+#: tests/LocaleFilter/Locale1Xml.xml:11
+msgid "This legal notice is only for Canadian locales."
+msgstr ""
+
+#. (itstool) path: legalnotice/para
+#. (itstool) include locale: *-CH
+#: tests/LocaleFilter/Locale1Xml.xml:14
+msgid "This legal notice is only for Swiss locales."
+msgstr ""
+
diff --git a/tests/LocaleFilter/Locale1Xml.xml b/tests/LocaleFilter/Locale1Xml.xml
new file mode 100644
index 0000000..a28e99e
--- /dev/null
+++ b/tests/LocaleFilter/Locale1Xml.xml
@@ -0,0 +1,20 @@
+<book
+ xmlns:its="http://www.w3.org/2005/11/its"
+ its:version="2.0">
+ <info>
+ <its:rules version="2.0">
+ <its:localeFilterRule selector="//legalnotice[@role='Canada']" localeFilterList="en-CA, fr-CA"/>
+ <its:localeFilterRule selector="//legalnotice[@role='Switzerland']" localeFilterList="*-CH"/>
+ <its:localeFilterRule selector="//remark" localeFilterList=""/>
+ </its:rules>
+ <legalnotice role="Canada">
+ <para>This legal notice is only for Canadian locales.</para>
+ </legalnotice>
+ <legalnotice role="Switzerland">
+ <para>This legal notice is only for Swiss locales.</para>
+ </legalnotice>
+ <remark>
+ This remark appears in no translations.
+ </remark>
+ </info>
+</book>
diff --git a/tests/LocaleFilter/Locale2Xml.fr_CA.po b/tests/LocaleFilter/Locale2Xml.fr_CA.po
new file mode 100644
index 0000000..3964bbc
--- /dev/null
+++ b/tests/LocaleFilter/Locale2Xml.fr_CA.po
@@ -0,0 +1,23 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2012-09-11 10:58-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. (itstool) path: legalnotice/para
+#. (itstool) include locale: en-CA, fr-CA
+#: tests/LocaleFilter/Locale2Xml.xml:5
+msgid "This legal notice is only for Canadian locales."
+msgstr "Cet avis juridique est seulement pour les locales canadiennes."
+
+#. (itstool) path: legalnotice/para
+#. (itstool) include locale: *-CH
+#: tests/LocaleFilter/Locale2Xml.xml:8
+msgid "This legal notice is only for Swiss locales."
+msgstr "Cet avis juridique est seulement pour les locales suisses."
+
diff --git a/tests/LocaleFilter/Locale2Xml.fr_CA.xml b/tests/LocaleFilter/Locale2Xml.fr_CA.xml
new file mode 100644
index 0000000..5f03f74
--- /dev/null
+++ b/tests/LocaleFilter/Locale2Xml.fr_CA.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<book xmlns:its="http://www.w3.org/2005/11/its">
+ <info>
+ <legalnotice its:localeFilterList="en-CA, fr-CA">
+ <para>Cet avis juridique est seulement pour les locales canadiennes.</para>
+ </legalnotice>
+ </info>
+</book>
diff --git a/tests/LocaleFilter/Locale2Xml.fr_CH.po b/tests/LocaleFilter/Locale2Xml.fr_CH.po
new file mode 100644
index 0000000..3964bbc
--- /dev/null
+++ b/tests/LocaleFilter/Locale2Xml.fr_CH.po
@@ -0,0 +1,23 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2012-09-11 10:58-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. (itstool) path: legalnotice/para
+#. (itstool) include locale: en-CA, fr-CA
+#: tests/LocaleFilter/Locale2Xml.xml:5
+msgid "This legal notice is only for Canadian locales."
+msgstr "Cet avis juridique est seulement pour les locales canadiennes."
+
+#. (itstool) path: legalnotice/para
+#. (itstool) include locale: *-CH
+#: tests/LocaleFilter/Locale2Xml.xml:8
+msgid "This legal notice is only for Swiss locales."
+msgstr "Cet avis juridique est seulement pour les locales suisses."
+
diff --git a/tests/LocaleFilter/Locale2Xml.fr_CH.xml b/tests/LocaleFilter/Locale2Xml.fr_CH.xml
new file mode 100644
index 0000000..f1d2aa7
--- /dev/null
+++ b/tests/LocaleFilter/Locale2Xml.fr_CH.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<book xmlns:its="http://www.w3.org/2005/11/its">
+ <info>
+ <legalnotice its:localeFilterList="*-CH">
+ <para>Cet avis juridique est seulement pour les locales suisses.</para>
+ </legalnotice>
+ </info>
+</book>
diff --git a/tests/LocaleFilter/Locale2Xml.fr_FR.po b/tests/LocaleFilter/Locale2Xml.fr_FR.po
new file mode 100644
index 0000000..3964bbc
--- /dev/null
+++ b/tests/LocaleFilter/Locale2Xml.fr_FR.po
@@ -0,0 +1,23 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2012-09-11 10:58-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. (itstool) path: legalnotice/para
+#. (itstool) include locale: en-CA, fr-CA
+#: tests/LocaleFilter/Locale2Xml.xml:5
+msgid "This legal notice is only for Canadian locales."
+msgstr "Cet avis juridique est seulement pour les locales canadiennes."
+
+#. (itstool) path: legalnotice/para
+#. (itstool) include locale: *-CH
+#: tests/LocaleFilter/Locale2Xml.xml:8
+msgid "This legal notice is only for Swiss locales."
+msgstr "Cet avis juridique est seulement pour les locales suisses."
+
diff --git a/tests/LocaleFilter/Locale2Xml.fr_FR.xml b/tests/LocaleFilter/Locale2Xml.fr_FR.xml
new file mode 100644
index 0000000..c640b3e
--- /dev/null
+++ b/tests/LocaleFilter/Locale2Xml.fr_FR.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<book xmlns:its="http://www.w3.org/2005/11/its">
+ <info>
+ </info>
+</book>
diff --git a/tests/LocaleFilter/Locale2Xml.joined.xml b/tests/LocaleFilter/Locale2Xml.joined.xml
new file mode 100644
index 0000000..407c7a4
--- /dev/null
+++ b/tests/LocaleFilter/Locale2Xml.joined.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<book xmlns:its="http://www.w3.org/2005/11/its">
+ <info>
+ <legalnotice its:localeFilterList="en-CA, fr-CA">
+ <para>This legal notice is only for Canadian locales.</para>
+ <para xml:lang="fr-CA">Cet avis juridique est seulement pour les locales canadiennes.</para>
+ </legalnotice>
+ <legalnotice its:localeFilterList="*-CH">
+ <para>This legal notice is only for Swiss locales.</para>
+ <para xml:lang="fr-CH">Cet avis juridique est seulement pour les locales suisses.</para>
+ </legalnotice>
+ <remark its:localeFilterList="">
+ This remark appears in no translations.
+ </remark>
+ </info>
+</book>
diff --git a/tests/LocaleFilter/Locale2Xml.pot b/tests/LocaleFilter/Locale2Xml.pot
new file mode 100644
index 0000000..1ae50f7
--- /dev/null
+++ b/tests/LocaleFilter/Locale2Xml.pot
@@ -0,0 +1,23 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2012-09-11 10:58-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. (itstool) path: legalnotice/para
+#. (itstool) include locale: en-CA, fr-CA
+#: tests/LocaleFilter/Locale2Xml.xml:5
+msgid "This legal notice is only for Canadian locales."
+msgstr ""
+
+#. (itstool) path: legalnotice/para
+#. (itstool) include locale: *-CH
+#: tests/LocaleFilter/Locale2Xml.xml:8
+msgid "This legal notice is only for Swiss locales."
+msgstr ""
+
diff --git a/tests/LocaleFilter/Locale2Xml.xml b/tests/LocaleFilter/Locale2Xml.xml
new file mode 100644
index 0000000..7a61600
--- /dev/null
+++ b/tests/LocaleFilter/Locale2Xml.xml
@@ -0,0 +1,14 @@
+<book
+ xmlns:its="http://www.w3.org/2005/11/its">
+ <info>
+ <legalnotice its:localeFilterList="en-CA, fr-CA">
+ <para>This legal notice is only for Canadian locales.</para>
+ </legalnotice>
+ <legalnotice its:localeFilterList="*-CH">
+ <para>This legal notice is only for Swiss locales.</para>
+ </legalnotice>
+ <remark its:localeFilterList="">
+ This remark appears in no translations.
+ </remark>
+ </info>
+</book>
diff --git a/tests/LocaleFilter/Locale3Rule.xml b/tests/LocaleFilter/Locale3Rule.xml
new file mode 100644
index 0000000..9d33c0a
--- /dev/null
+++ b/tests/LocaleFilter/Locale3Rule.xml
@@ -0,0 +1,5 @@
+<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="2.0">
+ <its:localeFilterRule selector="//legalnotice[@role='Canada']" localeFilterList="en-CA, fr-CA"/>
+ <its:localeFilterRule selector="//legalnotice[@role='Switzerland']" localeFilterList="*-CH"/>
+ <its:localeFilterRule selector="//remark" localeFilterList=""/>
+</its:rules>
diff --git a/tests/LocaleFilter/Locale3Xml.fr_CA.po b/tests/LocaleFilter/Locale3Xml.fr_CA.po
new file mode 100644
index 0000000..1bfa5af
--- /dev/null
+++ b/tests/LocaleFilter/Locale3Xml.fr_CA.po
@@ -0,0 +1,23 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2012-09-11 23:59-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. (itstool) path: legalnotice/para
+#. (itstool) include locale: en-CA, fr-CA
+#: tests/LocaleFilter/Locale3Xml.xml:7
+msgid "This legal notice is only for Canadian locales."
+msgstr "Cet avis juridique est seulement pour les locales canadiennes."
+
+#. (itstool) path: legalnotice/para
+#. (itstool) include locale: *-CH
+#: tests/LocaleFilter/Locale3Xml.xml:10
+msgid "This legal notice is only for Swiss locales."
+msgstr "Cet avis juridique est seulement pour les locales suisses."
+
diff --git a/tests/LocaleFilter/Locale3Xml.fr_CA.xml b/tests/LocaleFilter/Locale3Xml.fr_CA.xml
new file mode 100644
index 0000000..88d099b
--- /dev/null
+++ b/tests/LocaleFilter/Locale3Xml.fr_CA.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<book xmlns:its="http://www.w3.org/2005/11/its" its:version="2.0">
+ <info>
+ <its:rules xmlns:xlink="http://www.w3.org/1999/xlink" version="1.0" xlink:type="simple" xlink:href="Locale3Rule.xml"/>
+ <legalnotice role="Canada">
+ <para>Cet avis juridique est seulement pour les locales canadiennes.</para>
+ </legalnotice>
+ </info>
+</book>
diff --git a/tests/LocaleFilter/Locale3Xml.fr_CH.po b/tests/LocaleFilter/Locale3Xml.fr_CH.po
new file mode 100644
index 0000000..1bfa5af
--- /dev/null
+++ b/tests/LocaleFilter/Locale3Xml.fr_CH.po
@@ -0,0 +1,23 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2012-09-11 23:59-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. (itstool) path: legalnotice/para
+#. (itstool) include locale: en-CA, fr-CA
+#: tests/LocaleFilter/Locale3Xml.xml:7
+msgid "This legal notice is only for Canadian locales."
+msgstr "Cet avis juridique est seulement pour les locales canadiennes."
+
+#. (itstool) path: legalnotice/para
+#. (itstool) include locale: *-CH
+#: tests/LocaleFilter/Locale3Xml.xml:10
+msgid "This legal notice is only for Swiss locales."
+msgstr "Cet avis juridique est seulement pour les locales suisses."
+
diff --git a/tests/LocaleFilter/Locale3Xml.fr_CH.xml b/tests/LocaleFilter/Locale3Xml.fr_CH.xml
new file mode 100644
index 0000000..653bde7
--- /dev/null
+++ b/tests/LocaleFilter/Locale3Xml.fr_CH.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<book xmlns:its="http://www.w3.org/2005/11/its" its:version="2.0">
+ <info>
+ <its:rules xmlns:xlink="http://www.w3.org/1999/xlink" version="1.0" xlink:type="simple" xlink:href="Locale3Rule.xml"/>
+ <legalnotice role="Switzerland">
+ <para>Cet avis juridique est seulement pour les locales suisses.</para>
+ </legalnotice>
+ </info>
+</book>
diff --git a/tests/LocaleFilter/Locale3Xml.fr_FR.po b/tests/LocaleFilter/Locale3Xml.fr_FR.po
new file mode 100644
index 0000000..1bfa5af
--- /dev/null
+++ b/tests/LocaleFilter/Locale3Xml.fr_FR.po
@@ -0,0 +1,23 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2012-09-11 23:59-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. (itstool) path: legalnotice/para
+#. (itstool) include locale: en-CA, fr-CA
+#: tests/LocaleFilter/Locale3Xml.xml:7
+msgid "This legal notice is only for Canadian locales."
+msgstr "Cet avis juridique est seulement pour les locales canadiennes."
+
+#. (itstool) path: legalnotice/para
+#. (itstool) include locale: *-CH
+#: tests/LocaleFilter/Locale3Xml.xml:10
+msgid "This legal notice is only for Swiss locales."
+msgstr "Cet avis juridique est seulement pour les locales suisses."
+
diff --git a/tests/LocaleFilter/Locale3Xml.fr_FR.xml b/tests/LocaleFilter/Locale3Xml.fr_FR.xml
new file mode 100644
index 0000000..b28d4d5
--- /dev/null
+++ b/tests/LocaleFilter/Locale3Xml.fr_FR.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<book xmlns:its="http://www.w3.org/2005/11/its" its:version="2.0">
+ <info>
+ <its:rules xmlns:xlink="http://www.w3.org/1999/xlink" version="1.0" xlink:type="simple" xlink:href="Locale3Rule.xml"/>
+ </info>
+</book>
diff --git a/tests/LocaleFilter/Locale3Xml.joined.xml b/tests/LocaleFilter/Locale3Xml.joined.xml
new file mode 100644
index 0000000..8e355d2
--- /dev/null
+++ b/tests/LocaleFilter/Locale3Xml.joined.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<book xmlns:its="http://www.w3.org/2005/11/its" its:version="2.0">
+ <info>
+ <its:rules xmlns:xlink="http://www.w3.org/1999/xlink" version="1.0" xlink:type="simple" xlink:href="Locale3Rule.xml"/>
+ <legalnotice role="Canada">
+ <para>This legal notice is only for Canadian locales.</para>
+ <para xml:lang="fr-CA">Cet avis juridique est seulement pour les locales canadiennes.</para>
+ </legalnotice>
+ <legalnotice role="Switzerland">
+ <para>This legal notice is only for Swiss locales.</para>
+ <para xml:lang="fr-CH">Cet avis juridique est seulement pour les locales suisses.</para>
+ </legalnotice>
+ <remark>
+ This remark appears in no translations.
+ </remark>
+ </info>
+</book>
diff --git a/tests/LocaleFilter/Locale3Xml.pot b/tests/LocaleFilter/Locale3Xml.pot
new file mode 100644
index 0000000..3e9fcb4
--- /dev/null
+++ b/tests/LocaleFilter/Locale3Xml.pot
@@ -0,0 +1,23 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2012-09-11 23:59-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. (itstool) path: legalnotice/para
+#. (itstool) include locale: en-CA, fr-CA
+#: tests/LocaleFilter/Locale3Xml.xml:7
+msgid "This legal notice is only for Canadian locales."
+msgstr ""
+
+#. (itstool) path: legalnotice/para
+#. (itstool) include locale: *-CH
+#: tests/LocaleFilter/Locale3Xml.xml:10
+msgid "This legal notice is only for Swiss locales."
+msgstr ""
+
diff --git a/tests/LocaleFilter/Locale3Xml.xml b/tests/LocaleFilter/Locale3Xml.xml
new file mode 100644
index 0000000..b46f6f1
--- /dev/null
+++ b/tests/LocaleFilter/Locale3Xml.xml
@@ -0,0 +1,16 @@
+<book
+ xmlns:its="http://www.w3.org/2005/11/its"
+ its:version="2.0">
+ <info>
+ <its:rules xmlns:xlink="http://www.w3.org/1999/xlink" version="1.0" xlink:type="simple" xlink:href="Locale3Rule.xml"/>
+ <legalnotice role="Canada">
+ <para>This legal notice is only for Canadian locales.</para>
+ </legalnotice>
+ <legalnotice role="Switzerland">
+ <para>This legal notice is only for Swiss locales.</para>
+ </legalnotice>
+ <remark>
+ This remark appears in no translations.
+ </remark>
+ </info>
+</book>
diff --git a/tests/LocaleFilter/Locale4Rule.xml b/tests/LocaleFilter/Locale4Rule.xml
new file mode 100644
index 0000000..5eda8cc
--- /dev/null
+++ b/tests/LocaleFilter/Locale4Rule.xml
@@ -0,0 +1,3 @@
+<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="2.0">
+ <its:localeFilterRule selector="//legalnotice[@role='Canada']" localeFilterList="en-CA, fr-CA"/>
+</its:rules>
diff --git a/tests/LocaleFilter/Locale4Xml.fr_CA.po b/tests/LocaleFilter/Locale4Xml.fr_CA.po
new file mode 100644
index 0000000..849295b
--- /dev/null
+++ b/tests/LocaleFilter/Locale4Xml.fr_CA.po
@@ -0,0 +1,23 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2012-09-11 23:59-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. (itstool) path: legalnotice/para
+#. (itstool) include locale: en-CA, fr-CA
+#: tests/LocaleFilter/Locale4Xml.xml:10
+msgid "This legal notice is only for Canadian locales."
+msgstr "Cet avis juridique est seulement pour les locales canadiennes."
+
+#. (itstool) path: legalnotice/para
+#. (itstool) include locale: *-CH
+#: tests/LocaleFilter/Locale4Xml.xml:13
+msgid "This legal notice is only for Swiss locales."
+msgstr "Cet avis juridique est seulement pour les locales suisses."
+
diff --git a/tests/LocaleFilter/Locale4Xml.fr_CA.xml b/tests/LocaleFilter/Locale4Xml.fr_CA.xml
new file mode 100644
index 0000000..d281f6f
--- /dev/null
+++ b/tests/LocaleFilter/Locale4Xml.fr_CA.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<book xmlns:its="http://www.w3.org/2005/11/its" its:version="2.0">
+ <info>
+ <its:rules xmlns:xlink="http://www.w3.org/1999/xlink" version="1.0" xlink:type="simple" xlink:href="Locale3Rule.xml"/>
+ <its:rules version="2.0">
+ <its:localeFilterRule selector="//legalnotice[@role='Switzerland']" localeFilterList="*-CH"/>
+ </its:rules>
+ <legalnotice role="Canada">
+ <para>Cet avis juridique est seulement pour les locales canadiennes.</para>
+ </legalnotice>
+ </info>
+</book>
diff --git a/tests/LocaleFilter/Locale4Xml.fr_CH.po b/tests/LocaleFilter/Locale4Xml.fr_CH.po
new file mode 100644
index 0000000..849295b
--- /dev/null
+++ b/tests/LocaleFilter/Locale4Xml.fr_CH.po
@@ -0,0 +1,23 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2012-09-11 23:59-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. (itstool) path: legalnotice/para
+#. (itstool) include locale: en-CA, fr-CA
+#: tests/LocaleFilter/Locale4Xml.xml:10
+msgid "This legal notice is only for Canadian locales."
+msgstr "Cet avis juridique est seulement pour les locales canadiennes."
+
+#. (itstool) path: legalnotice/para
+#. (itstool) include locale: *-CH
+#: tests/LocaleFilter/Locale4Xml.xml:13
+msgid "This legal notice is only for Swiss locales."
+msgstr "Cet avis juridique est seulement pour les locales suisses."
+
diff --git a/tests/LocaleFilter/Locale4Xml.fr_CH.xml b/tests/LocaleFilter/Locale4Xml.fr_CH.xml
new file mode 100644
index 0000000..8b08cc9
--- /dev/null
+++ b/tests/LocaleFilter/Locale4Xml.fr_CH.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<book xmlns:its="http://www.w3.org/2005/11/its" its:version="2.0">
+ <info>
+ <its:rules xmlns:xlink="http://www.w3.org/1999/xlink" version="1.0" xlink:type="simple" xlink:href="Locale3Rule.xml"/>
+ <its:rules version="2.0">
+ <its:localeFilterRule selector="//legalnotice[@role='Switzerland']" localeFilterList="*-CH"/>
+ </its:rules>
+ <legalnotice role="Switzerland">
+ <para>Cet avis juridique est seulement pour les locales suisses.</para>
+ </legalnotice>
+ </info>
+</book>
diff --git a/tests/LocaleFilter/Locale4Xml.fr_FR.po b/tests/LocaleFilter/Locale4Xml.fr_FR.po
new file mode 100644
index 0000000..849295b
--- /dev/null
+++ b/tests/LocaleFilter/Locale4Xml.fr_FR.po
@@ -0,0 +1,23 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2012-09-11 23:59-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. (itstool) path: legalnotice/para
+#. (itstool) include locale: en-CA, fr-CA
+#: tests/LocaleFilter/Locale4Xml.xml:10
+msgid "This legal notice is only for Canadian locales."
+msgstr "Cet avis juridique est seulement pour les locales canadiennes."
+
+#. (itstool) path: legalnotice/para
+#. (itstool) include locale: *-CH
+#: tests/LocaleFilter/Locale4Xml.xml:13
+msgid "This legal notice is only for Swiss locales."
+msgstr "Cet avis juridique est seulement pour les locales suisses."
+
diff --git a/tests/LocaleFilter/Locale4Xml.fr_FR.xml b/tests/LocaleFilter/Locale4Xml.fr_FR.xml
new file mode 100644
index 0000000..62ff99a
--- /dev/null
+++ b/tests/LocaleFilter/Locale4Xml.fr_FR.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<book xmlns:its="http://www.w3.org/2005/11/its" its:version="2.0">
+ <info>
+ <its:rules xmlns:xlink="http://www.w3.org/1999/xlink" version="1.0" xlink:type="simple" xlink:href="Locale3Rule.xml"/>
+ <its:rules version="2.0">
+ <its:localeFilterRule selector="//legalnotice[@role='Switzerland']" localeFilterList="*-CH"/>
+ </its:rules>
+ </info>
+</book>
diff --git a/tests/LocaleFilter/Locale4Xml.joined.xml b/tests/LocaleFilter/Locale4Xml.joined.xml
new file mode 100644
index 0000000..56c8635
--- /dev/null
+++ b/tests/LocaleFilter/Locale4Xml.joined.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<book xmlns:its="http://www.w3.org/2005/11/its" its:version="2.0">
+ <info>
+ <its:rules xmlns:xlink="http://www.w3.org/1999/xlink" version="1.0" xlink:type="simple" xlink:href="Locale3Rule.xml"/>
+ <its:rules version="2.0">
+ <its:localeFilterRule selector="//legalnotice[@role='Switzerland']" localeFilterList="*-CH"/>
+ </its:rules>
+ <legalnotice role="Canada">
+ <para>This legal notice is only for Canadian locales.</para>
+ <para xml:lang="fr-CA">Cet avis juridique est seulement pour les locales canadiennes.</para>
+ </legalnotice>
+ <legalnotice role="Switzerland">
+ <para>This legal notice is only for Swiss locales.</para>
+ <para xml:lang="fr-CH">Cet avis juridique est seulement pour les locales suisses.</para>
+ </legalnotice>
+ </info>
+</book>
diff --git a/tests/LocaleFilter/Locale4Xml.pot b/tests/LocaleFilter/Locale4Xml.pot
new file mode 100644
index 0000000..73d1f42
--- /dev/null
+++ b/tests/LocaleFilter/Locale4Xml.pot
@@ -0,0 +1,23 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2012-09-11 23:59-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. (itstool) path: legalnotice/para
+#. (itstool) include locale: en-CA, fr-CA
+#: tests/LocaleFilter/Locale4Xml.xml:10
+msgid "This legal notice is only for Canadian locales."
+msgstr ""
+
+#. (itstool) path: legalnotice/para
+#. (itstool) include locale: *-CH
+#: tests/LocaleFilter/Locale4Xml.xml:13
+msgid "This legal notice is only for Swiss locales."
+msgstr ""
+
diff --git a/tests/LocaleFilter/Locale4Xml.xml b/tests/LocaleFilter/Locale4Xml.xml
new file mode 100644
index 0000000..c6e01cc
--- /dev/null
+++ b/tests/LocaleFilter/Locale4Xml.xml
@@ -0,0 +1,16 @@
+<book
+ xmlns:its="http://www.w3.org/2005/11/its"
+ its:version="2.0">
+ <info>
+ <its:rules xmlns:xlink="http://www.w3.org/1999/xlink" version="1.0" xlink:type="simple" xlink:href="Locale3Rule.xml"/>
+ <its:rules version="2.0">
+ <its:localeFilterRule selector="//legalnotice[@role='Switzerland']" localeFilterList="*-CH"/>
+ </its:rules>
+ <legalnotice role="Canada">
+ <para>This legal notice is only for Canadian locales.</para>
+ </legalnotice>
+ <legalnotice role="Switzerland">
+ <para>This legal notice is only for Swiss locales.</para>
+ </legalnotice>
+ </info>
+</book>
diff --git a/tests/LocaleFilter/Locale5Xml.fr_CA.po b/tests/LocaleFilter/Locale5Xml.fr_CA.po
new file mode 100644
index 0000000..563c147
--- /dev/null
+++ b/tests/LocaleFilter/Locale5Xml.fr_CA.po
@@ -0,0 +1,23 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2012-09-11 10:58-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. (itstool) path: span/para
+#. (itstool) include locale: en-CA, fr-CA
+#: tests/LocaleFilter/Locale5Xml.xml:4
+msgid "This legal notice is only for Canadian locales."
+msgstr "Cet avis juridique est seulement pour les locales canadiennes."
+
+#. (itstool) path: span/para
+#. (itstool) include locale: *-CH
+#: tests/LocaleFilter/Locale5Xml.xml:7
+msgid "This legal notice is only for Swiss locales."
+msgstr "Cet avis juridique est seulement pour les locales suisses."
+
diff --git a/tests/LocaleFilter/Locale5Xml.fr_CA.xml b/tests/LocaleFilter/Locale5Xml.fr_CA.xml
new file mode 100644
index 0000000..f439aa4
--- /dev/null
+++ b/tests/LocaleFilter/Locale5Xml.fr_CA.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<book xmlns:its="http://www.w3.org/2005/11/its">
+<info>
+<its:span localeFilterList="en-CA, fr-CA">
+<para>Cet avis juridique est seulement pour les locales canadiennes.</para>
+</its:span>
+</info>
+</book>
diff --git a/tests/LocaleFilter/Locale5Xml.fr_CH.po b/tests/LocaleFilter/Locale5Xml.fr_CH.po
new file mode 100644
index 0000000..563c147
--- /dev/null
+++ b/tests/LocaleFilter/Locale5Xml.fr_CH.po
@@ -0,0 +1,23 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2012-09-11 10:58-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. (itstool) path: span/para
+#. (itstool) include locale: en-CA, fr-CA
+#: tests/LocaleFilter/Locale5Xml.xml:4
+msgid "This legal notice is only for Canadian locales."
+msgstr "Cet avis juridique est seulement pour les locales canadiennes."
+
+#. (itstool) path: span/para
+#. (itstool) include locale: *-CH
+#: tests/LocaleFilter/Locale5Xml.xml:7
+msgid "This legal notice is only for Swiss locales."
+msgstr "Cet avis juridique est seulement pour les locales suisses."
+
diff --git a/tests/LocaleFilter/Locale5Xml.fr_CH.xml b/tests/LocaleFilter/Locale5Xml.fr_CH.xml
new file mode 100644
index 0000000..d84be13
--- /dev/null
+++ b/tests/LocaleFilter/Locale5Xml.fr_CH.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<book xmlns:its="http://www.w3.org/2005/11/its">
+<info>
+<its:span localeFilterList="*-CH">
+<para>Cet avis juridique est seulement pour les locales suisses.</para>
+</its:span>
+</info>
+</book>
diff --git a/tests/LocaleFilter/Locale5Xml.fr_FR.po b/tests/LocaleFilter/Locale5Xml.fr_FR.po
new file mode 100644
index 0000000..563c147
--- /dev/null
+++ b/tests/LocaleFilter/Locale5Xml.fr_FR.po
@@ -0,0 +1,23 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2012-09-11 10:58-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. (itstool) path: span/para
+#. (itstool) include locale: en-CA, fr-CA
+#: tests/LocaleFilter/Locale5Xml.xml:4
+msgid "This legal notice is only for Canadian locales."
+msgstr "Cet avis juridique est seulement pour les locales canadiennes."
+
+#. (itstool) path: span/para
+#. (itstool) include locale: *-CH
+#: tests/LocaleFilter/Locale5Xml.xml:7
+msgid "This legal notice is only for Swiss locales."
+msgstr "Cet avis juridique est seulement pour les locales suisses."
+
diff --git a/tests/LocaleFilter/Locale5Xml.fr_FR.xml b/tests/LocaleFilter/Locale5Xml.fr_FR.xml
new file mode 100644
index 0000000..66194b4
--- /dev/null
+++ b/tests/LocaleFilter/Locale5Xml.fr_FR.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<book xmlns:its="http://www.w3.org/2005/11/its">
+<info>
+</info>
+</book>
diff --git a/tests/LocaleFilter/Locale5Xml.joined.xml b/tests/LocaleFilter/Locale5Xml.joined.xml
new file mode 100644
index 0000000..4772026
--- /dev/null
+++ b/tests/LocaleFilter/Locale5Xml.joined.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<book xmlns:its="http://www.w3.org/2005/11/its">
+<info>
+<its:span localeFilterList="en-CA, fr-CA">
+<para>This legal notice is only for Canadian locales.</para>
+<para xml:lang="fr-CA">Cet avis juridique est seulement pour les locales canadiennes.</para>
+</its:span>
+<its:span localeFilterList="*-CH">
+<para>This legal notice is only for Swiss locales.</para>
+<para xml:lang="fr-CH">Cet avis juridique est seulement pour les locales suisses.</para>
+</its:span>
+<its:span localeFilterList="">
+<remark>This remark appears in no translations.</remark>
+</its:span>
+</info>
+</book>
diff --git a/tests/LocaleFilter/Locale5Xml.pot b/tests/LocaleFilter/Locale5Xml.pot
new file mode 100644
index 0000000..6f8b66f
--- /dev/null
+++ b/tests/LocaleFilter/Locale5Xml.pot
@@ -0,0 +1,23 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2012-09-11 10:58-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. (itstool) path: span/para
+#. (itstool) include locale: en-CA, fr-CA
+#: tests/LocaleFilter/Locale5Xml.xml:4
+msgid "This legal notice is only for Canadian locales."
+msgstr ""
+
+#. (itstool) path: span/para
+#. (itstool) include locale: *-CH
+#: tests/LocaleFilter/Locale5Xml.xml:7
+msgid "This legal notice is only for Swiss locales."
+msgstr ""
+
diff --git a/tests/LocaleFilter/Locale5Xml.xml b/tests/LocaleFilter/Locale5Xml.xml
new file mode 100644
index 0000000..99a010f
--- /dev/null
+++ b/tests/LocaleFilter/Locale5Xml.xml
@@ -0,0 +1,13 @@
+<book xmlns:its="http://www.w3.org/2005/11/its">
+<info>
+<its:span localeFilterList="en-CA, fr-CA">
+<para>This legal notice is only for Canadian locales.</para>
+</its:span>
+<its:span localeFilterList="*-CH">
+<para>This legal notice is only for Swiss locales.</para>
+</its:span>
+<its:span localeFilterList="">
+<remark>This remark appears in no translations.</remark>
+</its:span>
+</info>
+</book>
diff --git a/tests/LocaleFilter/Locale6Xml.fr_CA.po b/tests/LocaleFilter/Locale6Xml.fr_CA.po
new file mode 100644
index 0000000..fab5864
--- /dev/null
+++ b/tests/LocaleFilter/Locale6Xml.fr_CA.po
@@ -0,0 +1,22 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2012-09-11 10:58-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. (itstool) path: legalnotice/para
+#. (itstool) include locale: *-CA
+#: tests/LocaleFilter/Locale6Xml.xml:11
+msgid "This legal notice is only for Canadian locales."
+msgstr "Cet avis juridique est seulement pour les locales canadiennes."
+
+#. (itstool) path: legalnotice/para
+#. (itstool) exclude locale: *-CA
+#: tests/LocaleFilter/Locale6Xml.xml:14
+msgid "This legal notice is only for non-Canadian locales."
+msgstr "Cet avis juridique est seulement pour les locales non-canadiens."
diff --git a/tests/LocaleFilter/Locale6Xml.fr_CA.xml b/tests/LocaleFilter/Locale6Xml.fr_CA.xml
new file mode 100644
index 0000000..ddb82b3
--- /dev/null
+++ b/tests/LocaleFilter/Locale6Xml.fr_CA.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<book xmlns:its="http://www.w3.org/2005/11/its" its:version="2.0">
+ <info>
+ <its:rules version="2.0">
+ <its:localeFilterRule selector="//legalnotice[@role='Canada']" localeFilterList="*-CA"/>
+ <its:localeFilterRule selector="//legalnotice[@role='nonCanada']" localeFilterList="*-CA" localeFilterType="exclude"/>
+ <its:localeFilterRule selector="//remark" localeFilterList="*" localeFilterType="exclude"/>
+ </its:rules>
+ <legalnotice role="Canada">
+ <para>Cet avis juridique est seulement pour les locales canadiennes.</para>
+ </legalnotice>
+ </info>
+</book>
diff --git a/tests/LocaleFilter/Locale6Xml.fr_CH.po b/tests/LocaleFilter/Locale6Xml.fr_CH.po
new file mode 100644
index 0000000..de2e16f
--- /dev/null
+++ b/tests/LocaleFilter/Locale6Xml.fr_CH.po
@@ -0,0 +1,23 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2012-09-11 10:58-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. (itstool) path: legalnotice/para
+#. (itstool) include locale: *-CA
+#: tests/LocaleFilter/Locale6Xml.xml:11
+msgid "This legal notice is only for Canadian locales."
+msgstr "Cet avis juridique est seulement pour les locales canadiennes."
+
+#. (itstool) path: legalnotice/para
+#. (itstool) exclude locale: *-CA
+#: tests/LocaleFilter/Locale6Xml.xml:14
+msgid "This legal notice is only for non-Canadian locales."
+msgstr "Cet avis juridique est seulement pour les locales non-canadiens."
+
diff --git a/tests/LocaleFilter/Locale6Xml.fr_CH.xml b/tests/LocaleFilter/Locale6Xml.fr_CH.xml
new file mode 100644
index 0000000..6b7b16b
--- /dev/null
+++ b/tests/LocaleFilter/Locale6Xml.fr_CH.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<book xmlns:its="http://www.w3.org/2005/11/its" its:version="2.0">
+ <info>
+ <its:rules version="2.0">
+ <its:localeFilterRule selector="//legalnotice[@role='Canada']" localeFilterList="*-CA"/>
+ <its:localeFilterRule selector="//legalnotice[@role='nonCanada']" localeFilterList="*-CA" localeFilterType="exclude"/>
+ <its:localeFilterRule selector="//remark" localeFilterList="*" localeFilterType="exclude"/>
+ </its:rules>
+ <legalnotice role="nonCanada">
+ <para>Cet avis juridique est seulement pour les locales non-canadiens.</para>
+ </legalnotice>
+ </info>
+</book>
diff --git a/tests/LocaleFilter/Locale6Xml.fr_FR.po b/tests/LocaleFilter/Locale6Xml.fr_FR.po
new file mode 100644
index 0000000..fab5864
--- /dev/null
+++ b/tests/LocaleFilter/Locale6Xml.fr_FR.po
@@ -0,0 +1,22 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2012-09-11 10:58-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. (itstool) path: legalnotice/para
+#. (itstool) include locale: *-CA
+#: tests/LocaleFilter/Locale6Xml.xml:11
+msgid "This legal notice is only for Canadian locales."
+msgstr "Cet avis juridique est seulement pour les locales canadiennes."
+
+#. (itstool) path: legalnotice/para
+#. (itstool) exclude locale: *-CA
+#: tests/LocaleFilter/Locale6Xml.xml:14
+msgid "This legal notice is only for non-Canadian locales."
+msgstr "Cet avis juridique est seulement pour les locales non-canadiens."
diff --git a/tests/LocaleFilter/Locale6Xml.fr_FR.xml b/tests/LocaleFilter/Locale6Xml.fr_FR.xml
new file mode 100644
index 0000000..6b7b16b
--- /dev/null
+++ b/tests/LocaleFilter/Locale6Xml.fr_FR.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<book xmlns:its="http://www.w3.org/2005/11/its" its:version="2.0">
+ <info>
+ <its:rules version="2.0">
+ <its:localeFilterRule selector="//legalnotice[@role='Canada']" localeFilterList="*-CA"/>
+ <its:localeFilterRule selector="//legalnotice[@role='nonCanada']" localeFilterList="*-CA" localeFilterType="exclude"/>
+ <its:localeFilterRule selector="//remark" localeFilterList="*" localeFilterType="exclude"/>
+ </its:rules>
+ <legalnotice role="nonCanada">
+ <para>Cet avis juridique est seulement pour les locales non-canadiens.</para>
+ </legalnotice>
+ </info>
+</book>
diff --git a/tests/LocaleFilter/Locale6Xml.joined.xml b/tests/LocaleFilter/Locale6Xml.joined.xml
new file mode 100644
index 0000000..5e575ba
--- /dev/null
+++ b/tests/LocaleFilter/Locale6Xml.joined.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<book xmlns:its="http://www.w3.org/2005/11/its" its:version="2.0">
+ <info>
+ <its:rules version="2.0">
+ <its:localeFilterRule selector="//legalnotice[@role='Canada']" localeFilterList="*-CA"/>
+ <its:localeFilterRule selector="//legalnotice[@role='nonCanada']" localeFilterList="*-CA" localeFilterType="exclude"/>
+ <its:localeFilterRule selector="//remark" localeFilterList="*" localeFilterType="exclude"/>
+ </its:rules>
+ <legalnotice role="Canada">
+ <para>This legal notice is only for Canadian locales.</para>
+ <para xml:lang="fr-CA">Cet avis juridique est seulement pour les locales canadiennes.</para>
+ </legalnotice>
+ <legalnotice role="nonCanada">
+ <para>This legal notice is only for non-Canadian locales.</para>
+ <para xml:lang="fr-CH">Cet avis juridique est seulement pour les locales non-canadiens.</para>
+ <para xml:lang="fr-FR">Cet avis juridique est seulement pour les locales non-canadiens.</para>
+ </legalnotice>
+ <remark>
+ This remark appears in no translations.
+ </remark>
+ </info>
+</book>
diff --git a/tests/LocaleFilter/Locale6Xml.pot b/tests/LocaleFilter/Locale6Xml.pot
new file mode 100644
index 0000000..4796e95
--- /dev/null
+++ b/tests/LocaleFilter/Locale6Xml.pot
@@ -0,0 +1,23 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2012-09-11 10:58-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. (itstool) path: legalnotice/para
+#. (itstool) include locale: *-CA
+#: tests/LocaleFilter/Locale6Xml.xml:11
+msgid "This legal notice is only for Canadian locales."
+msgstr ""
+
+#. (itstool) path: legalnotice/para
+#. (itstool) exclude locale: *-CA
+#: tests/LocaleFilter/Locale6Xml.xml:14
+msgid "This legal notice is only for non-Canadian locales."
+msgstr ""
+
diff --git a/tests/LocaleFilter/Locale6Xml.xml b/tests/LocaleFilter/Locale6Xml.xml
new file mode 100644
index 0000000..5b19444
--- /dev/null
+++ b/tests/LocaleFilter/Locale6Xml.xml
@@ -0,0 +1,20 @@
+<book
+ xmlns:its="http://www.w3.org/2005/11/its"
+ its:version="2.0">
+ <info>
+ <its:rules version="2.0">
+ <its:localeFilterRule selector="//legalnotice[@role='Canada']" localeFilterList="*-CA"/>
+ <its:localeFilterRule selector="//legalnotice[@role='nonCanada']" localeFilterList="*-CA" localeFilterType="exclude"/>
+ <its:localeFilterRule selector="//remark" localeFilterList="*" localeFilterType="exclude"/>
+ </its:rules>
+ <legalnotice role="Canada">
+ <para>This legal notice is only for Canadian locales.</para>
+ </legalnotice>
+ <legalnotice role="nonCanada">
+ <para>This legal notice is only for non-Canadian locales.</para>
+ </legalnotice>
+ <remark>
+ This remark appears in no translations.
+ </remark>
+ </info>
+</book>
diff --git a/tests/Translate1.ll.po b/tests/Translate/Translate1.ll.po
index e57b5c5..f286c22 100644
--- a/tests/Translate1.ll.po
+++ b/tests/Translate/Translate1.ll.po
@@ -11,37 +11,37 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
#. (itstool) path: body/par
-#: tests/Translate1.xml:15
+#: tests/Translate/Translate1.xml:15
msgid "Text with an image: <img alt=\"Image description\" src=\"img.png\"/>."
msgstr ""
"Texte avec une image : <img alt=\"Description d'image\" src=\"img.png\"/>."
#. (itstool) path: body/par@title
-#: tests/Translate1.xml:16
+#: tests/Translate/Translate1.xml:16
msgid "Text"
msgstr "Texte"
#. (itstool) path: body/par
-#: tests/Translate1.xml:16
+#: tests/Translate/Translate1.xml:16
msgid "This is the first paragraph. It has some <_:verbatim-1/>."
msgstr "C'est le premier paragraphe. Il contient du texte <_:verbatim-1/>."
#. (itstool) path: 封面/汇集
-#: tests/Translate1.xml:21
+#: tests/Translate/Translate1.xml:21
msgid "The Lord of the Rings"
msgstr "Le Seigneur des Anneaux"
#. (itstool) path: 封面/标题
-#: tests/Translate1.xml:22
+#: tests/Translate/Translate1.xml:22
msgid "The Return of the King"
msgstr "Le retour du Roi"
#. (itstool) path: 章节/头注
-#: tests/Translate1.xml:26
+#: tests/Translate/Translate1.xml:26
msgid "Minas Tirith"
msgstr "Minas Tirith"
#. (itstool) path: 章节/段落识别
-#: tests/Translate1.xml:27
+#: tests/Translate/Translate1.xml:27
msgid "<_:姓名-1/> looked out from the shelter of <_:姓名-2/>'s cloak."
msgstr "<_:姓名-1/> regarda depuis l'abri du manteau de <_:姓名-2/>."
diff --git a/tests/Translate1.ll.xml b/tests/Translate/Translate1.ll.xml
index 72b30fe..72b30fe 100644
--- a/tests/Translate1.ll.xml
+++ b/tests/Translate/Translate1.ll.xml
diff --git a/tests/Translate1.pot b/tests/Translate/Translate1.pot
index 0cc5de3..7302484 100644
--- a/tests/Translate1.pot
+++ b/tests/Translate/Translate1.pot
@@ -10,37 +10,37 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
#. (itstool) path: body/par
-#: tests/Translate1.xml:15
+#: tests/Translate/Translate1.xml:15
msgid "Text with an image: <img alt=\"Image description\" src=\"img.png\"/>."
msgstr ""
#. (itstool) path: body/par@title
-#: tests/Translate1.xml:16
+#: tests/Translate/Translate1.xml:16
msgid "Text"
msgstr ""
#. (itstool) path: body/par
-#: tests/Translate1.xml:16
+#: tests/Translate/Translate1.xml:16
msgid "This is the first paragraph. It has some <_:verbatim-1/>."
msgstr ""
#. (itstool) path: 封面/汇集
-#: tests/Translate1.xml:21
+#: tests/Translate/Translate1.xml:21
msgid "The Lord of the Rings"
msgstr ""
#. (itstool) path: 封面/标题
-#: tests/Translate1.xml:22
+#: tests/Translate/Translate1.xml:22
msgid "The Return of the King"
msgstr ""
#. (itstool) path: 章节/头注
-#: tests/Translate1.xml:26
+#: tests/Translate/Translate1.xml:26
msgid "Minas Tirith"
msgstr ""
#. (itstool) path: 章节/段落识别
-#: tests/Translate1.xml:27
+#: tests/Translate/Translate1.xml:27
msgid "<_:姓名-1/> looked out from the shelter of <_:姓名-2/>'s cloak."
msgstr ""
diff --git a/tests/Translate1.xml b/tests/Translate/Translate1.xml
index e10aa88..e10aa88 100644
--- a/tests/Translate1.xml
+++ b/tests/Translate/Translate1.xml
diff --git a/tests/Translate2.ll.po b/tests/Translate/Translate2.ll.po
index 7ee89c7..22fdef9 100644
--- a/tests/Translate2.ll.po
+++ b/tests/Translate/Translate2.ll.po
@@ -11,11 +11,11 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
#. (itstool) path: body/par@title
-#: tests/Translate2.xml:8
+#: tests/Translate/Translate2.xml:8
msgid "Text"
msgstr "Texte"
#. (itstool) path: body/par
-#: tests/Translate2.xml:8
+#: tests/Translate/Translate2.xml:8
msgid "This is the first paragraph. It has some <_:code-1/>."
msgstr "C'est le premier paragraphe. Il contient du texte <_:code-1/>."
diff --git a/tests/Translate2.ll.xml b/tests/Translate/Translate2.ll.xml
index 959c733..959c733 100644
--- a/tests/Translate2.ll.xml
+++ b/tests/Translate/Translate2.ll.xml
diff --git a/tests/Translate2.pot b/tests/Translate/Translate2.pot
index 66b110f..0f03da1 100644
--- a/tests/Translate2.pot
+++ b/tests/Translate/Translate2.pot
@@ -10,12 +10,12 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
#. (itstool) path: body/par@title
-#: tests/Translate2.xml:8
+#: tests/Translate/Translate2.xml:8
msgid "Text"
msgstr ""
#. (itstool) path: body/par
-#: tests/Translate2.xml:8
+#: tests/Translate/Translate2.xml:8
msgid "This is the first paragraph. It has some <_:code-1/>."
msgstr ""
diff --git a/tests/Translate2.xml b/tests/Translate/Translate2.xml
index 2108aa2..2108aa2 100644
--- a/tests/Translate2.xml
+++ b/tests/Translate/Translate2.xml
diff --git a/tests/Translate2_LinkedRules.xml b/tests/Translate/Translate2_LinkedRules.xml
index d32f4f3..d32f4f3 100644
--- a/tests/Translate2_LinkedRules.xml
+++ b/tests/Translate/Translate2_LinkedRules.xml
diff --git a/tests/Translate3.ll.po b/tests/Translate/Translate3.ll.po
index 1775d0c..2243bb5 100644
--- a/tests/Translate3.ll.po
+++ b/tests/Translate/Translate3.ll.po
@@ -11,12 +11,12 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
#. (itstool) path: head/title
-#: tests/Translate3.xml:6
+#: tests/Translate/Translate3.xml:6
msgid "The Life of a Simple Man"
msgstr "La vie d'un simple homme"
#. (itstool) path: body/p
-#: tests/Translate3.xml:9
+#: tests/Translate/Translate3.xml:9
msgid ""
"Everything started when Zebulon discovered that he had a <_:span-1/> who was "
"a serious baseball <_:span-2/>."
diff --git a/tests/Translate3.ll.wrong.po b/tests/Translate/Translate3.ll.wrong.po
index 78b861c..4ee7f31 100644
--- a/tests/Translate3.ll.wrong.po
+++ b/tests/Translate/Translate3.ll.wrong.po
@@ -11,12 +11,12 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
#. (itstool) path: head/title
-#: tests/Translate3.xml:6
+#: tests/Translate/Translate3.xml:6
msgid "The Life of a Simple Man"
msgstr "La vie d'un simple homme"
#. (itstool) path: body/p
-#: tests/Translate3.xml:9
+#: tests/Translate/Translate3.xml:9
msgid ""
"Everything started when Zebulon discovered that he had a <_:span-1/> who was "
"a serious baseball <_:span-2/>."
diff --git a/tests/Translate3.ll.wrong.xml b/tests/Translate/Translate3.ll.wrong.xml
index 3c8c7b2..d111f2b 100644
--- a/tests/Translate3.ll.wrong.xml
+++ b/tests/Translate/Translate3.ll.wrong.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<book xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:its="http://www.w3.org/2005/11/its" xsi:noNamespaceSchemaLocation="EX-ways-to-use-its-5.xsd" its:version="1.0" lang="test">
+<book xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:its="http://www.w3.org/2005/11/its" xsi:noNamespaceSchemaLocation="EX-ways-to-use-its-5.xsd" its:version="1.0">
<head>
<title>La vie d'un simple homme</title>
</head>
diff --git a/tests/Translate3.ll.xml b/tests/Translate/Translate3.ll.xml
index a8376c3..8dc1e7f 100644
--- a/tests/Translate3.ll.xml
+++ b/tests/Translate/Translate3.ll.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<book xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:its="http://www.w3.org/2005/11/its" xsi:noNamespaceSchemaLocation="EX-ways-to-use-its-5.xsd" its:version="1.0" lang="test">
+<book xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:its="http://www.w3.org/2005/11/its" xsi:noNamespaceSchemaLocation="EX-ways-to-use-its-5.xsd" its:version="1.0">
<head>
<title>La vie d'un simple homme</title>
</head>
diff --git a/tests/Translate3.pot b/tests/Translate/Translate3.pot
index 240c28c..425b8f1 100644
--- a/tests/Translate3.pot
+++ b/tests/Translate/Translate3.pot
@@ -10,12 +10,12 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
#. (itstool) path: head/title
-#: tests/Translate3.xml:6
+#: tests/Translate/Translate3.xml:6
msgid "The Life of a Simple Man"
msgstr ""
#. (itstool) path: body/p
-#: tests/Translate3.xml:9
+#: tests/Translate/Translate3.xml:9
msgid "Everything started when Zebulon discovered that he had a <_:span-1/> who was a serious baseball <_:span-2/>."
msgstr ""
diff --git a/tests/Translate3.xml b/tests/Translate/Translate3.xml
index e25758c..e25758c 100644
--- a/tests/Translate3.xml
+++ b/tests/Translate/Translate3.xml
diff --git a/tests/Translate4.ll.po b/tests/Translate/Translate4.ll.po
index 22b8bec..6669e32 100644
--- a/tests/Translate4.ll.po
+++ b/tests/Translate/Translate4.ll.po
@@ -11,12 +11,12 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
#. (itstool) path: head/title
-#: tests/Translate4.xml:3
+#: tests/Translate/Translate4.xml:3
msgid "The Life of a Simple Man"
msgstr "La vie d'un simple homme"
#. (itstool) path: body/p
-#: tests/Translate4.xml:6
+#: tests/Translate/Translate4.xml:6
msgid ""
"Everything started when Zebulon discovered that he had a <_:fexp-1/> who was "
"a serious baseball <_:fexp-2/>."
diff --git a/tests/Translate4.ll.xml b/tests/Translate/Translate4.ll.xml
index 7394181..873d1b5 100644
--- a/tests/Translate4.ll.xml
+++ b/tests/Translate/Translate4.ll.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<book xmlns:its="http://www.w3.org/2005/11/its" its:version="1.0" lang="test">
+<book xmlns:its="http://www.w3.org/2005/11/its" its:version="1.0">
<head>
<title>La vie d'un simple homme</title>
</head>
diff --git a/tests/Translate4.pot b/tests/Translate/Translate4.pot
index 2c7a552..f3ed595 100644
--- a/tests/Translate4.pot
+++ b/tests/Translate/Translate4.pot
@@ -10,12 +10,12 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
#. (itstool) path: head/title
-#: tests/Translate4.xml:3
+#: tests/Translate/Translate4.xml:3
msgid "The Life of a Simple Man"
msgstr ""
#. (itstool) path: body/p
-#: tests/Translate4.xml:6
+#: tests/Translate/Translate4.xml:6
msgid "Everything started when Zebulon discovered that he had a <_:fexp-1/> who was a serious baseball <_:fexp-2/>."
msgstr ""
diff --git a/tests/Translate4.xml b/tests/Translate/Translate4.xml
index e353d09..e353d09 100644
--- a/tests/Translate4.xml
+++ b/tests/Translate/Translate4.xml
diff --git a/tests/Translate5.ll.po b/tests/Translate/Translate5.ll.po
index e2dfa0a..91e38be 100644
--- a/tests/Translate5.ll.po
+++ b/tests/Translate/Translate5.ll.po
@@ -11,12 +11,12 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
#. (itstool) path: info/item
-#: tests/Translate5.xml:9
+#: tests/Translate/Translate5.xml:9
msgid "The Life of a <_:b-1/>"
msgstr "La vie d'un <_:b-1/>"
#. (itstool) path: content/p
-#: tests/Translate5.xml:15
+#: tests/Translate/Translate5.xml:15
msgid ""
"Everything started when Zebulon discovered that he had a <_:span-1/> who was "
"a serious baseball <_:span-2/>."
diff --git a/tests/Translate5.ll.xml b/tests/Translate/Translate5.ll.xml
index ccb9cbd..ccb9cbd 100644
--- a/tests/Translate5.ll.xml
+++ b/tests/Translate/Translate5.ll.xml
diff --git a/tests/Translate5.pot b/tests/Translate/Translate5.pot
index ac73acc..4bb7643 100644
--- a/tests/Translate5.pot
+++ b/tests/Translate/Translate5.pot
@@ -10,12 +10,12 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
#. (itstool) path: info/item
-#: tests/Translate5.xml:9
+#: tests/Translate/Translate5.xml:9
msgid "The Life of a <_:b-1/>"
msgstr ""
#. (itstool) path: content/p
-#: tests/Translate5.xml:15
+#: tests/Translate/Translate5.xml:15
msgid "Everything started when Zebulon discovered that he had a <_:span-1/> who was a serious baseball <_:span-2/>."
msgstr ""
diff --git a/tests/Translate5.xml b/tests/Translate/Translate5.xml
index a275360..a275360 100644
--- a/tests/Translate5.xml
+++ b/tests/Translate/Translate5.xml
diff --git a/tests/Translate6.ll.po b/tests/Translate/Translate6.ll.po
index e15cdff..2c1a6d3 100644
--- a/tests/Translate6.ll.po
+++ b/tests/Translate/Translate6.ll.po
@@ -11,27 +11,27 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
#. (itstool) path: item/b
-#: tests/Translate6.xml:9
+#: tests/Translate/Translate6.xml:9
msgid "Simple Man"
msgstr "simple homme"
#. (itstool) path: info/item
-#: tests/Translate6.xml:9
+#: tests/Translate/Translate6.xml:9
msgid "The Life of a <_:b-1/>"
msgstr "La vie d'un <_:b-1/>"
#. (itstool) path: p/span
-#: tests/Translate6.xml:16
+#: tests/Translate/Translate6.xml:16
msgid "doppelgänger"
msgstr "double"
#. (itstool) path: p/span
-#: tests/Translate6.xml:17
+#: tests/Translate/Translate6.xml:17
msgid "aficionado"
msgstr "passionné"
#. (itstool) path: content/p
-#: tests/Translate6.xml:15
+#: tests/Translate/Translate6.xml:15
msgid ""
"Everything started when Zebulon discovered that he had a <_:span-1/> who was "
"a serious baseball <_:span-2/>."
diff --git a/tests/Translate6.ll.xml b/tests/Translate/Translate6.ll.xml
index 7c30876..7c30876 100644
--- a/tests/Translate6.ll.xml
+++ b/tests/Translate/Translate6.ll.xml
diff --git a/tests/Translate6.pot b/tests/Translate/Translate6.pot
index d86bb52..4954d87 100644
--- a/tests/Translate6.pot
+++ b/tests/Translate/Translate6.pot
@@ -10,27 +10,27 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
#. (itstool) path: item/b
-#: tests/Translate6.xml:9
+#: tests/Translate/Translate6.xml:9
msgid "Simple Man"
msgstr ""
#. (itstool) path: info/item
-#: tests/Translate6.xml:9
+#: tests/Translate/Translate6.xml:9
msgid "The Life of a <_:b-1/>"
msgstr ""
#. (itstool) path: p/span
-#: tests/Translate6.xml:16
+#: tests/Translate/Translate6.xml:16
msgid "doppelgänger"
msgstr ""
#. (itstool) path: p/span
-#: tests/Translate6.xml:17
+#: tests/Translate/Translate6.xml:17
msgid "aficionado"
msgstr ""
#. (itstool) path: content/p
-#: tests/Translate6.xml:15
+#: tests/Translate/Translate6.xml:15
msgid "Everything started when Zebulon discovered that he had a <_:span-1/> who was a serious baseball <_:span-2/>."
msgstr ""
diff --git a/tests/Translate6.xml b/tests/Translate/Translate6.xml
index 6374f32..6374f32 100644
--- a/tests/Translate6.xml
+++ b/tests/Translate/Translate6.xml
diff --git a/tests/Translate7.ll.po b/tests/Translate/Translate7.ll.po
index ff82f24..a1635f0 100644
--- a/tests/Translate7.ll.po
+++ b/tests/Translate/Translate7.ll.po
@@ -11,11 +11,11 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
#. (itstool) path: body/p
-#: tests/Translate7.xml:19
+#: tests/Translate/Translate7.xml:19
msgid "For the implementation of ITS, apply the rules in the order:"
msgstr "Pour l'implémentation d'ITS, appliquez les règles dans l'ordre :"
#. (itstool) path: body/p
-#: tests/Translate7.xml:26
+#: tests/Translate/Translate7.xml:26
msgid "<_:ph-1/> The last rule wins."
msgstr "<_:ph-1/> La dernière règle gagne."
diff --git a/tests/Translate7.ll.xml b/tests/Translate/Translate7.ll.xml
index 1ac74b0..1ac74b0 100644
--- a/tests/Translate7.ll.xml
+++ b/tests/Translate/Translate7.ll.xml
diff --git a/tests/Translate7.pot b/tests/Translate/Translate7.pot
index 60ab061..4141b48 100644
--- a/tests/Translate7.pot
+++ b/tests/Translate/Translate7.pot
@@ -10,12 +10,12 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
#. (itstool) path: body/p
-#: tests/Translate7.xml:19
+#: tests/Translate/Translate7.xml:19
msgid "For the implementation of ITS, apply the rules in the order:"
msgstr ""
#. (itstool) path: body/p
-#: tests/Translate7.xml:26
+#: tests/Translate/Translate7.xml:26
msgid "<_:ph-1/> The last rule wins."
msgstr ""
diff --git a/tests/Translate7.xml b/tests/Translate/Translate7.xml
index dc75458..dc75458 100644
--- a/tests/Translate7.xml
+++ b/tests/Translate/Translate7.xml
diff --git a/tests/TranslateGlobal.ll.po b/tests/Translate/TranslateGlobal.ll.po
index 9f86d44..b612236 100644
--- a/tests/TranslateGlobal.ll.po
+++ b/tests/Translate/TranslateGlobal.ll.po
@@ -11,16 +11,16 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
#. (itstool) path: body/par@title
-#: tests/TranslateGlobal.xml:10
+#: tests/Translate/TranslateGlobal.xml:10
msgid "Text"
msgstr "Texte"
#. (itstool) path: body/par
-#: tests/TranslateGlobal.xml:10
+#: tests/Translate/TranslateGlobal.xml:10
msgid "This is the first paragraph. It has some <_:code-1/>."
msgstr "Voici le premier paragraphe. Il contient du texte <_:code-1/>."
#. (itstool) path: body/par
-#: tests/TranslateGlobal.xml:11
+#: tests/Translate/TranslateGlobal.xml:11
msgid "Some additional text."
msgstr "Du texte supplémentaire."
diff --git a/tests/TranslateGlobal.ll.xml b/tests/Translate/TranslateGlobal.ll.xml
index eed9b8b..eed9b8b 100644
--- a/tests/TranslateGlobal.ll.xml
+++ b/tests/Translate/TranslateGlobal.ll.xml
diff --git a/tests/TranslateGlobal.pot b/tests/Translate/TranslateGlobal.pot
index 5da4806..8393308 100644
--- a/tests/TranslateGlobal.pot
+++ b/tests/Translate/TranslateGlobal.pot
@@ -10,17 +10,17 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
#. (itstool) path: body/par@title
-#: tests/TranslateGlobal.xml:10
+#: tests/Translate/TranslateGlobal.xml:10
msgid "Text"
msgstr ""
#. (itstool) path: body/par
-#: tests/TranslateGlobal.xml:10
+#: tests/Translate/TranslateGlobal.xml:10
msgid "This is the first paragraph. It has some <_:code-1/>."
msgstr ""
#. (itstool) path: body/par
-#: tests/TranslateGlobal.xml:11
+#: tests/Translate/TranslateGlobal.xml:11
msgid "Some additional text."
msgstr ""
diff --git a/tests/TranslateGlobal.xml b/tests/Translate/TranslateGlobal.xml
index 3dc8dd5..3dc8dd5 100644
--- a/tests/TranslateGlobal.xml
+++ b/tests/Translate/TranslateGlobal.xml
diff --git a/tests/TranslateGlobal_LinkedRules.xml b/tests/Translate/TranslateGlobal_LinkedRules.xml
index 9a570d1..9a570d1 100644
--- a/tests/TranslateGlobal_LinkedRules.xml
+++ b/tests/Translate/TranslateGlobal_LinkedRules.xml
diff --git a/tests/elementwithintextLocalXml.ll.po b/tests/elementwithintextLocalXml.ll.po
new file mode 100644
index 0000000..7413773
--- /dev/null
+++ b/tests/elementwithintextLocalXml.ll.po
@@ -0,0 +1,16 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2012-09-21 09:34-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. (itstool) path: body/par
+#: tests/elementwithintextLocalXml.xml:5
+msgid "Text with <bold its:withinText=\"yes\">bold</bold>."
+msgstr "Texte en <bold its:withinText=\"yes\">gras</bold>."
+
diff --git a/tests/elementwithintextLocalXml.ll.xml b/tests/elementwithintextLocalXml.ll.xml
new file mode 100644
index 0000000..fb950c0
--- /dev/null
+++ b/tests/elementwithintextLocalXml.ll.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<text xmlns:its="http://www.w3.org/2005/11/its" its:version="2.0">
+ <body>
+ <par>Texte en <bold its:withinText="yes">gras</bold>.</par>
+ </body>
+</text>
diff --git a/tests/elementwithintextLocalXml.pot b/tests/elementwithintextLocalXml.pot
new file mode 100644
index 0000000..2f9ff2a
--- /dev/null
+++ b/tests/elementwithintextLocalXml.pot
@@ -0,0 +1,16 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2012-09-21 09:34-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. (itstool) path: body/par
+#: tests/elementwithintextLocalXml.xml:5
+msgid "Text with <bold its:withinText=\"yes\">bold</bold>."
+msgstr ""
+
diff --git a/tests/elementwithintextLocalXml.xml b/tests/elementwithintextLocalXml.xml
new file mode 100644
index 0000000..fd15d6d
--- /dev/null
+++ b/tests/elementwithintextLocalXml.xml
@@ -0,0 +1,8 @@
+<text
+ xmlns:its="http://www.w3.org/2005/11/its"
+ its:version="2.0">
+ <body>
+ <par>Text with <bold
+ its:withinText="yes">bold</bold>.</par>
+ </body>
+</text>
diff --git a/tests/elementwithintextlocalitsSpanXml.ll.po b/tests/elementwithintextlocalitsSpanXml.ll.po
new file mode 100644
index 0000000..e668a5a
--- /dev/null
+++ b/tests/elementwithintextlocalitsSpanXml.ll.po
@@ -0,0 +1,16 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2012-09-20 08:51-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. (itstool) path: body/par
+#: tests/elementwithintextlocalitsSpanXml.xml:5
+msgid "Text with <its:span withinText=\"yes\">bold</its:span>."
+msgstr "Texte en <its:span withinText=\"yes\">gras</its:span>."
+
diff --git a/tests/elementwithintextlocalitsSpanXml.ll.xml b/tests/elementwithintextlocalitsSpanXml.ll.xml
new file mode 100644
index 0000000..72d0670
--- /dev/null
+++ b/tests/elementwithintextlocalitsSpanXml.ll.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<text xmlns:its="http://www.w3.org/2005/11/its" its:version="2.0">
+ <body>
+ <par>Texte en <its:span withinText="yes">gras</its:span>.</par>
+ </body>
+</text>
diff --git a/tests/elementwithintextlocalitsSpanXml.pot b/tests/elementwithintextlocalitsSpanXml.pot
new file mode 100644
index 0000000..6995416
--- /dev/null
+++ b/tests/elementwithintextlocalitsSpanXml.pot
@@ -0,0 +1,16 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2012-09-20 08:51-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. (itstool) path: body/par
+#: tests/elementwithintextlocalitsSpanXml.xml:5
+msgid "Text with <its:span withinText=\"yes\">bold</its:span>."
+msgstr ""
+
diff --git a/tests/elementwithintextlocalitsSpanXml.xml b/tests/elementwithintextlocalitsSpanXml.xml
new file mode 100644
index 0000000..d9927ee
--- /dev/null
+++ b/tests/elementwithintextlocalitsSpanXml.xml
@@ -0,0 +1,7 @@
+<text
+ xmlns:its="http://www.w3.org/2005/11/its"
+ its:version="2.0">
+ <body>
+ <par>Text with <its:span withinText="yes">bold</its:span>.</par>
+ </body>
+</text>
diff --git a/tests/preservespace1xml.pot b/tests/preservespace1xml.pot
new file mode 100644
index 0000000..ab6ea7d
--- /dev/null
+++ b/tests/preservespace1xml.pot
@@ -0,0 +1,23 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2012-09-08 13:24-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. (itstool) path: book/verse
+#: tests/preservespace1xml.xml:9
+#, no-wrap
+msgid ""
+"\n"
+" ’Twas brillig, and the slithy toves\n"
+" Did gyre and gimble in the wabe;\n"
+" All mimsy were the borogoves,\n"
+" And the mome raths outgrabe.\n"
+" "
+msgstr ""
+
diff --git a/tests/preservespace1xml.xml b/tests/preservespace1xml.xml
new file mode 100644
index 0000000..3282291
--- /dev/null
+++ b/tests/preservespace1xml.xml
@@ -0,0 +1,15 @@
+<book
+ xmlns:its="http://www.w3.org/2005/11/its" >
+ <info>
+ <its:rules
+ its:version="2.0">
+ <its:preserveSpaceRule selector="//verse" space="preserve"/>
+ </its:rules>
+ </info>
+ <verse>
+ ’Twas brillig, and the slithy toves
+ Did gyre and gimble in the wabe;
+ All mimsy were the borogoves,
+ And the mome raths outgrabe.
+ </verse>
+</book>
diff --git a/tests/preservespace2xml.pot b/tests/preservespace2xml.pot
new file mode 100644
index 0000000..c9c5b90
--- /dev/null
+++ b/tests/preservespace2xml.pot
@@ -0,0 +1,23 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2012-09-08 13:24-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. (itstool) path: book/verse
+#: tests/preservespace2xml.xml:4
+#, no-wrap
+msgid ""
+"\n"
+" 'Twas brillig, and the slithy toves\n"
+" Did gyre and gimble in the wabe;\n"
+" All mimsy were the borogoves,\n"
+" And the mome raths outgrabe.\n"
+" "
+msgstr ""
+
diff --git a/tests/preservespace2xml.xml b/tests/preservespace2xml.xml
new file mode 100644
index 0000000..cdc082d
--- /dev/null
+++ b/tests/preservespace2xml.xml
@@ -0,0 +1,10 @@
+<book
+ xmlns:its="http://www.w3.org/2005/11/its"
+ its:version="2.0">
+ <verse xml:space="preserve">
+ 'Twas brillig, and the slithy toves
+ Did gyre and gimble in the wabe;
+ All mimsy were the borogoves,
+ And the mome raths outgrabe.
+ </verse>
+</book>
diff --git a/tests/preservespace3XmlRule.xml b/tests/preservespace3XmlRule.xml
new file mode 100644
index 0000000..8b05d41
--- /dev/null
+++ b/tests/preservespace3XmlRule.xml
@@ -0,0 +1,3 @@
+<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="2.0">
+ <its:preserveSpaceRule selector="//verse" space="preserve"/>
+ </its:rules>
diff --git a/tests/preservespace3xml.pot b/tests/preservespace3xml.pot
new file mode 100644
index 0000000..ea21748
--- /dev/null
+++ b/tests/preservespace3xml.pot
@@ -0,0 +1,23 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2012-09-08 13:24-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. (itstool) path: book/verse
+#: tests/preservespace3xml.xml:6
+#, no-wrap
+msgid ""
+"\n"
+" ’Twas brillig, and the slithy toves\n"
+" Did gyre and gimble in the wabe;\n"
+" All mimsy were the borogoves,\n"
+" And the mome raths outgrabe.\n"
+" "
+msgstr ""
+
diff --git a/tests/preservespace3xml.xml b/tests/preservespace3xml.xml
new file mode 100644
index 0000000..6291c40
--- /dev/null
+++ b/tests/preservespace3xml.xml
@@ -0,0 +1,12 @@
+<book
+ xmlns:its="http://www.w3.org/2005/11/its" >
+ <info>
+ <its:rules xmlns:its="http://www.w3.org/2005/11/its" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.0" xlink:type="simple" xlink:href="preservespace3XmlRule.xml"/>
+ </info>
+ <verse>
+ ’Twas brillig, and the slithy toves
+ Did gyre and gimble in the wabe;
+ All mimsy were the borogoves,
+ And the mome raths outgrabe.
+ </verse>
+</book>
diff --git a/tests/preservespace4xml.pot b/tests/preservespace4xml.pot
new file mode 100644
index 0000000..6ae58e1
--- /dev/null
+++ b/tests/preservespace4xml.pot
@@ -0,0 +1,23 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2012-09-08 13:24-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. (itstool) path: book/span
+#: tests/preservespace4xml.xml:4
+#, no-wrap
+msgid ""
+"\n"
+" 'Twas brillig, and the slithy toves\n"
+" Did gyre and gimble in the wabe;\n"
+" All mimsy were the borogoves,\n"
+" And the mome raths outgrabe.\n"
+" "
+msgstr ""
+
diff --git a/tests/preservespace4xml.xml b/tests/preservespace4xml.xml
new file mode 100644
index 0000000..61cea70
--- /dev/null
+++ b/tests/preservespace4xml.xml
@@ -0,0 +1,10 @@
+<book
+ xmlns:its="http://www.w3.org/2005/11/its"
+ its:version="2.0">
+ <its:span xml:space="preserve">
+ 'Twas brillig, and the slithy toves
+ Did gyre and gimble in the wabe;
+ All mimsy were the borogoves,
+ And the mome raths outgrabe.
+ </its:span >
+</book>
diff --git a/tests/run_tests.py b/tests/run_tests.py
index 48bd25f..6939ff6 100644
--- a/tests/run_tests.py
+++ b/tests/run_tests.py
@@ -32,7 +32,7 @@ class ItstoolTests(unittest.TestCase):
def _test_pot_generation(self, start_file, reference_pot=None, expected_status=0, options=None):
start_file_base = os.path.splitext(start_file)[0]
- result = self.run_command("cd %(dir)s && python itstool_test %(opt)s -o %(out)s %(in)s" % {
+ result = self.run_command("cd %(dir)s && python itstool_test %(opt)s -n -o %(out)s %(in)s" % {
'dir' : ITSTOOL_DIR,
'opt' : (options or ''),
'out' : os.path.join('tests', "test.pot"),
@@ -57,14 +57,14 @@ class ItstoolTests(unittest.TestCase):
mo_file = '%s.mo' % lang
self.run_command("cd %(dir)s && msgfmt -o %(mo_file)s %(po_file)s" %
{'dir': TEST_DIR, 'mo_file': mo_file, 'po_file': po_file})
- result = self.run_command("cd %(dir)s && python itstool_test -o%(res)s -j %(src)s %(mo)s" % {
+ result = self.run_command("cd %(dir)s && python itstool_test -n -o%(res)s -j %(src)s %(mo)s" % {
'dir': ITSTOOL_DIR,
'res': os.path.join(TEST_DIR, 'test.xml'),
'src': os.path.join(TEST_DIR, start_file),
'mo': ' '.join([os.path.join(TEST_DIR, '%s.mo' % lang) for lang in langs])
})
if xml_file is None:
- xml_file = '%s.ll.xml' % start_file_base
+ xml_file = '%s.joined.xml' % start_file_base
self.assertFilesEqual(
os.path.join(TEST_DIR, 'test.xml'),
os.path.join(TEST_DIR, xml_file)
@@ -72,83 +72,222 @@ class ItstoolTests(unittest.TestCase):
return result
- def _test_translation_process(self, start_file, expected_status=0, po_file=None, xml_file=None, options=None):
+ def _test_translation_process(self, start_file, expected_status=0, outputs=None, options=None):
start_file_base = os.path.splitext(start_file)[0]
self._test_pot_generation(start_file, options=options)
- # Compile mo and merge
- if po_file is None:
- po_file = "%s.ll.po" % start_file_base
- self.run_command("cd %(dir)s && msgfmt -o test.mo %(po_file)s" % {'dir': TEST_DIR, 'po_file': po_file})
- result = self.run_command("cd %(dir)s && python itstool_test %(opt)s -m %(mo)s -o %(res)s %(src)s" % {
- 'dir': ITSTOOL_DIR,
- 'opt': (options or ''),
- 'mo' : os.path.join(TEST_DIR, "test.mo"),
- 'res': os.path.join(TEST_DIR, "test.xml"),
- 'src': os.path.join(TEST_DIR, start_file),
- }, expected_status)
- if xml_file is None:
- xml_file = "%s.ll.xml" % start_file_base
- if (expected_status == 0):
- self.assertFilesEqual(
- os.path.join(TEST_DIR, "test.xml"),
- os.path.join(TEST_DIR, xml_file)
- )
- return result
+ if outputs is None:
+ outputs = [("%s.ll.po" % start_file_base, "%s.ll.xml" % start_file_base, 'll')]
+ for po_file, xml_file, lang in outputs:
+ self.run_command("cd %(dir)s && msgfmt -o test.mo %(po_file)s" % {'dir': TEST_DIR, 'po_file': po_file})
+ self.run_command("cd %(dir)s && python itstool_test -n %(opt)s -l %(lc)s -m %(mo)s -o %(res)s %(src)s" % {
+ 'dir': ITSTOOL_DIR,
+ 'opt': (options or ''),
+ 'lc' : lang,
+ 'mo' : os.path.join(TEST_DIR, "test.mo"),
+ 'res': os.path.join(TEST_DIR, "test.xml"),
+ 'src': os.path.join(TEST_DIR, start_file),
+ }, expected_status)
+ if (expected_status == 0):
+ self.assertFilesEqual(
+ os.path.join(TEST_DIR, "test.xml"),
+ os.path.join(TEST_DIR, xml_file)
+ )
def test_LocNote1(self):
# FIXME: only the third note appears currently, as notes on subnodes don't propagate to parent nodes
- self._test_pot_generation('LocNote1.xml')
+ self._test_pot_generation('LocNote/LocNote1.xml')
def test_LocNote2(self):
# FIXME: only the third note appears currently, as notes on subnodes don't propagate to parent nodes
- self._test_pot_generation('LocNote2.xml')
+ self._test_pot_generation('LocNote/LocNote2.xml')
def test_LocNote3(self):
- self._test_pot_generation('LocNote3.xml')
+ self._test_pot_generation('LocNote/LocNote3.xml')
def test_LocNote4(self):
- self._test_pot_generation('LocNote4.xml')
+ self._test_pot_generation('LocNote/LocNote4.xml')
def test_EX_locNote_element_1(self):
- self._test_pot_generation('EX-locNote-element-1.xml')
+ self._test_pot_generation('LocNote/EX-locNote-element-1.xml')
def test_EX_locNote_selector_2(self):
- self._test_pot_generation('EX-locNote-selector-2.xml')
+ self._test_pot_generation('LocNote/EX-locNote-selector-2.xml')
def test_EX_locNotePointer_attribute_1(self):
- self._test_pot_generation('EX-locNotePointer-attribute-1.xml')
+ self._test_pot_generation('LocNote/EX-locNotePointer-attribute-1.xml')
def test_EX_locNoteRef_attribute_1(self):
- self._test_pot_generation('EX-locNoteRef-attribute-1.xml')
+ self._test_pot_generation('LocNote/EX-locNoteRef-attribute-1.xml')
def test_EX_locNoteRefPointer_attribute_1(self):
- self._test_pot_generation('EX-locNoteRefPointer-attribute-1.xml')
+ self._test_pot_generation('LocNote/EX-locNoteRefPointer-attribute-1.xml')
+
+ def test_PreserveSpace1(self):
+ self._test_pot_generation('preservespace1xml.xml')
+
+ def test_PreserveSpace2(self):
+ self._test_pot_generation('preservespace2xml.xml')
+
+ def test_PreserveSpace3(self):
+ self._test_pot_generation('preservespace3xml.xml')
+
+ def test_PreserveSpace4(self):
+ self._test_pot_generation('preservespace4xml.xml')
def test_Translate1(self):
- self._test_translation_process('Translate1.xml')
+ self._test_translation_process('Translate/Translate1.xml')
def test_Translate2(self):
- self._test_translation_process('Translate2.xml')
+ self._test_translation_process('Translate/Translate2.xml')
def test_Translate3(self):
- self._test_translation_process('Translate3.xml')
+ self._test_translation_process('Translate/Translate3.xml')
def test_Translate4(self):
- self._test_translation_process('Translate4.xml')
+ self._test_translation_process('Translate/Translate4.xml')
def test_Translate5(self):
- self._test_translation_process('Translate5.xml')
+ self._test_translation_process('Translate/Translate5.xml')
def test_Translate6(self):
- self._test_translation_process('Translate6.xml')
+ self._test_translation_process('Translate/Translate6.xml')
def test_Translate7(self):
- self._test_translation_process('Translate7.xml')
+ self._test_translation_process('Translate/Translate7.xml')
def test_TranslateGlobal(self):
- self._test_translation_process('TranslateGlobal.xml')
+ self._test_translation_process('Translate/TranslateGlobal.xml')
+
+ def test_ExternalResource1(self):
+ self._test_pot_generation('ExternalResource/ExternalResource1Xml.xml')
+
+ def test_ExternalResource2(self):
+ self._test_pot_generation('ExternalResource/ExternalResource2Xml.xml')
+
+ def test_ExternalResource3(self):
+ self._test_pot_generation('ExternalResource/ExternalResource3Xml.xml')
+
+ def test_ExternalResource1Attr(self):
+ self._test_pot_generation('ExternalResource/Attr/ExternalResource1AttrXml.xml')
+
+ def test_ExternalResource2Attr(self):
+ self._test_pot_generation('ExternalResource/Attr/ExternalResource2AttrXml.xml')
+
+ def test_ExternalResource3Attr(self):
+ self._test_pot_generation('ExternalResource/Attr/ExternalResource3AttrXml.xml')
+
+ def test_IdValue1(self):
+ self._test_pot_generation('IdValue/idvalue1xml.xml')
+
+ def test_IdValue2(self):
+ self._test_pot_generation('IdValue/idvalue2xml.xml')
+
+ def test_IdValue3(self):
+ self._test_pot_generation('IdValue/idvalue3xml.xml')
+
+ def test_Locale1(self):
+ self._test_translation_process('LocaleFilter/Locale1Xml.xml',
+ outputs=[('LocaleFilter/Locale1Xml.fr_FR.po',
+ 'LocaleFilter/Locale1Xml.fr_FR.xml',
+ 'fr-FR'),
+ ('LocaleFilter/Locale1Xml.fr_CA.po',
+ 'LocaleFilter/Locale1Xml.fr_CA.xml',
+ 'fr-CA'),
+ ('LocaleFilter/Locale1Xml.fr_CH.po',
+ 'LocaleFilter/Locale1Xml.fr_CH.xml',
+ 'fr-CH')])
+
+ def test_Locale2(self):
+ self._test_translation_process('LocaleFilter/Locale2Xml.xml',
+ outputs=[('LocaleFilter/Locale2Xml.fr_FR.po',
+ 'LocaleFilter/Locale2Xml.fr_FR.xml',
+ 'fr-FR'),
+ ('LocaleFilter/Locale2Xml.fr_CA.po',
+ 'LocaleFilter/Locale2Xml.fr_CA.xml',
+ 'fr-CA'),
+ ('LocaleFilter/Locale2Xml.fr_CH.po',
+ 'LocaleFilter/Locale2Xml.fr_CH.xml',
+ 'fr-CH')])
+
+ def test_Locale3(self):
+ self._test_translation_process('LocaleFilter/Locale3Xml.xml',
+ outputs=[('LocaleFilter/Locale3Xml.fr_FR.po',
+ 'LocaleFilter/Locale3Xml.fr_FR.xml',
+ 'fr-FR'),
+ ('LocaleFilter/Locale3Xml.fr_CA.po',
+ 'LocaleFilter/Locale3Xml.fr_CA.xml',
+ 'fr-CA'),
+ ('LocaleFilter/Locale3Xml.fr_CH.po',
+ 'LocaleFilter/Locale3Xml.fr_CH.xml',
+ 'fr-CH')])
+
+ def test_Locale4(self):
+ self._test_translation_process('LocaleFilter/Locale4Xml.xml',
+ outputs=[('LocaleFilter/Locale4Xml.fr_FR.po',
+ 'LocaleFilter/Locale4Xml.fr_FR.xml',
+ 'fr-FR'),
+ ('LocaleFilter/Locale4Xml.fr_CA.po',
+ 'LocaleFilter/Locale4Xml.fr_CA.xml',
+ 'fr-CA'),
+ ('LocaleFilter/Locale4Xml.fr_CH.po',
+ 'LocaleFilter/Locale4Xml.fr_CH.xml',
+ 'fr-CH')])
+
+ def test_Locale5(self):
+ self._test_translation_process('LocaleFilter/Locale5Xml.xml',
+ outputs=[('LocaleFilter/Locale5Xml.fr_FR.po',
+ 'LocaleFilter/Locale5Xml.fr_FR.xml',
+ 'fr-FR'),
+ ('LocaleFilter/Locale5Xml.fr_CA.po',
+ 'LocaleFilter/Locale5Xml.fr_CA.xml',
+ 'fr-CA'),
+ ('LocaleFilter/Locale5Xml.fr_CH.po',
+ 'LocaleFilter/Locale5Xml.fr_CH.xml',
+ 'fr-CH')])
+
+ def test_Locale6(self):
+ self._test_translation_process('LocaleFilter/Locale6Xml.xml',
+ outputs=[('LocaleFilter/Locale6Xml.fr_FR.po',
+ 'LocaleFilter/Locale6Xml.fr_FR.xml',
+ 'fr-FR'),
+ ('LocaleFilter/Locale6Xml.fr_CA.po',
+ 'LocaleFilter/Locale6Xml.fr_CA.xml',
+ 'fr-CA'),
+ ('LocaleFilter/Locale6Xml.fr_CH.po',
+ 'LocaleFilter/Locale6Xml.fr_CH.xml',
+ 'fr-CH')])
+
+ def test_Locale1_join(self):
+ self._test_translation_join('LocaleFilter/Locale1Xml.xml',
+ ('fr_FR', 'fr_CA', 'fr_CH'))
+
+ def test_Locale2_join(self):
+ self._test_translation_join('LocaleFilter/Locale2Xml.xml',
+ ('fr_FR', 'fr_CA', 'fr_CH'))
+
+ def test_Locale3_join(self):
+ self._test_translation_join('LocaleFilter/Locale3Xml.xml',
+ ('fr_FR', 'fr_CA', 'fr_CH'))
+
+ def test_Locale4_join(self):
+ self._test_translation_join('LocaleFilter/Locale4Xml.xml',
+ ('fr_FR', 'fr_CA', 'fr_CH'))
+
+ def test_Locale5_join(self):
+ self._test_translation_join('LocaleFilter/Locale5Xml.xml',
+ ('fr_FR', 'fr_CA', 'fr_CH'))
+
+ def test_Locale6_join(self):
+ self._test_translation_join('LocaleFilter/Locale6Xml.xml',
+ ('fr_FR', 'fr_CA', 'fr_CH'))
+
+ def test_elementwithintextlocalitsSpanXml(self):
+ self._test_translation_process('elementwithintextlocalitsSpanXml.xml')
+
+ def test_elementwithintextLocalXml(self):
+ self._test_translation_process('elementwithintextLocalXml.xml')
def test_WithinText1(self):
self._test_translation_process('WithinText1.xml')
@@ -156,6 +295,9 @@ class ItstoolTests(unittest.TestCase):
def test_WithinText2(self):
self._test_translation_process('WithinText2.xml')
+ def test_IT_externalRef1(self):
+ self._test_translation_process('IT-externalRef1.xml')
+
def test_IT_locNote_inline(self):
self._test_pot_generation('IT-locNote-inline.xml')
@@ -201,20 +343,21 @@ class ItstoolTests(unittest.TestCase):
self._test_translation_process('IT-keep-entities-2.xml', options='--keep-entities')
def test_IT_join_1(self):
- res = self._test_translation_join('IT-join-1.xml', ('cs', 'de', 'fr'))
+ self._test_translation_join('IT-join-1.xml', ('cs', 'de', 'fr'))
def test_Translate3_wrong1(self):
""" Test that bad XML syntax in translation generates a proper exception """
- res = self._test_translation_process('Translate3.xml', expected_status=1,
- po_file='Translate3.ll.wrong.po',
- options='-s')
+ self._test_translation_process('Translate/Translate3.xml', expected_status=1,
+ outputs=[('Translate/Translate3.ll.wrong.po', None, 'll')],
+ options='-s')
#self.assertTrue("libxml2.parserError" in res['errors'])
def test_Translate3_wrong2(self):
""" Test that bad XML syntax in translation is handled gracefully """
- res = self._test_translation_process('Translate3.xml',
- po_file='Translate3.ll.wrong.po',
- xml_file='Translate3.ll.wrong.xml')
+ self._test_translation_process('Translate/Translate3.xml',
+ outputs=[('Translate/Translate3.ll.wrong.po',
+ 'Translate/Translate3.ll.wrong.xml',
+ 'll')])
class ITSTestRunner(unittest.TextTestRunner):