[mapguide-users] RE: RE: Exporting as XML

Ben Trumbore ben.trumbore at autodesk.com
Fri Jul 7 15:56:21 EDT 2006


I guess I wasn't clear in my previous email.  The sample in the dev
guide is a program that creates an object model for a layer.  It is OK
to assign strings like the filter in question in a program.  When that
object model is serialized to XML, the offending characters are escaped.
You can see the result of this in the XML you quoted in your most recent
message (included below).  When you are directly editing a layer's XML,
you must escape the five "bad" characters yourself.

 

   Ben

 

-----Original Message-----
From: newjim [mailto:j_oleary_ed at yahoo.ca] 
Sent: Friday, July 07, 2006 3:22 PM
To: users at mapguide.osgeo.org
Subject: [mapguide-users] RE: RE: Exporting as XML

 

Yes, I still get this error. However, there is a complete sample in the
new

dev guide documentation that appears to work, so i will examine that. It
has

the literal > in 'YRBUILT > 1950'.

-- 

 

[Ben Trumbore] <?xml version="1.0" encoding="UTF-8"?>

<LayerDefinition xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xsi:noNamespaceSchemaLocation="LayerDefinition-1.0.0.xsd"
version="1.0.0">

      <VectorLayerDefinition>

      

<ResourceId>Library://Samples/Sheboygan/Data/Parcels.FeatureSource</Reso
urceId>

            <FeatureName>SHP_Schema:Parcels</FeatureName>

            <FeatureNameType>FeatureClass</FeatureNameType>

            <PropertyMapping>

                  <Name>NAME</Name>

                  <Value>NAME</Value>

            </PropertyMapping>

            <PropertyMapping>

                  <Name>ID</Name>

                  <Value>ID</Value>

            </PropertyMapping>

            <PropertyMapping>

                  <Name>YRBUILT</Name>

                  <Value>YRBUILT</Value>

            </PropertyMapping>

            <Geometry>SHPGEOM</Geometry>

            <VectorScaleRange>

                  <MaxScale>10000</MaxScale>

                  <AreaTypeStyle>

                        <AreaRule>

                              <LegendLabel>Built after
1950</LegendLabel>

                              <Filter>YRBUILT &gt; 1950</Filter>

                              <Label>

                                    <Unit>Points</Unit>

 
<SizeContext>DeviceUnits</SizeContext>

                                    <SizeX>0.3</SizeX>

                                    <SizeY>10</SizeY>

                                    <Text>YRBUILT</Text>

                                    <FontName>Arial</FontName>

 
<ForegroundColor>FF000000</ForegroundColor>

 
<BackgroundColor>FFFFFFFF</BackgroundColor>

 
<BackgroundStyle>Transparent</BackgroundStyle>

 
<HorizontalAlignment>&apos;Center&apos;</HorizontalAlignment>

 
<VerticalAlignment>&apos;Baseline&apos;</VerticalAlignment>

                              </Label>

                              <AreaSymbolization2D>

                                    <Fill>

 
<FillPattern>Solid</FillPattern>

 
<ForegroundColor>FFFFFF00</ForegroundColor>

 
<BackgroundColor>FF000000</BackgroundColor>

                                    </Fill>

                                    <Stroke>

                                          <LineStyle>Solid</LineStyle>

                                          <Thickness>0</Thickness>

                                          <Color>FF000000</Color>

                                          <Unit>Inches</Unit>

                                    </Stroke>

                              </AreaSymbolization2D>

                        </AreaRule>

                  </AreaTypeStyle>

            </VectorScaleRange>

      </VectorLayerDefinition>

</LayerDefinition>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20060707/07e995f5/attachment.html


More information about the Mapguide-users mailing list