Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • railML 2 railML 2
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Graph
    • Compare revisions
  • Issues 50
    • Issues 50
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • railML.orgrailML.org
  • railML 2railML 2
  • Issues
  • #344
Closed
Open
Issue created Oct 04, 2018 by IS Coordination@coordination.ISMaintainer

Check all schemes for unnecessary @minOccurs, @maxOccurs and @usage

Description

In railML schemes there are elements that occur exactly one time. Thus, @minOccurs="1" and @maxOccurs="1". Since these are default values, they don't have to be given explicitly. The same applies for @use="optional" for attributes.

Background

elements... are by default mandatory (minOccurs="1" and maxOccurs="1")

attributes... are by default optional (use="optional")

Therefore, mandatory elements and optional attributes don't have to have mentioned properties.

For the following cases, properties have to be provided in the schema:

  • optional elements occuring once: minOccurs="0"
  • optional elements occuring up to n times: minOccurs="0" and maxOccurs="n" (with n being a positive number)
  • mandatory elements occurinng up to n times: maxOccurs="n" (with n being a positive number)
  • mandatory attributes: use="required"

Links

  • Forum discussion:
  • Christian Rahmig, 02.10.2018: [https://www.railml.org/forum/index.php?t=msg&th=609&start=0&]
  • Web links:
  • XSD Indicators: [https://www.w3schools.com/xml/schema_complex_indicators.asp]
  • XSD Attributes: [https://www.w3schools.com/xml/schema_simple_attributes.asp]

Proposed solution

Remove in all schema files:

  • minOccurs="1"
  • maxOccurs="1"
  • use="optional"
Assignee
Assign to
Time tracking

railML.org e.V. (Registry of Associations: VR 5750) Phone: +49 351 47582911 Altplauen 19h; 01187 Dresden; Germany