[mapguide-internals] Default values for InsertionPointX

Kenneth Skovhede, GEOGRAF A/S ks at geograf.dk
Wed May 13 15:58:52 EDT 2009


Thanks Walt.

I have updated Maestro to use the default values.

I have created a new ticket for the issue, and attached a patch for 
LayerDefinition-1.2.0.
http://trac.osgeo.org/mapguide/ticket/984

I also belive that this update is a documentation issue, and as such 
should not produce ill effects.

However, I noticed that InsertionPointX is a string and InsertionPointY 
is a double.
If they are actually both doubles, I guess that there is something in a 
parse/serializer somewhere that has trouble assigning null to a double,
so it was decided to make it a string? Or is it because it could also be 
a column name (so the Y is the faulty one)?

If both can only be doubles, I belive that it is an error to adjust an 
xsd schema to fit a parser/serializer,
but changing that will likely require a lot of work, and definately an RFC.
The benefit from changing it will likely be mostly asthetic, so should I 
just forget about it?

Regards, Kenneth Skovhede, GEOGRAF A/S



Walt Welton-Lair skrev:
> Hi Kenneth,
>
> MapGuide's XML serialization code for this element assumes default values of 0.5.  So, yes, the schema should be updated to indicate this is the default value.
>
> In general, our schemas should specify default values for all optional elements that are basic types.  For example in that same SymbolType element we should specify a default value of true for MaintainAspect, and 0.0 for Rotation.  There are lots of other elements that are missing this information.
>
> Normally we need an RFC for a schema change, but to me this isn't really that kind of a change.  We're just clarifying how the existing schema should be interpreted.  For now go ahead and update Maestro to assume 0.5 defaults.  I think as a separate step we need to go through the whole schema and add the missing default value attributes.
>
> *** Does anyone disagree and feel an RFC is needed? ***
>
> I generally have maintained the XML serialization code, ensuring that it adheres to the schema, and correctly handles versioning.  So I don't mind doing the schema edits, but it will take a week or so before I can get to it.  How about after fixing the Maestro code you can assign the ticket to me, and add a comment indicating what still needs to be done.
>
> Thanks,
> Walt
>
>
> -----Original Message-----
> From: mapguide-internals-bounces at lists.osgeo.org [mailto:mapguide-internals-bounces at lists.osgeo.org] On Behalf Of Kenneth Skovhede, GEOGRAF A/S
> Sent: Wednesday, May 13, 2009 3:31 AM
> To: MapGuide Internals Mail List
> Subject: [mapguide-internals] Default values for InsertionPointX
>
> I'm trying to fix issue #918:
> http://trac.osgeo.org/mapguide/ticket/918
>
> The ticket seems to indicate that 0.5 is the default value.
> The xml fragment looks like this:
>
>       <xs:element name="InsertionPointX" type="xs:string" minOccurs="0">
>         <xs:annotation>
>           <xs:documentation>X offset for the symbol specified in symbol 
> space.  Does not apply to labels.</xs:documentation>
>         </xs:annotation>
>       </xs:element>
>       <xs:element name="InsertionPointY" type="xs:double" minOccurs="0">
>         <xs:annotation>
>           <xs:documentation>Y offset for the symbol specified in symbol 
> space.  Does not apply to labels.</xs:documentation>
>         </xs:annotation>
>       </xs:element>
>
> If the InsertionPoint values are omitted, does MapGuide assume 0.5 or 0.0 ?
> If it assumes 0.5 should the xsd be updated to indicate this?
>
>   


More information about the mapguide-internals mailing list