Skip to content

Commit 972d881

Browse files
committed
wip
1 parent ad755fc commit 972d881

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pkg/xsd/schema.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,16 @@ func (sch *Schema) resolveNameCollisions() {
8282
for _, l := range elementsByName {
8383
if len(l) > 1 {
8484
// Found elements that have duplicate name
85-
fmt.Printf("\n - resolving name collision: %s", l[0].GoName())
85+
// TODO: resolve the name collisions more intelligently here.
86+
// TODO: Needs to compare parent name for all the collisions and potentially use grand parent
87+
fmt.Printf("\n - TODO: resolving name collision: %s", l[0].GoName())
8688
for idx := range l {
8789
el := l[idx]
8890
el.prefixNameWithParent(el.Parent)
8991
}
9092
}
9193
}
94+
// TODO call resolveNameCollisions again on resolved schema, to avoid new collisions created by resolver
9295
}
9396

9497
func (sch *Schema) elementsByGoName() map[string][]*Element {

0 commit comments

Comments
 (0)