Activity for Peter A. Bigot

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    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.

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    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.

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    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.

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    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...

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    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.

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    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.

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    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.

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

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

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    I think you're adding the class pyxb.utils.saxdom.Element, rather than an instance of a DOM element. So what's there isn't recognized by PyXB. test-issue-0014 has an example of what you're trying to do. See that test case for full context, but you'll want something like this: # Create a namespace and tell PyXB what to call it in generated documents ns2 = pyxb.namespace.Namespace("urn:issue14.2") pyxb.utils.domutils.BindingDOMSupport.DeclareNamespace(ns2, 'n2') # Construct a DOM element for tag e2...

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    There's not enough detail on what you're doing. If you open an issue on github that reproduces the problem with a simple schema I may be able to assist. However, unless the documents generated by PyXB violate the schema, changes to order of element and content is not a bug: order can only be preserved if order is enforced by the schema.

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    It may be that the order you are adding them is not consistent with the order required by the schema, or the schema does not require a specific order, or you may be using mixed content. See this section of the manual and the use of pyxb.ValidationConfig.

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Open Discussion

    This forum will no longer be monitored. Please see: https://github.com/pabigot/pyxb/issues/100

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    This forum will no longer be monitored. Please see: https://github.com/pabigot/pyxb/issues/100

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    This could probably be done with introspection of the bindings module. Walk it to identify top-level members that subclass pyxb.binding.basis._TypeBinding_mixin, then search for how they appear within other members. For example, class CTD_ANON_5 is added as the type of an element named list in a parent class WebAppList, which itself appears at the type of an element webApps in WasScanTarget. Look in the bindings for things like what's below. WebAppList._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(None,...

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    PyXB is concerned with validation, and the schema does not enforce an order. What support is provided was intended primarily for preserving order when processing existing documents, and your need to build them up manually may not be supported. For example, using this schema: <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="SCn"> <xs:complexType> <xs:sequence> <xs:choice minOccurs="0" maxOccurs="unbounded"> <xs:element name="a" type="xs:integer"/>...

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    Read this page of the manual. You need to generate the bindings for the imported schema first, then generate the bindings for all schema files that define the content of your namespace simutaneously and referencing the bindings for the imported schema. This could be done by generating with schema the includes both command and reply or doing something like: pyxbgen \ -u command.xsd -m command \ -u reply.xsd -m reply \ --archive-path .:+

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    Rather than setting an attribute on the class, I would use the full customization api to add capabilities through a subclass, even if you're just adding helpers that don't need to affect XML parsing or generation. But it'd probably work the way you're using it. I think m.abc.typeDefinition() would produce a reference to the binding class for the type of element m.abc.

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    To be more clear, comments are not part of the PyXB binding data model, so you can't put a comment into a binding object and have it expressed as a comment when the object is converted to XML.

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    BindingDOMSupport is special interface used only to affect how PyXB binding objects are converted to or from DOM instances. Once you have the DOM instance you need to use the xml.dom API to manipulate it. You probably need something like: dom.root.appendChild(dom.createComment('My comment'));

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    What do you mean by "comment", and how are you adding it? If you have: <element> <subelt>3</subelt> mixed content </element> are you looking to add a real XML comment: <element> <!-- subelt is optional --> <subelt>3</subelt> mixed content </element> or more text, or something else? If you want to add an XML comment then you'll need to convert the PyXB binding object to DOM and operate on the DOM structure. Use obj.toDOM(). If you want to add something to the PyXB binding object whatever you add has...

  • Peter A. Bigot Peter A. Bigot committed [f2f091]

    Archive release 1.2.6

  • Peter A. Bigot Peter A. Bigot committed [41a9ab]

    Refine release process

  • Peter A. Bigot Peter A. Bigot modified a comment on discussion Help

    A couple comments: First, if you're not doing it already you probably should use the PyXB bundles for common and gml; otherwise it looks like you get six modules when you could be only generating bindings for the lido namespace: pyxbgen \ --archive-path='&pyxb/bundles/opengis//:&pyxb/bundles/common//' \ -u lido-v1.0.xsd -m lido Also, if you do this: try: root.append(child) except pyxb.ValidationError as e: print(e.details()) you get a little more detail about what's going on. Which is that you've...

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    A couple comments: First, if you're not doing it already you probably should use the PyXB bundles for common and gml; otherwise it looks like you get six modules when you could be only generating bindings for the lido namespace: pyxbgen \ --archive-path='&pyxb/bundles/opengis//:&pyxb/bundles/common//' \ -u lido-v1.0.xsd -m lido Also, if you do this: try: root.append(child) except pyxb.ValidationError as e: print(e.details()) you get a little more detail about what's going on. Which is that you've...

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    An example bundle showing how to use the modularized XHTML namespace has been added; see issue 81.

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    See issue 82.

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    Thanks; now tracked on github.

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    Since that schema extends the content model of http://www.w3.org/1999/xhtml you would normally need to add this: --archive-path ${PYXB_ROOT}/pyxb/bundles/common// to your pyxbgen command line. This tells PyXB to import the content model metadata for the bundle that includes the xhtml namespace. The schema still won't generate bindings because it references a model group {http://www.w3.org/1999/xhtml}xhtml.BlkStruct.class that only exists in the modularized version of that namespace, which is not...

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    If you delete the filler elements from within the sequence, the bindings module can be imported. sed -i -e /filler/d xml-mgmt.xsd

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    No. The schema element at that point has minOccurs=0 maxOccurs=0 which means it doesn't exist. PyXB seems to remove it, which means the remaining reference to it while building the automaton fails. This is now filed as issue #79. I don't know when it will be worked.

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    TimePositionType is a complex type with simple content, meaning that it is a basic value that's annotated with attributes. Because you need to access the attributes like calendarEraName from the instance, you have to use the value() method on the instance to access the basic value. Example schema: <?xml version="1.0" encoding="UTF-8"?> <xs:schema targetNamespace="URN:test" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="datePrepared" type="gml:TimePositionType"/>...

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    No. I've never encountered a situation where I've had to do it.

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    Not a simple way, no. You could use the class _ElementMap and _AttributeMap properties to extract elements and attributes from an instance and put them into a dictionary.

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Open Discussion

    Identified and resolved as github issue #78.

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Open Discussion

    Update your StackOverflow post with the schema description for an element that uses those types and I'll answer it there.

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    Some of the complexity is required given PyXB's primary goal of supporting XML validation,...

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    Your addendum is correct. PyXB does not attempt to infer names for the anonymous...

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    I would expect the multiprocessing module would have to pickle+unpickle the object...

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    Without reproducing the problem locally there are several clear problems. First,...

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    That was scheduled for 2.0 seven years ago. It didn't make the cut when unfinished...

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    Your first issue with trailing zeroes removed is discussed here. PyXB does not support...

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    It would probably be possible, but you would have to create a modified genbind script...

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    PyXB delegates to the DOM implementation to generate the document structure. This...

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    https://github.com/pabigot/pyxb/blob/next/pyxb/utils/xmlre.py

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    PyXB attempts to translate XML regex syntax into Python syntax for execution. It's...

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    Yes. You have to change the targetNamespace attribute (which must match the attribute...

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    The NFe schema variants define incompatible information sets that have the same namespace....

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    You need the patch for issue #59.

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    Thanks; I've updated the issue to note that approach should be considered.

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    As noted in my response on stackoverflow (which I don't monitor regularly), utf8...

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    The command I gave specifies that the orderedContent order is to be used. I suspect...

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    In fact, yes. Take a look at this description and this source file. For your example,...

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    Here the value is a DOM element already, but it's in a micro implementation of DOM...

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    Yes, that is indeed issue #40. I'm sorry, but I have no plans to fix it. Doing so...

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    If you want to save time, the problem is this issue which is not likely to be fi...

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    It depends what you're trying to do. If your intent is to create Python bindings...

  • Peter A. Bigot Peter A. Bigot modified a comment on discussion Help

    I converted that to a complete schema by using xs:string for XType, etc., and adding...

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    ERROR! The markdown supplied could not be parsed correctly. Did you forget to surround...

  • Peter A. Bigot Peter A. Bigot modified a comment on discussion Help

    OK, I'm back and have been able to play with that schema. Whoever coded that schema...

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    OK, I'm back and have been able to play with that schema. Whoever coded that schema...

  • Peter A. Bigot Peter A. Bigot modified a comment on discussion Help

    I note that the element in the schema is inertial, not inertia. Other than that,...

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    I note that the element in the schema is interial, not inertia. Other than that,...

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    There is no such thing as an anonymous element (all have names), but if the type...

  • Peter A. Bigot Peter A. Bigot modified a comment on discussion Help

    I've opened issue #62 to track this, but in essence the example is correct even if...

  • Peter A. Bigot Peter A. Bigot modified a comment on discussion Help

    I've opened issue #62 to track this, but in essence the example is correct even if...

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    I've opened issue #62 to track this, but in essence the example is correct even if...

  • Peter A. Bigot Peter A. Bigot committed [bb4d8d]

    Archive release 1.2.5

  • Peter A. Bigot Peter A. Bigot committed [fc7ff2]

    Refine release process

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    The best place for PyXB support is the github issues page. The per-module generated...

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    It took me a while to figure out what you meant by the 30s example, which I couldn't...

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    Turns out this is much harder than I can deal with at this time. maxOccurs is a union...

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    It'll probably touch a couple files.

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    Apparently this is the first time somebody's pointed PyXB at schema that reference...

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    No, unloading is not supported. You could try delegating to a subprocess.

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    If you're still getting references to http://microsoft.com/wsdl/types/ then either...

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    Delete the old bindings file and regenerate it.

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    Instead of removing targetNamespace change the namespace value of both it and the...

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    If the schema have no namespace you could create wrapper schema with unique namespaces...

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    Interesting; I've never heard of PyCharm and have no idea how it guesses what methods...

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    The simplest approach would be to add the additional attributes to the DOM object...

  • Peter A. Bigot Peter A. Bigot posted a comment on ticket #365

    C++ was not supported in mspgcc, and mspgcc itself is no longer supported. The error...

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    For Q1 you usually only need to use BIND in cases where there's an inner element...

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    Re-reading one of your previous responses and now understanding more about what you...

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    For DOM structures, you can't, at least not easily or completely. DOM is simply an...

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    For that simple case: <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element...

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    If you mean you have bindings for which everything could be resolved by PyXB then...

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    Note: In the previous response, the cbacba.wsdl file processed by the modified pyxbdump...

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    This can be done, but it's not easy. The PyXB WSDL API assumes a WSDL file contains...

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    Objects can be constructed either with keyword arguments using the sub-element and...

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    Converting to DOM doesn't require the whole document. e.toDOM() will generate a fragment...

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    PyXB is primarily intended for validation. An incomplete element cannot be validated....

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    PyXB uses the Python standard base64 using the standard_b64decode and standard_b64encode...

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    No, that feature isn't present. Thel solution requires generating a conforming document...

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    Schema: <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:complexType name="ct1_t">...

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    When I last compared (over a year ago), I got a small code size increase with msp430-elf....

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    mspgcc (which is no longer maintained) does not support link-time optimization with...

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    When you set RequireValidWhenGenerating(False) generation should not consult the...

  • Peter A. Bigot Peter A. Bigot posted a comment on discussion Help

    ERROR! The markdown supplied could not be parsed correctly. Did you forget to surround...

1 >