#2092 closed defect (fixed)
libxml2.8.0 namespace prefix issue
Reported by: | colivier | Owned by: | colivier |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 2.0.2 |
Component: | postgis | Version: | 2.0.x |
Keywords: | history | Cc: |
Description
This one use to work with libxml2 2.7x
SELECT 'linestring_1', ST_AsEWKT(ST_GeomFromGML('<gml:LineString><gml:coordinates>1,2 3,4</gml:coordinates></gml:LineString>'));
But don't work anymore with 2.8.0 Removing the ns_prefix string make it work:
SELECT 'linestring_1', ST_AsEWKT(ST_GeomFromGML('<LineString><coordinates>1,2 3,4</coordinates></LineString>'))
Defining a gml namespace uri don't seems to change behaviour.
Issue on both 1.5 and 2.0 branch
Change History (13)
comment:1 by , 12 years ago
comment:2 by , 12 years ago
Yeap that do the trick for in_gml, but seems still an issue for in_kml...
comment:3 by , 12 years ago
The problem is is_kml_namespace (probably is_gml_namespace has similar issues, they just aren't tested as much) testing the name space element, which looks like this:
$11 = { next = 0x0, type = XML_NAMESPACE_DECL, href = 0x0, prefix = 0x100a038e0 "kml", _private = 0x0, context = 0x0 }
Note that (a) it exists and (b) is has a null href. The routine expects that if you have an ns element, it's got everything, and that if you don't have one, you can assume none was declared. I guess the old routine stripped the prefixes without populating the name space elements, fun.
comment:6 by , 12 years ago
It's pretty important but also pretty hard. Let me know if you're not doing it Olivier, and I'll try and figure it before the deadline.
comment:7 by , 12 years ago
Milestone: | PostGIS 2.0.2 → PostGIS 2.0.3 |
---|
sounds like this will have to wait. Too much involved to fix and test.
comment:8 by , 12 years ago
Milestone: | PostGIS 2.0.3 → PostGIS 2.0.2 |
---|
comment:9 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fix commited in both 2.0 and trunk branches. Tested with libxml 2.8.0 and 2.7.8.
comment:10 by , 12 years ago
pramsey can you test Olivier's changes to see if it fixes your regression issues.
Olivier -- you forgot to note the r revision.
Then maybe we can have a release before anyone else tries to sneak in another ticket.
comment:11 by , 12 years ago
Keywords: | history added |
---|
Using this instead of xmlParseMemory seems to get us back to the old behavior
Couldn't find anyway to get the SAX2 parser to do what we wanted.