Skip to content

Commit

Permalink
Consistent use of WebLinkStructure (#123)
Browse files Browse the repository at this point in the history
Removed 3 occurrences of xs:anyURI and exchanged it with WebLinkStructure (MultiTripFareResultStructure and BookingArrangementStructure). Introduced a WebLinkGroup consisting of URL, MIME type and embeddedness. Used that group within the WebLinkStructure (without actually changing it). Exchanged xs:anyURI in GeneralAttributeStructure by the WebLinkGroup as there is already a text available for the link.
  • Loading branch information
pvgrumbkow authored Nov 30, 2020
1 parent ca30235 commit 24fc224
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 16 deletions.
8 changes: 2 additions & 6 deletions OJP/OJP_Common.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@
</xs:annotation>
<xs:complexType name="GeneralAttributeStructure">
<xs:annotation>
<xs:documentation>Structured attribute classification with associated text.</xs:documentation>
<xs:documentation>Structured attribute classification with associated text. If URL is given, it refers to the whole attribute text.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="Text" type="InternationalTextStructure">
Expand All @@ -358,11 +358,7 @@
<xs:documentation>Importance of the attribute.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="InfoUrl" type="xs:anyURI" minOccurs="0">
<xs:annotation>
<xs:documentation>URL to additional information on this general attribute. If available, the whole attribute text has to be used as the marked link.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:group ref="WebLinkGroup" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
2 changes: 1 addition & 1 deletion OJP/OJP_Fare.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@
<xs:documentation>The set of passed zones.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="StaticInfoUrl" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded">
<xs:element name="StaticInfoUrl" type="WebLinkStructure" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>URL to Fare information pages on the web.</xs:documentation>
</xs:annotation>
Expand Down
4 changes: 2 additions & 2 deletions OJP/OJP_FareSupport.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,12 @@
<xs:documentation>Name of the booking agency (contractual partner).</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="BookingUrl" type="xs:anyURI" minOccurs="0">
<xs:element name="BookingUrl" type="WebLinkStructure" minOccurs="0">
<xs:annotation>
<xs:documentation>URL to online booking service.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="InfoUrl" type="xs:anyURI" minOccurs="0">
<xs:element name="InfoUrl" type="WebLinkStructure" minOccurs="0">
<xs:annotation>
<xs:documentation>URL to information page.</xs:documentation>
</xs:annotation>
Expand Down
22 changes: 15 additions & 7 deletions OJP/OJP_Utility.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,11 @@
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="WebLinkStructure">
<xs:group name="WebLinkGroup">
<xs:annotation>
<xs:documentation>URL of a web resource with label.</xs:documentation>
<xs:documentation>URL of a web resource including type of resource.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="Label" type="InternationalTextStructure">
<xs:annotation>
<xs:documentation>Label for link description.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Url" type="xs:anyURI">
<xs:annotation>
<xs:documentation>URL to resource on web.</xs:documentation>
Expand All @@ -91,5 +86,18 @@
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:group>
<xs:complexType name="WebLinkStructure">
<xs:annotation>
<xs:documentation>URL of a web resource with label.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="Label" type="InternationalTextStructure">
<xs:annotation>
<xs:documentation>Label for link description.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:group ref="WebLinkGroup"/>
</xs:sequence>
</xs:complexType>
</xs:schema>

0 comments on commit 24fc224

Please sign in to comment.