Home » railML newsgroups » railML.infrastructure » How to mix switches and crossings en connections ?
Re: How to mix switches and crossings en connections ? [message #1364 is a reply to message #1361] Fri, 17 June 2016 10:04 Go to previous messageGo to previous message
prenaud is currently offline  prenaud
Messages: 3
Registered: June 2016
Junior Member
Hello Christian,

I have checked the definition of the <xs:choice> element on different reference sites.

On the web site of W3C https://www.w3.org/TR/xmlschema11-1/ chapter 3.8.1 the definition is:

Quote:

(sequence) correspond, in order, to the specified {particles};
(choice) correspond to exactly one of the specified {particles};
(all) correspond to the specified {particles}. The elements can occur in any order.


On Microsoft MSDN https://msdn.microsoft.com/en-us/library/ms256109%28v=vs.110 %29.aspx the definition is:

Quote:
Allows one and only one of the elements contained in the selected group to be present within the containing element.


On the site W3Schools.com http://www.w3schools.com/xml/el_choice.asp :

Quote:
XML Schema choice element allows only one of the elements contained in the <choice> declaration to be present within the containing element.


These three definitions are coherent and indicate that a <xs:choice> element cannot contains both the sub-elements it defines.

In other words, in the RailML, a <connections> element cannot contains both <switch> AND <crossing> elements.

Your code snippet is not valid with the validation tool xmllint which is based on the library LibXML 2.7.7

Best regards,

Patrick
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Connection on TrackBegin and TrackEnd
Next Topic: Vertical track geometry
Goto Forum:
  


Current Time: Wed May 08 07:30:52 CEST 2024