Opened 17 years ago

Closed 14 years ago

#488 closed enhancement (fixed)

phpgenerictasks theme: XML Indexer: Parse error, Fixing suggestion

Reported by: poulet1212 Owned by: chrisclaydon
Priority: medium Milestone:
Component: Samples Version:
Severity: major Keywords:
Cc: External ID:

Description

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

Change History (3)

comment:1 by tomfukushima, 17 years ago

Owner: set to chrisclaydon

comment:2 by jbirch, 15 years ago

Version: 2.0.0

Removing version from enhancement request. If this enhancement request has been addressed or is no longer required, please close ticket.

comment:3 by tomfukushima, 14 years ago

Resolution: fixed
Status: newclosed

No response. Closing ticket.

Note: See TracTickets for help on using tickets.