#202 attributes improperly inherit default namespace

PyXB 1.2.3
Generation Model
PyXB 1.2.2

See: https://sourceforge.net/p/pyxb/discussion/956708/thread/b9d221e0/

Namespaces in XML 1.0 contains the following somewhat contradictory direction:

Default namespace declarations do not apply directly to attribute names; the interpretation of unprefixed attributes is determined by the element on which they appear. ... The namespace name for an unprefixed attribute name always has no value.

PyXB 1.2.2 applies default namespace rules to attributes when it should not.

2 Attachments


  • Peter A. Bigot

    Peter A. Bigot - 2013-07-10
    • status changed from new to closed
    • resolution set to fixed

    Fixed with following commits to be in PyXB 1.2.3. The fix may be obtained from the next branch of the git repository or by applying these patches:

    patch -p1 --ignore-whitespace < 0001-domutils-do-not-map-default-namespace-to-None.patch
    patch -p1 --ignore-whitespace < 0002-trac-202-attributes-improperly-inherit-default-names.patch

    commit 2e10e8126b2bd971ff40582346adb836fa27031c
    Author: Peter A. Bigot <pab@pabigot.com>
    Date:   Wed Jul 10 14:05:47 2013 -0500
        trac/202: attributes improperly inherit default namespace
        Ensure attribute names that have a namespace remain qualified even if the
        corresponding namespace is the default namespace.
    :100644 100644 357c604... 0b9ab37... M  pyxb/utils/domutils.py
    :000000 100644 0000000... a5658db... A  tests/trac/trac-0202/check.py
    :000000 100644 0000000... 265f759... A  tests/trac/trac-0202/sample.xsd
    :000000 100755 0000000... 5f55f82... A  tests/trac/trac-0202/test.sh
    commit 731fee507ad415812e56098d3afe4ddb5fb8d5e0
    Author: Peter A. Bigot <pab@pabigot.com>
    Date:   Wed Jul 10 13:46:27 2013 -0500
        domutils: do not map default namespace to None
        This will cause difficulties when we need to have a prefix associated with a
        default namespace.
    :100644 100644 1d2bf98... 357c604... M  pyxb/utils/domutils.py

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

Sign up for the SourceForge newsletter:

No, thanks