PasjaGSM.pl
  Jesteś w: PasjaGSM.pl > Ginger > Ginger input format

flag:pl Polski Ginger input format

The following data format is used for generating Ginger. The description is intended mainly for companies providing transportation, which are interested in using Ginger. Please contact us before preparing any xml documents. The description will be expanded in future.
<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="lines">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" name="line">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" name="direction">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" name="stop">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" name="legend">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<!-- Text of legend - e.g. the bus goes only to Sun Street-->
<xs:attribute name="symbol" type="xs:string" use="required" />
<!-- One character symbol of the legend - e.g. *-->
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element maxOccurs="unbounded" name="hour">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" name="minute">
<xs:complexType>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="legend">
<xs:complexType>
<xs:attribute name="symbol" type="xs:string" use="required" />
<!-- Symbol of the legend, which text should be defined for this Stop in the Legend node - e.g. *-->
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="value" type="xs:unsignedByte" use="required" />
<!-- Minutes value of the departure -->
<xs:attribute name="type" type="xs:string" use="required" />
<!-- Mode - e.g. Workdays-->
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="value" type="xs:unsignedByte" use="required" />
<!-- Hour value of the departure-->
</xs:complexType>
</xs:element>
<xs:element minOccurs="0" name="description" type="xs:string" />
<!-- Global description of the line - e.g. The line doesn't work in July and August-->
</xs:sequence>
<xs:attribute name="name" type="xs:string" use="required" />
<!-- Name of the stop - e.g. Sun Street-->
<xs:attribute name="id" type="xs:string" use="required" />
<!-- Unique identifier of the stop - e.g. sun1-->
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="name" type="xs:string" use="required" />
<!-- Name of the line-->
<xs:attribute name="ignoreLastStop" type="xs:boolean" use="optional" />
<!-- If ignoreLastStop is set to True then timetable for the last stop in each direction is ignored and the stop is used only to display Directions screen-->
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="prefix" type="xs:string" use="optional" />
<!-- Prefix which will be added to the name of each line, and will be displayed in the Ginger description. This needed only if Ginger contains timetable of many cities, to avoid line name conflicts.-->
<xs:attribute name="city" type="xs:string" use="optional" />
<!-- Name of the city-->
<xs:attribute name="validFrom" type="xs:string" use="optional" />
<!-- Date in the format dd/MM/yyyy from when the timetable is valid-->
</xs:complexType>
</xs:element>
</xs:schema>

While generating Ginger, we have the following assumptions:

  • Timetable includes all stops (even the ending one)
  • The data is provided in the clean form. Name of lines, stops, text of descriptions and legends does not exist in multiple forms, which differs only by character size, white spaces, abbreviations etc. If this is not met, the generated application will be bigger, possibly not meeting requirements of some phones.
  • Symbols of the legends are generated by Ginger. The values defined in the input format are ignored.
  • Name of the route (second screen in Ginger) is the name of the last stop in this route
  • The valid value of hour is 0 - 23
  • Each Stop has 2 attributes – name and id. Many different stops can have the same name, but id should be globally unique. In current moment Ginger uses ids for command Przesiadki (lines available on the given stop), and names form command Przyblizone przesiadki (lines available from all stops with the given name).
  • In current moment Ginger ignores departure symbols (legends) that are not present on the first stop. It does not affect new departures that are added on other stops.
  • In current moment Ginger can handle:
    • up to 2048 stops with different names
    • up to 31 stops with the same name but different id
    • up to 65535 different text of legends and line descriptions

  • Attribute ignoreLastStop let specify that timetable for the last stop is ignored. It's useful when we don't know timetable for last stop but we want to display it in Directions screen.
  • Changelog:

    • 3/01/2007 - attributes city and validFrom were added to lines
    • 3/18/2007 - attribute ignoreLastStop was added to line