<BODY bgColor=#ffffff><P>Hi all,<BR>For those who use the theme function of phpgenerictasks:<BR><BR>Sometimes when creating a Theme, an exception occurs in:<BR><BR>classes/theme.php method ApplyTheme():<BR><BR>At this line:<BR>$resourceService->SetResource($layerResId, $byteSource->GetReader(), null);<BR><BR>The error sounds like this:</P>
<P>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)'<BR><BR>So after browsing a little the web, I've seen a Post which fixes similar problems for pointrules..<BR><BR>What needs to be done is:<BR><BR>Adding a <SizeContext>DeviceUnits</SizeContext> tag in phpgenerictasks\theme\templates\arearuletemplate.xml<BR><BR>Initially the file is like this:<BR><BR><AreaRule><BR> <LegendLabel>%s</LegendLabel><BR> <Filter>%s</Filter><BR> <AreaSymbolization2D><BR> <Fill><BR> <FillPattern>Solid</FillPattern><BR> <ForegroundColor>%s</ForegroundColor><BR> <BackgroundColor>FF000000</BackgroundColor><BR> </Fill><BR> <Stroke><BR> <LineStyle>Solid</LineStyle><BR> <Thickness>0</Thickness><BR> <Color>%s</Color><BR> <Unit>Inches</Unit><BR> </Stroke><BR> </AreaSymbolization2D><BR></AreaRule><BR><BR>and it might be changed like this:<BR><BR><AreaRule><BR> <LegendLabel>%s</LegendLabel><BR> <Filter>%s</Filter><BR> <AreaSymbolization2D><BR> <Fill><BR> <FillPattern>Solid</FillPattern><BR> <ForegroundColor>%s</ForegroundColor><BR> <BackgroundColor>FF000000</BackgroundColor><BR> </Fill><BR> <Stroke><BR> <LineStyle>Solid</LineStyle><BR> <Thickness>0</Thickness><BR> <Color>%s</Color><BR> <Unit>Inches</Unit><BR> <STRONG> <SizeContext>DeviceUnits</SizeContext></STRONG><BR> </Stroke><BR> </AreaSymbolization2D><BR></AreaRule><BR><BR><BR>It solves my problem, hope this can help someone :-)<BR>Cheers, Rémy</P></BODY>