Home » railML newsgroups » railml.common » roles
Re: roles [message #1105 is a reply to message #1104] |
Fri, 16 March 2012 15:47 |
Joerg von Lingen
Messages: 149 Registered: May 2011
|
Senior Member |
|
|
Hi,
basically I don't see a problem to have one type <role> for this. However, we
have to bear in mind that this type must have all the particular attributes
required for each role, e.g. startDate+endDate for "Operator" but not
necessarily for "Manufacturer".
--
Best regards,
Joerg v. Lingen
Rollingstock Coordinator
On 16.03.2012 11:48, Andreas Tanner wrote:
> Hi,
>
> what about something like this:
>
> Fragment from schema:
>
> <xs:simpleType name="RoleName">
> <xs:restriction base="xs:string">
> <xs:enumeration value="InfrastructureManager"/>
> <xs:enumeration value="Operator"/>
> <xs:enumeration value="Contractor"/>
> <xs:enumeration value="Manufacturer"/>
> </xs:restriction>
> </xs:simpleType>
>
> Usage in document:
>
> <role id="001" roleName="InfrastructureManager" owner="BrokenTracks" uic="foo"/>
> <role id="002" roleName="Operator" owner="SpeedyRailways" uic="xxx"/>
> <role id="003" roleName="Contractor" owner="AtYourServiceCorp" uic="yyy"/>
> <role id="004" roleName="Manufacturer" owner="SteamCoach" />
> ...
>
> <infraStructure>
> ...
> <infraAttributes><roleref ref = "001" startdate="..." ... </infraAttributes>
> ...
> </infraStructure>
>
> <timetable>
> ...
> <trainPart><roleRefs>002 003</roleRefs><trainPart>
> ...
> </timetable>
>
> <rollingStock>
> <vehicle>
> <classification>
> <roleRefs>
> <roleRef ref="004" startDate="..." .../>
> ..
> </roleRefs>
> </classification>
> ...
>
>
> Regards,
> Andreas Tanner.
>
>
>
> Am 15.03.2012 14:46, schrieb Susanne Wunsch:
>> Andreas Tanner<ata(at)ivude> writes:
>>
>> Hi Andreas,
>>
>>> In RailML, we have different attributes and elements for roles:
>>> - "owner" in InfraAttrGroups and "ownerChanges", both used for tracks
>>> - "manufacturer" and "operator" (element) for vehicles,
>>> - "operator" (attribute) for trainParts
>>
>> Yes, it's done in different ways across the subschemas.
>>
>>> I think it would be wise to introduce a dedicated type for "roles" and
>>> provide slots for id references at the appropriate locations. Maybe a
>>> string enumeration type would work for the names of the different
>>> roles. Even better, we could provide container elements as used in the
>>> vehicle classification everywhere.
>>
>> I try to figure out, what you want to get. The following XML snippets
>> try to show your wishes. Please correct me, if I'm wrong with my
>> implementation.
>>
>> <infrastructure>
>> ...
>> <infraAttributes>
>> <owner id="im_12345" name="Die Bahninfrastruktur"
>> role="infrastructureManager"
>> uicNumber="foo"/>
>> ..
>> <track>
>> ...
>> <ownerChange id="im_54321" name="Schweizerische Bahn"
>> role="infrastructureManager"
>> uicNumber="bar"/>
>> ...
>> </infrastructure>
>> <rollingstock>
>> ...
>> <vehicle>
>> <classification>
>> <manufacturer id="m_123" name="Bombardjee"
>> role="manufacturer"
>> serial_number="123.456.78"/>
>> <operator id="o_123" name="EmErCeE-DispoLok"
>> role="rollingstockOperator"
>> class="baz"
>> startDate="2012-01-01" endDate="2012-12-31"/>
>> ...
>> </rollingstock>
>> <timetable>
>> ...
>> <trainPart>
>> <operator id="op_123" name="Der Bahnbetreiber"
>> role="railwayUntertaking"/>
>> ...
>> </timetable>
>>
>> My first step is some clarification, afterwards I would comment it.
>>
>> Thanks for your idea and kind regards...
>> Susanne
>>
>
|
|
|
Goto Forum:
Current Time: Mon Oct 14 13:27:21 CEST 2024
|