Namespaced attributes use fully-qualified names instead of prefixes

Bug #1037597 reported by Leonard Richardson on 2012-08-16
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Beautiful Soup

Bug Description

Failing test:

    def test_namespaced_attributes(self):
        markup = '<foo xmlns:xsi=""><bar xsi:schemaLocation=""/></foo>'
        soup = self.soup(markup)
        self.assertEqual(unicode(, markup)

The markup looks like this:

<foo xmlns:xsi=""><bar {}schemaLocation=""/></foo>

lxml gives fully-qualified namespaces instead of namespace prefixes, and there's no code to convert back to prefixes for attribute names, the way there is for tag names.

Changed in beautifulsoup:
status: New → Fix Committed
Changed in beautifulsoup:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers