[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [udig-dev] EMF Resource Handling o LayerLegendItem
|
Hi,
No that does not matter. I guess you'd best ask at the EMF-Forum BTW it
should be
---
saveOptions.put(XMLResource.OPTION_SKIP_ESCAPE_URI, Boolean.FALSE);
---
but I wonder if this is really needed. From an EMF point of view the
value in the attribute is just a string and naturally it has to escape
that string when writing it to the XML.
Tom
Am 18.01.21 um 11:38 schrieb Frank Gasdorf:
Thanks for your fast reponse!
I tried to set
saveOptions.put(XMLResource.OPTION_SKIP_ESCAPE_URI,
Boolean.FALSE.toString());
Project.Plugin.java without any effect to layer reference of legend.
Wondering Ith there is a problem in the model itself how to handle this
resource-reference. Or is it a problem that the code was geneared with
an older version of EMF, if so could you guide use to upgrade to the
latest EMF-Version provided by the target-platform?
Thanks a ton!
--
Frank
Am Mo., 18. Jan. 2021 um 09:50 Uhr schrieb Erdal Karaca
<erdal.karaca.de@xxxxxxxxx <mailto:erdal.karaca.de@xxxxxxxxx>>:
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 <mailto: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 <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
<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 <mailto:udig-dev@xxxxxxxxxxx>
To unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/udig-dev
<https://www.eclipse.org/mailman/listinfo/udig-dev>
_______________________________________________
udig-dev mailing list
udig-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/udig-dev