Opened 18 years ago
Closed 18 years ago
#1691 closed enhancement (fixed)
[Context] a context without an XML header can not be loaded
Reported by: | Owned by: | mapserverbugs | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | MapScript-PHP | Version: | 4.8 |
Severity: | minor | Keywords: | |
Cc: |
Description
It would be nice if the Mapserver code would be a bit more leniant with respect to needing an XML header in the WMC file, since e.g. a WMC exported by Ionic misses this XML header. This is probably in the CPL XML parsing code. PHP Warning: [MapServer Error]: msLoadMapContext(): Invalid XML file (/data/geoservices/apps/geoservices/htdocs/ionic.cml) in /data/geoservices/apps/geoservices/htdocs/wmc_ionic.php on line 5
Attachments (1)
Change History (7)
comment:2 by , 18 years ago
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.
comment:4 by , 18 years ago
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
comment:5 by , 18 years ago
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
comment:6 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
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
Note:
See TracTickets
for help on using tickets.