Open tbonfort opened 12 years ago
Author: jlacroix Date: 2006/03/01 - 16:24
This error is only returned when CPL XML is not able to read the XML file. So
this is a GDAL bug. Frank is there a reason cpl_minixml.cpp needs the XML header?
Here's an example of xml returned by ionic:
<ViewContext xmlns:xlink="http://www.w3.org/1999/xlink"
xsi:schemaLocation="http://www.opengis.net/context context.xsd"
xmlns="http://www.opengis.net/context"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="none" version="1.0.0">
<General>
<Window width="600" height="300"></Window>
<BoundingBox SRS="EPSG:4326" miny="34.2" maxy="55.800000000000004"
maxx="28.500000000000007" minx="-14.699999999999996"></BoundingBox>
<Title>World view</Title>
<Abstract>Example Context</Abstract>
</General>
</ViewContext>
CPL reads it only if we add at the beginning:
<?xml service="1.0" encoding="utf-8" standalone="no"?>
Author: fwarmerdam Date: 2006/03/01 - 16:46
Julien,
I saved the document to a file, and ran xmlreformat and it worked
fine. xmlreformat is a test program that reads and writes a file
with the cpl_minixml.cpp stuff.
Could there be some formatting or special characters lost in the
bug report paste? I will attach the literal file I ran this on.
PS. This was with GDAL-CVS, though I don't see any real fixes in
that code since 1.3.1.
Author: fwarmerdam Date: 2006/03/09 - 05:45
Julien / Bart,
Any follow up on this?
Author: jlacroix Date: 2006/03/09 - 20:45
Sorry I'm unable to compile xmlreformat. I always get:
$ make xmlreformat
/bin/sh ../libtool --mode=compile g++ -Wall -O2 -DOGR_ENABLED -c -o
xmlreformat.o xmlreformat.cpp
g++ -Wall -O2 -DOGR_ENABLED -c xmlreformat.cpp -fPIC -DPIC -o .libs/xmlreformat.o
g++ -Wall -O2 -DOGR_ENABLED -c xmlreformat.cpp -o xmlreformat.o >/dev/null
2>&1/bin/sh ../libtool --mode=compile g++ -Wall -O2 xmlreformat.o
../libgdal.la -o xmlreformat
libtool: compile: cannot determine name of library object from `xmlreformat'
make: *** [xmlreformat] Error 1
Author: fwarmerdam Date: 2006/03/09 - 21:00
I think you will either need to hand compile xmlreformat or build
GDAL without libtool (my normal default for local work).
Hand compilation, assuming installation of gdal in /usr/local, would be:
g++ gdal/port/xmlreformat.cpp -I/usr/local/include -L/usr/local/lib -lgdal -o
xmlreformat
Author: jlacroix Date: 2006/03/09 - 22:21
Thanks Frank!
OK I found the problem, it was on my side. The context code was done so it
always skipped the first XML tag. Fixed in 4.9 CVS.
Marking as FIXED
Reporter: bartvde@osgis.nl Date: 2006/03/01 - 08:01