User Activity

  • Posted a comment on discussion Help on PyXB: Python XML Schema Bindings

    Your document needs to be: <ns1:datapackage xmlns:ns1="urn:datapackageNS"> <ns1:timestamp>123.3</ns1:timestamp> <ns1:type>type</ns1:type> <ns1:host>host</ns1:host> </ns1:datapackage> The namespace declaration attribute doesn't automatically apply to the name of the tag it's in.

  • Posted a comment on discussion Help on PyXB: Python XML Schema Bindings

    The schema shows there are an unbounded number of Gender elements within the containing GenderDetails element; i.e. Gender is plural, as I originally suggested. So you probably need person.GenderDetails.Gender[0].GenderValue.

  • Posted a comment on discussion Help on PyXB: Python XML Schema Bindings

    If the schema shows GenderValue as a non-plural element within whatever type Gender is the code you show should work. Without seeing the schema I can't tell. The _PluralBinding material is internal to PyXB; some of its visible markers are described here.

  • Posted a comment on discussion Help on PyXB: Python XML Schema Bindings

    A couple things are odd. First, you're referencing GenderDetails but the XML has it spelled genderdetails. Probably one or the other is not what's actually being used. The bigger clue is the reference to PluralBinding which suggests that the Gender element can appear multiple times (which is also a little odd), in which case it's like a list/array and you have to pick which of the elements you want to look at. Or you're spelling the element name wrong. At any rate there isn't enough context here...

  • Posted a comment on discussion Help on PyXB: Python XML Schema Bindings

    PyXB 1.2.4 is almost four years old. The command you provided runs without error on the development version of PyXB, which has minimal changes from 1.2.6 which is the current release. Please update; if you have problems with 1.2.6 please open an issue on github.

  • Posted a comment on discussion Help on PyXB: Python XML Schema Bindings

    Support for PyXB is handled on github. Please open an issue there, describing what you want to accomplish and attaching your (minimized) schema and an example (minimized) program showing that it doesn't do what you expect. The problem should be reproducible with a schema that has at most a single element with a simple type with the defaults.

  • Posted a comment on discussion Help on PyXB: Python XML Schema Bindings

    I'm not getting enough information to tell what the problem is, probably because it depends on your schema. Take the test-issue-0014 example which is self-contained, and change it incrementally until it does what you're trying to do. That should either reveal the problem, or at least provide something you can provide in an issue on github where I could see exactly what's going on.

  • Posted a comment on discussion Help on PyXB: Python XML Schema Bindings

    I think you'd want to do: reg.Extensions._appendWildcardElement(name) to match what the example does.

View All

Personal Data

Username:
pabigot
Joined:
2000-09-02 13:35:52

Projects

This is a list of open source software projects that Peter A. Bigot is associated with:

Personal Tools