<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=iso-8859-1">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        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;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 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="FR" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">Hi all,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">When trying to generate C# classes from the VRT schema provided with GDAL (gdalvrt.xsd), I came accross a known issue with XSD that doesn’t map the xs:nonNegativeInteger type to a native integer type, but instead maps
 it to a string.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">See this question for the rationale : <a href="https://stackoverflow.com/questions/9616040/why-does-xsd-exe-generate-string-property-for-xsinteger">
https://stackoverflow.com/questions/9616040/why-does-xsd-exe-generate-string-property-for-xsinteger</a><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">To summarize, since nonNegativeInteger is unbounded, it is not possible to map it to a (bounded) native type (such as Uint32). Ironically, the VRT schema defines a custom type named “nonNegativeInteger32” that should
 exactly map to Uint32, but since it inherits from nonNegativeInteger, it still maps to a string.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">My question is : would it be acceptable to modify the VRT schema to replace the unbounded integer types by appropriate bounded types (xs:int, xs:long, xs:unsignedInt, etc.), or would it break existing behaviour ?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">See <a href="https://www.w3schools.com/xml/schema_dtypes_numeric.asp">
https://www.w3schools.com/xml/schema_dtypes_numeric.asp</a> for available XSD datatypes.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Sébastien<o:p></o:p></span></p>
</div>
<div style="margin-right:0px">
<p><span lang="EN-US" style="font-size:8.0pt; font-family:Calibri,Verdana,sans-serif; color:green">Please consider the environment before printing this email message.</span></p>
<hr>
<p><span lang="FR-FR" style="font-size:10.0pt; font-family:Calibri,Verdana,sans-serif; color:#999999"><em>Ce courriel (incluant ses éventuelles pièces jointes) peut contenir des informations confidentielles et/ou protégées ou dont la diffusion est restreinte.
 Si vous avez reçu ce courriel par erreur, vous ne devez ni le copier, ni l'utiliser, ni en divulguer le contenu à quiconque. Merci d'en avertir immédiatement l'expéditeur et d'effacer ce courriel de votre système. Airbus DS Geo décline toute responsabilité
 en cas de corruptionpar virus, d'altération ou de falsification de ce courriel lors de sa transmission par voie électronique.</em></span></p>
<p><span lang="EN-US" style="font-size:10.0pt; font-family:Calibri,Verdana,sans-serif; color:#999999"><em>This email (including any attachments) may contain confidential and/or privileged information or information otherwise protected from disclosure. If you
 are not the intended recipient, please notify the sender immediately, do not copy this message or any attachments and do not use it for any purpose or disclose its content to any person, but delete this message and any attachments from your system. Airbus
 DS Geo disclaims any and all liability if this email transmission was virus corrupted, altered or falsified.</em></span></p>
<hr>
<p><span lang="FR-FR" style="font-size:10.0pt; font-family:Calibri,Verdana,sans-serif; color:gray"><em>Airbus DS Geo SA (325 089 589 RCS Toulouse) - Siege social: 5, rue des Satellites, 31400 Toulouse, France.</em></span></p>
</div>
</body>
</html>