[mapguide-trac] #488: phpgenerictasks theme: XML Indexer: Parse
error, Fixing suggestion
MapGuide Open Source
trac_mapguide at osgeo.org
Mon Mar 10 08:23:11 EDT 2008
#488: phpgenerictasks theme: XML Indexer: Parse error, Fixing suggestion
---------------------------+------------------------------------------------
Reporter: poulet1212 | Owner:
Type: enhancement | Status: new
Priority: medium | Milestone:
Component: Samples | Version: 2.0.0
Severity: major | Keywords:
External_id: |
---------------------------+------------------------------------------------
Enhancement suggestion to: phpgenerictasks (Theme)
--------------------------------------------------
Sometimes when creating a Theme, an exception occurs in:
{{{
phpgenerictasks/theme/classes/theme.php method ApplyTheme():
When calling:
$resourceService->SetResource($layerResId, $byteSource->GetReader(),
null);
}}}
The error sounds like this:
{{{
Error: XML Indexer: Parse error in document at line, 34, char 12.
Parser message: Not enough elements to match content model :
'((LineStyle,Thickness,Color,Unit,SizeContext),ExtendedData1)'
}}}
I refer here a very similar problem, which is already fixed:
http://trac.osgeo.org/mapguide/ticket/61
This problem was solved by adding a {{{<SizeContext>}}} tag to the xml
definition.
So what needs to be done here:
Adding a {{{<SizeContext>DeviceUnits</SizeContext>}}} tag in
phpgenerictasks\theme\templates\arearuletemplate.xml
Initially the file is like this:
{{{
<AreaRule>
<LegendLabel>%s</LegendLabel>
<Filter>%s</Filter>
<AreaSymbolization2D>
<Fill>
<FillPattern>Solid</FillPattern>
<ForegroundColor>%s</ForegroundColor>
<BackgroundColor>FF000000</BackgroundColor>
</Fill>
<Stroke>
<LineStyle>Solid</LineStyle>
<Thickness>0</Thickness>
<Color>%s</Color>
<Unit>Inches</Unit>
</Stroke>
</AreaSymbolization2D>
</AreaRule>
}}}
and it might be changed like this:
{{{
<AreaRule>
<LegendLabel>%s</LegendLabel>
<Filter>%s</Filter>
<AreaSymbolization2D>
<Fill>
<FillPattern>Solid</FillPattern>
<ForegroundColor>%s</ForegroundColor>
<BackgroundColor>FF000000</BackgroundColor>
</Fill>
<Stroke>
<LineStyle>Solid</LineStyle>
<Thickness>0</Thickness>
<Color>%s</Color>
<Unit>Inches</Unit>
<SizeContext>DeviceUnits</SizeContext>
</Stroke>
</AreaSymbolization2D>
</AreaRule>
}}}
I did try with these changes and it seems to work fine.
Regards, Rémy
--
Ticket URL: <http://trac.osgeo.org/mapguide/ticket/488>
MapGuide Open Source <http://mapguide.osgeo.org/>
MapGuide Open Source Internals
More information about the mapguide-trac
mailing list