pyxb-users Mailing List for PyXB: Python XML Schema Bindings (Page 2)
Brought to you by:
pabigot
You can subscribe to this list here.
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(4) |
Sep
(3) |
Oct
|
Nov
(11) |
Dec
(17) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2010 |
Jan
(17) |
Feb
(3) |
Mar
|
Apr
|
May
(7) |
Jun
(1) |
Jul
(7) |
Aug
(3) |
Sep
|
Oct
(7) |
Nov
(4) |
Dec
(2) |
2011 |
Jan
(3) |
Feb
(4) |
Mar
|
Apr
(4) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(14) |
Nov
|
Dec
|
2012 |
Jan
(8) |
Feb
(7) |
Mar
(5) |
Apr
(5) |
May
(16) |
Jun
(5) |
Jul
(3) |
Aug
(2) |
Sep
|
Oct
|
Nov
(3) |
Dec
(1) |
2013 |
Jan
(4) |
Feb
(9) |
Mar
(8) |
Apr
(5) |
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
(5) |
Oct
(9) |
Nov
(2) |
Dec
|
2014 |
Jan
|
Feb
(19) |
Mar
(4) |
Apr
(3) |
May
(3) |
Jun
(1) |
Jul
|
Aug
(3) |
Sep
|
Oct
(3) |
Nov
|
Dec
(3) |
2015 |
Jan
|
Feb
(3) |
Mar
(1) |
Apr
(10) |
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(4) |
Nov
|
Dec
(1) |
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2017 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2018 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: malika m. <mam...@gm...> - 2015-02-12 18:42:31
|
Thank you. I am using stackoverflow reply to fix my problem. Malika On Thu, Feb 12, 2015 at 12:59 PM, Peter Bigot <bi...@ac...> wrote: > See > http://pyxb.sourceforge.net/api/pyxb.binding.basis._TypeBinding_mixin-class.html#_setIsNil > > and various examples in the PyXB tests directory. > > Please accept the answer I gave to your stack overflow question and ask > future questions in public forums (stack overflow, the mailing list, or > github issues) so others can benefit from the information. > > Peter > > On Thu, Feb 12, 2015 at 11:28 AM, malika mahoui <mam...@gm...> > wrote: > >> Hi Peter, >> after going through the reply to my question on stackoverflow, I went to >> my full example and I found out that my real problem was that I was not >> assigning a value to an element that was nillable (see description >> element below) >> >> <xs:element name="reports" type="tns:Reports"/> >> >> <xs:complexType name="Reports"> >> >> <xs:sequence> ... >> >> <xs:element name="nbReports" nillable="true" type="xs:int"/> >> >> So, I tried to assign xs.int() to description but this will create < >> nbReports>0</nbReports)>while in my case I want <nbReports xs:nil=true/> >> >> thanks. >> >> >> Malika >> >> On Thu, Feb 12, 2015 at 9:11 AM, malika mahoui <mam...@gm...> >> wrote: >> >>> Hi Peter, >>> thank you for forwarding me to the reply. >>> Malika >>> >>> On Wed, Feb 11, 2015 at 1:34 PM, Peter Bigot <bi...@ac...> wrote: >>> >>>> Answered [on stackoverflow](stackoverflow.com/questions/28372382). >>>> >>>> Peter >>>> >>>> On Wed, Feb 11, 2015 at 9:22 AM, malika mahoui <mam...@gm...> >>>> wrote: >>>> >>>>> Hi, >>>>> I sent the email below few days ago and I did not get any reply. I >>>>> Really appreciate your help to figure out the error I am getting. >>>>> >>>>> Thanks. >>>>> >>>>> Malika >>>>> ---------- Forwarded message ---------- >>>>> From: malika mahoui <mam...@gm...> >>>>> Date: Mon, Feb 9, 2015 at 9:13 AM >>>>> Subject: pyxb issues with assigning values to anunbound inner complex >>>>> element with known type >>>>> To: pyx...@li... >>>>> >>>>> >>>>> I am trying to assign values to an unbound inner element of a >>>>> predefined type but I am not able to validate it. >>>>> >>>>> here is my example with reports.xsd and the snippet of the code that >>>>> is not working: >>>>> >>>>> ... >>>>> >>>>> <xs:element name="reports" type="tns:Reports"/> >>>>> >>>>> <xs:complexType name="Reports"> >>>>> >>>>> <xs:sequence> >>>>> >>>>> <xs:element minOccurs="0" name="description" >>>>> type="xs:string"/> >>>>> >>>>> <xs:element minOccurs="0" name="reportingGroups"> >>>>> >>>>> <xs:complexType> >>>>> >>>>> <xs:sequence> >>>>> >>>>> <xs:element maxOccurs="unbounded" minOccurs="0" >>>>> >>>>> name="reportingGroup" >>>>> type="tns:ReportingGroupType"/> >>>>> >>>>> </xs:sequence> >>>>> >>>>> </xs:complexType> >>>>> >>>>> </xs:element> >>>>> >>>>> </xs:sequence> >>>>> >>>>> </xs:complexType> >>>>> >>>>> <xs:complexType name="ReportingGroupType"> >>>>> >>>>> <xs:sequence> >>>>> >>>>> <xs:element name="title" type="xs:string"/> >>>>> >>>>> <xs:element minOccurs="0" name="description" >>>>> type="xs:string"/> >>>>> >>>>> </xs:sequence> >>>>> >>>>> <xs:attribute name="id" type="xs:ID" use="required"/> >>>>> >>>>> </xs:complexType> >>>>> >>>>> ------------------------------------------------------- >>>>> >>>>> import reports >>>>> >>>>> rep=reports.reports() >>>>> >>>>> rep.description="this report is ..." #works >>>>> >>>>> rep.reportingGroups=pyxb.BIND() >>>>> >>>>> rep.reportingGroups.append("ReportingGroupType(name='this >>>>> title",id=xs.string("A1")) #works >>>>> >>>>> print(rep.reportingGroups.toxml("utf-8")) #does not work >>>>> >>>>> ------------------------------------- >>>>> >>>>> I was not able to find a case similar to this one. I appreciate your >>>>> help. >>>>> >>>>> Malika >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> ------------------------------------------------------------------------------ >>>>> Dive into the World of Parallel Programming. The Go Parallel Website, >>>>> sponsored by Intel and developed in partnership with Slashdot Media, >>>>> is your >>>>> hub for all things parallel software development, from weekly thought >>>>> leadership blogs to news, videos, case studies, tutorials and more. >>>>> Take a >>>>> look and join the conversation now. http://goparallel.sourceforge.net/ >>>>> _______________________________________________ >>>>> pyxb-users mailing list >>>>> pyx...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/pyxb-users >>>>> >>>>> >>>> >>> >> > |
From: Peter B. <bi...@ac...> - 2015-02-11 18:34:13
|
Answered [on stackoverflow](stackoverflow.com/questions/28372382). Peter On Wed, Feb 11, 2015 at 9:22 AM, malika mahoui <mam...@gm...> wrote: > Hi, > I sent the email below few days ago and I did not get any reply. I Really > appreciate your help to figure out the error I am getting. > > Thanks. > > Malika > ---------- Forwarded message ---------- > From: malika mahoui <mam...@gm...> > Date: Mon, Feb 9, 2015 at 9:13 AM > Subject: pyxb issues with assigning values to anunbound inner complex > element with known type > To: pyx...@li... > > > I am trying to assign values to an unbound inner element of a predefined > type but I am not able to validate it. > > here is my example with reports.xsd and the snippet of the code that is > not working: > > ... > > <xs:element name="reports" type="tns:Reports"/> > > <xs:complexType name="Reports"> > > <xs:sequence> > > <xs:element minOccurs="0" name="description" type="xs:string"/> > > <xs:element minOccurs="0" name="reportingGroups"> > > <xs:complexType> > > <xs:sequence> > > <xs:element maxOccurs="unbounded" minOccurs="0" > > name="reportingGroup" > type="tns:ReportingGroupType"/> > > </xs:sequence> > > </xs:complexType> > > </xs:element> > > </xs:sequence> > > </xs:complexType> > > <xs:complexType name="ReportingGroupType"> > > <xs:sequence> > > <xs:element name="title" type="xs:string"/> > > <xs:element minOccurs="0" name="description" type="xs:string"/> > > </xs:sequence> > > <xs:attribute name="id" type="xs:ID" use="required"/> > > </xs:complexType> > > ------------------------------------------------------- > > import reports > > rep=reports.reports() > > rep.description="this report is ..." #works > > rep.reportingGroups=pyxb.BIND() > > rep.reportingGroups.append("ReportingGroupType(name='this > title",id=xs.string("A1")) #works > > print(rep.reportingGroups.toxml("utf-8")) #does not work > > ------------------------------------- > > I was not able to find a case similar to this one. I appreciate your help. > > Malika > > > > > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming. The Go Parallel Website, > sponsored by Intel and developed in partnership with Slashdot Media, is > your > hub for all things parallel software development, from weekly thought > leadership blogs to news, videos, case studies, tutorials and more. Take a > look and join the conversation now. http://goparallel.sourceforge.net/ > _______________________________________________ > pyxb-users mailing list > pyx...@li... > https://lists.sourceforge.net/lists/listinfo/pyxb-users > > |
From: malika m. <mam...@gm...> - 2015-02-11 15:22:32
|
Hi, I sent the email below few days ago and I did not get any reply. I Really appreciate your help to figure out the error I am getting. Thanks. Malika ---------- Forwarded message ---------- From: malika mahoui <mam...@gm...> Date: Mon, Feb 9, 2015 at 9:13 AM Subject: pyxb issues with assigning values to anunbound inner complex element with known type To: pyx...@li... I am trying to assign values to an unbound inner element of a predefined type but I am not able to validate it. here is my example with reports.xsd and the snippet of the code that is not working: ... <xs:element name="reports" type="tns:Reports"/> <xs:complexType name="Reports"> <xs:sequence> <xs:element minOccurs="0" name="description" type="xs:string"/> <xs:element minOccurs="0" name="reportingGroups"> <xs:complexType> <xs:sequence> <xs:element maxOccurs="unbounded" minOccurs="0" name="reportingGroup" type="tns:ReportingGroupType"/> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> <xs:complexType name="ReportingGroupType"> <xs:sequence> <xs:element name="title" type="xs:string"/> <xs:element minOccurs="0" name="description" type="xs:string"/> </xs:sequence> <xs:attribute name="id" type="xs:ID" use="required"/> </xs:complexType> ------------------------------------------------------- import reports rep=reports.reports() rep.description="this report is ..." #works rep.reportingGroups=pyxb.BIND() rep.reportingGroups.append("ReportingGroupType(name='this title",id=xs.string("A1")) #works print(rep.reportingGroups.toxml("utf-8")) #does not work ------------------------------------- I was not able to find a case similar to this one. I appreciate your help. Malika |
From: Sayth R. <fle...@gm...> - 2014-12-10 22:06:50
|
If I Look at jaxb and this answer http://stackoverflow.com/a/607267/461887 then jaxb is to design schema off data sceme xsd that you create. So I am assuming like an orm for xml. Wondering with xquery features coming in 3.0 whether it's useful or I just have the wrong idea. Thanks Sayth PS I have made the assumption that pyxb is similar to jaxb. On Thu, 11 Dec 2014 12:23 AM Peter Bigot <bi...@ac...> wrote: > PyXB could do this, if you write the python code to translate the > structured Python instances into database table updates. Depending on your > environment there may be a better approach, perhaps involving XSLT. I > defer to anybody else on this list who has a recommendation. > > Peter > > On Wed, Dec 10, 2014 at 6:46 AM, Sayth Renshaw <fle...@gm...> > wrote: > >> Please forgive my ignorance in asking this question. Is Pyxb a suitable >> option for put an xml feed into a database or ORM like sqlalchemy. >> >> Essentially I have a feed I have been given with an xsd definition,I want >> to be able to send it to a database, create csv files from it to do some >> stats on and graphing. >> >> Is pyxb for this? I have started looking at baseX and keeping most things >> in XML, is that a better option? >> >> Again I apologise but am not sure which way to go? >> >> Sayth >> >> >> ------------------------------------------------------------------------------ >> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >> from Actuate! Instantly Supercharge Your Business Reports and Dashboards >> with Interactivity, Sharing, Native Excel Exports, App Integration & more >> Get technology previously reserved for billion-dollar corporations, FREE >> >> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk >> _______________________________________________ >> pyxb-users mailing list >> pyx...@li... >> https://lists.sourceforge.net/lists/listinfo/pyxb-users >> >> > |
From: Peter B. <bi...@ac...> - 2014-12-10 13:23:55
|
PyXB could do this, if you write the python code to translate the structured Python instances into database table updates. Depending on your environment there may be a better approach, perhaps involving XSLT. I defer to anybody else on this list who has a recommendation. Peter On Wed, Dec 10, 2014 at 6:46 AM, Sayth Renshaw <fle...@gm...> wrote: > Please forgive my ignorance in asking this question. Is Pyxb a suitable > option for put an xml feed into a database or ORM like sqlalchemy. > > Essentially I have a feed I have been given with an xsd definition,I want > to be able to send it to a database, create csv files from it to do some > stats on and graphing. > > Is pyxb for this? I have started looking at baseX and keeping most things > in XML, is that a better option? > > Again I apologise but am not sure which way to go? > > Sayth > > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > > http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk > _______________________________________________ > pyxb-users mailing list > pyx...@li... > https://lists.sourceforge.net/lists/listinfo/pyxb-users > > |
From: Sayth R. <fle...@gm...> - 2014-12-10 12:46:36
|
Please forgive my ignorance in asking this question. Is Pyxb a suitable option for put an xml feed into a database or ORM like sqlalchemy. Essentially I have a feed I have been given with an xsd definition,I want to be able to send it to a database, create csv files from it to do some stats on and graphing. Is pyxb for this? I have started looking at baseX and keeping most things in XML, is that a better option? Again I apologise but am not sure which way to go? Sayth |
From: Nathan R. <na...@na...> - 2014-10-19 23:02:39
|
Thanks Peter. We'll test it this week and let you know of any issues we come across. On 19 October 2014 23:07, Peter Bigot <bi...@ac...> wrote: > It's out, on SourceForge and PyPI. > > Best news: the PyPI version should work with Python 2.6 through 3.4.2; > turns out it wasn't all that hard to make the generated bindings > cross-compatible. AFAICT it works just fine within the limitations of each > Python version (though I did not test Python 3.0 because my installation > lacks the sha256 module required for hash generation). > > Notify me of any problems either here (for distribution issues) or on > github https://github.com/pabigot/pyxb/issues (for bug reports). > > Peter > > On Wed, Aug 20, 2014 at 4:57 PM, Nathan Robertson <na...@na...> > wrote: > >> Hi Peter, >> >> We've been using 1.2.4-DEV in production on Python 3 (currently 3.4.1) >> since that branch was created and announced on the mailing list. We've >> found it to be stable and reliable - we've got roughly 200'000 lines of >> code (mixed Java JAXB and Python PyXB), and about 4700 lines of XML schema. >> So we've been running a fairly large application in production with PyXB on >> Python 3.x for quite a while now. >> >> We have our own internal pypiserver with mirrors of the versions of the >> packages we use, and created a 1.2.4-DEV PyPI package (probably 3.x only, >> but we only use 3.x) and put it there. >> >> I'd personally like to thank you for creating 1.2.4-DEV. Before that >> point, PyXB was the only element in our stack that we could neither >> substitute with another 3.x compantible product, or upgrade to a 3.x >> compatible version. Even though it wasn't tagged as a production release, >> we found it stable, and it allowed us to upgrade to 3.x. >> >> Michael: We also backported the RPMs for Python 3.4.1 from RawHide to >> RHEL 6. It took us a day to figure it out, but that's also in production >> now, and served out of our internal yum repo. I gather that updated Python >> packages wouldn't usually qualify for EPEL, but given given python3-* isn't >> in the base RHEL 6 distro I'm guessing it may qualify. >> >> Regards, >> Nathan. >> >> >> >> On 20 August 2014 21:39, Peter Bigot <bi...@ac...> wrote: >> >>> There is no planned release date; it's whenever I get tired of working >>> on other things and turn attention to PyXB. 1.2.5 is more likely than >>> 1.3.0, and python3 will be part of 1.3.0. The hold-up there is that >>> PyXB includes generated bindings for a large number of schema, and at >>> this time I don't believe the bindings generated under python2 work >>> for python3 or vice-versa. Since PyPI doesn't allow me to have two >>> packages no release can officially support both until I figure out a >>> solution to that. >>> >>> The more people express an interest the more likely it'll happen. It >>> also tends to be correlated to bug reports, which also get me working >>> on PyXB. FWIW, development (including bug reports) is now hosted on >>> github at https://github.com/pabigot/pyxb though I'll still push >>> release packages onto sourceforge. >>> >>> Peter >>> >>> On Wed, Aug 20, 2014 at 5:15 AM, Michal Srb <ms...@re...> wrote: >>> > Hi, >>> > >>> > I'm a maintainer of PyXB package in Fedora and I'm really looking >>> > forward to PyXB 1.2.4 (or 1.3.0?) release with official Python 3 >>> > support. I would like to ask if there is any ETA on when it could be >>> > officially released. >>> > >>> > Thanks and regards >>> > Michal >>> > >>> > >>> ------------------------------------------------------------------------------ >>> > Slashdot TV. >>> > Video for Nerds. Stuff that matters. >>> > http://tv.slashdot.org/ >>> > _______________________________________________ >>> > pyxb-users mailing list >>> > pyx...@li... >>> > https://lists.sourceforge.net/lists/listinfo/pyxb-users >>> >>> >>> ------------------------------------------------------------------------------ >>> Slashdot TV. >>> Video for Nerds. Stuff that matters. >>> http://tv.slashdot.org/ >>> _______________________________________________ >>> pyxb-users mailing list >>> pyx...@li... >>> https://lists.sourceforge.net/lists/listinfo/pyxb-users >>> >> >> > |
From: Peter B. <bi...@ac...> - 2014-10-19 12:07:17
|
It's out, on SourceForge and PyPI. Best news: the PyPI version should work with Python 2.6 through 3.4.2; turns out it wasn't all that hard to make the generated bindings cross-compatible. AFAICT it works just fine within the limitations of each Python version (though I did not test Python 3.0 because my installation lacks the sha256 module required for hash generation). Notify me of any problems either here (for distribution issues) or on github https://github.com/pabigot/pyxb/issues (for bug reports). Peter On Wed, Aug 20, 2014 at 4:57 PM, Nathan Robertson <na...@na...> wrote: > Hi Peter, > > We've been using 1.2.4-DEV in production on Python 3 (currently 3.4.1) > since that branch was created and announced on the mailing list. We've > found it to be stable and reliable - we've got roughly 200'000 lines of > code (mixed Java JAXB and Python PyXB), and about 4700 lines of XML schema. > So we've been running a fairly large application in production with PyXB on > Python 3.x for quite a while now. > > We have our own internal pypiserver with mirrors of the versions of the > packages we use, and created a 1.2.4-DEV PyPI package (probably 3.x only, > but we only use 3.x) and put it there. > > I'd personally like to thank you for creating 1.2.4-DEV. Before that > point, PyXB was the only element in our stack that we could neither > substitute with another 3.x compantible product, or upgrade to a 3.x > compatible version. Even though it wasn't tagged as a production release, > we found it stable, and it allowed us to upgrade to 3.x. > > Michael: We also backported the RPMs for Python 3.4.1 from RawHide to RHEL > 6. It took us a day to figure it out, but that's also in production now, > and served out of our internal yum repo. I gather that updated Python > packages wouldn't usually qualify for EPEL, but given given python3-* isn't > in the base RHEL 6 distro I'm guessing it may qualify. > > Regards, > Nathan. > > > > On 20 August 2014 21:39, Peter Bigot <bi...@ac...> wrote: > >> There is no planned release date; it's whenever I get tired of working >> on other things and turn attention to PyXB. 1.2.5 is more likely than >> 1.3.0, and python3 will be part of 1.3.0. The hold-up there is that >> PyXB includes generated bindings for a large number of schema, and at >> this time I don't believe the bindings generated under python2 work >> for python3 or vice-versa. Since PyPI doesn't allow me to have two >> packages no release can officially support both until I figure out a >> solution to that. >> >> The more people express an interest the more likely it'll happen. It >> also tends to be correlated to bug reports, which also get me working >> on PyXB. FWIW, development (including bug reports) is now hosted on >> github at https://github.com/pabigot/pyxb though I'll still push >> release packages onto sourceforge. >> >> Peter >> >> On Wed, Aug 20, 2014 at 5:15 AM, Michal Srb <ms...@re...> wrote: >> > Hi, >> > >> > I'm a maintainer of PyXB package in Fedora and I'm really looking >> > forward to PyXB 1.2.4 (or 1.3.0?) release with official Python 3 >> > support. I would like to ask if there is any ETA on when it could be >> > officially released. >> > >> > Thanks and regards >> > Michal >> > >> > >> ------------------------------------------------------------------------------ >> > Slashdot TV. >> > Video for Nerds. Stuff that matters. >> > http://tv.slashdot.org/ >> > _______________________________________________ >> > pyxb-users mailing list >> > pyx...@li... >> > https://lists.sourceforge.net/lists/listinfo/pyxb-users >> >> >> ------------------------------------------------------------------------------ >> Slashdot TV. >> Video for Nerds. Stuff that matters. >> http://tv.slashdot.org/ >> _______________________________________________ >> pyxb-users mailing list >> pyx...@li... >> https://lists.sourceforge.net/lists/listinfo/pyxb-users >> > > |
From: Peter B. <bi...@ac...> - 2014-10-19 12:04:04
|
1.2.4 (19 Oct 2014) ------------------- The major feature of this release is a new approach to Python 3 support based on the `six <https://pypi.python.org/pypi/six/>`_ module. This resolves :ticket:`support for Python 3 <150>` and allows one release of PyXB to support Python versions from 2.6 through 3.4, excluding 3.0. The ``maintainer/2to3`` script used in PyXB 1.2.3 is no longer supported. Both the core implementation and the bindings are compatible with Python 2 and 3. A second important feature was correct handling of QName by changing the binding representation from a string to an expanded name that saves the namespace URI rather than the prefix from the original document. Finally, with this release primary development and support moves from SourceForge to `Github <https://github.com/pabigot/pyxb>`_. Inter-release updates will be made first on github (on the `next <https://github.com/pabigot/pyxb/tree/next>`_ branch), and pushed to the SourceForge git repository aperiodically. Other miscellanous changes: - Correct rich comparisons for _PluralBinding instances. :ticket:`218` - Prevent adding non-element content as wildcard elements. :ticket:`219` - Provide public API to _CF_enumeration helper methods. :ticket:`221` - Specify requirements for an acceptable DOM implementation. :ticket:`224` - Rebase xs:decimal on Python decimal.Decimal to provide high precision support. :ticket:`91` - Support Python 3. :ticket:`150` - Fix mis-ordered attribute groups use/resolution issue. :ticket:`230` - Generate facet values that are valid Python expressions. :ticket:`231` - Improve validation failure location for simple values. :ticket:`232` - Disallow name attribute in internal complex types. :issue:`6` - Avoid unbounded non-deterministic expansion. :issue:`5` - Reduce namespace intrusion with enumeration types. :issue:`9` - Add API to replace simple content complex type values. :issue:`7` - Fix representation and use of QNames. :issue:`13` - Fix generation of wildcard attributes. :issue:`14` - Fix validation of wildcard types in DOM instances. :issue:`15` - Reference github for bug reports. :issue:`16`: - Eliminate a gratuitous log warning on a validation failure. :issue:`17` - Eliminate improper assertion on extension binding use of imported bindings. :issue:`18` - Support serialization of anonymous namespaces to allow Python copy.deepcopy module to work on binding instances. :issue:`19` - Generate bindings that are compatible with both Python 2 and Python 3. :issue:`22` |
From: Nathan R. <na...@na...> - 2014-08-20 22:21:57
|
Hi Peter, We've been using 1.2.4-DEV in production on Python 3 (currently 3.4.1) since that branch was created and announced on the mailing list. We've found it to be stable and reliable - we've got roughly 200'000 lines of code (mixed Java JAXB and Python PyXB), and about 4700 lines of XML schema. So we've been running a fairly large application in production with PyXB on Python 3.x for quite a while now. We have our own internal pypiserver with mirrors of the versions of the packages we use, and created a 1.2.4-DEV PyPI package (probably 3.x only, but we only use 3.x) and put it there. I'd personally like to thank you for creating 1.2.4-DEV. Before that point, PyXB was the only element in our stack that we could neither substitute with another 3.x compantible product, or upgrade to a 3.x compatible version. Even though it wasn't tagged as a production release, we found it stable, and it allowed us to upgrade to 3.x. Michael: We also backported the RPMs for Python 3.4.1 from RawHide to RHEL 6. It took us a day to figure it out, but that's also in production now, and served out of our internal yum repo. I gather that updated Python packages wouldn't usually qualify for EPEL, but given given python3-* isn't in the base RHEL 6 distro I'm guessing it may qualify. Regards, Nathan. On 20 August 2014 21:39, Peter Bigot <bi...@ac...> wrote: > There is no planned release date; it's whenever I get tired of working > on other things and turn attention to PyXB. 1.2.5 is more likely than > 1.3.0, and python3 will be part of 1.3.0. The hold-up there is that > PyXB includes generated bindings for a large number of schema, and at > this time I don't believe the bindings generated under python2 work > for python3 or vice-versa. Since PyPI doesn't allow me to have two > packages no release can officially support both until I figure out a > solution to that. > > The more people express an interest the more likely it'll happen. It > also tends to be correlated to bug reports, which also get me working > on PyXB. FWIW, development (including bug reports) is now hosted on > github at https://github.com/pabigot/pyxb though I'll still push > release packages onto sourceforge. > > Peter > > On Wed, Aug 20, 2014 at 5:15 AM, Michal Srb <ms...@re...> wrote: > > Hi, > > > > I'm a maintainer of PyXB package in Fedora and I'm really looking > > forward to PyXB 1.2.4 (or 1.3.0?) release with official Python 3 > > support. I would like to ask if there is any ETA on when it could be > > officially released. > > > > Thanks and regards > > Michal > > > > > ------------------------------------------------------------------------------ > > Slashdot TV. > > Video for Nerds. Stuff that matters. > > http://tv.slashdot.org/ > > _______________________________________________ > > pyxb-users mailing list > > pyx...@li... > > https://lists.sourceforge.net/lists/listinfo/pyxb-users > > > ------------------------------------------------------------------------------ > Slashdot TV. > Video for Nerds. Stuff that matters. > http://tv.slashdot.org/ > _______________________________________________ > pyxb-users mailing list > pyx...@li... > https://lists.sourceforge.net/lists/listinfo/pyxb-users > |
From: Peter B. <bi...@ac...> - 2014-08-20 11:39:43
|
There is no planned release date; it's whenever I get tired of working on other things and turn attention to PyXB. 1.2.5 is more likely than 1.3.0, and python3 will be part of 1.3.0. The hold-up there is that PyXB includes generated bindings for a large number of schema, and at this time I don't believe the bindings generated under python2 work for python3 or vice-versa. Since PyPI doesn't allow me to have two packages no release can officially support both until I figure out a solution to that. The more people express an interest the more likely it'll happen. It also tends to be correlated to bug reports, which also get me working on PyXB. FWIW, development (including bug reports) is now hosted on github at https://github.com/pabigot/pyxb though I'll still push release packages onto sourceforge. Peter On Wed, Aug 20, 2014 at 5:15 AM, Michal Srb <ms...@re...> wrote: > Hi, > > I'm a maintainer of PyXB package in Fedora and I'm really looking > forward to PyXB 1.2.4 (or 1.3.0?) release with official Python 3 > support. I would like to ask if there is any ETA on when it could be > officially released. > > Thanks and regards > Michal > > ------------------------------------------------------------------------------ > Slashdot TV. > Video for Nerds. Stuff that matters. > http://tv.slashdot.org/ > _______________________________________________ > pyxb-users mailing list > pyx...@li... > https://lists.sourceforge.net/lists/listinfo/pyxb-users |
From: Michal S. <ms...@re...> - 2014-08-20 10:15:38
|
Hi, I'm a maintainer of PyXB package in Fedora and I'm really looking forward to PyXB 1.2.4 (or 1.3.0?) release with official Python 3 support. I would like to ask if there is any ETA on when it could be officially released. Thanks and regards Michal |
From: Peter B. <bi...@ac...> - 2014-06-12 12:14:46
|
The QName problems with PyXB have been fixed on the next branch of the repository at https://github.com/pabigot/pyxb/commit/eb61be926da2d90908d8f82d0dac1c142e0088fe. Still available on Sourceforge at https://sourceforge.net/p/pyxb/code/ci/next/tree/ but as prophesied active development and ticket management has switched to github: https://github.com/pabigot/pyxb This change requires that all bindings that use QNames as data objects must be rebuilt. OpenGIS bindings in particular must be rebuilt, and the change to how QNames are used to look up components is likely to affect WSDL applications. All legacy SourceForge tickets (https://sourceforge.net/p/pyxb/tickets/) that are likely to ever be worked have been added on github (https://github.com/pabigot/pyxb/issues?page=1&state=open). If there are tickets you care about that I didn't transfer, please feel free to add a new issue. Anybody tracking development, please try this. I anticipate PyXB 1.2.4 release in mid July; no significant features/bug fixes are pending for that release, just some cleanup and anything reported by users. Peter On Thu, Mar 6, 2014 at 8:21 AM, Peter Bigot <bi...@ac...> wrote: > Not so great news, I'm afraid. > > This turns out to be a really nasty thing to fix, as it requires > propagating namespace contexts into areas that they've never had to > reach before (you can't form the lexical representation of a QName > without a context that tells you how to spell the qualifying prefix > for the QName's namespace). > > I'm not going to be able to develop a satisfactory solution in a few > hours, so I'm going to have to delay this until I can find a spare > week or two when I can address the accumulated infoset issues behind > this and a couple other bugs. That won't happen until I've found a > source of income for this year. > > Sorry. No estimated date for a fix, and there will be no PyXB > releases until there is a fix. > > Peter > > > On Wed, Mar 5, 2014 at 4:24 PM, Xavier Fernandez > <xav...@gm...> wrote: >> Great news :) >> >> I'm looking forward to your bugfix. >> >> Xavier >> >> >> On Wed, Mar 5, 2014 at 4:44 PM, Peter Bigot <bi...@ac...> wrote: >>> >>> Heh. tns should not be special. It is special because PyXB has not >>> properly handled the QName type until you pointed this out: the value space >>> and lexical space are not the same. Since the schema for soap12 identifies >>> the enumeration restrictions with the string "tns:Sender" it works. Once I >>> correct PyXB to handle QName properly (making the type inherit from >>> ExpandedName instead of string), alternative namespace prefixes will also >>> work. >>> >>> This is now https://sourceforge.net/apps/trac/pyxb/ticket/229 and I should >>> get a patch into the next branch by the end of the week. >>> >>> Peter >>> >>> >>> On Wed, Mar 5, 2014 at 9:25 AM, Xavier Fernandez <xav...@gm...> >>> wrote: >>>> >>>> Hello list, >>>> >>>> I'm quite new to PyXB and I'm looking forward for the porting to Python >>>> 3. >>>> >>>> Meanwhile I've got an issue with soap 1.2 faults, is the 'tns' namespace >>>> magic or something ?: >>>> >>>> from pyxb.bundles.wssplat import soap12 >>>> >>>> resp="""<{0}:Envelope >>>> xmlns:{0}="http://www.w3.org/2003/05/soap-envelope"> >>>> <{0}:Body> >>>> <{0}:Fault> >>>> <{0}:Code> >>>> <{0}:Value>{0}:Sender</{0}:Value> >>>> </{0}:Code> >>>> <{0}:Reason><{0}:Text xml:lang="en">Reason >>>> test</{0}:Text></{0}:Reason> >>>> </{0}:Fault> >>>> </{0}:Body> >>>> </{0}:Envelope>""" >>>> >>>> soap12.CreateFromDocument(resp.format('tns')) >>>> print 'OK for tns' >>>> soap12.CreateFromDocument(resp.format('anything')) >>>> >>>> The CreateFromDocument works with 'tns' but not with 'anything' that >>>> fails with: >>>> pyxb.exceptions_.SimpleFacetValueError: Type >>>> {http://www.w3.org/2003/05/soap-envelope}faultcodeEnum enumeration >>>> constraint violated by value anything:Sender >>>> >>>> Am I missing something ? >>>> >>>> Regards, >>>> Xavier >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> Subversion Kills Productivity. Get off Subversion & Make the Move to >>>> Perforce. >>>> With Perforce, you get hassle-free workflows. Merge that actually works. >>>> Faster operations. Version large binaries. Built-in WAN optimization and >>>> the >>>> freedom to use Git, Perforce or both. Make the move to Perforce. >>>> >>>> http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk >>>> _______________________________________________ >>>> pyxb-users mailing list >>>> pyx...@li... >>>> https://lists.sourceforge.net/lists/listinfo/pyxb-users >>>> >>> >> |
From: Peter B. <bi...@ac...> - 2014-05-31 15:58:13
|
As of 19Jun SourceForge will finally be disabling the hosted applications, which includes the trac database used to manage PyXB tickets. All existing tickets as of today have been automatically converted into SourceForge tickets, and the trac application disabled. At this time, any new problem reports that are not resolved in the forums should be made on the SourceForge ticket interface at: http://sourceforge.net/p/pyxb/tickets/ It is fairly like that any future major work on PyXB will include a transition of new tickets, as well as source hosting, to https://github.com/pabigot where I do most of my open source work these days. Peter |
From: Peter B. <bi...@ac...> - 2014-05-27 21:37:20
|
At this time, no. PyXB provides documentation annotations as Python doc strings, but those can only be attached to Python classes. Enumeration constants are simply instances of the underlying type, with no place to attach the documentation string. Peter On Tue, May 27, 2014 at 6:12 AM, Alessandro Pasotti <apa...@gm...> wrote: > Hi, > > I'm trying to generate binding for an official italian schema (it's for > public administrations electronic invoicing), the problem is that this > schema has a lot of enumerations that use obscure codes, in order to have a > meaningful binding I would like to use the annotations but they are not > present in the bindings. > > Here is a small extract of the schema: > > > <xs:simpleType name="TipoCassaType"> > <xs:restriction base="xs:string"> > <xs:length value="4"/> > <xs:enumeration value="TC01"> > <xs:annotation> > <xs:documentation> > Cassa nazionale previdenza e assistenza avvocati e > procuratori legali > </xs:documentation> > </xs:annotation> > </xs:enumeration> > <xs:enumeration value="TC02"> > <xs:annotation> > <xs:documentation> > Cassa previdenza dottori commercialisti > </xs:documentation> > </xs:annotation> > </xs:enumeration> > </xs:restriction> > </xs:simpleType> > > > The generated bindings do not contain the annotation/documentation: > > # Atomic simple type: > {http://www.fatturapa.gov.it/sdi/fatturapa/v1.0}TipoCassaType > class TipoCassaType (pyxb.binding.datatypes.string, > pyxb.binding.basis.enumeration_mixin): > > """An atomic simple type.""" > > _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'TipoCassaType') > _XSDLocation = > pyxb.utils.utility.Location('/home/ale/public_html/fattura_elettronica/fatturapa_v1.0.xsd', > 229, 1) > _Documentation = None > TipoCassaType._CF_enumeration = > pyxb.binding.facets.CF_enumeration(value_datatype=TipoCassaType, > enum_prefix=None) > TipoCassaType.TC01 = > TipoCassaType._CF_enumeration.addEnumeration(unicode_value=u'TC01', > tag=u'TC01') > TipoCassaType.TC02 = > TipoCassaType._CF_enumeration.addEnumeration(unicode_value=u'TC02', > tag=u'TC02') > > > Is there a way to add annotations to the bindings? > > > -- > Alessandro Pasotti > w3: www.itopen.it > > ------------------------------------------------------------------------------ > The best possible search technologies are now affordable for all companies. > Download your FREE open source Enterprise Search Engine today! > Our experts will assist you in its installation for $59/mo, no commitment. > Test it for FREE on our Cloud platform anytime! > http://pubads.g.doubleclick.net/gampad/clk?id=145328191&iu=/4140/ostg.clktrk > _______________________________________________ > pyxb-users mailing list > pyx...@li... > https://lists.sourceforge.net/lists/listinfo/pyxb-users > |
From: Alessandro P. <apa...@gm...> - 2014-05-27 11:12:40
|
Hi, I'm trying to generate binding for an official italian schema (it's for public administrations electronic invoicing), the problem is that this schema has a lot of enumerations that use obscure codes, in order to have a meaningful binding I would like to use the annotations but they are not present in the bindings. Here is a small extract of the schema: <xs:simpleType name="TipoCassaType"> <xs:restriction base="xs:string"> <xs:length value="4"/> <xs:enumeration value="TC01"> <xs:annotation> <xs:documentation> Cassa nazionale previdenza e assistenza avvocati e procuratori legali </xs:documentation> </xs:annotation> </xs:enumeration> <xs:enumeration value="TC02"> <xs:annotation> <xs:documentation> Cassa previdenza dottori commercialisti </xs:documentation> </xs:annotation> </xs:enumeration> </xs:restriction> </xs:simpleType> The generated bindings do not contain the annotation/documentation: # Atomic simple type: { http://www.fatturapa.gov.it/sdi/fatturapa/v1.0}TipoCassaType class TipoCassaType (pyxb.binding.datatypes.string, pyxb.binding.basis.enumeration_mixin): """An atomic simple type.""" _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'TipoCassaType') _XSDLocation = pyxb.utils.utility.Location('/home/ale/public_html/fattura_elettronica/fatturapa_v1.0.xsd', 229, 1) _Documentation = None TipoCassaType._CF_enumeration = pyxb.binding.facets.CF_enumeration(value_datatype=TipoCassaType, enum_prefix=None) TipoCassaType.TC01 = TipoCassaType._CF_enumeration.addEnumeration(unicode_value=u'TC01', tag=u'TC01') TipoCassaType.TC02 = TipoCassaType._CF_enumeration.addEnumeration(unicode_value=u'TC02', tag=u'TC02') Is there a way to add annotations to the bindings? -- Alessandro Pasotti w3: www.itopen.it |
From: Peter B. <bi...@ac...> - 2014-04-16 12:20:40
|
Below is an example with several approaches that work for me. I've also added some comments in context explaining why what you tried didn't work. import items inv = items.items() # can't have empty inventory; need minOccurs="0" #print inv.toxml() i1 = items.Item(name="cheese", price="50") inv.item.append(i1) print type(inv) i2 = items.Item(name="parrot", price="200") inv.item.append(i2) print(inv.toxml()) inv.item[:] = [i2, i1] print(inv.toxml()) inv = items.items(i1, i2) print(inv.toxml()) On Wed, Apr 16, 2014 at 7:04 AM, Serge Gadioux <ser...@gm...> wrote: > I also tried to use the append method() : > > inv = items.Items() The error here is you're creating an instance of the type Items, not the element items. > inv.item.append(i1) > inv.item.append(i2) > print(inv.toxml()) > > This time, the error comes from toxml() : > > Traceback (most recent call last): > File "test2.py", line 9, in <module> > print(inv.toxml()) > File "C:\Documents and Settings\sgadioux\Application > Data\Python\Python27\site-packages\pyxb\binding\basis.py", line 539, > in toxml > dom = self.toDOM(bds) > File "C:\Documents and Settings\sgadioux\Application > Data\Python\Python27\site-packages\pyxb\binding\basis.py", line 511, > in toDOM > raise pyxb.UnboundElementError(self) > pyxb.exceptions_.UnboundElementError: Instance of type Items has no > bound element for start tag > > > What is the right way to build such a list of items from Python ? > > Thanks, > Serge > > > On Wed, Apr 16, 2014 at 1:46 PM, Serge Gadioux <ser...@gm...> wrote: >> Hi, >> >> I am trying to use PyXB (1.2.3) to produce XML from python object. >> I have a simple xsd schema: >> >> <?xml version="1.0" encoding="UTF-8"?> >> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> >> >> <xsd:complexType name="Items"> >> <xsd:sequence> >> <xsd:element name="item" type="Item" maxOccurs="unbounded"/> >> </xsd:sequence> >> </xsd:complexType> >> >> <xsd:complexType name="Item"> >> <xsd:attribute name="name" type="xsd:string" use="required"/> >> <xsd:attribute name="price" type="xsd:string" use="required"/> >> </xsd:complexType> >> >> <xsd:element name="items" type="Items"/> >> >> </xsd:schema> >> >> >> I generated bindings with the command: >> pyxbgen" -u items.xsd -m items >> >> I am able to read an xml (with CreateFromDocument) and get an Items object. >> >> Then if try to build the document from python to generate XML, I get an >> error. >> I use the following script: >> >> import items >> >> i1 = items.Item(name="cheese", price="50") >> i2 = items.Item(name="parrot", price="200") >> inv = items.Items([i1, i2]) The problem here is that the content you've provided is a Python list, not a sequence of element bindings. >> print(inv.tomxl()) >> >> Running this script gives me pyxb.exceptions_.MixedContentError: Invalid >> non-element content >> Here is the stack trace: >> Traceback (most recent call last): >> File "test2.py", line 5, in <module> >> inv = items.Items([i1, i2]) >> File "C:\Documents and Settings\sgadioux\Application >> Data\Python\Python27\site-packages\pyxb\binding\basis.py", line 2060, in >> __init__ >> self.extend(args, _from_xml=from_xml, _location=location) >> File "C:\Documents and Settings\sgadioux\Application >> Data\Python\Python27\site-packages\pyxb\binding\basis.py", line 2517, in >> extend >> [ self.append(_v, _fallback_namespace=_fallback_namespace, >> _from_xml=_from_xml, _location=_location) for _v in value_list ] >> File "C:\Documents and Settings\sgadioux\Application >> Data\Python\Python27\site-packages\pyxb\binding\basis.py", line 2505, in >> append >> raise pyxb.MixedContentError(self, value, location) >> pyxb.exceptions_.MixedContentError: Invalid non-element content >> >> What am I doing wrong ? Do I need to specify a namespace in my xsd ? >> >> Thanks in advance, >> Serge > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and their > applications. Written by three acclaimed leaders in the field, > this first edition is now available. Download your free book today! > http://p.sf.net/sfu/NeoTech > _______________________________________________ > pyxb-users mailing list > pyx...@li... > https://lists.sourceforge.net/lists/listinfo/pyxb-users |
From: Serge G. <ser...@gm...> - 2014-04-16 12:05:09
|
I also tried to use the append method() : inv = items.Items() inv.item.append(i1) inv.item.append(i2) print(inv.toxml()) This time, the error comes from toxml() : Traceback (most recent call last): File "test2.py", line 9, in <module> print(inv.toxml()) File "C:\Documents and Settings\sgadioux\Application Data\Python\Python27\site-packages\pyxb\binding\basis.py", line 539, in toxml dom = self.toDOM(bds) File "C:\Documents and Settings\sgadioux\Application Data\Python\Python27\site-packages\pyxb\binding\basis.py", line 511, in toDOM raise pyxb.UnboundElementError(self) pyxb.exceptions_.UnboundElementError: Instance of type Items has no bound element for start tag What is the right way to build such a list of items from Python ? Thanks, Serge On Wed, Apr 16, 2014 at 1:46 PM, Serge Gadioux <ser...@gm...> wrote: > Hi, > > I am trying to use PyXB (1.2.3) to produce XML from python object. > I have a simple xsd schema: > > <?xml version="1.0" encoding="UTF-8"?> > <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> > > <xsd:complexType name="Items"> > <xsd:sequence> > <xsd:element name="item" type="Item" maxOccurs="unbounded"/> > </xsd:sequence> > </xsd:complexType> > > <xsd:complexType name="Item"> > <xsd:attribute name="name" type="xsd:string" use="required"/> > <xsd:attribute name="price" type="xsd:string" use="required"/> > </xsd:complexType> > > <xsd:element name="items" type="Items"/> > > </xsd:schema> > > > I generated bindings with the command: > pyxbgen" -u items.xsd -m items > > I am able to read an xml (with CreateFromDocument) and get an Items object. > > Then if try to build the document from python to generate XML, I get an > error. > I use the following script: > > import items > > i1 = items.Item(name="cheese", price="50") > i2 = items.Item(name="parrot", price="200") > inv = items.Items([i1, i2]) > print(inv.tomxl()) > > Running this script gives me pyxb.exceptions_.MixedContentError: Invalid > non-element content > Here is the stack trace: > Traceback (most recent call last): > File "test2.py", line 5, in <module> > inv = items.Items([i1, i2]) > File "C:\Documents and Settings\sgadioux\Application > Data\Python\Python27\site-packages\pyxb\binding\basis.py", line 2060, in > __init__ > self.extend(args, _from_xml=from_xml, _location=location) > File "C:\Documents and Settings\sgadioux\Application > Data\Python\Python27\site-packages\pyxb\binding\basis.py", line 2517, in > extend > [ self.append(_v, _fallback_namespace=_fallback_namespace, > _from_xml=_from_xml, _location=_location) for _v in value_list ] > File "C:\Documents and Settings\sgadioux\Application > Data\Python\Python27\site-packages\pyxb\binding\basis.py", line 2505, in > append > raise pyxb.MixedContentError(self, value, location) > pyxb.exceptions_.MixedContentError: Invalid non-element content > > What am I doing wrong ? Do I need to specify a namespace in my xsd ? > > Thanks in advance, > Serge |
From: Serge G. <ser...@gm...> - 2014-04-16 11:46:45
|
Hi, I am trying to use PyXB (1.2.3) to produce XML from python object. I have a simple xsd schema: <?xml version="1.0" encoding="UTF-8"?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xsd:complexType name="Items"> <xsd:sequence> <xsd:element name="item" type="Item" maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> <xsd:complexType name="Item"> <xsd:attribute name="name" type="xsd:string" use="required"/> <xsd:attribute name="price" type="xsd:string" use="required"/> </xsd:complexType> <xsd:element name="items" type="Items"/> </xsd:schema> I generated bindings with the command: pyxbgen" -u items.xsd -m items I am able to read an xml (with CreateFromDocument) and get an Items object. Then if try to build the document from python to generate XML, I get an error. I use the following script: import items i1 = items.Item(name="cheese", price="50") i2 = items.Item(name="parrot", price="200") inv = items.Items([i1, i2]) print(inv.tomxl()) Running this script gives me pyxb.exceptions_.MixedContentError: Invalid non-element content Here is the stack trace: Traceback (most recent call last): File "test2.py", line 5, in <module> inv = items.Items([i1, i2]) File "C:\Documents and Settings\sgadioux\Application Data\Python\Python27\site-packages\pyxb\binding\basis.py", line 2060, in __init__ self.extend(args, _from_xml=from_xml, _location=location) File "C:\Documents and Settings\sgadioux\Application Data\Python\Python27\site-packages\pyxb\binding\basis.py", line 2517, in extend [ self.append(_v, _fallback_namespace=_fallback_namespace, _from_xml=_from_xml, _location=_location) for _v in value_list ] File "C:\Documents and Settings\sgadioux\Application Data\Python\Python27\site-packages\pyxb\binding\basis.py", line 2505, in append raise pyxb.MixedContentError(self, value, location) pyxb.exceptions_.MixedContentError: Invalid non-element content What am I doing wrong ? Do I need to specify a namespace in my xsd ? Thanks in advance, Serge |
From: Peter B. <bi...@ac...> - 2014-03-06 14:21:28
|
Not so great news, I'm afraid. This turns out to be a really nasty thing to fix, as it requires propagating namespace contexts into areas that they've never had to reach before (you can't form the lexical representation of a QName without a context that tells you how to spell the qualifying prefix for the QName's namespace). I'm not going to be able to develop a satisfactory solution in a few hours, so I'm going to have to delay this until I can find a spare week or two when I can address the accumulated infoset issues behind this and a couple other bugs. That won't happen until I've found a source of income for this year. Sorry. No estimated date for a fix, and there will be no PyXB releases until there is a fix. Peter On Wed, Mar 5, 2014 at 4:24 PM, Xavier Fernandez <xav...@gm...> wrote: > Great news :) > > I'm looking forward to your bugfix. > > Xavier > > > On Wed, Mar 5, 2014 at 4:44 PM, Peter Bigot <bi...@ac...> wrote: >> >> Heh. tns should not be special. It is special because PyXB has not >> properly handled the QName type until you pointed this out: the value space >> and lexical space are not the same. Since the schema for soap12 identifies >> the enumeration restrictions with the string "tns:Sender" it works. Once I >> correct PyXB to handle QName properly (making the type inherit from >> ExpandedName instead of string), alternative namespace prefixes will also >> work. >> >> This is now https://sourceforge.net/apps/trac/pyxb/ticket/229 and I should >> get a patch into the next branch by the end of the week. >> >> Peter >> >> >> On Wed, Mar 5, 2014 at 9:25 AM, Xavier Fernandez <xav...@gm...> >> wrote: >>> >>> Hello list, >>> >>> I'm quite new to PyXB and I'm looking forward for the porting to Python >>> 3. >>> >>> Meanwhile I've got an issue with soap 1.2 faults, is the 'tns' namespace >>> magic or something ?: >>> >>> from pyxb.bundles.wssplat import soap12 >>> >>> resp="""<{0}:Envelope >>> xmlns:{0}="http://www.w3.org/2003/05/soap-envelope"> >>> <{0}:Body> >>> <{0}:Fault> >>> <{0}:Code> >>> <{0}:Value>{0}:Sender</{0}:Value> >>> </{0}:Code> >>> <{0}:Reason><{0}:Text xml:lang="en">Reason >>> test</{0}:Text></{0}:Reason> >>> </{0}:Fault> >>> </{0}:Body> >>> </{0}:Envelope>""" >>> >>> soap12.CreateFromDocument(resp.format('tns')) >>> print 'OK for tns' >>> soap12.CreateFromDocument(resp.format('anything')) >>> >>> The CreateFromDocument works with 'tns' but not with 'anything' that >>> fails with: >>> pyxb.exceptions_.SimpleFacetValueError: Type >>> {http://www.w3.org/2003/05/soap-envelope}faultcodeEnum enumeration >>> constraint violated by value anything:Sender >>> >>> Am I missing something ? >>> >>> Regards, >>> Xavier >>> >>> >>> ------------------------------------------------------------------------------ >>> Subversion Kills Productivity. Get off Subversion & Make the Move to >>> Perforce. >>> With Perforce, you get hassle-free workflows. Merge that actually works. >>> Faster operations. Version large binaries. Built-in WAN optimization and >>> the >>> freedom to use Git, Perforce or both. Make the move to Perforce. >>> >>> http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk >>> _______________________________________________ >>> pyxb-users mailing list >>> pyx...@li... >>> https://lists.sourceforge.net/lists/listinfo/pyxb-users >>> >> > |
From: Xavier F. <xav...@gm...> - 2014-03-05 22:24:29
|
Great news :) I'm looking forward to your bugfix. Xavier On Wed, Mar 5, 2014 at 4:44 PM, Peter Bigot <bi...@ac...> wrote: > Heh. tns should not be special. It is special because PyXB has not > properly handled the QName type until you pointed this out: the value space > and lexical space are not the same. Since the schema for soap12 identifies > the enumeration restrictions with the string "tns:Sender" it works. Once I > correct PyXB to handle QName properly (making the type inherit from > ExpandedName instead of string), alternative namespace prefixes will also > work. > > This is now https://sourceforge.net/apps/trac/pyxb/ticket/229 and I > should get a patch into the next branch by the end of the week. > > Peter > > > On Wed, Mar 5, 2014 at 9:25 AM, Xavier Fernandez <xav...@gm...>wrote: > >> Hello list, >> >> I'm quite new to PyXB and I'm looking forward for the porting to Python 3. >> >> Meanwhile I've got an issue with soap 1.2 faults, is the 'tns' namespace >> magic or something ?: >> >> from pyxb.bundles.wssplat import soap12 >> >> resp="""<{0}:Envelope xmlns:{0}="http://www.w3.org/2003/05/soap-envelope >> "> >> <{0}:Body> >> <{0}:Fault> >> <{0}:Code> >> <{0}:Value>{0}:Sender</{0}:Value> >> </{0}:Code> >> <{0}:Reason><{0}:Text xml:lang="en">Reason >> test</{0}:Text></{0}:Reason> >> </{0}:Fault> >> </{0}:Body> >> </{0}:Envelope>""" >> >> soap12.CreateFromDocument(resp.format('tns')) >> print 'OK for tns' >> soap12.CreateFromDocument(resp.format('anything')) >> >> The CreateFromDocument works with 'tns' but not with 'anything' that >> fails with: >> pyxb.exceptions_.SimpleFacetValueError: Type { >> http://www.w3.org/2003/05/soap-envelope}faultcodeEnum enumeration >> constraint violated by value anything:Sender >> >> Am I missing something ? >> >> Regards, >> Xavier >> >> >> ------------------------------------------------------------------------------ >> Subversion Kills Productivity. Get off Subversion & Make the Move to >> Perforce. >> With Perforce, you get hassle-free workflows. Merge that actually works. >> Faster operations. Version large binaries. Built-in WAN optimization and >> the >> freedom to use Git, Perforce or both. Make the move to Perforce. >> >> http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk >> _______________________________________________ >> pyxb-users mailing list >> pyx...@li... >> https://lists.sourceforge.net/lists/listinfo/pyxb-users >> >> > |
From: Peter B. <bi...@ac...> - 2014-03-05 15:44:48
|
Heh. tns should not be special. It is special because PyXB has not properly handled the QName type until you pointed this out: the value space and lexical space are not the same. Since the schema for soap12 identifies the enumeration restrictions with the string "tns:Sender" it works. Once I correct PyXB to handle QName properly (making the type inherit from ExpandedName instead of string), alternative namespace prefixes will also work. This is now https://sourceforge.net/apps/trac/pyxb/ticket/229 and I should get a patch into the next branch by the end of the week. Peter On Wed, Mar 5, 2014 at 9:25 AM, Xavier Fernandez <xav...@gm...>wrote: > Hello list, > > I'm quite new to PyXB and I'm looking forward for the porting to Python 3. > > Meanwhile I've got an issue with soap 1.2 faults, is the 'tns' namespace > magic or something ?: > > from pyxb.bundles.wssplat import soap12 > > resp="""<{0}:Envelope xmlns:{0}="http://www.w3.org/2003/05/soap-envelope"> > <{0}:Body> > <{0}:Fault> > <{0}:Code> > <{0}:Value>{0}:Sender</{0}:Value> > </{0}:Code> > <{0}:Reason><{0}:Text xml:lang="en">Reason > test</{0}:Text></{0}:Reason> > </{0}:Fault> > </{0}:Body> > </{0}:Envelope>""" > > soap12.CreateFromDocument(resp.format('tns')) > print 'OK for tns' > soap12.CreateFromDocument(resp.format('anything')) > > The CreateFromDocument works with 'tns' but not with 'anything' that fails > with: > pyxb.exceptions_.SimpleFacetValueError: Type { > http://www.w3.org/2003/05/soap-envelope}faultcodeEnum enumeration > constraint violated by value anything:Sender > > Am I missing something ? > > Regards, > Xavier > > > ------------------------------------------------------------------------------ > Subversion Kills Productivity. Get off Subversion & Make the Move to > Perforce. > With Perforce, you get hassle-free workflows. Merge that actually works. > Faster operations. Version large binaries. Built-in WAN optimization and > the > freedom to use Git, Perforce or both. Make the move to Perforce. > > http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk > _______________________________________________ > pyxb-users mailing list > pyx...@li... > https://lists.sourceforge.net/lists/listinfo/pyxb-users > > |
From: Xavier F. <xav...@gm...> - 2014-03-05 15:25:45
|
Hello list, I'm quite new to PyXB and I'm looking forward for the porting to Python 3. Meanwhile I've got an issue with soap 1.2 faults, is the 'tns' namespace magic or something ?: from pyxb.bundles.wssplat import soap12 resp="""<{0}:Envelope xmlns:{0}="http://www.w3.org/2003/05/soap-envelope"> <{0}:Body> <{0}:Fault> <{0}:Code> <{0}:Value>{0}:Sender</{0}:Value> </{0}:Code> <{0}:Reason><{0}:Text xml:lang="en">Reason test</{0}:Text></{0}:Reason> </{0}:Fault> </{0}:Body> </{0}:Envelope>""" soap12.CreateFromDocument(resp.format('tns')) print 'OK for tns' soap12.CreateFromDocument(resp.format('anything')) The CreateFromDocument works with 'tns' but not with 'anything' that fails with: pyxb.exceptions_.SimpleFacetValueError: Type { http://www.w3.org/2003/05/soap-envelope}faultcodeEnum enumeration constraint violated by value anything:Sender Am I missing something ? Regards, Xavier |
From: Nathan R. <na...@na...> - 2014-02-27 22:34:08
|
Thanks Peter. That's an excellent blog post. John Weng is working on our Python 3.x port (using Python 3.3), and has our test suite running with no errors. He's now working on migrating our Pyramid webapps over the coming weeks. After that's done we'll send all our Python code to production, using the git-next branch of PyXB. We'll let you know if we have any issues, but we've had surprisingly few so far. Thanks again for your work on this. Regards, Nathan. On 28 February 2014 09:09, Peter Bigot <bi...@ac...> wrote: > See http://www.pabigot.com/xml/python-23-compatible-source-and-pyxb/ for > the details. This eliminates the 2to3 script, using a shared source for > all versions of Python. The python3 branches of the git repository won't > be updated and will eventually be removed. > > Any problems you report now are much less likely to be present in the > 1.3.0 release. I have no imminent plans to create that release, though. > > Peter > > > ------------------------------------------------------------------------------ > Flow-based real-time traffic analytics software. Cisco certified tool. > Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer > Customize your own dashboards, set traffic alerts and generate reports. > Network behavioral analysis & security monitoring. All-in-one tool. > > http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk > _______________________________________________ > pyxb-users mailing list > pyx...@li... > https://lists.sourceforge.net/lists/listinfo/pyxb-users > > |
From: Peter B. <bi...@ac...> - 2014-02-27 22:09:09
|
See http://www.pabigot.com/xml/python-23-compatible-source-and-pyxb/ for the details. This eliminates the 2to3 script, using a shared source for all versions of Python. The python3 branches of the git repository won't be updated and will eventually be removed. Any problems you report now are much less likely to be present in the 1.3.0 release. I have no imminent plans to create that release, though. Peter |