#26 Improve diagnostics in instance document parsing

PyXB 1.2.0
Content model

I.e., when something's missing, say what it is; when something's not expected, say what should have been there.


  • Peter A. Bigot

    Peter A. Bigot - 2009-07-16
    • status changed from new to accepted
    • milestone changed from PyXB 0.5.1 to PyXB 0.5.2

    Delayed to next beta.

  • Peter A. Bigot

    Peter A. Bigot - 2009-08-04
    • milestone changed from PyXB 0.5.2 to PyXB 0.7.1

    Pushed out until default binding style has changed to property.

  • Peter A. Bigot

    Peter A. Bigot - 2009-08-08
    • type changed from defect to enhancement
  • Peter A. Bigot

    Peter A. Bigot - 2009-08-23
    • priority changed from major to minor
    • milestone changed from PyXB 0.7.1 to PyXB 2.0.0

    We'll do this later, too.

  • Arne Grimstrup

    Arne Grimstrup - 2009-11-20

    Let me add a "+1" to this ticket. The message

    pyxb.exceptions_.UnrecognizedContentError: {Alma/APDMTest/ObsProject}timeOfCreation value 2009-05-08 21:23:45

    really didn't help me understand that another element was missing.

  • Peter A. Bigot

    Peter A. Bigot - 2012-11-03
    • milestone changed from PyXB 2.0.0 to PyXB 1.2.0
  • Peter A. Bigot

    Peter A. Bigot - 2012-11-07
    • status changed from accepted to closed
    • resolution set to fixed

    Calling this closed as of the following commit in pyxb-1.2/next.

    commit 2dc019aef34d34bbe9dd0f31b3ee3c920dc2847a
    Author: Peter A. Bigot <pab@pabigot.com>
    Date:   Wed Nov 7 06:46:32 2012 -0600
        Test SimpleFacetValueError

    Example of available diagnostics, documenting that the error occurs on line 217 of the input, showing what was found, and what was expected:

    *** ERROR validating response:
    The containing element parameters is defined at ndfd_data.xsd[29:12].
    The containing element type parametersType is defined at parameters.xsd[21:4]
    The unrecognized content probability-of-precipitation begins at <unknown>[217:6]
    The parametersType automaton is in an accepting state.
    The following element and wildcard content would be accepted:
            An element cloud-amount per parameters.xsd[379:12]
            An element humidity per parameters.xsd[416:12]
            An element weather per parameters.xsd[449:12]
            An element conditions-icon per parameters.xsd[566:12]
            An element hazards per parameters.xsd[585:12]
            An element wordedForecast per parameters.xsd[701:11]
            An element pressure per parameters.xsd[715:12]
            An element probabilisticCondition per parameters.xsd[751:12]
            An element water-state per parameters.xsd[785:12]

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks