Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-dev] EMF Resource Handling o LayerLegendItem

Hi Frank,
Have a look at org.eclipse.emf.ecore.xmi.XMLResource.OPTION_SKIP_ESCAPE_URI
You should set that option on serialization of the model.

...
options = new map
options.put(org.eclipse.emf.ecore.xmi.XMLResource.OPTION_SKIP_ESCAPE_URI, Boolean.FALSE)
resource.save(model, options);

Am Mo., 18. Jan. 2021 um 09:26 Uhr schrieb Frank Gasdorf <fgdrf@xxxxxxxxxxxxxxxxxxxxx>:
Hello everybody!

If I open an empty Map with uDig and add a WMS Layer to it, e.g. localhost:8091/geoserver/ows?service=wms&request=GetCapabilities#my_layer

the map is fine. After I closed the application the umap resource file has been written with a legend element as follows:

<?xml version="1.0" encoding="UTF-8"?>
<org.locationtech.udig.project.internal:Map xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" [...]>
[...]
  <legend xsi:type="org.locationtech.udig.project.internal:LayerLegendItem" layer="http://localhost:8091/geoserver/ows?service=wms&request=GetCapabilities#my_layer"/>
</org.locationtech.udig.project.internal:Map>

the problem: the XML document isn't valid due to an "&" right befor request-Parameter.

This leads to an SAXParserException when starting uDig again without the "clean" option:

[..]
lineNumber: 19; columnNumber: 139; The reference to entity "request" must end with the ';' delimiter. 
[..]

How should be the EMF-Model look like to get a valid refernce to layer  OR with other words: How can I save valid encoded XML from the Model?

--
Thanks in advance
Frank
_______________________________________________
udig-dev mailing list
udig-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/udig-dev

Back to the top