File tree Expand file tree Collapse file tree 2 files changed +38
-4
lines changed
test/java/org/culturegraph/mf/morph/collectors Expand file tree Collapse file tree 2 files changed +38
-4
lines changed Original file line number Diff line number Diff line change 416
416
<element ref =" tns:entity" />
417
417
<element ref =" tns:call-macro" />
418
418
</choice >
419
- <attribute name =" name" type =" string" use =" optional" >
419
+ <attribute name =" name" type =" string" use =" optional" default = " " >
420
420
<annotation >
421
421
<documentation >Name of the entity. If not given the entity must
422
- have an entity-name element. </documentation >
422
+ have an entity-name element otherwise an empty name is emitted </documentation >
423
423
</annotation >
424
424
</attribute >
425
425
<attribute name =" reset" type =" boolean" use =" optional"
Original file line number Diff line number Diff line change 370
370
</cgxml : cgxml >
371
371
</result >
372
372
</test-case >
373
-
373
+
374
374
<test-case name =" shouldResetNameToNameAttribute" >
375
375
<input type =" text/x-cg+xml" >
376
376
<cgxml : cgxml version =" 1.0" >
417
417
</cgxml : cgxml >
418
418
</result >
419
419
</test-case >
420
-
420
+
421
+ <test-case name =" should emit empty string if entity name is not set" >
422
+ <input type =" text/x-cg+xml" >
423
+ <cgxml : cgxml version =" 1.0" >
424
+ <cgxml : records >
425
+ <cgxml : record id =" 1" >
426
+ <cgxml : literal name =" in" value =" a" />
427
+ </cgxml : record >
428
+ </cgxml : records >
429
+ </cgxml : cgxml >
430
+ </input >
431
+
432
+ <transformation type =" text/x-metamorph+xml" >
433
+ <mm : metamorph version =" 1" >
434
+ <mm : rules >
435
+ <mm : entity >
436
+ <mm : data source =" in" name =" out" />
437
+ </mm : entity >
438
+ </mm : rules >
439
+ </mm : metamorph >
440
+ </transformation >
441
+
442
+ <result type =" text/x-cg+xml" >
443
+ <cgxml : cgxml version =" 1.0" >
444
+ <cgxml : records >
445
+ <cgxml : record id =" 1" >
446
+ <cgxml : entity name =" " >
447
+ <cgxml : literal name =" out" value =" a" />
448
+ </cgxml : entity >
449
+ </cgxml : record >
450
+ </cgxml : records >
451
+ </cgxml : cgxml >
452
+ </result >
453
+ </test-case >
454
+
421
455
</metamorph-test >
You can’t perform that action at this time.
0 commit comments