-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmatxin-spa-eus.interchunk_move1.xml
206 lines (176 loc) · 8.46 KB
/
matxin-spa-eus.interchunk_move1.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
<transfer>
<!-- prep!=''/prep type=~'emen'/prep up overwrite -->
<!-- prep!=''/casref type=~'emen'/casref up overwrite -->
<!-- prep!=''/casalloc type=~'emen'/casalloc up overwrite -->
<def-rule id="ST_InterchunkMove1: (type=~'emen') prep/casref/casalloc->" comment="">
<template match="//CHUNK[contains(@type, 'emen') and ./CHUNK[@prep!='']]">
<copy>
<attribute name="prep"><value-of select="./CHUNK[@prep!='']/@prep"/></attribute>
<attribute name="casref"><value-of select="./CHUNK[@prep!='']/@casref"/></attribute>
<attribute name="casalloc"><value-of select="./CHUNK[@prep!='']/@casalloc"/></attribute>
<apply-templates select="@*[name()!='prep' and name()!='casref' and name()!='casalloc'] | *"/>
</copy>
</template>
</def-rule>
<!-- spost!=''/spost si='dobj'/cas down overwrite -->
<!-- spost!=''/spostref si='dobj'/casref down overwrite -->
<!-- spost!=''/spostalloc si='dobj'/casalloc down overwrite -->
<def-rule id="ST_InterchunkMove1: (si='dobj') spost/spostref/spostalloc->" comment="">
<template match="//CHUNK[@si='dobj' and ancestor::CHUNK[1][@spost!='']]">
<copy>
<attribute name="spost"><value-of select="@spost"/></attribute>
<attribute name="spostref"><value-of select="@spostref"/></attribute>
<attribute name="spostalloc"><value-of select="@spostalloc"/></attribute>
<apply-templates select="@*[name()!='spost' and name()!='spostref' and name()!='spostalloc'] | *"/>
</copy>
</template>
</def-rule>
<!-- spost!='' && ref='1'/spost ref='2'/cas down overwrite -->
<!-- spost!='' && ref='1'/spostref ref='2'/casref down overwrite -->
<!-- spost!='' && ref='1'/spostalloc ref='2'/casalloc down overwrite -->
<def-rule id="ST_InterchunkMove1: ((spost!='' and ref='1') and (ref ='2')) cas/casref/casalloc->" comment="">
<template match="//CHUNK[@ref='2' and ancestor::CHUNK[1][@spost!='' and ref='1']]">
<copy>
<attribute name="cas"><value-of select="@cas"/></attribute>
<attribute name="casref"><value-of select="@casref"/></attribute>
<attribute name="casalloc"><value-of select="@casalloc"/></attribute>
<apply-templates select="@*[name()!='cas' and name()!='casref' and name()!='casalloc'] | *"/>
</copy>
</template>
</def-rule>
<!-- -->
<!-- type='mend-p'/vpost type='zehazt-s'/'+[DEK][ABS][NUMS]' up concat -->
<def-rule id="ST_InterchunkMove1: (type=~'mend-p' and type=~'zehazt-s') vpost->.'+[DEK][ABS][NUMS]'" comment="">
<template match="//CHUNK[@type='mend-p' and ./CHUNK[@type='zehazt-s']]">
<copy>
<attribute name="vpost"><value-of select="concat(@vpost, ',+[DEK][ABS][NUMS]' )"/></attribute>
<apply-templates select="@*[name()!='vpost'] | *"/>
</copy>
</template>
</def-rule>
<!-- type='mend-p'/vpost type='zehazt-p'/'+[DEK][ABS][NUMP]' up concat -->
<def-rule id="ST_InterchunkMove1: (type=~'mend-p' and type=~'zehazt-p') vpost->.'+[DEK][ABS][NUMP]'" comment="">
<template match="//CHUNK[@type='mend-p' and ./CHUNK[@type='zehazt-p' ]]">
<copy>
<attribute name="vpost"><value-of select="concat(@vpost, ',+[DEK][ABS][NUMP]' )"/></attribute>
<apply-templates select="@*[name()!='vpost'] | *"/>
</copy>
</template>
</def-rule>
<!-- -->
<!-- type='mend-p' && vpost!=''/vpost type=~'adi-'/rel down overwrite -->
<def-rule id="ST_InterchunkMove1: ((type='mend-p' and vpost!='') and (type=~'adi-')) vpost->rel" comment="">
<template match="//CHUNK[contains(@type, 'adi-') and ancestor::CHUNK[1][@type='mend-p' and @vpost!='']]">
<copy>
<attribute name="rel"><value-of select="ancestor::CHUNK[1]/@vpost"/></attribute>
<apply-templates select="@*[name()!='rel'] | *"/>
</copy>
</template>
</def-rule>
<!-- vpost!=''/'[ZERO]' type=~'adi-'/cas down overwrite -->
<!-- vpost!=''/vpostref type=~'adi-'/relref down overwrite -->
<!-- vpost!=''/vpostalloc type=~'adi-'/relalloc down overwrite -->
<def-rule id="ST_InterchunkMove1: (vpost!='' and type=~'adi-') cas->'[ZERO]'" comment="">
<template match="//CHUNK[contains(@type, 'adi-') and ancestor::CHUNK[1][@vpost!='']]">
<copy>
<attribute name="cas">[ZERO]</attribute>
<attribute name="relref"><value-of select="ancestor::CHUNK[1]/@vpostref"/></attribute>
<attribute name="relalloc"><value-of select="ancestor::CHUNK[1]/@vpostalloc"/></attribute>
<apply-templates select="@*[name()!='cas' and name()!='relref' and name()!='relalloc' ] | *"/>
</copy>
</template>
</def-rule>
<!-- #/'[NUMS]' type='mend-p'/mi down overwrite -->
<!-- #/'[NUMS]' type!~'adi-' && def='[MUGM]' && num='[NUMS]'/mi down no-overwrite -->
<!-- #/'[NUMP]' type!~'adi-' && def='[MUGM]' && num='[NUMP]'/mi down no-overwrite -->
<!-- #/'[NUMS]' type!~'adi-' && def='' && num='[NUMS]'/mi down no-overwrite -->
<!-- #/'[NUMP]' type!~'adi-' && def='' && num='[NUMP]'/mi down no-overwrite -->
<!-- #/'[MG]' type!~'adi-' && def='[MG]'/mi down no-overwrite -->
<!-- -->
<!-- type='adi-pas'/'true' prep='por'/subject down overwrite -->
<def-rule id="" comment="">
<template match="//CHUNK[@prep='por' and ancestor::CHUNK[1][@type='adi-pas']]">
<copy>
<attribute name="subject">true</attribute>
<apply-templates select="@*[name()!='subject'] | *"/>
<!-- <apply-templates select="@* | *"/> -->
</copy>
</template>
</def-rule>
<!-- type='adi-pas'/'subj' prep='por'/si down overwrite -->
<def-rule id="" comment="">
<template match="//CHUNK[@prep='por' and ancestor::CHUNK[1][@type='adi-pas']]">
<copy>
<attribute name="si">subj</attribute>
<apply-templates select="@*[name()!='si'] | *"/>
</copy>
</template>
</def-rule>
<!-- -->
<!-- type=~'adi-kat'/'true' ref-1=parent.ref/focus down overwrite -->
<def-rule id="" comment="">
<template match="//CHUNK[ancestor::CHUNK[1][contains(@type,'adi-kat')] and (@ref - 1) = ancestor::CHUNK[1]/@ref]">
<copy>
<attribute name="focus">true</attribute>
<apply-templates select="@*[name()!='focus'] | *"/>
<!-- <apply-templates select="@* | *"/> -->
</copy>
</template>
</def-rule>
<!-- -->
<!-- type='p-int'/'true' type=~'adi-'/quest down overwrite -->
<def-rule id="ST_InterchunkMove1: (type='p-int' and type=~'adi-') quest->'true'" comment="">
<template match="//CHUNK[contains(@type,'adi-kat') and ancestor::CHUNK[1][@type='p-int']]">
<copy>
<attribute name="quest">true</attribute>
<apply-templates select="@*[name()!='quest'] | *"/>
</copy>
</template>
</def-rule>
<!-- -->
<!-- type='ez'/'true' type=~'adi-'/neg up overwrite -->
<def-rule id="ST_InterchunkMove1: (type='ez' and type=~'adi-') neg->'true'" comment="">
<template match="//CHUNK[contains(@type, 'adi-') and ./CHUNK[@type='ez']]">
<copy>
<attribute name="neg">true</attribute>
<apply-templates select="@*[name() != 'neg'] | *"/>
</copy>
</template>
</def-rule>
<!-- type='ez'/'adi-kat-ez' type='adi-kat'/type up overwrite -->
<def-rule id="ST_InterchunkMove1: (type='ez' and type='adi-kat') type->'adi-kat-ez'" comment="">
<template match="//CHUNK[@type='adi-kat' and ./CHUNK[@type='ez']]">
<copy>
<attribute name="type">adi-kat-ez</attribute>
<apply-templates select="@*[name()!='type'] | *"/>
</copy>
</template>
</def-rule>
<!-- type='ez'/'adi-pas-ez' type='adi-pas'/type up overwrite -->
<def-rule id="ST_InterchunkMove1: (type='ez' and type='adi-pas') type->'adi-pas-ez'" comment="">
<template match="//CHUNK[@type='adi-pas' and ./CHUNK[@type='ez']]">
<copy>
<attribute name="type">adi-pas-ez</attribute>
<apply-templates select="@*[name()!='type'] | *"/>
</copy>
</template>
</def-rule>
<!-- -->
<!-- qtype='wh'/'wh' type=~'adi-'/qtype up overwrite -->
<def-rule id="ST_InterchunkMove1: (qtype='wh' and type=~'adi-') qtype->'wh'" comment="">
<template match="//CHUNK[contains(@type, 'adi-') and ./CHUNK[@type='wh']]">
<copy>
<attribute name="qtype">wh</attribute>
<apply-templates select="@*[name()!='qtype'] | *"/>
</copy>
</template>
</def-rule>
<!-- #si='dobj' && type='mend-p'/'[NUMS]' type=~'adi-'/objMi up overwrite -->
<!-- #si='dobj'/'[NUMS]' type=~'adi-'/objMi up overwrite -->
<!-- Quitar nodos que no tengan ningun nodo abajo -->
<def-rule id="" comment="">
<template match="//CHUNK[not(./NODE)]">
<apply-templates select="*"/>
</template>
</def-rule>
</transfer>