Skip to content

Add example for line and operator filter in StopEventRequest - #470

Open
leonardehrenfried wants to merge 3 commits into
VDVde:developfrom
leonardehrenfried:line-filter
Open

Add example for line and operator filter in StopEventRequest#470
leonardehrenfried wants to merge 3 commits into
VDVde:developfrom
leonardehrenfried:line-filter

Conversation

@leonardehrenfried

@leonardehrenfried leonardehrenfried commented Feb 21, 2025

Copy link
Copy Markdown
Collaborator

I'm familiarising myself with OJP but I'm a little puzzled about how to set a line filter in the StopEventRequest.

Intellij's autocomplete and the HTML documentation suggests that you can do it like in the example in this PR but xmllint and weirdly Intellij itself complain about it.

examples/basic/StopEventRequest-LineFilter.xml:25: element LineFilter: Schemas validity error : Element '{http://www.vdv.de/ojp}LineFilter': This element is not expected. Expected is one of ( {http://www.vdv.de/ojp}IncludePlacesContext, {http://www.vdv.de/ojp}IncludeSituationsContext, {http://www.vdv.de/ojp}IncludeStopHierarchy, {http://www.vdv.de/ojp}Extension ).

Is the below example correct?

@leonardehrenfried leonardehrenfried changed the title How do I include a LineFilter that passes the XSD validation? How do I set a StopEventRequest's LineFilter that passes the XSD validation? Feb 22, 2025
@mentz-mhe

Copy link
Copy Markdown
Contributor

@leonardehrenfried the order of your Params is incorrect. LineFilter should come before the other Params:

<?xml version="1.0" encoding="UTF-8"?> <OJP xmlns="http://www.vdv.de/ojp" xmlns:siri="http://www.siri.org.uk/siri" version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.vdv.de/ojp file:///D:/Schnittstellen/OJP-release-2.0/OJP.xsd"> <OJPRequest> <siri:ServiceRequest> <siri:RequestTimestamp>2020-01-20T12:00:00Z</siri:RequestTimestamp> <siri:RequestorRef>IRMA</siri:RequestorRef> <OJPStopEventRequest> <siri:RequestTimestamp>2020-01-20T12:00:00Z</siri:RequestTimestamp> <siri:MessageIdentifier>756</siri:MessageIdentifier> <Location xmlns:siri="http://www.siri.org.uk/siri"> <PlaceRef> <StopPlaceRef>8530813</StopPlaceRef> <Name> <Text>Zürich Kreuzplatz</Text> </Name> </PlaceRef> <DepArrTime>2020-12-01T12:00:00Z</DepArrTime> </Location> <Params> <LineFilter> <Line> <siri:LineRef>7311234</siri:LineRef> </Line> <Exclude>true</Exclude> </LineFilter> <StopEventType>both</StopEventType> <IncludePreviousCalls>true</IncludePreviousCalls> <IncludeOnwardCalls>true</IncludeOnwardCalls> <IncludeOperatingDays>true</IncludeOperatingDays> <UseRealtimeData>full</UseRealtimeData> </Params> </OJPStopEventRequest> </siri:ServiceRequest> </OJPRequest> </OJP>

@leonardehrenfried

Copy link
Copy Markdown
Collaborator Author

Aha - thank you for this!

If you're interested in having these examples you may merge this or close this PR if not.

@leonardehrenfried leonardehrenfried changed the title How do I set a StopEventRequest's LineFilter that passes the XSD validation? Add example for line and operator filter in StopEventRequest Feb 25, 2025
@ue71603 ue71603 added this to the v2.0.1 milestone Feb 20, 2026
@ue71603
ue71603 requested review from skinkie, trurlurl and ue71603 August 3, 2026 07:13
@sgrossberndt

Copy link
Copy Markdown
Contributor

Should this example file rather be placed in examples/functions/stop_event/?

@ue71603 ue71603 self-assigned this Aug 3, 2026
@ue71603

ue71603 commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

@leonardehrenfried : Why did you use something that uses exclude in both cases? To show how it works?

@skinkie skinkie left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The example is syntactically valid. I would approve. But I don't think it is a realistic example.

@trurlurl

trurlurl commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

I would follow @sgrossberndt and preferrably have it in ../stop-event/

@ue71603

ue71603 commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

@leonardehrenfried can you pls move the file and perhaps update it? then we can merge it

@ue71603 ue71603 assigned leonardehrenfried and unassigned ue71603 Aug 3, 2026
@ue71603 ue71603 added the enhancement New feature or request label Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants