sp_fr: add alias with _1 suffix to cater for nodes with maxOccurs > 1 (#33256)

Text nodes which can be multiple must always have a counter suffix.
This commit is contained in:
Benjamin Dauvergne 2019-05-20 11:36:38 +02:00
parent f58880854c
commit 20c614261c
1 changed files with 3 additions and 0 deletions

View File

@ -490,6 +490,9 @@ class Resource(BaseResource):
yield p, value
else:
yield path, text_content(node)
# case of multiple nodes
new_path = path[:-1] + [path[-1] + '_1']
yield new_path, text_content(node)
return {'_'.join(path): value for path, value in helper([tag_name(root)], root)}
class Meta: