[mapguide-internals] does the featureService setResource method do full xml validation?

Kenneth, GEOGRAF A/S ks at geograf.dk
Thu May 24 06:01:25 EDT 2007


Based on my experience, it only validates using XSD, and there may be 
cases that are not trapped by the XSD.
I've seen some cases where the upload works fine, but the server crashes 
or is unable to display the map.
I can't get it to display xml that is not UTF-8 encoded, even with a 
valid encoding header, but upload works fine.

Also, MapGuide Studio requires spaces (linefeeds?) between tags.

Regards, GEOGRAF A/S



zspitzer wrote:
> I have been playing with creating creating some resources with SetResource.
> It seems i can pass XML which causes server crashes. 
>
> for example not having     <VectorScaleRange>.....</VectorScaleRange> in a
> layer definition for example throws
>
>  	An exception occurred in DB XML component. Error: XML Indexer: Parse error
> in document at line, 9, char 28. Parser message: Not enough elements to
> match content model :
> '(ResourceId,Opacity,(FeatureName,FeatureNameType,Filter,PropertyMapping,Geometry,Url,ToolTip,VectorScaleRange),ExtendedData1)'
>
> however  having an empty <VectorScaleRange></VectorScaleRange> ie no styling
> or scale ranges
>
> will case a runtime error and a console dialog on xp.
>
> the following is listed in the logs
>
>   - MgStylizationUtil.StylizeLayers line 923 file
> c:\build_bond_area\mapguide_open_source_v1.2\build_13.7\mgdev\server\src\services\mapping\StylizationUtil.cpp
> Failed to stylize layer: Datasets_ABORIG_NT
>
> I have also experienced crashes which return a 500 server error with
> incorrect xml for resources which were successfully uploaded via SetResource
>
>
>
>   


More information about the mapguide-internals mailing list