Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change main namespace of OJP from SIRI to OJP #347

Merged
merged 16 commits into from
May 25, 2023

Conversation

ue71603
Copy link
Contributor

@ue71603 ue71603 commented Apr 4, 2023

https://github.com/VDVde/OJP/pull/339/files
but not in a different repository.

@ue71603 ue71603 added bug Something isn't working documentation labels Apr 4, 2023
@ue71603 ue71603 added this to the v2.0 milestone Apr 4, 2023
@ue71603 ue71603 requested review from Aurige and sgrossberndt April 4, 2023 13:59
Aurige
Aurige previously approved these changes Apr 4, 2023
@ue71603
Copy link
Contributor Author

ue71603 commented Apr 4, 2023

@Aurige doesn't compile in OJP.xsd. Pls check why this is...

@ue71603
Copy link
Contributor Author

ue71603 commented Apr 4, 2023

We are back at the QName problem (which blocked the change last time, as far as I know):
siri/xsd/siri_model/siri_situationIdentity.xsd:145: element element: Schemas parser error : element decl. '{http://www.siri.org.uk/siri}CountryRef', attribute 'type': The QName value '{http://www.ifopt.org.uk/ifopt}CountryRefStructure' does not resolve to a(n) type definition.
siri/xsd/siri_model/siri_situationIdentity.xsd:167: element element: Schemas parser error : element decl. '{http://www.siri.org.uk/siri}UpdateCountryRef', attribute 'type': The QName value '{http://www.ifopt.org.uk/ifopt}CountryRefStructure' does not resolve to a(n) type definition.
siri/xsd/siri_model/siri_situationIdentity.xsd:208: element element: Schemas parser error : element decl. '{http://www.siri.org.uk/siri}VersionCountryRef', attribute 'type': The QName value '{http://www.ifopt.org.uk/ifopt}CountryRefStructure' does not resolve to a(n) type definition.
siri/xsd/siri_model/siri_facility.xsd:197: element element: Schemas parser error : element decl. '{http://www.siri.org.uk/siri}StopPlaceRef', attribute 'type': The QName value '{http://www.ifopt.org.uk/ifopt}StopPlaceRefStructure' does not resolve to a(n) type definition.
siri/xsd/siri_model/siri_facility.xsd:202: element element: Schemas parser error : element decl. '{http://www.siri.org.uk/siri}StopPlaceComponentId', attribute 'type': The QName value '{http://www.ifopt.org.uk/ifopt}StopPlaceComponentRefStructure' does not resolve to a(n) type definition.
siri/xsd/siri_model/siri_facility.xsd:640: element element: Schemas parser error : element decl. '{http://www.siri.org.uk/siri}EquipmentRef', attribute 'type': The QName value '{http://www.ifopt.org.uk/ifopt}EquipmentRefStructure' does not resolve to a(n) type definition.
siri/xsd/siri_model/siri_facility.xsd:650: element element: Schemas parser error : element decl. '{http://www.siri.org.uk/siri}EquipmentTypeRef', attribute 'type': The QName value '{http://www.ifopt.org.uk/ifopt}EquipmentTypeRefStructure' does not resolve to a(n) type definition.
siri/xsd/siri_model/siri_facility.xsd:660: element element: Schemas parser error : element decl. '{http://www.siri.org.uk/siri}EquipmentStatus', attribute 'type': The QName value '{http://www.ifopt.org.uk/ifopt}EquipmentStatusEnumeration' does not resolve to a(n) type definition.
siri/xsd/siri_model/siri_situationAffects.xsd:149: element element: Schemas parser error : element decl. '{http://www.siri.org.uk/siri}StopPlaceRef', attribute 'type': The QName value '{http://www.ifopt.org.uk/ifopt}StopPlaceRefStructure' does not resolve to a(n) type definition.
siri/xsd/siri_model/siri_situationAffects.xsd:351: element element: Schemas parser error : element decl. '{http://www.siri.org.uk/siri}AccessMode', attribute 'type': The QName value '{http://www.ifopt.org.uk/ifopt}AccessModesEnumeration' does not resolve to a(n) type definition.
siri/xsd/siri_model/siri_situationAffects.xsd:506: element element: Schemas parser error : element decl. '{http://www.siri.org.uk/siri}LinkProjection', attribute 'type': The QName value '{http://www.ifopt.org.uk/ifopt}LinkProjectionStructure' does not resolve to a(n) type definition.
siri/xsd/siri_model/siri_situationAffects.xsd:684: element element: Schemas parser error : element decl. '{http://www.siri.org.uk/siri}FirstStopPlaceRef', attribute 'type': The QName value '{http://www.ifopt.org.uk/ifopt}StopPlaceRefStructure' does not resolve to a(n) type definition.
siri/xsd/siri_model/siri_situationAffects.xsd:701: element element: Schemas parser error : element decl. '{http://www.siri.org.uk/siri}IntermediateStopPlaceRef', attribute 'type': The QName value '{http://www.ifopt.org.uk/ifopt}StopPlaceRefStructure' does not resolve to a(n) type definition.
siri/xsd/siri_model/siri_situationAffects.xsd:718: element element: Schemas parser error : element decl. '{http://www.siri.org.uk/siri}LastStopPlaceRef', attribute 'type': The QName value '{http://www.ifopt.org.uk/ifopt}StopPlaceRefStructure' does not resolve to a(n) type definition.
siri/xsd/siri_model/siri_situationAffects.xsd:788: element element: Schemas parser error : element decl. '{http://www.siri.org.uk/siri}LinkProjectionToNextStopPoint', attribute 'type': The QName value '{http://www.ifopt.org.uk/ifopt}LinkProjectionStructure' does not resolve to a(n) type definition.
siri/xsd/siri_model/siri_situationAffects.xsd:1187: element element: Schemas parser error : element decl. '{http://www.siri.org.uk/siri}StopPlaceRef', attribute 'type': The QName value '{http://www.ifopt.org.uk/ifopt}StopPlaceRefStructure' does not resolve to a(n) type definition.
siri/xsd/siri_model/siri_situationAffects.xsd:1236: element element: Schemas parser error : element decl. '{http://www.siri.org.uk/siri}NavigationPathRef', attribute 'type': The QName value '{http://www.ifopt.org.uk/ifopt}NavigationPathRefStructure' does not resolve to a(n) type definition.
siri/xsd/siri_model/siri_situationAffects.xsd:1277: element group: Schemas parser error : Element '{http://www.w3.org/[20](https://github.com/VDVde/OJP/actions/runs/4608807304/jobs/8145079924#step:6:21)01/XMLSchema}group', attribute 'ref': The QName value '{http://www.ifopt.org.uk/ifopt}PlaceProjectionGroup' does not resolve to a(n) model group definition.
siri/xsd/siri_model/siri_situationAffects.xsd:1262: element element: Schemas parser error : element decl. '{http://www.siri.org.uk/siri}ComponentRef', attribute 'type': The QName value '{http://www.ifopt.org.uk/ifopt}StopPlaceComponentRefStructure' does not resolve to a(n) type definition.
siri/xsd/siri_model/siri_situationAffects.xsd:1272: element element: Schemas parser error : element decl. '{http://www.siri.org.uk/siri}ComponentType', attribute 'type': The QName value '{http://www.ifopt.org.uk/ifopt}StopPlaceComponentTypeEnumeration' does not resolve to a(n) type definition.
siri/xsd/siri_model/siri_situation.xsd:503: element element: Schemas parser error : element decl. '{http://www.siri.org.uk/siri}Country', attribute 'type': The QName value '{http://www.ifopt.org.uk/ifopt}CountryRefStructure' does not resolve to a(n) type definition.
WXS schema OJP.xsd failed to compile

@Aurige
Copy link
Contributor

Aurige commented Apr 4, 2023

@Aurige doesn't compile in OJP.xsd. Pls check why this is...

It looks Ok on my side ... what should I check ?
I did a global validation in XML Spy (all xsd, all examples) and everything is OK !

@ue71603
Copy link
Contributor Author

ue71603 commented Apr 4, 2023

@ue71603
Copy link
Contributor Author

ue71603 commented Apr 4, 2023

It works, but I had to fix SIRI. Created an issue, because doing a PR would break a lot of things there:
1d7a3ea

SIRI-CEN/SIRI#107

I suggest we work with it and do the PR in SIRI, if necessary.

@ue71603 ue71603 requested a review from skinkie April 4, 2023 16:27
@ue71603
Copy link
Contributor Author

ue71603 commented Apr 5, 2023

added to SIRI SIRI-CEN/SIRI#108

skinkie
skinkie previously approved these changes Apr 11, 2023
@herlitze
Copy link
Contributor

We did change the default namespace of TRIAS once, and got complaints because some clients were expecting them in a specific way and could not handle any other way. But a change with version 2.0 should be fine.

herlitze
herlitze previously approved these changes May 2, 2023
Copy link
Contributor

@herlitze herlitze left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We did change the default namespace of TRIAS once, and got complaints because some clients were expecting them in a specific way and could not handle any other way. But a change with version 2.0 should be fine.

normanoffel
normanoffel previously approved these changes May 12, 2023
@ue71603 ue71603 dismissed stale reviews from normanoffel and herlitze via fc82e03 May 24, 2023 13:12
Aurige and others added 4 commits May 24, 2023 15:14
For some reason, the main OJP namespace was "siri", and SIRI was included and OJP imported... This PR just put the things back in the proper order.
Following the proposal of namespace updated in OJP, as pointed by Matthias, this has consequences in all example.
Having a look arround them, the use of namespace is a bit of a mess in OJP.
Basically, headers should move to something like this in examples:
<OJP xmlns="http://www.vdv.de/ojp" xmlns:ojp="http://www.vdv.de/ojp" xmlns:siri="http://www.siri.org.uk/siri" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.1-dev" xsi:schemaLocation="http://www.vdv.de/ojp ../../OJP.xsd">

But you can see that there is 2 different uses of "http://www.vdv.de/ojp" because the examples don't make a consistent use of the "ojp" prefix. Also, once "ojp" becomes the default namespace, then you need to use the "siri" one when you use somethnig from SIRI (that was kind of reverse up to now because SIRI wans made default.

By the way, that's one of the good side of tools like XML Spy that prevent that kind of mistake when you use it yo create examples ;-)
@ue71603 ue71603 force-pushed the Fix-of-namespaces-II branch from fc82e03 to 16d6e17 Compare May 24, 2023 16:01
skinkie
skinkie previously approved these changes May 24, 2023
herlitze
herlitze previously approved these changes May 25, 2023
@skinkie skinkie dismissed stale reviews from herlitze and themself via d01362c May 25, 2023 09:20
Copy link
Contributor

@sgrossberndt sgrossberndt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll push an improvement soon adding comments to the changed SIRI files

always use
* schemaLocation="../ifopt/ifopt_allStopPlace.xsd" for import of namespace="http://www.ifopt.org.uk/ifopt"
* schemaLocation="../acsb/acsb_all.xsd" for import of namespace="http://www.ifopt.org.uk/acsb"

because several XML tools fail to validate the XSD if different files are defined to provide the same namespace

Added comments at the changed locations to make the OJP changes to siri sources visible.

There is a pull request in SIRI to fix this: SIRI-CEN/SIRI#108
@sgrossberndt sgrossberndt changed the title Fix of namespaces ii Change main namespace of OJP from SIRI to OJP May 25, 2023
@sgrossberndt sgrossberndt merged commit 3d4dbf2 into changes_for_v1.1 May 25, 2023
@sgrossberndt sgrossberndt deleted the Fix-of-namespaces-II branch May 25, 2023 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working doc updated
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants