Commit 1a0d7e1b authored by Christian Ledermann's avatar Christian Ledermann

test that SchemaData is read from kml, bugfix for this

parent 58433799
......@@ -2,6 +2,13 @@
Changelog
=========
0.6 (unreleased)
----------------
- add Schema
- add SchemaData
- make use of lxmls default namespace
0.5 (2013/10/23)
-----------------
......
......@@ -2,7 +2,7 @@
To Do
======
- Schema and Extended Data
- add untyped custom data with namespace prefix
- Overlays
......@@ -1000,9 +1000,9 @@ class ExtendedData(_XMLObject):
el = Data(self.ns)
el.from_element(ud)
self.elements.append(el)
typed_data = element.findall('%sSimpleData' % self.ns)
typed_data = element.findall('%sSchemaData' % self.ns)
for sd in typed_data:
el = SimpleData(self.ns)
el = SchemaData(self.ns, 'dummy')
el.from_element(sd)
self.elements.append(el)
......
......@@ -484,7 +484,9 @@ class KmlFromStringTestCase( unittest.TestCase ):
self.assertTrue(
'<i>The par for this hole is </i>' in extended_data.elements[1].display_name
)
sd = extended_data.elements[2]
self.assertEqual(sd.data[0]['name'], 'TrailHeadName')
self.assertEqual(sd.data[1]['value'], '347.45')
def test_polygon(self):
doc= """<kml xmlns="http://www.opengis.net/kml/2.2">
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment