<div dir="ltr">Hello,<div><br></div><div>I am working with the Geotoolkit SE/SLD API and I have run into what seems to be a bug with XML serialization to SE 1.1.0.</div><div><br></div><div>When Geotoolkit reads a FeatureTypeName (an element of FeaturetypeStyle) from an XML file, it uses org.geotoolkit.feature.type.NamesExt to create a GenericName with a null NameSpace as its scope. this causes some pretty strange behavior when serializing generated FeatureTypeStyle objects back to XML.</div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">This is an example FeatureTypeName element that I'm reading using Geotoolkit:</font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><span style="font-family:monospace,monospace"><se:FeatureTypeName xmlns:tds="</span><span style="font-family:monospace,monospace"><a href="http://metadata.dod.mil/mdr/ns/GSIP/4.0/tds/4.0">http://metadata.dod.mil/mdr/ns/GSIP/4.0/tds/4.0</a></span><span style="font-family:monospace,monospace">">tds:MissileSiteGeosurface</se:FeatureTypeName></span><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">However, when using StyleXmlIO to write the generated FeatureTypeStyle object back to SE XML version 1.1.0, the FeatureTypeName element comes out like this:</font></div><div><br></div><div><font face="monospace, monospace"><se:FeatureTypeName xmlns:ns9="null:">ns9:<a href="http://metadata.dod.mil/mdr/ns/GSIP/4.0/tds/4.0:MissileSiteGeosurface">http://metadata.dod.mil/mdr/ns/GSIP/4.0/tds/4.0:MissileSiteGeosurface</a></se:FeatureTypeName></font></div><div><font face="monospace, monospace"><br></font></div><div><font face="arial, helvetica, sans-serif">This is messy and, more importantly, incorrect. I would expect to see something more like the input XML. </font><span style="font-family:arial,helvetica,sans-serif">Note that when I serialize using the  SLD 1.0.0 standard instead, the output looks like the following, which seems fine to me: </span></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="monospace, monospace"><sld:FeatureTypeName><a href="http://metadata.dod.mil/mdr/ns/GSIP/4.0/tds/4.0:MissileSiteGeosurface">http://metadata.dod.mil/mdr/ns/GSIP/4.0/tds/4.0:MissileSiteGeosurface</a></sld:FeatureTypeName></font><br></div><div><font face="arial, helvetica, sans-serif"><br></font><div><div>Any help with how to remedy this issue would be much appreciated.</div><div><br></div><div>Regards,</div><div class="gmail_signature"><div dir="ltr">Cullen Rombach<div>Image Matters LLC</div><div><a href="http://www.imagemattersllc.com" target="_blank">www.imagemattersllc.com</a></div></div></div>
</div></div></div>