You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This seems related to #8, but I dont need an enhancement in the xgen tool, just a way to solve the problem below.
I am having a similar problem when trying to use xgen on the Grobid xsd files: xgen -i ./grobid/grobid-home/schemas/xsd -o ./pkg/extraction/grobid -p grobid -l Go
It creates all the corresponding go files, albeit in a weird directory path (pkg/extraction/grobid/grobid/grobid-home/schemas/xsd/), but after moving the files to the expected path, the go compiler complains found packages schema (Grobid.xsd.go) and grobid (dcr.xsd.go). If I manually change the package from schema to grobid in Grobid.xsd.go I get a bunch of errors related to redeclared in this block. Is there any way to work around this issue?
Steps to reproduce the issue:
xgen -i ./grobid/grobid-home/schemas/xsd -o ./pkg/extraction/grobid -p grobid -l Go
pkg/extraction/extraction.go:25:2: foundpackagesschema (Grobid.xsd.go) andgrobid (dcr.xsd.go) in/Users/ojg/code/corpora/server/pkg/extraction/grobid```5.Changepackage name to`grobid`in`Grobid.xsd.go`andbuild:
```go build -o bin/test .
pkg/extraction/grobid/tei.xsd.go:10:6: P redeclared in this block
pkg/extraction/grobid/Grobid.xsd.go:2606:6: other declaration of P
pkg/extraction/grobid/tei.xsd.go:20:6: Hi redeclared in this block
pkg/extraction/grobid/Grobid.xsd.go:2616:6: other declaration of Hi
Describe the results you received:
The code did not compile compile - see output above.
Describe the results you expected:
The code to compile.
Output of go version:
go version go1.22.1 darwin/arm64
xgen version or commit ID:
xgen version: 0.1.0
Environment details (OS, physical, etc.):
macOS 14.4 on MacBook Pro with M2.
The text was updated successfully, but these errors were encountered:
I think it is not an issue. The tei.xsd and grobid.xsd have a lot of elements twice. xgen will properly generate two definitions of all these elements.
Description
This seems related to #8, but I dont need an enhancement in the
xgen
tool, just a way to solve the problem below.I am having a similar problem when trying to use
xgen
on the Grobid xsd files:xgen -i ./grobid/grobid-home/schemas/xsd -o ./pkg/extraction/grobid -p grobid -l Go
It creates all the corresponding go files, albeit in a weird directory path (
pkg/extraction/grobid/grobid/grobid-home/schemas/xsd/
), but after moving the files to the expected path, the go compiler complainsfound packages schema (Grobid.xsd.go) and grobid (dcr.xsd.go)
. If I manually change the package fromschema
togrobid
inGrobid.xsd.go
I get a bunch of errors related toredeclared in this block
. Is there any way to work around this issue?Steps to reproduce the issue:
xgen -i ./grobid/grobid-home/schemas/xsd -o ./pkg/extraction/grobid -p grobid -l Go
mv pkg/extraction/grobid/grobid/grobid-home/schemas/xsd/* pkg/extraction/grobid && rm -rf pkg/extraction/grobid/grobid/grobid-home
Describe the results you received:
The code did not compile compile - see output above.
Describe the results you expected:
The code to compile.
Output of
go version
:xgen version or commit ID:
Environment details (OS, physical, etc.):
macOS 14.4 on MacBook Pro with M2.
The text was updated successfully, but these errors were encountered: