[gdal-dev] VRT schema integer types serialization
GUIMMARA, Sébastien (External) [FR]
sebastien.guimmara.external at airbus.com
Fri Aug 24 00:52:04 PDT 2018
Hi all,
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.
See this question for the rationale : https://stackoverflow.com/questions/9616040/why-does-xsd-exe-generate-string-property-for-xsinteger
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.
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 ?
See https://www.w3schools.com/xml/schema_dtypes_numeric.asp for available XSD datatypes.
Sébastien
Please consider the environment before printing this email message.
________________________________
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.
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.
________________________________
Airbus DS Geo SA (325 089 589 RCS Toulouse) - Siege social: 5, rue des Satellites, 31400 Toulouse, France.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20180824/a17cea5f/attachment.html>
More information about the gdal-dev
mailing list