-
-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xsdata not working for ReqIF schema #204
Comments
Thanks for reporting @ansFourtyTwo This is my output ❯ xsdata https://www.omg.org/spec/ReqIF/20110401/reqif.xsd --package reqif_model
Parsing schema reqif.xsd
Parsing schema xsi.xsd
Compiling schema xsi.xsd
Builder: 4 main and 0 inner classes
Parsing schema xml.xsd
Compiling schema xml.xsd
Builder: 5 main and 2 inner classes
Parsing schema driver.xsd
Parsing schema xhtml-datatypes-1.xsd
Compiling schema xhtml-datatypes-1.xsd
Builder: 30 main and 1 inner classes
Parsing schema xhtml-framework-1.xsd
warning: Unassigned parsed object {http://www.w3.org/2001/XMLSchema}annotation
Parsing schema xhtml-attribs-1.xsd
Compiling schema xhtml-attribs-1.xsd
Builder: 12 main and 0 inner classes
Compiling schema xhtml-framework-1.xsd
Parsing schema xhtml-text-1.xsd
Parsing schema xhtml-blkphras-1.xsd
warning: Unassigned parsed object {http://www.w3.org/2001/XMLSchema}annotation
Compiling schema xhtml-blkphras-1.xsd
Builder: 29 main and 0 inner classes
Parsing schema xhtml-blkstruct-1.xsd
Compiling schema xhtml-blkstruct-1.xsd
Builder: 6 main and 0 inner classes
Parsing schema xhtml-inlphras-1.xsd
warning: Unassigned parsed object {http://www.w3.org/2001/XMLSchema}annotation
Compiling schema xhtml-inlphras-1.xsd
Builder: 33 main and 0 inner classes
Parsing schema xhtml-inlstruct-1.xsd
warning: Unassigned parsed object {http://www.w3.org/2001/XMLSchema}annotation
Compiling schema xhtml-inlstruct-1.xsd
Builder: 6 main and 0 inner classes
Compiling schema xhtml-text-1.xsd
Parsing schema xhtml-hypertext-1.xsd
Compiling schema xhtml-hypertext-1.xsd
Builder: 3 main and 0 inner classes
Parsing schema xhtml-list-1.xsd
Compiling schema xhtml-list-1.xsd
Builder: 18 main and 0 inner classes
Parsing schema xhtml-edit-1.xsd
Compiling schema xhtml-edit-1.xsd
Builder: 3 main and 0 inner classes
Parsing schema xhtml-pres-1.xsd
warning: Unassigned parsed object {http://www.w3.org/2001/XMLSchema}annotation
Parsing schema xhtml-blkpres-1.xsd
warning: Unassigned parsed object {http://www.w3.org/2001/XMLSchema}annotation
Compiling schema xhtml-blkpres-1.xsd
Builder: 3 main and 0 inner classes
Parsing schema xhtml-inlpres-1.xsd
warning: Unassigned parsed object {http://www.w3.org/2001/XMLSchema}annotation
Compiling schema xhtml-inlpres-1.xsd
Builder: 3 main and 0 inner classes
Compiling schema xhtml-pres-1.xsd
Parsing schema xhtml-inlstyle-1.xsd
Compiling schema xhtml-inlstyle-1.xsd
Builder: 1 main and 0 inner classes
Parsing schema xhtml-object-1.xsd
warning: Unassigned parsed object {http://www.w3.org/2001/XMLSchema}annotation
Parsing schema xhtml-param-1.xsd
warning: Unassigned parsed object {http://www.w3.org/2001/XMLSchema}annotation
Compiling schema xhtml-param-1.xsd
Builder: 3 main and 1 inner classes
Compiling schema xhtml-object-1.xsd
Builder: 3 main and 1 inner classes
Parsing schema xhtml-table-1.xsd
warning: Unassigned parsed object {http://www.w3.org/2001/XMLSchema}annotation
Compiling schema xhtml-table-1.xsd
Builder: 35 main and 5 inner classes
Compiling schema driver.xsd
Builder: 34 main and 0 inner classes
Compiling schema reqif.xsd
Builder: 41 main and 77 inner classes
Analyzer input: 272 main and 87 inner classes
Traceback (most recent call last):
File "/home/chris/.pyenv/versions/xsdata/bin/xsdata", line 11, in <module>
load_entry_point('xsdata', 'console_scripts', 'xsdata')()
File "/home/chris/.pyenv/versions/3.7.4/envs/xsdata/lib/python3.7/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/home/chris/.pyenv/versions/3.7.4/envs/xsdata/lib/python3.7/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/chris/.pyenv/versions/3.7.4/envs/xsdata/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/chris/.pyenv/versions/3.7.4/envs/xsdata/lib/python3.7/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/home/chris/projects/xsdata/xsdata/cli.py", line 41, in cli
transformer.process_schemas(list(uris), kwargs["package"])
File "/home/chris/projects/xsdata/xsdata/codegen/transformer.py", line 70, in process_schemas
self.process_classes(package)
File "/home/chris/projects/xsdata/xsdata/codegen/transformer.py", line 83, in process_classes
classes = self.analyze_classes(classes)
File "/home/chris/projects/xsdata/xsdata/codegen/transformer.py", line 205, in analyze_classes
return ClassAnalyzer.process(classes)
File "/home/chris/projects/xsdata/xsdata/codegen/analyzer.py", line 25, in process
container.process()
File "/home/chris/projects/xsdata/xsdata/codegen/container.py", line 78, in process
self.process_class(obj)
File "/home/chris/projects/xsdata/xsdata/codegen/container.py", line 89, in process_class
self.process_class(inner)
File "/home/chris/projects/xsdata/xsdata/codegen/container.py", line 85, in process_class
processor.process(target)
File "/home/chris/projects/xsdata/xsdata/codegen/handlers/attribute_type.py", line 39, in process
self.process_type(target, attr, attr_type)
File "/home/chris/projects/xsdata/xsdata/codegen/handlers/attribute_type.py", line 55, in process_type
self.process_dependency_type(target, attr, attr_type)
File "/home/chris/projects/xsdata/xsdata/codegen/handlers/attribute_type.py", line 94, in process_dependency_type
source = self.find_dependency(target, attr_type)
File "/home/chris/projects/xsdata/xsdata/codegen/handlers/attribute_type.py", line 77, in find_dependency
result = self.container.find(qname, condition=condition)
File "/home/chris/projects/xsdata/xsdata/codegen/container.py", line 66, in find
self.process_class(row)
File "/home/chris/projects/xsdata/xsdata/codegen/container.py", line 85, in process_class
processor.process(target)
File "/home/chris/projects/xsdata/xsdata/codegen/handlers/attribute_type.py", line 39, in process
self.process_type(target, attr, attr_type)
File "/home/chris/projects/xsdata/xsdata/codegen/handlers/attribute_type.py", line 55, in process_type
self.process_dependency_type(target, attr, attr_type)
File "/home/chris/projects/xsdata/xsdata/codegen/handlers/attribute_type.py", line 94, in process_dependency_type
source = self.find_dependency(target, attr_type)
File "/home/chris/projects/xsdata/xsdata/codegen/handlers/attribute_type.py", line 77, in find_dependency
result = self.container.find(qname, condition=condition)
File "/home/chris/projects/xsdata/xsdata/codegen/container.py", line 66, in find
self.process_class(row)
File "/home/chris/projects/xsdata/xsdata/codegen/container.py", line 85, in process_class
processor.process(target)
File "/home/chris/projects/xsdata/xsdata/codegen/handlers/attribute_group.py", line 31, in process
self.process_attribute(target, attr)
File "/home/chris/projects/xsdata/xsdata/codegen/handlers/attribute_group.py", line 49, in process_attribute
raise AnalyzerValueError(f"Group attribute not found: `{qname}`")
xsdata.exceptions.AnalyzerValueError: Group attribute not found: `{http://www.omg.org/spec/ReqIF/20110401/reqif.xsd}xhtml.BlkStruct.class`
Some of the imported schemas are from w3c.org which is known to sometimes block requests, I will try download everything locally and check again |
let me know if the fix is working for you too!
|
Hi @tefra, many many thanks. |
Nice I think I 've sorted out all the issues, I will try to merge and include the fix in the next release as soon as possible |
I tried to create bindings for reqif.xsd with following command:
xsdata https://www.omg.org/spec/ReqIF/20110401/reqif.xsd --package reqif_model
Is there any chance this can be resolved? I have similar issues with generateDS and pyXB, but this tools seems more promising and quite active currently.
The text was updated successfully, but these errors were encountered: