not Build in model group
B-Nicolai opened this issue · comments
Example:
http://www.w3.org/1999/xhtml}xhtml.BlkStruct.class that only exists in the modularized version of that namespace, which is not what PyXB has built-in.
Generate python code from http://www.omg.org/spec/ReqIF/1.2/
There exist the necessary xsd file, but when i want to generate code : pyxbgen -u reqif.xsd -m reqif
an error occures : raise pyxb.NamespaceError(self, '%s has no category %s' % (self, category))
NamespaceError: http://www.w3.org/1999/xhtml has no category modelGroupDefinition
See additional information on the help forum.
I second that. I have the same problem (also with reqIf). Any hints on this?
Same here (also with ReqIF). Is there anything we could do to help?
I'm curious why all of a sudden everybody's interested in those schema. Example in a class somewhere, or some open source project that's trying to use them?
I've closed this as a side effect of adding a bundle that supports ReqIF. This will appear in the next release. No, I don't know when that'll be--probably sometime in September since PyXB's been tending to annual releases. I could be convinced to expedite it; making a release isn't really hard, just tedious and tends to increase support requests I don't really have time for.
If you want it before then you should be able to apply 350e85c and cde4487 to any recent PyXB release, then do:
pyxb/bundles/reqif/scripts/genbind
A couple things to keep in mind:
-
The script will have to download the schema for the modularized XHTML namespace, and it does so from w3.org directly. To discourage reference to their schema they impose a significant delay (about 30 s) on each retrieval. So it'll take a few minutes to download everything.
-
Since
-
is not a valid identifier character in Python all the ReqIF element names substitute_
. So you'll get a lot of these:WARNING:pyxb.binding.generate:Simple type {http://www.omg.org/spec/ReqIF/20110401/reqif.xsd}LOCAL-REF renamed to LOCAL_REF
If anybody's using this to support a quality open-source requirements management tool I'd be interested in seeing it.
Any chance to see 1.2.7 released? I'm working on some ReqIF tools and it would make distribution a lot easier for me.
Confused: this was fixed in 1.2.6, which was released 2017-09-03.
1.2.7 isn't on my horizon right now.
I just pip installed 1.2.6 in a clean environment, and it has no ReqIF bundle in it:
MM235917-PC:~ tmiller$ mkvirtualenv foo
Using base prefix '/usr/local/Cellar/python/3.6.4_3/Frameworks/Python.framework/Versions/3.6'
New python executable in /Users/tmiller/.virtualenvs/foo/bin/python3.6
Also creating executable in /Users/tmiller/.virtualenvs/foo/bin/python
Installing setuptools, pip, wheel...done.
virtualenvwrapper.user_scripts creating /Users/tmiller/.virtualenvs/foo/bin/predeactivate
virtualenvwrapper.user_scripts creating /Users/tmiller/.virtualenvs/foo/bin/postdeactivate
virtualenvwrapper.user_scripts creating /Users/tmiller/.virtualenvs/foo/bin/preactivate
virtualenvwrapper.user_scripts creating /Users/tmiller/.virtualenvs/foo/bin/postactivate
virtualenvwrapper.user_scripts creating /Users/tmiller/.virtualenvs/foo/bin/get_env_details
(foo) MM235917-PC:~ tmiller$ pip install pyxb
Collecting pyxb
Installing collected packages: pyxb
Successfully installed pyxb-1.2.6
(foo) MM235917-PC:bundles tmiller$ ls ~/.virtualenvs/foo/lib/python3.6/site-packages/pyxb/bundles/
__init__.py __pycache__ common dc saml20 wssplat
I can see the bundles in the tagged release tree. Did the bundle get generated when you deployed?
PyXB distributions don't include generated bindings for most bundles, because of space and copyright concerns. See the documentation for information on how to build the bindings. As best I can tell the source tar file for 1.2.6 has the necessary pieces; I don't know how you make pip do anything with them.