Poc més
[apertium.git] / apertium-unicode / apertium / odt-format.xml
blob5782744e5d6852b251c164681b536258e78c72f1
1 <?xml version="1.0" encoding="UTF-8"?>
2 <format name="html">
3   <options>
4     <largeblocks size="8192"/>
5     <input encoding="ISO-8859-1"/>
6     <output encoding="ISO-8859-1"/>
7     <tag-name regexp="[a-zA-Z]+"/>
8     <escape-chars regexp='[][^@\\/]'/>
9     <space-chars regexp='[ \n\t\r$*&lt;&gt;]'/>
10     <case-sensitive value="no"/>
11   </options>
13   <rules>
14     <format-rule type="comment" eos="no" priority="1">
15       <begin regexp='"&lt;!--"'/>
16       <end regexp='"--&gt;"'/>
17     </format-rule>
19     <format-rule type="comment" eos="no" priority="2">
20       <begin regexp='"&lt;math:"[a-zA-Z]+(" "[^&gt;]*)?"&gt;"'/>
21       <end regexp='"&lt;/math:"[a-zA-Z]+(" "[^&gt;]*)?"&gt;"'/>
22     </format-rule> 
24     <format-rule type="open" eos="yes" priority="3">
25       <tag regexp='"&lt;text:"[hp](" "[^&gt;]*)?"&gt;"'/>
26     </format-rule>
28     <format-rule type="close" eos="yes" priority="3">
29       <tag regexp='"&lt;/text:"[hp](" "[^&gt;]*)?"&gt;"'/>
30     </format-rule>
33     <format-rule type="empty" eos="no" priority="4">
34       <tag regexp='("&lt;!"|"&lt;?")[a-zA-Z][^&gt;]*"&gt;"'/>
35     </format-rule>
38     <format-rule type="open" eos="no" priority="4">
39       <tag regexp='"&lt;"[a-zA-Z][^&gt;]*"&gt;"'/>
40     </format-rule>
41     
42     <format-rule type="close" eos="no" priority="4">
43       <tag regexp='"&lt;/"[a-zA-Z][^&gt;]*"&gt;"'/>
44     </format-rule>
45     <replacement-rule regexp='"&amp;"([a-zA-Z]+|"#x"[0-9a-fA-F]{1,4}|"#"[0-9]{1,8});'>
46       <replace source="&amp;apos;" target="'"/>
47     </replacement-rule>
48   </rules>
50 </format>