From 4b2f86d65bd5fe9372020d4cd3de7eb61712297e Mon Sep 17 00:00:00 2001 From: Markus Quaritsch <markus.quaritsch@tugraz.at> Date: Fri, 28 Feb 2020 10:04:53 +0100 Subject: [PATCH] making xml schema for reports more flexible - remove enums for legislative class and cycle type --- .../OutputData/XML/XMLCustomerReport.cs | 2 +- .../Resources/XSD/VectoOutputCustomer.0.8.xsd | 15 +++++------ .../XSD/VectoOutputManufacturer.0.8.xsd | 27 +++++++++---------- 3 files changed, 21 insertions(+), 23 deletions(-) diff --git a/VectoCore/VectoCore/OutputData/XML/XMLCustomerReport.cs b/VectoCore/VectoCore/OutputData/XML/XMLCustomerReport.cs index 84df04d0c8..585a562d61 100644 --- a/VectoCore/VectoCore/OutputData/XML/XMLCustomerReport.cs +++ b/VectoCore/VectoCore/OutputData/XML/XMLCustomerReport.cs @@ -258,7 +258,7 @@ namespace TUGraz.VectoCore.OutputData.XML new XAttribute(XNamespace.Xmlns + "tns", rootNS), new XAttribute(XNamespace.Xmlns + "di", di), new XAttribute(xsi + "schemaLocation", - string.Format("{0} {1}VectoOutputCustomer.xsd", rootNS, AbstractXMLWriter.SchemaLocationBaseUrl)), + string.Format("{0} {1}DEV/VectoOutputCustomer.xsd", rootNS, AbstractXMLWriter.SchemaLocationBaseUrl)), new XElement(rootNS + XMLNames.Report_DataWrap, new XAttribute(xsi + "type", "VectoOutputDataType"), vehicle, diff --git a/VectoCore/VectoCore/Resources/XSD/VectoOutputCustomer.0.8.xsd b/VectoCore/VectoCore/Resources/XSD/VectoOutputCustomer.0.8.xsd index 6637f51554..913fd65484 100644 --- a/VectoCore/VectoCore/Resources/XSD/VectoOutputCustomer.0.8.xsd +++ b/VectoCore/VectoCore/Resources/XSD/VectoOutputCustomer.0.8.xsd @@ -221,10 +221,15 @@ <xs:documentation>P238 / II.1.1.1</xs:documentation> </xs:annotation> </xs:element> - <xs:element name="LegislativeClass" type="vdecdef:LegislativeClassDeclarationType"> + <xs:element name="LegislativeClass"> <xs:annotation> <xs:documentation>P251 / II.1.1.2</xs:documentation> </xs:annotation> + <xs:simpleType> + <xs:restriction base="xs:string"> + <xs:minLength value="1"/> + </xs:restriction> + </xs:simpleType> </xs:element> <xs:element name="GrossVehicleMass"> <xs:annotation> @@ -519,13 +524,7 @@ </xs:simpleType> <xs:simpleType name="MissionTypeType"> <xs:restriction base="xs:token"> - <xs:enumeration value="Long Haul EMS"/> - <xs:enumeration value="Long Haul"/> - <xs:enumeration value="Regional Delivery EMS"/> - <xs:enumeration value="Regional Delivery"/> - <xs:enumeration value="Urban Delivery"/> - <xs:enumeration value="Municipal Utility"/> - <xs:enumeration value="Construction"/> + <xs:minLength value="1"/> </xs:restriction> </xs:simpleType> <xs:simpleType name="PowerUnitType"> diff --git a/VectoCore/VectoCore/Resources/XSD/VectoOutputManufacturer.0.8.xsd b/VectoCore/VectoCore/Resources/XSD/VectoOutputManufacturer.0.8.xsd index cc3f924ab6..a4fd13a5d9 100644 --- a/VectoCore/VectoCore/Resources/XSD/VectoOutputManufacturer.0.8.xsd +++ b/VectoCore/VectoCore/Resources/XSD/VectoOutputManufacturer.0.8.xsd @@ -733,10 +733,15 @@ <xs:documentation>P238 / I.1.1.3 / #1</xs:documentation> </xs:annotation> </xs:element> - <xs:element name="LegislativeClass" type="vdecdef:LegislativeClassDeclarationType"> + <xs:element name="LegislativeClass"> <xs:annotation> <xs:documentation>P251 / I.1.1.4 / #10</xs:documentation> </xs:annotation> + <xs:simpleType> + <xs:restriction base="xs:string"> + <xs:minLength value="1"/> + </xs:restriction> + </xs:simpleType> </xs:element> <xs:element name="GrossVehicleMass"> <xs:annotation> @@ -1031,10 +1036,15 @@ <xs:documentation>P238 / I.1.1.3 / #1</xs:documentation> </xs:annotation> </xs:element> - <xs:element name="LegislativeClass" type="vdecdef:LegislativeClassDeclarationType"> + <xs:element name="LegislativeClass"> <xs:annotation> <xs:documentation>P251 / I.1.1.4 / #10</xs:documentation> </xs:annotation> + <xs:simpleType> + <xs:restriction base="xs:string"> + <xs:minLength value="1"/> + </xs:restriction> + </xs:simpleType> </xs:element> <xs:element name="GrossVehicleMass"> <xs:annotation> @@ -1171,18 +1181,7 @@ </xs:simpleType> <xs:simpleType name="MissionTypeType"> <xs:restriction base="xs:token"> - <xs:enumeration value="Long Haul EMS"/> - <xs:enumeration value="Long Haul"/> - <xs:enumeration value="Regional Delivery EMS"/> - <xs:enumeration value="Regional Delivery"/> - <xs:enumeration value="Urban Delivery"/> - <xs:enumeration value="Municipal Utility"/> - <xs:enumeration value="Construction"/> - <xs:enumeration value="Heavy Urban"/> - <xs:enumeration value="Urban"/> - <xs:enumeration value="Suburban"/> - <xs:enumeration value="Coach"/> - <xs:enumeration value="Interurban"/> + <xs:minLength value="1"/> </xs:restriction> </xs:simpleType> <xs:simpleType name="PercentType"> -- GitLab