diff --git a/docs/02_basic_concepts.md b/docs/02_basic_concepts.md
index 79f90b0..e3fd51b 100644
--- a/docs/02_basic_concepts.md
+++ b/docs/02_basic_concepts.md
@@ -1,3 +1,6 @@
+---
+mermaid: true
+---
# Basic concepts in NeTEx
NeTEx can support multiple use cases. Here we talk about the Swiss timetable delivery.
diff --git a/docs/05_frames.md b/docs/05_frames.md
index 36104e2..9e9864c 100644
--- a/docs/05_frames.md
+++ b/docs/05_frames.md
@@ -15,12 +15,12 @@ In addition to linking to the NeTEx XML schema, this element is used to specify
participant's identifier.
### Table
-- [Swiss profile tables](../generated/markdown-examples/PublicationDelivery.md)
+- [Swiss profile tables](../site/tables/PublicationDelivery.md)
*→ [Original NeTEx table](../generated/netex-html/PublicationDelivery.html)*
### Example
-- [XML Snippet](../generated/xml-snippets/PublicationDelivery.xml)
+- [XML Snippet](../site/xml-snippets/PublicationDelivery.xml)
*→ [Template](../templates/PublicationDelivery.xml)*
@@ -60,12 +60,12 @@ The `CompositeFrame` is the container for the `FrameDefaults` and the other fram
appearing in this order.
### Table
-- [Swiss profile NeTEx definition](../generated/markdown-examples/CompositeFrame.md)
+- [Swiss profile NeTEx definition](../site/tables/CompositeFrame.md)
*→ [General NeTEx definition](../generated/netex-html/CompositeFrame.html)*
### Example
-- [Example snippet](../generated/xml-snippets/CompositeFrame.xml)
+- [Example snippet](../site/xml-snippets/CompositeFrame.xml)
*→ [Template](../templates/CompositeFrame.xml)*
diff --git a/docs/06_stops.md b/docs/06_stops.md
index 3e9cd83..927ff6c 100644
--- a/docs/06_stops.md
+++ b/docs/06_stops.md
@@ -51,12 +51,12 @@ classDiagram
- Not currently modelled: entrances, levels, equipments, paths, accessibility properties, points of interest
### Table
-- [Swiss profile NeTEx definition](../generated/markdown-examples/SiteFrame.md)
+- [Swiss profile NeTEx definition](../site/tables/SiteFrame.md)
*→ [General NeTEx definition ](../generated/netex-html/SiteFrame.html)*
### Example
-- [Example snippet](../generated/xml-snippets/SiteFrame.xml)
+- [Example snippet](../site/xml-snippets/SiteFrame.xml)
*→ [Template](../templates/SiteFrame.xml)*
@@ -72,12 +72,12 @@ Note that a `StopPlace` is a distinct concept from the representation of the sto
### Table
-- [Swiss profile NeTEx definition](../generated/markdown-examples/StopPlace.md)
+- [Swiss profile NeTEx definition](../site/tables/StopPlace.md)
*→ [General NeTEx definition ](../generated/netex-html/StopPlace.html)*
### Example
-- [Example snippet](../generated/xml-snippets/StopPlace.xml)
+- [Example snippet](../site/xml-snippets/StopPlace.xml)
*→ [Template](../templates/StopPlace.xml)*
@@ -95,14 +95,13 @@ Note that a `StopPlace` is a distinct concept from the representation of the sto
### Purpose
A specific boarding or alighting position (platform, stand, bay) within a `StopPlace` where passengers physically meet vehicles.
-
### Table
-- [Swiss profile NeTEx definition](../generated/markdown-examples/Quay.md)
+- [Swiss profile NeTEx definition](../site/tables/Quai.md)
*→ [General NeTEx definition ](../generated/netex-html/StopPlace.html)*
### Example
-- [Example snippet](../generated/xml-snippets/StopPlace.xml)
+- [Example snippet](../site/xml-snippets/StopPlace.xml)
*→ [Template](../templates/StopPlace.xml)*
@@ -147,13 +146,13 @@ A named geographic area such as a city, municipality, county, or region - used t
### Table
-- [Swiss profile NeTEx definition](../generated/markdown-examples/TopographicPlace.md)
+- [Swiss profile NeTEx definition](../site/tables/TopographicPlace.md)
*→ [General NeTEx definition ](../generated/netex-html/TopographicPlace.html)*
### Example
-- [Example snippet](../generated/xml-snippets/TopographicPlace.xml)
+- [Example snippet](../site/xml-snippets/TopographicPlace.xml)
*→ [Template](../templates/TopographicPlace.xml)*
@@ -168,12 +167,12 @@ A named geographic area such as a city, municipality, county, or region - used t
It provides precise geographic coordinates (WGS84) of a central reference point representing a single point or an area such as a `Quay`or a `StopPlace`.
### Table
-- [Swiss profile NeTEx definition](../generated/markdown-examples/Centroid.md)
+- [Swiss profile NeTEx definition](../site/tables/Centroid.md)
*→ [General NeTEx definition ](../generated/netex-html/Centroid.html)*
### Example
-- [Example snippet](../generated/xml-snippets/Centroid.xml)
+- [Example snippet](../site/xml-snippets/Centroid.xml)
*→ [Template](../templates/Centroid.xml)*
diff --git a/docs/07_service.md b/docs/07_service.md
index 8c7fb65..2826ace 100644
--- a/docs/07_service.md
+++ b/docs/07_service.md
@@ -100,12 +100,12 @@ Other important classes of the `ServiceFrame` include:
- `Notice`s which are then assigned to `Journey` and `Passingtime` of the `TimetableFrame` through `NoticeAssignment`s. They model the association of footnotes and passenger information content such as stop announcements and the network.
### Table
-- [Swiss profile NeTEx definition](../generated/markdown-examples/ServiceFrame.md)
+- [Swiss profile NeTEx definition](../site/tables/ServiceFrame.md)
*→ [General NeTEx definition ](../generated/netex-html/ServiceFrame.html)*
### Example
-- [Example snippet](../generated/xml-snippets/ServiceFrame.xml)
+- [Example snippet](../site/xml-snippets/ServiceFrame.xml)
*→ [Template](../templates/ServiceFrame.xml)*
@@ -125,13 +125,13 @@ This means that the old two defined dirctions `ch:1:Direction:H` and `ch:1:Direc
A public transport service line, representing a marketed route with a `Name`, `TransportMode`, and `Operator`.
### Table
-- [Swiss profile NeTEx definition](../generated/markdown-examples/Line.md)
+- [Swiss profile NeTEx definition](../site/tables/Line.md)
*-> [General NeTEx definition](../generated/netex-html/Line.html)*
### Example
-- [Example snippet](../generated/xml-snippets/Line.xml)
+- [Example snippet](../site/xml-snippets/Line.xml)
*->[Template](../templates/Line.xml)*
@@ -153,13 +153,13 @@ A public transport service line, representing a marketed route with a `Name`, `T
Showing the destination of a `ServiceJourney`. The text shown on the front or side of a public transport vehicle to indicate its destination, including via-points and variant labels.
### Table
-- [Swiss profile NeTEx definition](../generated/markdown-examples/DestinationDisplay.md)
+- [Swiss profile NeTEx definition](../site/tables/DestinationDisplay.md)
*-> [General NeTEx definition](../generated/netex-html/DestinationDisplay.html)*
### Example
-- [Example snippet](../generated/xml-snippets/DestinationDisplay.xml)
+- [Example snippet](../site/xml-snippets/DestinationDisplay.xml)
*->[Template](../templates/DestinationDisplay.xml)*
@@ -183,13 +183,13 @@ A `ScheduledStopPoint` can represent two types of stop points:
### Table
-- [Swiss profile NeTEx definition](../generated/markdown-examples/ScheduledStopPoint.md)
+- [Swiss profile NeTEx definition](../site/tables/ScheduledStopPoint.md)
*-> [General NeTEx definition](../generated/netex-html/ScheduledStopPoint.html)*
### Example
-- [Example snippet](../generated/xml-snippets/ScheduledStopPoint.xml)
+- [Example snippet](../site/xml-snippets/ScheduledStopPoint.xml)
*->[Template](../templates/ScheduledStopPoint.xml)*
@@ -206,13 +206,13 @@ A `ScheduledStopPoint` can represent two types of stop points:
- A `ScheduledStopPoint` in a `ServiceJourneyPattern` is linked to a `Quay` for arrival and departure.
### Table
-- [Swiss profile NeTEx definition](../generated/markdown-examples/PassengerStopAssignment.md)
+- [Swiss profile NeTEx definition](../site/tables/PassengerStopAssignment.md)
*-> [General NeTEx definition](../generated/netex-html/PassengerStopAssignment.html)*
### Example
-- [Example snippet](../generated/xml-snippets/PassengerStopAssignment.xml)
+- [Example snippet](../site/xml-snippets/PassengerStopAssignment.xml)
*->[Template](../templates/PassengerStopAssignment.xml)*
@@ -237,13 +237,13 @@ https://github.com/openTdataCH/netexRealisationGuideSwitzerland/issues/82
### Table
-- [Swiss profile NeTEx definition](../generated/markdown-examples/DefaultConnection.md)
+- [Swiss profile NeTEx definition](../site/tables/DefaultConnection.md)
*-> [General NeTEx definition](../generated/netex-html/DefaultConnection.html)*
### Example
-- [Example snippet](../generated/xml-snippets/DefaultConnection.xml)
+- [Example snippet](../site/xml-snippets/DefaultConnection.xml)
*->[Template](../templates/DefaultConnection.xml)*
@@ -261,13 +261,13 @@ https://github.com/openTdataCH/netexRealisationGuideSwitzerland/issues/82
### Table
-- [Swiss profile NeTEx definition](../generated/markdown-examples/SiteConnection.md)
+- [Swiss profile NeTEx definition](../site/tables/SiteConnection.md)
*-> [General NeTEx definition](../generated/netex-html/SiteConnection.html)*
### Example
-- [Example snippet](../generated/xml-snippets/SiteConnection.xml)
+- [Example snippet](../site/xml-snippets/SiteConnection.xml)
*->[Template](../templates/SiteConnection.xml)*
@@ -312,13 +312,13 @@ For more details see the [use case on transfers](uc03_transfers.md).
### Table
-- [Swiss profile NeTEx definition](../generated/markdown-examples/ServiceJourneyPattern.md)
+- [Swiss profile NeTEx definition](../site/tables/ServiceJourneyPattern.md)
*-> [General NeTEx definition](../generated/netex-html/ServiceJourneyPattern.html)*
### Example
-- [Example snippet](../generated/xml-snippets/ServiceJourneyPattern.xml)
+- [Example snippet](../site/xml-snippets/ServiceJourneyPattern.xml)
*->[Template](../templates/ServiceJourneyPattern.xml)*
@@ -359,13 +359,13 @@ Informational or regulatory text associated with public transport services, disp
### Table
-- [Swiss profile NeTEx definition](../generated/markdown-examples/Notice.md)
+- [Swiss profile NeTEx definition](../site/tables/Notice.md)
*-> [General NeTEx definition](../generated/netex-html/Notice.html)*
### Example
-- [Example snippet](../generated/xml-snippets/Notice.xml)
+- [Example snippet](../site/xml-snippets/Notice.xml)
*->[Template](../templates/Notice.xml)*
@@ -381,13 +381,13 @@ Notice elements should only be used to convey information which cannot be transp
Assign a `Notice` to an element.
### Table
-- [Swiss profile NeTEx definition](../generated/markdown-examples/NoticeAssignment.md)
+- [Swiss profile NeTEx definition](../site/tables/NoticeAssignment.md)
*-> [General NeTEx definition](../generated/netex-html/NoticeAssignment.html)*
### Example
-- [Example snippet](../generated/xml-snippets/NoticeAssignment.xml)
+- [Example snippet](../site/xml-snippets/NoticeAssignment.xml)
*->[Template](../templates/NoticeAssignment.xml)*
diff --git a/docs/08_service_calendars.md b/docs/08_service_calendars.md
index acd206c..a15b38e 100644
--- a/docs/08_service_calendars.md
+++ b/docs/08_service_calendars.md
@@ -88,12 +88,12 @@ classDiagram
```
#### Table
-- [Swiss profile NeTEx definition](../generated/markdown-examples/ServiceCalendarFrame.md)
+- [Swiss profile NeTEx definition](../site/tables/ServiceCalendarFrame.md)
*→ [General NeTEx definition](../generated/netex-html/ServiceCalendarFrame.html)*
#### Example
-- [Example snippet](../generated/xml-snippets/ServiceCalendarFrame.xml)
+- [Example snippet](../site/xml-snippets/ServiceCalendarFrame.xml)
*→ [Template](../templates/ServiceCalendarFrame.xml)*
@@ -107,12 +107,12 @@ classDiagram
Temporal availability in terms of `Date`s, `Timeband`s, `ValidDayBits`.
#### Table
--[Swiss profile NeTEx definition](../generated/markdown-examples/AvailabilityCondition.md)
+-[Swiss profile NeTEx definition](../site/tables/AvailabilityCondition.md)
*→ [General NeTEx definition](../generated/netex-html/AvailabilityCondition.html)*
#### Example
-- [Example snippet](../generated/xml-snippets/AvailabilityCondition.xml)
+- [Example snippet](../site/xml-snippets/AvailabilityCondition.xml)
*→ [Template](../templates/AvailabilityCondition.xml)*
@@ -136,12 +136,12 @@ Temporal availability in terms of `Date`s, `Timeband`s, `ValidDayBits`.
Long-term planning uses calendar days that are classified as specific DayTypes (example: weekday in school holidays). A ServiceCalendar defines a mapping between DayTypes and OperatingDays.
#### Table
-- [Swiss profile NeTEx definition](../generated/markdown-examples/ServiceCalendar.md)
+- [Swiss profile NeTEx definition](../site/tables/ServiceCalendar.md)
*→ [General NeTEx definition](../generated/netex-html/ServiceCalendar.html)*
#### Example
-- [Example snippet](../generated/xml-snippets/ServiceCalendar.xml)
+- [Example snippet](../site/xml-snippets/ServiceCalendar.xml)
*→ [Template](../templates/ServiceCalendar.xml)*
@@ -157,12 +157,12 @@ A classification of days on which a specific set of transport services operates
#### Table
-- [Swiss profile NeTEx definition](../generated/markdown-examples/DayType.md)
+- [Swiss profile NeTEx definition](../site/tables/DayType.md)
*→ [General NeTEx definition](../generated/netex-html/DayType.html)*
#### Example
-- [Example snippet](../generated/xml-snippets/DayType.xml)
+- [Example snippet](../site/xml-snippets/DayType.xml)
*→ [Template](../templates/DayType.xml)*
@@ -177,12 +177,12 @@ A period of time within a day, usually defined by a start and end time.
#### Table
-- [Swiss profile NeTEx definition](../generated/markdown-examples/Timeband.md)
+- [Swiss profile NeTEx definition](../site/tables/Timeband.md)
*→ [General NeTEx definition](../generated/netex-html/Timeband.html)*
#### Example
-- [Example snippet](../generated/xml-snippets/Timeband.xml)
+- [Example snippet](../site/xml-snippets/Timeband.xml)
*→ [Template](../templates/Timeband.xml)*
@@ -202,12 +202,12 @@ This assignment overrides the `DayType` specified for the day in the overall pla
#### Table
-- [Swiss profile NeTEx definition](../generated/markdown-examples/DayTypeAssignment.md)
+- [Swiss profile NeTEx definition](../site/tables/DayTypeAssignment.md)
*→ [General NeTEx definition](../generated/netex-html/DayTypeAssignment.html)*
#### Example
-[Example snippet](../generated/xml-snippets/DayTypeAssignment.xml)
+[Example snippet](../site/xml-snippets/DayTypeAssignment.xml)
*→ [Template](../templates/DayTypeAssignment.xml)*
diff --git a/docs/09_timetable.md b/docs/09_timetable.md
index e6ac79a..da92c4a 100644
--- a/docs/09_timetable.md
+++ b/docs/09_timetable.md
@@ -40,12 +40,12 @@ A `TimetableFrame` contains the operational journey definitions — the actual t
### Table
-- [Swiss profile NeTEx definition](../generated/markdown-examples/TimetableFrame.md)
+- [Swiss profile NeTEx definition](../site/tables/TimetableFrame.md)
*→ [General NeTEx definition ](../generated/netex-html/TimetableFrame.html)*
### Example
-- [Example snippet](../generated/xml-snippets/TimetableFrame.xml)
+- [Example snippet](../site/xml-snippets/TimetableFrame.xml)
*→ [Template](../templates/TimetableFrame.xml)*
@@ -59,12 +59,12 @@ A `TimetableFrame` contains the operational journey definitions — the actual t
A `ServiceJourney` represents a planned trip in the timetable operating on a recurring schedule. It defines the stop sequence via reference to a `JourneyPattern`, includes scheduled passing times, and specifies operational details such as operator and days of operation. Unlike `DatedServiceJourney`, which represents a concrete instance on a specific date, `ServiceJourney` is the reusable template used across multiple dates via `DayType` definitions
### Table
-- [Swiss profile NeTEx definition](../generated/markdown-examples/ServiceJourney.md)
+- [Swiss profile NeTEx definition](../site/tables/ServiceJourney.md)
*→ [General NeTEx definition ](../generated/netex-html/ServiceJourney.html)*
### Example
-- [Example snippet](../generated/xml-snippets/ServiceJourney.xml)
+- [Example snippet](../site/xml-snippets/ServiceJourney.xml)
*→ [Template](../templates/ServiceJourney.xml)*
@@ -88,12 +88,12 @@ A `TemplateServiceJourney` represents a sequence of planned trips. It is similar
A frequency is specified in a `HeadwayJourneyGroup` (e.g. every 20 minutes). The `TemplateServiceJourney` may thus represent multiple journeys or it could be used simply as a template for adding extra date journeys after the planning phase.
### Table
-- [Swiss profile NeTEx definition](../generated/markdown-examples/TemplateServiceJourney.md)
+- [Swiss profile NeTEx definition](../site/tables/TemplateServiceJourney.md)
*→ [General NeTEx definition ](../generated/netex-html/TemplateServiceJourney.html)*
### Example
-- [Example snippet](../generated/xml-snippets/TemplateServiceJourney.xml)
+- [Example snippet](../site/xml-snippets/TemplateServiceJourney.xml)
*→ [Template](../templates/TemplateServiceJourney.xml)*
@@ -110,12 +110,12 @@ A frequency is specified in a `HeadwayJourneyGroup` (e.g. every 20 minutes). The
`OccupancyView`can be used on the `Journey`, `JourneyPart`, and `TimetabledPassingTime` elements. Used for predicted and planned occupancies of vehicles.
### Table
-- [Swiss profile NeTEx definition](../generated/markdown-examples/OccupancyView.md)
+- [Swiss profile NeTEx definition](../site/tables/OccupancyView.md)
*→ [General NeTEx definition ](../generated/netex-html/OccupancyView.html)*
### Example
-- [Example snippet](../generated/xml-snippets/OccupancyView.xml)
+- [Example snippet](../site/xml-snippets/OccupancyView.xml)
*→ [Template](../templates/OccupancyView.xml)*
@@ -131,12 +131,12 @@ We currently don't use OccupancyView.
Codes assigned to particular journeys (`ServiceJourney`, `TemplateServiceJourney`) when operated by trains. `ServiceJourney`s can in principle have multiple different `TrainNumber`s whereas a `JourneyPart` can only reference a single one.
### Table
-- [Swiss profile NeTEx definition](../generated/markdown-examples/TrainNumber.md)
+- [Swiss profile NeTEx definition](../site/tables/TrainNumber.md)
*→ [General NeTEx definition ](../generated/netex-html/TrainNumber.html)*
### Example
-- [Example snippet](../generated/xml-snippets/TrainNumber.xml)
+- [Example snippet](../site/xml-snippets/TrainNumber.xml)
*→ [Template](../templates/TrainNumber.xml)*
@@ -150,12 +150,12 @@ Codes assigned to particular journeys (`ServiceJourney`, `TemplateServiceJourney
`TypeOfService` indicates the purpose of a `ServiceJourney`, for example, whether if it is a passenger transport or a garage run-in. We only use `ch:1:TypeOfService:1`
### Table
-- [Swiss profile NeTEx definition](../generated/markdown-examples/TypeOfService.md)
+- [Swiss profile NeTEx definition](../site/tables/TypeOfService.md)
*→ [General NeTEx definition](../generated/netex-html/TypeOfService.html)*
### Example
-- [XML Snippet](../generated/xml-snippets/TypeOfService.xml)
+- [XML Snippet](../site/xml-snippets/TypeOfService.xml)
*→ - [Template](../templates/TypeOfService.xml)*
@@ -183,12 +183,12 @@ Actually there is only one allowed value that we use in the Swiss profile: Only
Long-term planned time data concerning public transport vehicles passing a particular `PointInJourneyPattern` on a specified vehicle journey for a certain `DayType`.
### Table
-- [Swiss profile NeTEx definition](../generated/markdown-examples/TimetabledPassingTime.md)
+- [Swiss profile NeTEx definition](../site/tables/TimetabledPassingTime.md)
*→ [General NeTEx definition ](../generated/netex-html/TimetabledPassingTime.html)*
### Example
-- [Example snippet](../generated/xml-snippets/TimetabledPassingTime.xml)
+- [Example snippet](../site/xml-snippets/TimetabledPassingTime.xml)
*→ [Template](../templates/TimetabledPassingTime.xml)*
@@ -211,7 +211,8 @@ The standard states: "In some cases, a SERVICE JOURNEY INTERCHANGE expresses an
`StaySeated=true` should be used for through-services (Durchbindung) and joining (Vereinigung). While splitting (Flügelzug) technically involves different vehicle parts, the passenger does not leave the train — however, they may need to move to the correct coach. For splitting, `StaySeated=false` combined with `ChangeWithinVehicle=true` is therefore the correct modelling. See [uc02 Joining and splitting](uc02_joining_splitting.md).
### Table
-- [Swiss profile NeTEx definition](../generated/markdown-examples/ServiceJourneyInterchange.md)
+
+- [Swiss profile NeTEx definition](../site/tables/ServiceJourneyInterchange.md)
*→ [General NeTEx definition ](../generated/netex-html/ServiceJourneyInterchange.html)*
@@ -253,3 +254,4 @@ The standard states: "In some cases, a SERVICE JOURNEY INTERCHANGE expresses an
## ServiceFacilitySet
*→ [see Common elements](./10_common.md#servicefacilityset)*
+
diff --git a/docs/10_common.md b/docs/10_common.md
index e29f9e0..04d26cc 100644
--- a/docs/10_common.md
+++ b/docs/10_common.md
@@ -90,13 +90,13 @@ If a `ServiceJourney` (in a particular `Call`) runs over midnight, then `DayOffs
Holds default values for certain basic parameters.
### Table
-- [Swiss profile NeTEx definition](../generated/markdown-examples/FrameDefaults.md)
+- [Swiss profile NeTEx definition](../site/tables/FrameDefaults.md)
*→ [General NeTEx definition](../generated/netex-html/FrameDefaults.html)*
### Example
-- [XML Snippet](../generated/xml-snippets/FrameDefaults.xml)
+- [XML Snippet](../site/xml-snippets/FrameDefaults.xml)
*→ [Template](../templates/FrameDefaults.xml)*
@@ -115,12 +115,12 @@ a `StopPlace` or `Organisation`.
For all other alternative texts use `AlternativeText`.
### Table
-- [Swiss profile NeTEx definition](../generated/markdown-examples/AlternativeName.md)
+- [Swiss profile NeTEx definition](../site/tables/AlternativeName.md)
*→ - [General NeTEx definition](../generated/netex-html/AlternativeName.html)*
### Example
-- [XML Snippet](../generated/xml-snippets/AlternativeName.xml)
+- [XML Snippet](../site/xml-snippets/AlternativeName.xml)
*→ - [Template](../templates/AlternativeName.xml)*
@@ -141,12 +141,12 @@ The `AlternativeText` is a generic way to provide an alternative text (translati
### Table
-- [Swiss profile NeTEx definition](../generated/markdown-examples/AlternativeText.md)
+- [Swiss profile NeTEx definition](../site/tables/AlternativeText.md)
*→ - [General NeTEx definition](../generated/netex-html/AlternativeText.html)*
### Example
-- [XML Snippet](../generated/xml-snippets/AlternativeText.xml)
+- [XML Snippet](../site/xml-snippets/AlternativeText.xml)
*→ - [Template](../templates/AlternativeText.xml)*
@@ -182,12 +182,12 @@ See the following class diagram for the most important objects of the RESOURCE F
- SiteFacilitySet
## Table
-- [Swiss profile NeTEx definition](../generated/markdown-examples/ResourceFrame.md)
+- [Swiss profile NeTEx definition](../site/tables/ResourceFrame.md)
*→ - [General NeTEx definition](../generated/netex-html/ResourceFrame.html)*
## Example
-- [XML Snippet](../generated/xml-snippets/ResourceFrame.xml)
+- [XML Snippet](../site/xml-snippets/ResourceFrame.xml)
*→ - [Template](../templates/ResourceFrame.xml)*
@@ -211,12 +211,12 @@ We use this element to describe the different roles of the participating compan
| `Operation` | role of the **operator company** responsible for providing the transport service |
### Table
-- [Swiss profile NeTEx definition](../generated/markdown-examples/ResponsibilitySet.md)
+- [Swiss profile NeTEx definition](../site/tables/ResponsibilitySet.md)
*→ - [General NeTEx definition](../generated/netex-html/ResponsibilitySet.html)*
### Example
-- [XML Snippet](../generated/xml-snippets/ResponsibilitySet.xml)
+- [XML Snippet](../site/xml-snippets/ResponsibilitySet.xml)
*→ - [Template](../templates/ResponsibilitySet.xml)*
@@ -282,13 +282,13 @@ For the ServiceJourneys exclusively provided in Switzerland, only the ProductCat
For ServiceJourneys provided in other countries or partially in Switzerland, there are no restrictions, provided that the category does not overlap with the ProductCategories defined for Switzerland.
### Table
-- [Swiss profile NeTEx definition](../generated/markdown-examples/TypeOfProductCategory.md)
+- [Swiss profile NeTEx definition](../site/tables/TypeOfProductCategory.md)
*→ [General NeTEx definition](../generated/netex-html/TypeOfProductCategory.html)*
### Example
-- [XML Snippet](../generated/xml-snippets/TypeOfProductCategory.xml)
+- [XML Snippet](../site/xml-snippets/TypeOfProductCategory.xml)
*→ [Template](../templates/TypeOfProductCategory.xml)*
@@ -305,12 +305,12 @@ A legally incorporated body associated with any aspect of public transportation.
### Table
-- [Swiss profile NeTEx definition](../generated/markdown-examples/Operator.md)
+- [Swiss profile NeTEx definition](../site/tables/Operator.md)
*→ [General NeTEx definition](../generated/netex-html/Operator.html)*
### Example
-- [XML Snippet](../generated/xml-snippets/Operator.xml)
+- [XML Snippet](../site/xml-snippets/Operator.xml)
*→ - [Template](../templates/Operator.xml)*
@@ -331,12 +331,12 @@ a different `OperatorRef`.
Set of `Facilitiy`s available for a `ServiceJourney` or a `JourneyPart`.
### Table
-- [Swiss profile NeTEx definition](../generated/markdown-examples/ServiceFacilitySet.md)
+- [Swiss profile NeTEx definition](../site/tables/ServiceFacilitySet.md)
*→ [General NeTEx definition](../generated/netex-html/ServiceFacilitySet.html)*
### Example
-- [XML Snippet](../generated/xml-snippets/ServiceFacilitySet.xml)
+- [XML Snippet](../site/xml-snippets/ServiceFacilitySet.xml)
*→ - [Template](../templates/ServiceFacilitySet.xml)*
@@ -374,12 +374,12 @@ A `SiteFacilitySet` defines a set of facilities like sanitary facilities, ticket
referenced to define facilities of a site.
### Table
-- [Swiss profile NeTEx definition](../generated/markdown-examples/SiteFacilitySet.md)
+- [Swiss profile NeTEx definition](../site/tables/SiteFacilitySet.md)
*→ [General NeTEx definition](../generated/netex-html/SiteFacilitySet.html)*
### Example
-- [XML Snippet](../generated/xml-snippets/SiteFacilitySet.xml)
+- [XML Snippet](../site/xml-snippets/SiteFacilitySet.xml)
*→ - [Template](../templates/SiteFacilitySet.xml)*
diff --git a/docs/uc03_transfers.md b/docs/uc03_transfers.md
index d83dfa5..acb158a 100644
--- a/docs/uc03_transfers.md
+++ b/docs/uc03_transfers.md
@@ -22,7 +22,7 @@ Defines the default transfer time at a specific stop place, regardless of operat
**When to use:** When a particular stop place has a transfer time that differs from the network-wide default.
-- [Example](../generated/xml-snippets/DefaultConnection_UMSTEIGB.xml)
+- [Example](../site/xml-snippets/DefaultConnection_UMSTEIGB.xml)
>Note: If no StopPlaceRef is set, the DefaultConnection applies network-wide for the given mode combination. A separate DefaultConnection must be defined for each relevant mode pair.
@@ -35,18 +35,16 @@ Defines transfer times between two specific operators at a stop place. The HRDF
**When to use:** When the transfer time depends on the operator combination at a given stop place.
-- [Example](../generated/xml-snippets/DefaultConnection_UMSTEIGV.xml)
+- [Example](../site/xml-snippets/DefaultConnection_UMSTEIGV.xml)
## Line and Direction-oriented transfer times (UMSTEIGL)
Defines transfer times between specific `lines` and `directions` at a stop place. Journeys are specified indirectly via Line and Direction, not as an explicit journey pair. The ! marker in HRDF indicates a guaranteed connection.
> **TODO** Adrian we don't have Direction anymore. This should be solved by the PR.
-
**When to use:** When the transfer time applies to all journeys of a specific line/direction combination at a given stop place.
-- [Example](../generated/xml-snippets/ServiceJourneyInterchange_UMSTEIGL.xml)
-
+- [Example](../site/xml-snippets/ServiceJourneyInterchange_UMSTEIGL.xml)
## ServiceJourney related transfer times (UMSTEIGZ)
Defines transfer times between two specific `ServiceJourneys` at a given stop place. Unlike UMSTEIGL, journeys are referenced directly via `ServiceJourneyRef`. The ! marker in HRDF indicates a guaranteed connection; an optional `Verkehrstagebitfeldnummer` restricts validity to specific days.
@@ -68,11 +66,11 @@ The differences between the various situations are to be differentiated with the
| Transfer required | `false` | `false` / `true` | Passenger must change vehicles |
| Through-service (stay seated) | `true` | `true` | Passenger remains in vehicle → see [uc01_durchbindung](uc01_durchbindung.md) |
-- [Example](../generated/xml-snippets/ServiceJourneyInterchange_UMSTEIGZ.xml)
+- [Example](../site/xml-snippets/ServiceJourneyInterchange_UMSTEIGZ.xml)
## Transfer times between different StopPlaces (METABHF)
Describes the walking time between two adjacent `StopPlaces` (e.g. main station A → tram stop B). Used only in the master data file, not in timetable files.
**When to use:** When passengers need to transfer between two physically separate stop places.
-- [Example](../generated/xml-snippets/SiteConnection.xml)
+- [Example](../site/xml-snippets/SiteConnection.xml)
diff --git a/docs/uc13_changes_in_destination.md b/docs/uc13_changes_in_destination.md
index 3ca7d1a..48866dc 100644
--- a/docs/uc13_changes_in_destination.md
+++ b/docs/uc13_changes_in_destination.md
@@ -11,10 +11,10 @@ We will adhere to the following rules:
We could have a sort of progression rule, e.g. when at the third stop the destination display changes, keep it to the end. We want however, that from then on the `DestinationDisplayRef` is set. Otherwise it reverses to the one on the `ServiceJourneyPattern`
-
Conclusion:
* The `DestinationDisplay` are stored in `ServiceFrame`.
* The references for the whole `ServiceJourney` are stored in `ServiceJourney/Destination/DestinationDisplayRef`.
* If the destination changes on a given stop, it is mentionend in `ServiceJourneyPattern/pointsInJourneyPattern/StopPointInJourneyPattern/DestinationDisplayRef`.
All this is shown in one of the [examples](../examples/NeTEx_CH_BLS_Bern_Luzern_DestinationChange.xml).
+
diff --git a/jekyll/_includes/footer.html b/jekyll/_includes/footer.html
new file mode 100644
index 0000000..498753e
--- /dev/null
+++ b/jekyll/_includes/footer.html
@@ -0,0 +1,39 @@
+
+
+{%- if page.mermaid -%}
+ {%- include mermaid.html -%}
+{%- endif -%}
diff --git a/jekyll/_includes/mermaid.html b/jekyll/_includes/mermaid.html
new file mode 100644
index 0000000..00e08d9
--- /dev/null
+++ b/jekyll/_includes/mermaid.html
@@ -0,0 +1,10 @@
+
+
\ No newline at end of file
diff --git a/tools/configuration.py b/tools/configuration.py
index ca97766..cc1e8e4 100644
--- a/tools/configuration.py
+++ b/tools/configuration.py
@@ -13,5 +13,6 @@
# Generated documents
SITE_DIR = PROJECT_DIR.joinpath("../site")
SITE_TABLES_DIR = SITE_DIR.joinpath("tables")
+SITE_XML_SNIPPETS_DIR = SITE_DIR.joinpath("xml-snippets")
diff --git a/tools/expand_docs/expand_docs.py b/tools/expand_docs/expand_docs.py
index ae0d8cf..1d10bf0 100644
--- a/tools/expand_docs/expand_docs.py
+++ b/tools/expand_docs/expand_docs.py
@@ -6,7 +6,7 @@
import shutil
import argparse
import re
-from tools.configuration import DOCS_DIR, SITE_DIR
+from tools.configuration import DOCS_DIR, SITE_DIR, SITE_TABLES_DIR, SITE_XML_SNIPPETS_DIR
TABLE_MD_LINK_TARGET_PATTERN = re.compile(r'(\[.*])\((.*(\.)md).*\)')
TABLE_MD_LINK_TARGET_REPLACEMENT = r'\1(./tables/\2)'
@@ -20,29 +20,38 @@ def copy_media_folder(input_folder, output_folder):
shutil.copytree(media_src, media_dst, dirs_exist_ok=True)
-def include_xml_snippet(match, base_folder):
- """Include XML snippet content directly."""
- snippet_path = match.group(1)
+def include_xml_snippet(snippet_file_name: str, base_folder: str):
+ """
+ Include XML snippet content directly.
+
+ param: snippet_file_name: Snippet file name
+ param: base_folder: Path to the documents base folder
+
+ """
# Look for files in the main generated folder, not output folder
# The generated folder is at the root of the project
# base_folder is already the docs folder, so go up one level to project root
project_root = os.path.abspath(os.path.join(base_folder, '..'))
- full_path = os.path.join(project_root, 'generated', 'xml-snippets', snippet_path)
+ full_path = os.path.join(project_root, 'site', 'xml-snippets', snippet_file_name)
if os.path.exists(full_path):
with open(full_path, 'r', encoding='utf-8') as f:
return f"```xml\n{f.read()}\n```"
- return match.group(0)
+ return snippet_file_name
+def include_markdown_table(table_file_name: str, base_folder: str):
+ """
+ Include markdown table content directly.
+
+ param: table_file_name: Path to the markdown table file
+ param: base_folder: Path to the documents base folder
+ """
-def include_markdown_table(match, base_folder):
- """Include markdown table content directly."""
- table_path = match.group(1)
# Look for files in the main generated folder, not output folder
# The generated folder is at the root of the project
# base_folder is already the docs folder, so go up one level to project root
project_root = os.path.abspath(os.path.join(base_folder, '..'))
- full_path = os.path.join(project_root, 'generated', 'markdown-examples', table_path)
+ full_path = os.path.join(project_root, 'site', 'tables', table_file_name)
if os.path.exists(full_path):
with open(full_path, 'r', encoding='utf-8') as f:
@@ -60,27 +69,43 @@ def include_markdown_table(match, base_folder):
elif in_table:
break
return '\n'.join(table_lines)
- return match.group(0)
+ return table_file_name
+
+def expand_markdown_file(input_file_path, output_file_path, base_folder):
+ """
+ Expands a single markdown file: integrates/expands xml snippets and markdown tables.
-def process_markdown_file(input_path, output_path, base_folder):
- """Process a single markdown file."""
- with open(input_path, 'r', encoding='utf-8') as f:
+ param: input_file_path: Path to the input markdown file
+ param: output_file_path: Path to the output markdown file
+ param: base_folder: Path to the documents base folder
+ """
+ with open(input_file_path, 'r', encoding='utf-8') as f:
content = f.read()
# Process XML snippets - match the entire line prefix and link (flexible text)
- xml_pattern = r'(?:- )?\[.*?\]\(\.\./generated/xml-snippets/([^)]+\.xml)\)'
- content = re.sub(xml_pattern, lambda m: '\n\n' + include_xml_snippet(m, base_folder) + '\n\n', content)
+ xml_pattern = r'(?:- )?\[.*?\]\(\.\./site/xml-snippets/([^)]+\.xml)\)'
+ content = re.sub(xml_pattern, lambda m: '\n\n' + include_xml_snippet(m.group(1), base_folder) + '\n\n', content)
# Process markdown tables - match the entire line prefix and link (flexible text)
- md_pattern = r'(?:- )?\[.*?\]\(\.\./generated/markdown-examples/([^)]+\.md)\)'
- content = re.sub(md_pattern, lambda m: '\n\n' + include_markdown_table(m, base_folder) + '\n\n', content)
+ md_pattern = r'(?:- )?\[.*?\]\(\.\./site/tables/([^)]+\.md)\)'
+ content = re.sub(md_pattern, lambda m: '\n\n' + include_markdown_table(m.group(1), base_folder) + '\n\n', content)
# Write processed content
- with open(output_path, 'w', encoding='utf-8') as f:
+ with open(output_file_path, 'w', encoding='utf-8') as f:
f.write(content)
+
def expand_docs(input_dir: str, output_dir: str):
+ """
+ Expands all markdown files in input_dir: integrates/expands xml snippets and markdown tables.
+
+ param: input_file_path: Path to the input dir to search for input markdown files
+ param: output_file_path: Path to the output dir
+ param: xml_snippets_path: Path to the folder to look for xml snippets
+ param: table_path: Path to the folder to look for markdown tables
+ """
+
# Create output folder if it doesn't exist
os.makedirs(output_dir, exist_ok=True)
@@ -92,7 +117,7 @@ def expand_docs(input_dir: str, output_dir: str):
if filename.endswith('.md'):
input_md = os.path.join(input_dir, filename)
output_md = os.path.join(output_dir, filename)
- process_markdown_file(input_md, output_md, input_dir)
+ expand_markdown_file(input_md, output_md, input_dir)
print(f"Documentation expanded successfully to {output_dir}")
diff --git a/tools/toolchain.py b/tools/toolchain.py
index 987b3ef..8981209 100644
--- a/tools/toolchain.py
+++ b/tools/toolchain.py
@@ -2,9 +2,10 @@
import shutil
from pathlib import Path
-from tools.configuration import DOCS_DIR, SITE_DIR, XSD_FILE_PATH, SITE_TABLES_DIR, TEMPLATES_DIR, JEKYLL_DIR
+from tools.configuration import DOCS_DIR, SITE_DIR, XSD_FILE_PATH, SITE_TABLES_DIR, TEMPLATES_DIR, JEKYLL_DIR, SITE_XML_SNIPPETS_DIR
from tools.expand_docs.expand_docs import expand_docs
from tools.md_builder.md_builder import build_markdown_tables
+from tools.xml_snippets.build_xml_snippets import generate_all_snippets
def clean(dir: str):
dir_path = Path(dir)
@@ -17,19 +18,21 @@ def copy_jekyll_files():
dst = Path(SITE_DIR)
shutil.copytree(src, dst, dirs_exist_ok=True)
-def generate_docs():
- expand_docs(DOCS_DIR, SITE_DIR)
- # generate_html_files(SITE_DIR)
-
def generate_tables():
build_markdown_tables(TEMPLATES_DIR, SITE_TABLES_DIR, XSD_FILE_PATH)
- # generate_html_files(SITE_TABLES_DIR)
+
+def generate_xml_snippets():
+ generate_all_snippets(TEMPLATES_DIR, SITE_XML_SNIPPETS_DIR)
+
+def generate_docs():
+ expand_docs(DOCS_DIR, SITE_DIR)
def main():
clean(SITE_DIR)
copy_jekyll_files()
- generate_docs()
generate_tables()
+ generate_xml_snippets()
+ generate_docs()
if __name__ == '__main__':
main()
diff --git a/tools/xml_snippets/__pycache__/build_xml_snippets.cpython-313.pyc b/tools/xml_snippets/__pycache__/build_xml_snippets.cpython-313.pyc
deleted file mode 100644
index 57fc855..0000000
Binary files a/tools/xml_snippets/__pycache__/build_xml_snippets.cpython-313.pyc and /dev/null differ
diff --git a/tools/xml_snippets/build_xml_snippets.py b/tools/xml_snippets/build_xml_snippets.py
index 44a6e1f..54680a7 100644
--- a/tools/xml_snippets/build_xml_snippets.py
+++ b/tools/xml_snippets/build_xml_snippets.py
@@ -21,22 +21,7 @@
from lxml import etree
-def parse_args():
- """Parse command line arguments"""
- parser = argparse.ArgumentParser(
- description='Extract XML snippets from templates with ch-start/ch-stop markers'
- )
- parser.add_argument(
- '-i', '--input',
- required=True,
- help='Input folder or single XML file containing templates'
- )
- parser.add_argument(
- '-o', '--output',
- required=True,
- help='Output folder for XML snippet files'
- )
- return parser.parse_args()
+
def remove_ch_annotations(text):
@@ -357,43 +342,79 @@ def extract_snippet_from_template(file_path):
return None
-def main():
- args = parse_args()
+def generate_all_snippets(input_dir: str, output_dir: str):
+ """
+ Generates all XML snippets from templates in input_dir.
- # Create output directory
- os.makedirs(args.output, exist_ok=True)
+ :param input_dir: Input directory
+ :param output_dir: Output directory where the XML snippets will be generated.
+ """
- # Determine if input is a file or directory
- if os.path.isfile(args.input):
- # Single file mode
- xml_files = [args.input]
- else:
- # Directory mode - process all XML files in input directory
- xml_files = [os.path.join(args.input, f) for f in os.listdir(args.input) if f.endswith('.xml')]
+ xml_files = [os.path.join(input_dir, f) for f in os.listdir(input_dir) if f.endswith('.xml')]
for file_path in xml_files:
- print(f"Processing {os.path.basename(file_path)}")
+ generate_snippet(file_path, output_dir)
+ print(f"Processed {len(xml_files)} files")
- # Extract snippet
- snippet = extract_snippet_from_template(file_path)
- if snippet:
- # Generate output filename
- output_filename = os.path.splitext(os.path.basename(file_path))[0] + '.xml'
- output_path = os.path.join(args.output, output_filename)
+def generate_snippet(template_path: str, output_dir: str):
+ """
+ Generates a XML snippet from a single template.
- # Write to file
- with open(output_path, 'w', encoding='utf-8') as f:
- # Add XML declaration
- f.write('\n')
- f.write(snippet)
+ :param template_path: Path to the template file.
+ :param output_dir: Output directory where the XML snippet will be generated.
+ """
+ print(f"Processing {os.path.basename(template_path)}")
- print(f"Generated {output_path}")
- else:
- print(f"No snippet extracted from {os.path.basename(file_path)}")
+ # Extract snippet
+ snippet = extract_snippet_from_template(template_path)
- print(f"Processed {len(xml_files)} files")
+ if snippet:
+
+ # Create output directory
+ os.makedirs(output_dir, exist_ok=True)
+
+ # Generate output filename
+ output_filename = os.path.splitext(os.path.basename(template_path))[0] + '.xml'
+ output_path = os.path.join(output_dir, output_filename)
+ # Write to file
+ with open(output_path, 'w', encoding='utf-8') as f:
+ # Add XML declaration
+ f.write('\n')
+ f.write(snippet)
+
+ print(f"Generated {output_path}")
+ else:
+ print(f"No snippet extracted from {os.path.basename(template_path)}")
+
+
+def parse_args():
+ """Parse command line arguments"""
+ parser = argparse.ArgumentParser(
+ description='Extract XML snippets from templates with ch-start/ch-stop markers'
+ )
+ parser.add_argument(
+ '-i', '--input',
+ required=True,
+ help='Input folder or single XML file containing templates'
+ )
+ parser.add_argument(
+ '-o', '--output',
+ required=True,
+ help='Output folder for XML snippet files'
+ )
+ return parser.parse_args()
+
+def main():
+ args = parse_args()
+
+ # Determine if input is a file or directory
+ if os.path.isfile(args.input):
+ generate_snippet(args.input, args.output)
+ else:
+ # Directory mode - process all XML files in input directory
+ generate_all_snippets(args.input, args.output)
if __name__ == '__main__':
main()