@@ -197,42 +197,42 @@ void testShorthandBtLabelReference_MissingLabelType() {
197
197
@ Test
198
198
void testShorthandIndirectLabelReferenceForIndicator () {
199
199
assertEquals (
200
- "declare block01 = { label(concat('indicator', '|', 'when', '-', ../IndicatorField/normalize-space(text()) , '|', 'BT-00-Indicator')) }\n for-each(/*/PathNode/TextField).call(block01)" ,
200
+ "declare block01 = { label(for $item in ../IndicatorField return concat('indicator', '|', 'when', '-', $item , '|', 'BT-00-Indicator')) }\n for-each(/*/PathNode/TextField).call(block01)" ,
201
201
translate ("{BT-00-Text} #{BT-00-Indicator}" ));
202
202
}
203
203
204
204
@ Test
205
205
void testShorthandIndirectLabelReferenceForCode () {
206
206
assertEquals (
207
- "declare block01 = { label(concat('code', '|', 'name', '|', 'main-activity', '.', ../CodeField/normalize-space(text()) )) }\n for-each(/*/PathNode/TextField).call(block01)" ,
207
+ "declare block01 = { label(for $item in ../CodeField return concat('code', '|', 'name', '|', 'main-activity', '.', $item )) }\n for-each(/*/PathNode/TextField).call(block01)" ,
208
208
translate ("{BT-00-Text} #{BT-00-Code}" ));
209
209
}
210
210
211
211
@ Test
212
212
void testShorthandIndirectLabelReferenceForInternalCode () {
213
213
assertEquals (
214
- "declare block01 = { label(concat('code', '|', 'name', '|', 'main-activity', '.', ../InternalCodeField/normalize-space(text()) )) }\n for-each(/*/PathNode/TextField).call(block01)" ,
214
+ "declare block01 = { label(for $item in ../InternalCodeField return concat('code', '|', 'name', '|', 'main-activity', '.', $item )) }\n for-each(/*/PathNode/TextField).call(block01)" ,
215
215
translate ("{BT-00-Text} #{BT-00-Internal-Code}" ));
216
216
}
217
217
218
218
@ Test
219
219
void testShorthandIndirectLabelReferenceForCodeAttribute () {
220
220
assertEquals (
221
- "declare block01 = { label(concat('code', '|', 'name', '|', 'main-activity', '.', ../CodeField/@attribute )) }\n for-each(/*/PathNode/TextField).call(block01)" ,
221
+ "declare block01 = { label(for $item in ../CodeField/@attribute return concat('code', '|', 'name', '|', 'main-activity', '.', $item )) }\n for-each(/*/PathNode/TextField).call(block01)" ,
222
222
translate ("{BT-00-Text} #{BT-00-CodeAttribute}" ));
223
223
}
224
224
225
225
@ Test
226
226
void testShorthandIndirectLabelReferenceForCodeAttribute_WithSameAttributeInContext () {
227
227
assertEquals (
228
- "declare block01 = { label(concat('code', '|', 'name', '|', 'main-activity', '.', ../@attribute )) }\n for-each(/*/PathNode/CodeField/@attribute).call(block01)" ,
228
+ "declare block01 = { label(for $item in ../@attribute return concat('code', '|', 'name', '|', 'main-activity', '.', $item )) }\n for-each(/*/PathNode/CodeField/@attribute).call(block01)" ,
229
229
translate ("{BT-00-CodeAttribute} #{BT-00-CodeAttribute}" ));
230
230
}
231
231
232
232
@ Test
233
233
void testShorthandIndirectLabelReferenceForCodeAttribute_WithSameElementInContext () {
234
234
assertEquals (
235
- "declare block01 = { label(concat('code', '|', 'name', '|', 'main-activity', '.', ./@attribute )) }\n for-each(/*/PathNode/CodeField).call(block01)" ,
235
+ "declare block01 = { label(for $item in ./@attribute return concat('code', '|', 'name', '|', 'main-activity', '.', $item )) }\n for-each(/*/PathNode/CodeField).call(block01)" ,
236
236
translate ("{BT-00-Code} #{BT-00-CodeAttribute}" ));
237
237
}
238
238
@@ -287,7 +287,7 @@ void testShorthandLabelReferenceFromContext_WithNodeContext() {
287
287
@ Test
288
288
void testShorthandIndirectLabelReferenceFromContextField () {
289
289
assertEquals (
290
- "declare block01 = { label(concat('code', '|', 'name', '|', 'main-activity', '.', ./normalize-space(text()) )) }\n for-each(/*/PathNode/CodeField).call(block01)" ,
290
+ "declare block01 = { label(for $item in . return concat('code', '|', 'name', '|', 'main-activity', '.', $item )) }\n for-each(/*/PathNode/CodeField).call(block01)" ,
291
291
translate ("{BT-00-Code} #value" ));
292
292
}
293
293
@@ -308,7 +308,7 @@ void testShorthandFieldValueReferenceFromContextField() {
308
308
@ Test
309
309
void testShorthandFieldValueReferenceFromContextField_WithText () {
310
310
assertEquals (
311
- "declare block01 = { text('blah ')label(concat('code', '|', 'name', '|', 'main-activity', '.', ./normalize-space(text()) ))text(' ')text('blah ')eval(.)text(' ')text('blah') }\n for-each(/*/PathNode/CodeField).call(block01)" ,
311
+ "declare block01 = { text('blah ')label(for $item in . return concat('code', '|', 'name', '|', 'main-activity', '.', $item ))text(' ')text('blah ')eval(.)text(' ')text('blah') }\n for-each(/*/PathNode/CodeField).call(block01)" ,
312
312
translate ("{BT-00-Code} blah #value blah $value blah" ));
313
313
}
314
314
0 commit comments