Generate c# code from Siri.xsd

205 views
Skip to first unread message

Henrik Stromberg

unread,
Sep 17, 2020, 10:43:37 AM9/17/20
to SIRI Developers
Hi I´m trying to generate c# from siri.xsd but the tool fails.

I have downloaded the version 2.0 from here https://www.vdv.de/siri.aspx

Im using Visual studio developer consol and run the command xsd /c "siri.xsd"

But i always fails with this error:

Warning: Schema could not be validated. Class generation may fail or may produce incorrect results.

Error: Error generating classes for schema 'C:\Users\henrik\Downloads\siri-java-model-master\siri-java-model-master\src\main\resources\siri-2_0\xsd\siri'.

Have anyone a solution to this or know what xsd file I should use.

Best regards Henrik


Henrik Stromberg

unread,
Sep 18, 2020, 2:53:22 AM9/18/20
to SIRI Developers
I found out how to generate the code.

Open the Developer powershell for VS 2019 console and run the command below to generate the code

 
 xsd /n:SIRI acsb\acsb_accessibility-v0.3.xsd acsb\acsb_all-v0.3.xsd acsb\acsb_limitations-v0.2.xsd acsb\acsb_passengerMobility-v0.3.xsd datex2\DATEXIISchema_1_0_1_0.xsd ifopt\ifopt_administration-v0.3.xsd ifopt\ifopt_allStopPlace-v0.3.xsd ifopt\ifopt_checkpoint-v0.3.xsd ifopt\ifopt_countries-v0.2.xsd ifopt\ifopt_equipment-v0.3.xsd ifopt\ifopt_location-v0.3.xsd ifopt\ifopt_modes-v0.2.xsd ifopt\ifopt_modification-v0.3.xsd ifopt\ifopt_path-v0.2.xsd ifopt\ifopt_stop-v0.3.xsd ifopt\ifopt_time-v0.2.xsd ifopt\ifopt_types-v0.2.xsd datex2\DATEXIISchema_2_0RC1_2_0.xsd xml\xml.xsd siri.xsd   /classes
 

Christophe Duquesne

unread,
Sep 18, 2020, 11:39:00 AM9/18/20
to SIRI Developers
As a complement, the latest SIRI XSD is available from Github https://github.com/SIRI-CEN/SIRI

We are also setting up a support organisation (Data4PT) who will be fully operation very soon (a few weeks...) to provide support (for free if not too much or too specific) on SIRI, NeTEx and Transmodel implementations.

Cordialement
Reply all
Reply to author
Forward
0 new messages