Spillgebees.Transmodel.Generator
0.1.0
See the version list below for details.
dotnet tool install --global Spillgebees.Transmodel.Generator --version 0.1.0
dotnet new tool-manifest
dotnet tool install --local Spillgebees.Transmodel.Generator --version 0.1.0
#tool dotnet:?package=Spillgebees.Transmodel.Generator&version=0.1.0
nuke :add-package Spillgebees.Transmodel.Generator --version 0.1.0
Spillgebees.Transmodel.Generator
CLI tool for generating C# XML bindings from NeTEx (Network Timetable Exchange) and SIRI (Service Interface for Real-time Information) XSD schemas.
Downloads schemas from the official repositories and generates modern C# XML bindings. Downloaded schemas are cached locally so repeated runs don't hit GitHub.
Getting started
Install the tool globally:
dotnet tool install -g Spillgebees.Transmodel.Generator
NeTEx generation
Generate bindings for a specific NeTEx version tag:
transmodel-generator generate-netex --version v1.3.1 --output ./Generated --namespace MyApp.NeTEx
This downloads the NeTEx schemas and generates XML bindings with the following sub-namespaces:
| Sub-namespace | XML Namespace | Description |
|---|---|---|
MyApp.NeTEx.NeTEx |
http://www.netex.org.uk/netex |
NeTEx types |
MyApp.NeTEx.SIRI |
http://www.siri.org.uk/siri |
SIRI types (subset bundled with NeTEx) |
MyApp.NeTEx.GML |
http://www.opengis.net/gml/3.2 |
GML types (geographic markup) |
SIRI generation
Generate bindings for a specific SIRI version tag:
transmodel-generator generate-siri --version v2.2 --output ./Generated --namespace MyApp.SIRI
This downloads the SIRI schemas and generates XML bindings with the following sub-namespaces:
| Sub-namespace | XML Namespace | Description |
|---|---|---|
MyApp.SIRI.SIRI |
http://www.siri.org.uk/siri |
Core SIRI types |
MyApp.SIRI.IFOPT |
http://www.ifopt.org.uk/ifopt |
IFOPT types |
MyApp.SIRI.ACSB |
http://www.ifopt.org.uk/acsb |
Accessibility types |
MyApp.SIRI.DATEX2 |
http://datex2.eu/schema/2_0RC1/2_0 |
DATEX2 types |
MyApp.SIRI.WSDL |
http://wsdl.siri.org.uk |
WSDL/SOAP types |
MyApp.SIRI.GML |
http://www.opengis.net/gml/3.2 |
GML types (geographic markup) |
MyApp.SIRI.W3 |
http://www.w3.org/XML/1998/namespace |
W3 types |
Schema caching
Schemas are cached locally after the first download. Version tags and commit SHAs are immutable, so they are cached permanently. Branch refs are always re-downloaded.
The cache is stored in local app data:
- Linux:
~/.local/share/{netex,siri}-schemas/ - macOS:
~/Library/Application Support/{netex,siri}-schemas/ - Windows:
%LOCALAPPDATA%\{netex,siri}-schemas\
CLI reference
transmodel-generator generate-netex [options]
transmodel-generator generate-siri [options]
Options:
-v, --version <version> Schema version tag (default: v1.3.1 for NeTEx, v2.2 for SIRI)
--ref <ref> Git ref (branch or commit SHA), mutually exclusive with --version
-o, --output <output> Output directory for generated C# files (default: ./Generated)
-n, --namespace <namespace> Root C# namespace (default: NeTEx.Models / SIRI.Models)
--clean Delete output directory before generating
--verbose Enable verbose logging
transmodel-generator list-netex-versions List available NeTEx version tags
transmodel-generator list-siri-versions List available SIRI version tags
Pre-generated models
If you don't need custom generation, use the pre-generated packages instead:
NeTEx
SIRI
| SIRI version | Package | NuGet |
|---|---|---|
| v2.1 | Spillgebees.SIRI.Models.V2_1 |
|
| v2.2 | Spillgebees.SIRI.Models.V2_2 |
|
| All versions | Spillgebees.SIRI.Models |
License
EUPL-1.2. The NeTEx schemas are licensed under GPL-3.0 by CEN. The SIRI schemas are published by CEN on the SIRI-CEN/SIRI repository without an explicit open-source license.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
This package has no dependencies.