Giter Club home page Giter Club logo

netex-xml's Introduction

I'm a member of several CEN TC278 WG3 working groups (SG4, SG7, SG9 ) working on CEN Public Transport data standards including SIRI, Transmodel and NeTEx,

🔭 I’m currently working on an extension to NeTEx to cover new modes

netex-xml's People

Contributors

nick-knowles avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

netex-xml's Issues

Linked Data vocabulary

One part of the NeTEx specification are useful definitions of specific terms within the NeTEx context. The European ISA² initiative supports European organizations to become more interoperable, and promotes the use of Linked Data and the Resource Description Format (RDF) for raising the semantic interoperability.

Making NeTEx available for use within Linked Data technologies is straightforward: a base URI needs to be added to every term. Then, when visiting this URI in the browser, an RDF representation needs to be returned, describing the term this URI identifies.

An example of other Linked Data vocabularies in the transport domain:

Would you be interested in doing this as part of this repository?

Internal reference validation

One of the things that currently seem to lack in the xml schema is the validation of the semantics of a NeTEx document. What I mean here is that a certain object types may refer to another (strict) object type which should fail in the XSD validation, when incorrect. An example of such reference can be found below.

The PointProjectionRef refers to a RoutePoint, there isn't any logic that nameOfRefClass would limit the reference made from this entity to the foreign entity. One would expect that the nameOfRefClass should be defined in the scope of this object. Hence a PointProjectionRef must only refer to object of class of Point. xs:keyref should facilitate this effort. http://docstore.mik.ua/orelly/xml/schema/ch09_03.htm

Secondary the reference itself is not to be present in the document and/or to be unique. If we consider the parent type of all ObjectIds we end up with an xsd:normalizedString. This would lead to the use of xs:ID upon definition and xs:IDREF upon reference.
http://docstore.mik.ua/orelly/xml/schema/ch09_01.htm

The XML Source.

<PointProjectionRef nameOfRefClass="RoutePoint" ref="NDOV:RP:NL:Q:36002156"/>

And the XML Schema's:

    <xsd:simpleType name="PointProjectionIdType">
        <xsd:annotation>
            <xsd:documentation>Type for identifier of a POINT PROJECTION.</xsd:documentation>
        </xsd:annotation>
        <xsd:restriction base="ProjectionIdType"/>
    </xsd:simpleType>
    <xsd:element name="PointProjectionRef" type="PointProjectionRefStructure" substitutionGroup="ProjectionRef">
        <xsd:annotation>
            <xsd:documentation>Reference to a PROJECTION.</xsd:documentation>
        </xsd:annotation>
    </xsd:element>
    <xsd:complexType name="PointProjectionRefStructure">
        <xsd:annotation>
            <xsd:documentation>Type for a reference to a POINT PROJECTION.</xsd:documentation>
        </xsd:annotation>
        <xsd:simpleContent>
            <xsd:restriction base="ProjectionRefStructure">
                <xsd:attribute name="ref" type="PointProjectionIdType" use="required">
                    <xsd:annotation>
                        <xsd:documentation>Identifier of a POINT PROJECTION.</xsd:documentation>
                    </xsd:annotation>
                </xsd:attribute>
            </xsd:restriction>
        </xsd:simpleContent>
    </xsd:complexType>
    <xsd:element name="VersionOfObjectRef" type="VersionOfObjectRefStructure">
        <xsd:annotation>
            <xsd:documentation>Reference to a NeTEx Object .  i.e. concrete instance of an ENTITY  may include a version. Implements a one to one relationship by reference.</xsd:documentation>
        </xsd:annotation>
    </xsd:element>
    <xsd:complexType name="VersionOfObjectRefStructure">
        <xsd:annotation>
            <xsd:documentation>Type for a versioned reference to a NeTEx Object.</xsd:documentation>
        </xsd:annotation>
        <xsd:simpleContent>
            <xsd:extension base="ObjectIdType">
                <xsd:attribute name="nameOfRefClass" type="NameOfClass" use="optional">
                    <xsd:annotation>
                        <xsd:documentation>Name of Class of the referenced entity. Allows reflection. Fixed for each entity type.</xsd:documentation>
                    </xsd:annotation>
                </xsd:attribute>
                <xsd:attributeGroup ref="ReferenceModificationDetailsGroup"/>
                <xsd:attribute name="ref" type="ObjectIdType" use="required">
                    <xsd:annotation>
                        <xsd:documentation>Identifier of referenced entity.</xsd:documentation>
                    </xsd:annotation>
                </xsd:attribute>
            </xsd:extension>
        </xsd:simpleContent>
    </xsd:complexType>
    <xsd:simpleType name="ObjectIdType">
        <xsd:annotation>
            <xsd:documentation>Abstract Type for identifier of a NeTEx Object.</xsd:documentation>
        </xsd:annotation>
        <xsd:restriction base="xsd:normalizedString"/>
    </xsd:simpleType>

Version/StartDate Version/EndDate as xs:dateTime. Why?

What is the design reason for Version/StartDate Version/EndDate being xs:dateTime?

<StartDate>2013-01-01T00:00:00Z</StartDate>
<EndDate>2013-03-31T00:00:00Z</EndDate>

https://github.com/nick-knowles/NeTEx-XML/blob/master/schema/1.03/xsd/netex_framework/netex_responsibility/netex_version_version-v1.0.xsd#L149

While other parts of the standard have defined StartDate/EndDate and FromDate/ToDate as xs:date.

https://github.com/nick-knowles/NeTEx-XML/blob/master/schema/1.03/xsd/netex_framework/netex_reusableComponents/netex_serviceCalendar_version-v1.0.xsd#L188

The latter is something I would like to see uniformly applied.

Supporting Icons/Graphics within Presentation

Several operators use custom graphics specific to a line/direction. The Presentation object allows Color like properties. We would like to find an extension to support Icons. Either by base64 encoding or an URI refering to an external source.

XSD validation of Examples

Quite a few examples do not validate with the current NeTEx XSD an example is Netex_CDL1_Bus_Zonal_MobileProducts.xml Could they be updated?

Please fix your publication

netex_service/netex_dataObjectRequest_service-v1.0.xsd:4: element import: Schemas parser warning : Element '{http://www.w3.org/2001/XMLSchema}import': Skipping import of schema located at 'siri/siri_requests-v2.0.xsd' for the namespace 'http://www.siri.org.uk/siri', since this namespace was already imported with the schema located at 'siri_utility/siri_participant-v2.0.xsd'.
Schemas parser error : element decl. '{http://www.netex.org.uk/netex}DataObjectRequest', attribute 'substitutionGroup': The QName value '{http://www.siri.org.uk/siri}AbstractFunctionalServiceRequest' does not resolve to a(n) element declaration.
netex_service/netex_dataObjectRequest_service-v1.0.xsd:87: element complexType: Schemas parser error : complex type 'DataObjectRequestStructure', attribute 'base': The QName value '{http://www.siri.org.uk/siri}AbstractFunctionalServiceRequestStructure' does not resolve to a(n) simple type definition.
netex_service/netex_dataObjectRequest_service-v1.0.xsd:95: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element', attribute 'ref': The QName value '{http://www.siri.org.uk/siri}Extensions' does not resolve to a(n) element declaration.
Schemas parser error : element decl. '{http://www.netex.org.uk/netex}DataObjectSubscriptionRequest', attribute 'substitutionGroup': The QName value '{http://www.siri.org.uk/siri}AbstractFunctionalServiceSubscriptionRequest' does not resolve to a(n) element declaration.
netex_service/netex_dataObjectRequest_service-v1.0.xsd:129: element complexType: Schemas parser error : complex type 'DataObjectSubscriptionStructure', attribute 'base': The QName value '{http://www.siri.org.uk/siri}AbstractSubscriptionStructure' does not resolve to a(n) simple type definition.
netex_service/netex_dataObjectRequest_service-v1.0.xsd:142: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element', attribute 'ref': The QName value '{http://www.siri.org.uk/siri}Extensions' does not resolve to a(n) element declaration.
Schemas parser error : element decl. '{http://www.netex.org.uk/netex}DataObjectDelivery', attribute 'substitutionGroup': The QName value '{http://www.siri.org.uk/siri}AbstractFunctionalServiceDelivery' does not resolve to a(n) element declaration.
netex_service/netex_dataObjectRequest_service-v1.0.xsd:167: element complexType: Schemas parser error : complex type 'DataObjectDeliveryStructure', attribute 'base': The QName value '{http://www.siri.org.uk/siri}AbstractServiceDeliveryStructure' does not resolve to a(n) simple type definition.
netex_service/netex_dataObjectRequest_service-v1.0.xsd:184: element element: Schemas parser error : element decl. '{http://www.netex.org.uk/netex}DataObjectCapabilitiesRequest', attribute 'type': The QName value '{http://www.siri.org.uk/siri}ServiceCapabilitiesRequestStructure' does not resolve to a(n) type definition.
Schemas parser error : element decl. '{http://www.netex.org.uk/netex}DataObjectCapabilitiesRequest', attribute 'substitutionGroup': The QName value '{http://www.siri.org.uk/siri}AbstractFunctionalServiceCapabilitiesRequest' does not resolve to a(n) element declaration.
Schemas parser error : element decl. '{http://www.netex.org.uk/netex}DataObjectCapabilitiesResponse', attribute 'substitutionGroup': The QName value '{http://www.siri.org.uk/siri}AbstractFunctionalServiceCapabilitiesResponse' does not resolve to a(n) element declaration.
netex_service/netex_dataObjectRequest_service-v1.0.xsd:195: element complexType: Schemas parser error : complex type 'DataObjectCapabilitiesResponseStructure', attribute 'base': The QName value '{http://www.siri.org.uk/siri}AbstractServiceCapabilitiesResponseStructure' does not resolve to a(n) simple type definition.
netex_service/netex_dataObjectRequest_service-v1.0.xsd:206: element attribute: Schemas parser error : attribute decl. 'version', attribute 'type': The QName value '{http://www.siri.org.uk/siri}VersionString' does not resolve to a(n) simple type definition.
netex_service/netex_dataObjectRequest_service-v1.0.xsd:220: element complexType: Schemas parser error : complex type 'DataObjectServiceCapabilitiesStructure', attribute 'base': The QName value '{http://www.siri.org.uk/siri}AbstractCapabilitiesStructure' does not resolve to a(n) simple type definition.
netex_service/netex_dataObjectRequest_service-v1.0.xsd:279: element complexType: Schemas parser error : complex type 'DataObjectCapabilityRequestPolicyStructure', attribute 'base': The QName value '{http://www.siri.org.uk/siri}CapabilityRequestPolicyStructure' does not resolve to a(n) simple type definition.
netex_service/netex_dataObjectRequest_service-v1.0.xsd:317: element complexType: Schemas parser error : complex type 'DataObjectServicePermissionStructure', attribute 'base': The QName value '{http://www.siri.org.uk/siri}AbsoluteBearingType' does not resolve to a(n) simple type definition.
WXS schema NeTEx_publication.xsd failed to compile

And see here how: https://github.com/StichtingOpenGeo/NeTEx/commits/v1.01

SupplementToFareProductRef references fare product PRICE id instead of fare product id

Hallo!
I guess that it is a mistake in netex_fareProduct_version-v1.0.xsd (v1.04b) where SUPPLEMENT PRODUCT should be able to reference FARE PRODUCT to which it is a supplement (according to documentation) by means of SupplementToFareProductRef. However, in scheme it refers to FareProductPriceIdType, and not to the FareProductIdType (see bellow) as I would expect.

<xsd:group name="SupplementProductGroup">
	<xsd:annotation>
		<xsd:documentation>Elements for a PREASSIGNED FARE PRODUCT.</xsd:documentation>
	</xsd:annotation>
	<xsd:sequence>
		<xsd:element name="SupplementToFareProductRef" type="FareProductPriceIdType" minOccurs="0">
			<xsd:annotation>
				<xsd:documentation>FARE PRODUCT to which this is a sublement.</xsd:documentation>
			</xsd:annotation>
		</xsd:element>
	</xsd:sequence>
</xsd:group>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.