<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Vorformatiert Zchn";
        margin:0cm;
        font-size:10.0pt;
        font-family:"Courier New";}
span.HTMLVorformatiertZchn
        {mso-style-name:"HTML Vorformatiert Zchn";
        mso-style-priority:99;
        mso-style-link:"HTML Vorformatiert";
        font-family:Consolas;
        mso-fareast-language:EN-US;}
span.E-MailFormatvorlage21
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="DE" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">Even,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Thanks – also for the additional background info!<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Johannes  <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="mso-fareast-language:DE">Von:</span></b><span style="mso-fareast-language:DE"> Even Rouault <even.rouault@spatialys.com>
<br>
<b>Gesendet:</b> Dienstag, 15. </span><span lang="EN-US" style="mso-fareast-language:DE">November 2022 13:27<br>
<b>An:</b> Johannes Echterhoff <echterhoff@interactive-instruments.de>; gdal-dev@lists.osgeo.org<br>
<b>Betreff:</b> Re: [gdal-dev] GML driver - gml:xlink resolving - just embedding?<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p><span lang="EN-US">Johannes,<o:p></o:p></span></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span lang="EN-US"> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Does resolving of xlink:href by the GML driver (when GML_SKIP_RESOLVE_ELEMS is used, i.e., set to NONE or HUGE) simply mean that the referenced resource is copied into the XML element that contains the xlink:href XML
 attribute? Tests seem to support this, but I’d really like to double-check on this list.
<o:p></o:p></span></p>
</blockquote>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:DE">Yes, that's my recollection of how it works.<br>
<br>
<o:p></o:p></span></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span lang="EN-US"> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">My somewhat naive assumption was that if the reference pointed to another GML object, then that would be recognized somehow (though the exact “how” is probably the issue; document-internal reference via @gml:id could
 work, but not an external reference), and duplication of objects avoided. The resolving also seems to remove the xlink:href attributes for resolved references, and the gml:id attributes on the elements that are copied into the main GML file. That, in fact,
 creates duplicate objects in my test case.<o:p></o:p></span></p>
</blockquote>
<p><span lang="EN-US">Complex GML is a pain to deal with and the "classic" GML driver is close its maximum potential. I believe the GML_SKIP_RESOLVE_ELEMS feature was mostly used to deal with geometry elements (like part of a boundary being used in different
 geometries, in particular use of GML topology elements), for which the current copy&paste strategy is fine to reconstruct a simple feature geometry. When xlink:href points at objects/features, then the ideal strategy is indeed much harder to define.<o:p></o:p></span></p>
<p><span lang="EN-US">For anything advanced, using GMLAS (</span><a href="https://gdal.org/drivers/vector/gmlas.html#vector-gmlas"><span lang="EN-US">https://gdal.org/drivers/vector/gmlas.html#vector-gmlas</span></a><span lang="EN-US">) is suggested. I won't
 say recommended to avoid people complaining that  it goes to the other extreme of returning an output that is (supposed to be) fully lossless regarding the original content but hard to comprehend.<o:p></o:p></span></p>
<p><span lang="EN-US">Even<o:p></o:p></span></p>
<pre><span lang="EN-US">-- <o:p></o:p></span></pre>
<pre><a href="http://www.spatialys.com"><span lang="EN-US">http://www.spatialys.com</span></a><span lang="EN-US"><o:p></o:p></span></pre>
<pre><span lang="EN-US">My software is free, but my time generally not.<o:p></o:p></span></pre>
</div>
</body>
</html>