epb_view_models 2.3.0 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/api/schemas/data/orchestrate.json +4 -0
  3. data/api/schemas/xml/RdSAP-Schema-S-12.0/RdSAP/CommonFiles/CommonStructures.xsd +160 -0
  4. data/api/schemas/xml/RdSAP-Schema-S-12.0/RdSAP/CommonFiles/Exceptions.xsd +72 -0
  5. data/api/schemas/xml/{RdSAP-Schema-S-14.0/RdSAP/Messages/PropertyUPRNValidationRequest_1.xsd → RdSAP-Schema-S-12.0/RdSAP/Messages/ConditionReportCreateRequest_1.xsd} +24 -15
  6. data/api/schemas/xml/{RdSAP-Schema-S-14.0/RdSAP/SAP-EPC → RdSAP-Schema-S-12.0/RdSAP}/Templates/EPC-Certificate.xsd +48 -105
  7. data/api/schemas/xml/RdSAP-Schema-S-12.0/RdSAP/Templates/EPC-CollectedData.xsd +445 -0
  8. data/api/schemas/xml/RdSAP-Schema-S-12.0/RdSAP/Templates/HCR-FeaturesExternal.xsd +283 -0
  9. data/api/schemas/xml/RdSAP-Schema-S-12.0/RdSAP/Templates/HCR-FeaturesGrounds.xsd +222 -0
  10. data/api/schemas/xml/RdSAP-Schema-S-12.0/RdSAP/Templates/HCR-FeaturesInternal.xsd +205 -0
  11. data/api/schemas/xml/RdSAP-Schema-S-12.0/RdSAP/Templates/HCR-FeaturesServices.xsd +311 -0
  12. data/api/schemas/xml/RdSAP-Schema-S-12.0/RdSAP/Templates/HCR-PropertyDetails.xsd +380 -0
  13. data/api/schemas/xml/RdSAP-Schema-S-12.0/RdSAP/Templates/HCR-RiskAssessment.xsd +297 -0
  14. data/api/schemas/xml/{RdSAP-Schema-S-14.0/RdSAP/SAP-EPC/Templates/SAP05-Report.xsd → RdSAP-Schema-S-12.0/RdSAP/Templates/HIP-Reports.xsd} +64 -56
  15. data/api/schemas/xml/{RdSAP-Schema-S-14.0/RdSAP/SAP-EPC → RdSAP-Schema-S-12.0/RdSAP}/Templates/Property.xsd +14 -9
  16. data/api/schemas/xml/{RdSAP-Schema-S-14.0/RdSAP/SAP-EPC → RdSAP-Schema-S-12.0/RdSAP}/Templates/UserManagement.xsd +100 -63
  17. data/api/schemas/xml/{RdSAP-Schema-S-14.0/RdSAP/SAP-EPC → RdSAP-Schema-S-12.0/RdSAP}/UDT/BaseDataTypes.xsd +28 -26
  18. data/api/schemas/xml/RdSAP-Schema-S-12.0/RdSAP/UDT/EPC-Domains.xsd +68 -0
  19. data/api/schemas/xml/RdSAP-Schema-S-12.0/RdSAP/UDT/HCR-Domains.xsd +1773 -0
  20. data/api/schemas/xml/RdSAP-Schema-S-12.0/RdSAP/UDT/SAP-Domains.xsd +1101 -0
  21. data/api/schemas/xml/RdSAP-Schema-S-12.0/RdSAP/UDT/SharedDomains.xsd +596 -0
  22. data/api/schemas/xml/RdSAP-Schema-S-12.0/RdSAP/UDT/TypeDefinitions.xsd +19 -0
  23. data/api/schemas/xml/RdSAP-Schema-S-14.0/RdSAP/Messages/ConditionReportCreateRequest_1.xsd +2 -2
  24. data/lib/epb_view_models/version.rb +5 -0
  25. data/lib/epb_view_models.rb +1 -3
  26. data/lib/helper/rrn_helper.rb +4 -4
  27. data/lib/view_model/cs63/common_schema.rb +18 -18
  28. data/lib/view_model/factory.rb +1 -0
  29. data/lib/view_model/rd_sap_schema_s_120/common_schema.rb +547 -0
  30. data/lib/view_model/rd_sap_wrapper.rb +2 -0
  31. metadata +26 -36
  32. data/.buildspec.yml +0 -13
  33. data/.gitignore +0 -19
  34. data/.rspec +0 -2
  35. data/.rubocop.yml +0 -8
  36. data/.ruby-version +0 -1
  37. data/Gemfile +0 -15
  38. data/Gemfile.lock +0 -122
  39. data/Makefile +0 -17
  40. data/Rakefile +0 -12
  41. data/api/schemas/xml/RdSAP-Schema-S-14.0/RdSAP/ExternalDefinitions.xsd +0 -147
  42. data/api/schemas/xml/RdSAP-Schema-S-14.0/RdSAP/Messages/ConditionReportChangeAccessRequest_1.xsd +0 -44
  43. data/api/schemas/xml/RdSAP-Schema-S-14.0/RdSAP/Messages/ConditionReportChangeAccessResponse_1.xsd +0 -47
  44. data/api/schemas/xml/RdSAP-Schema-S-14.0/RdSAP/Messages/ConditionReportChangeStatusRequest_1.xsd +0 -44
  45. data/api/schemas/xml/RdSAP-Schema-S-14.0/RdSAP/Messages/ConditionReportChangeStatusResponse_1.xsd +0 -47
  46. data/api/schemas/xml/RdSAP-Schema-S-14.0/RdSAP/Messages/ConditionReportCreateResponse_1.xsd +0 -52
  47. data/api/schemas/xml/RdSAP-Schema-S-14.0/RdSAP/Messages/ConditionReportRetrieveRequest_1.xsd +0 -52
  48. data/api/schemas/xml/RdSAP-Schema-S-14.0/RdSAP/Messages/ConditionReportRetrieveResponse_1.xsd +0 -87
  49. data/api/schemas/xml/RdSAP-Schema-S-14.0/RdSAP/Messages/HomeInspectorRegisterUpdateRequest_1.xsd +0 -44
  50. data/api/schemas/xml/RdSAP-Schema-S-14.0/RdSAP/Messages/HomeInspectorRegisterUpdateResponse_1.xsd +0 -28
  51. data/api/schemas/xml/RdSAP-Schema-S-14.0/RdSAP/Messages/HomeInspectorRegisterUpdateStatusRequest_1.xsd +0 -30
  52. data/api/schemas/xml/RdSAP-Schema-S-14.0/RdSAP/Messages/HomeInspectorRegisterUpdateStatusResponse_1.xsd +0 -52
  53. data/api/schemas/xml/RdSAP-Schema-S-14.0/RdSAP/Messages/PropertyUPRNValidationResponse_1.xsd +0 -46
  54. data/api/schemas/xml/RdSAP-Schema-S-14.0/RdSAP/SAP-EPC/Templates/SAP05-CollectedData.xsd +0 -1188
  55. data/api/schemas/xml/RdSAP-Schema-S-14.0/RdSAP/SAP-EPC/UDT/EPC-Domains.xsd +0 -703
  56. data/api/schemas/xml/RdSAP-Schema-S-14.0/RdSAP/SAP-EPC/UDT/SAP05-Domains.xsd +0 -3007
  57. data/api/schemas/xml/RdSAP-Schema-S-14.0/RdSAP/SAP-EPC/UDT/SharedDomains.xsd +0 -311
  58. data/epb_view_models.gemspec +0 -27
@@ -1,18 +1,11 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <xs:schema targetNamespace="http://www.est.org.uk/epc/lodgement/estV20/DCLG-SAP05" xmlns="http://www.est.org.uk/epc/lodgement/estV20/DCLG-SAP05" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:bdt="http://www.est.org.uk/epc/lodgement/estV20/DCLG-SAP05/BaseDataTypes" xmlns:SAP05="http://www.est.org.uk/epc/lodgement/estV20/DCLG-SAP05" elementFormDefault="qualified" version="LIG-14.0">
3
- <xs:import namespace="http://www.est.org.uk/epc/lodgement/estV20/DCLG-SAP05/BaseDataTypes" schemaLocation="../UDT/BaseDataTypes.xsd"/>
4
- <xs:include schemaLocation="../UDT/SharedDomains.xsd"/>
2
+ <xs:schema targetNamespace="http://www.est.org.uk/epc/lodgement/estV20/DCLG-HIP" xmlns="http://www.est.org.uk/epc/lodgement/estV20/DCLG-HIP" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:pfdt="http://www.est.org.uk/epc/lodgement/estV20/DCLG-HIP/BaseDataTypes" xmlns:HIP="http://www.est.org.uk/epc/lodgement/estV20/DCLG-HIP" elementFormDefault="qualified" version="LIG-12.0">
3
+ <xs:annotation>
4
+ <xs:documentation>© Department of Communities and Local Government. © Crown copyright, 2007. The Home Condition Report logo and associated wording is a registered trade mark - any unlicensed use is not permitted. Copyright in the typographical arrangement of this document rests with the Crown. This publication, excluding logos, may be reproduced free of charge in any format or medium for research, private study, for internal circulation within an organisation or by registered scheme users. This is subject to it being reproduced accurately and not used in a misleading context.</xs:documentation>
5
+ </xs:annotation>
6
+ <xs:import namespace="http://www.est.org.uk/epc/lodgement/estV20/DCLG-HIP/BaseDataTypes" schemaLocation="../UDT/BaseDataTypes.xsd"/>
7
+ <xs:include schemaLocation="../UDT/HCR-Domains.xsd"/>
5
8
  <xs:include schemaLocation="../Templates/Property.xsd"/>
6
- <xs:simpleType name="CertificateNumberType">
7
- <xs:annotation>
8
- <xs:documentation>The Certificate Number is a 10-character fixed-length alphanumeric code consisting of 4 characters identifying the Certification Scheme and a 6-digit zero-padded identifier for each Home Inspector certified by that Certification Scheme. For example ABCD987654, XYZ_123456 etc.</xs:documentation>
9
- </xs:annotation>
10
- <xs:restriction base="xs:string">
11
- <xs:pattern value="[A-Z/_]{4}[0-9]{6}"/>
12
- <xs:minLength value="10"/>
13
- <xs:maxLength value="10"/>
14
- </xs:restriction>
15
- </xs:simpleType>
16
9
  <xs:element name="Home-Inspector" type="Home-Inspector"/>
17
10
  <xs:complexType name="Home-Inspector">
18
11
  <xs:annotation>
@@ -40,14 +33,14 @@ Although covered by a different regulatory regime a Home Inspector and Energy As
40
33
  Reports are only acceptable from Home Inspectors who are actually "Active" at the point that the Report is submitted for registration.</xs:documentation>
41
34
  </xs:annotation>
42
35
  </xs:element>
43
- <xs:element name="Notify-Lodgement" type="bdt:Flag" minOccurs="0" maxOccurs="1">
36
+ <xs:element name="Notify-Lodgement" type="pfdt:Flag" minOccurs="0" maxOccurs="1">
44
37
  <xs:annotation>
45
38
  <xs:documentation>Indicates whether the Home Inspector wants to be notified that a new Home Condition Report has been lodged in the HCR Register under his name.
46
39
 
47
40
  If "Yes" then the HCR Registration Operating Entity must send a written notification, preferably an e-mail to the Home Inspector's registered E-Mail Address, for every Home Condition Report that the Home Inspector produces.</xs:documentation>
48
41
  </xs:annotation>
49
42
  </xs:element>
50
- <xs:element name="Contact-Address" type="AddressType" minOccurs="0" maxOccurs="1">
43
+ <xs:element name="Contact-Address" type="AddressType" minOccurs="1" maxOccurs="1">
51
44
  <xs:annotation>
52
45
  <xs:documentation>The address that any written correspondence can be sent to. This is not the same as the Registered Address because it may, of course, be a Post Office Box.</xs:documentation>
53
46
  </xs:annotation>
@@ -66,31 +59,30 @@ If "Yes" then the HCR Registration Operating Entity must send a written notifica
66
59
  <xs:documentation>A free-text list of any specialisms that the Home Inspector may offer to the consumer e.g. Thatched Roofs, SBEM etc). The list is at the discretion of the Home Inspector though may eventaully evolve into a predefined list.</xs:documentation>
67
60
  </xs:annotation>
68
61
  </xs:element>
69
- <xs:element name="Company-Name" type="xs:string" minOccurs="0" maxOccurs="1">
62
+ <xs:element name="Company-Name" type="xs:string" minOccurs="1" maxOccurs="1">
70
63
  <xs:annotation>
71
- <xs:documentation>The Name of the Company that the Home Inspector is empolyed by.</xs:documentation>
64
+ <xs:documentation>The Name of the Company that the Home Inspector is employed by.</xs:documentation>
72
65
  </xs:annotation>
73
66
  </xs:element>
74
67
  <xs:element name="Postcode-Coverage" type="Postcode-CoverageType" minOccurs="0" maxOccurs="1">
75
68
  <xs:annotation>
76
- <xs:documentation>Comma-delimited string of Postcode Areas and/or Postcode Outcodes that the Home Inspector covers - for example: NN, PE18, LE27.
69
+ <xs:documentation>Comma-delimited string of Postcode Areas and/or Postcode Outcodes that the Home Inspector covers - for example: &amp;#8220;NN, PE18, LE27&amp;#8221;.
77
70
 
78
71
  This is used by the General Public as part of the Search Home Inspector Register to find Home Inspectors that take work in a particular area.
79
72
 
80
- An empty list means that the Home Inspector does not cover any specific areas (which would be the case if they did not take privately commissioned work) and hence would not match on any Postcode based search.
81
- </xs:documentation>
82
- </xs:annotation>
83
- </xs:element>
84
- <xs:element name="Inspector-Report-Types" type="Inspector-Report-Types" minOccurs="1" maxOccurs="1">
85
- <xs:annotation>
86
- <xs:documentation>A list of ReportTypeCode elements that indicate what reports the assessor/inspector is allowed to undertake.</xs:documentation>
73
+ An empty list means that the Home Inspector does not cover any specific areas (which would be the case if they did not take privately commissioned work) and hence would not match on any Postcode based search.</xs:documentation>
87
74
  </xs:annotation>
88
75
  </xs:element>
89
76
  <xs:element name="Certification-Scheme" type="Certification-Scheme" minOccurs="1" maxOccurs="1"/>
90
- <xs:element name="Base-Postcode-Location" type="PostcodeType" minOccurs="0" maxOccurs="1">
91
- <xs:annotation>
92
- <xs:documentation>The full postcode that the Home Inspector works from.</xs:documentation>
93
- </xs:annotation>
77
+ <xs:element name="Inspector-Report-Types">
78
+ <xs:complexType>
79
+ <xs:annotation>
80
+ <xs:documentation>A list of ReportTypeCode elements that indicate what reports the assessor/inspector is allowed to undertake</xs:documentation>
81
+ </xs:annotation>
82
+ <xs:sequence>
83
+ <xs:element name="Report-Type" type="ReportTypeCode" minOccurs="1" maxOccurs="unbounded"/>
84
+ </xs:sequence>
85
+ </xs:complexType>
94
86
  </xs:element>
95
87
  <xs:element name="Identification-Number">
96
88
  <xs:complexType>
@@ -110,6 +102,29 @@ An empty list means that the Home Inspector does not cover any specific areas (w
110
102
  </xs:element>
111
103
  </xs:all>
112
104
  </xs:complexType>
105
+ <xs:simpleType name="InspectorTypeCode">
106
+ <xs:restriction base="xs:string">
107
+ <xs:enumeration value="1">
108
+ <xs:annotation>
109
+ <xs:documentation>Home Inspector</xs:documentation>
110
+ </xs:annotation>
111
+ </xs:enumeration>
112
+ <xs:enumeration value="2">
113
+ <xs:annotation>
114
+ <xs:documentation>Domestic Energy Assessor</xs:documentation>
115
+ </xs:annotation>
116
+ </xs:enumeration>
117
+ </xs:restriction>
118
+ </xs:simpleType>
119
+ <xs:element name="Mortgage-Lender" type="Mortgage-Lender"/>
120
+ <xs:complexType name="Mortgage-Lender">
121
+ <xs:annotation>
122
+ <xs:documentation>A Mortgage Lender is an organisation that may lend money to the Buyer for the purpose of purchasing the Property.
123
+
124
+ As part of this decision making the Mortgage Lender may use an Automated Valuation Model (AVM) to value the Property and requires access to the underlying data in the Home Condition Report or the content of the Energy Performance Certificate in order to complete this valuation.</xs:documentation>
125
+ </xs:annotation>
126
+ <xs:all/>
127
+ </xs:complexType>
113
128
  <xs:simpleType name="HomeInspectorStatusCode">
114
129
  <xs:restriction base="xs:string">
115
130
  <xs:enumeration value="Inactive">
@@ -134,46 +149,21 @@ An empty list means that the Home Inspector does not cover any specific areas (w
134
149
  </xs:enumeration>
135
150
  </xs:restriction>
136
151
  </xs:simpleType>
137
- <xs:element name="PersonNameType" type="PersonNameType"/>
138
- <xs:complexType name="PersonNameType">
139
- <xs:annotation>
140
- <xs:documentation>A Person Name is a complex structure to capture the separate components of the name for a Person, consisting of:
141
- * A prefix e.g. "Mr", "Mrs", "Dr" etc.
142
- * First Name e.g. "John"
143
- * Middle Initial
144
- * Surname e.g. "Smith"
145
- * Suffix e.g. "PhD", "FRICS"
146
- The First Name and Surname are the only mandatory elements of a name.
147
-
148
- The name elements can then be combined in a number of different ways to produce different formats appropriate to the output context.
149
-
150
- Note that all parts of the Persons Name should be stored as uppercase strings because this makes it easier to search and index the names but some components may be converted to mixed case for printing on reports and such like.
151
- </xs:documentation>
152
- </xs:annotation>
153
- <xs:all>
154
- <xs:element name="Prefix" type="xs:string" minOccurs="1" maxOccurs="1"/>
155
- <xs:element name="First-Name" type="xs:string" minOccurs="1" maxOccurs="1"/>
156
- <xs:element name="Surname" type="xs:string" minOccurs="1" maxOccurs="1"/>
157
- <xs:element name="Suffix" type="xs:string" minOccurs="1" maxOccurs="1"/>
158
- </xs:all>
159
- </xs:complexType>
160
- <xs:element name="Inspector-Report-Types" type="Inspector-Report-Types"/>
161
- <xs:complexType name="Inspector-Report-Types">
162
- <xs:sequence>
163
- <xs:element name="Report-Type" type="ReportTypeCode" minOccurs="1" maxOccurs="unbounded"/>
164
- </xs:sequence>
165
- </xs:complexType>
166
- <xs:simpleType name="PhoneNumberType">
167
- <xs:restriction base="xs:string">
168
- <xs:pattern value="[0-9\-\.\)\(\+ ]+"/>
169
- </xs:restriction>
170
- </xs:simpleType>
171
152
  <xs:simpleType name="Postcode-CoverageType">
172
153
  <xs:restriction base="xs:string">
173
154
  <xs:pattern value="[A-Z]{1,2}[0-9]{0,2}(,[A-Z]{1,2}[0-9]{0,2})*"/>
174
155
  <xs:maxLength value="500"/>
175
156
  </xs:restriction>
176
157
  </xs:simpleType>
158
+ <xs:element name="InspectorKeyFields" type="InspectorKeyFields"/>
159
+ <xs:complexType name="InspectorKeyFields">
160
+ <xs:annotation>
161
+ <xs:documentation>Key field definition for the Home Inspector class - used when a message requires a reference to a Home Inspexctor to be passed rather than the details.</xs:documentation>
162
+ </xs:annotation>
163
+ <xs:sequence>
164
+ <xs:element name="Certificate-Number" type="CertificateNumberType" minOccurs="1" maxOccurs="1"/>
165
+ </xs:sequence>
166
+ </xs:complexType>
177
167
  <xs:element name="Certification-Scheme" type="Certification-Scheme"/>
178
168
  <xs:complexType name="Certification-Scheme">
179
169
  <xs:annotation>
@@ -212,4 +202,51 @@ In the case of a individual the name may not be unique (e.g. there may be many t
212
202
  <xs:element name="Telephone" type="PhoneNumberType" minOccurs="1" maxOccurs="1"/>
213
203
  </xs:all>
214
204
  </xs:complexType>
205
+ <xs:element name="PersonNameType" type="PersonNameType"/>
206
+ <xs:complexType name="PersonNameType">
207
+ <xs:annotation>
208
+ <xs:documentation>A Person Name is a complex structure to capture the separate components of the name for a Person, consisting of:
209
+ * A prefix e.g. "Mr", "Mrs", "Dr" etc.
210
+ * First Name e.g. "John"
211
+ * Middle Initial
212
+ * Surname e.g. "Smith"
213
+ * Suffix e.g. "PhD", "FRICS"
214
+ The First Name and Surname are the only mandatory elements of a name.
215
+
216
+ The name elements can then be combined in a number of different ways to produce different formats appropriate to the output context.
217
+
218
+ Note that all parts of the Persons Name should be stored as uppercase strings because this makes it easier to search and index the names but some components may be converted to mixed case for printing on reports and such like.
219
+ </xs:documentation>
220
+ </xs:annotation>
221
+ <xs:all>
222
+ <xs:element name="Prefix" type="xs:string" minOccurs="1" maxOccurs="1"/>
223
+ <xs:element name="First-Name" type="xs:string" minOccurs="1" maxOccurs="1"/>
224
+ <xs:element name="Surname" type="xs:string" minOccurs="1" maxOccurs="1"/>
225
+ <xs:element name="Suffix" type="xs:string" minOccurs="1" maxOccurs="1"/>
226
+ </xs:all>
227
+ </xs:complexType>
228
+ <xs:element name="CertificationSchemeKeyFields" type="CertificationSchemeKeyFields"/>
229
+ <xs:complexType name="CertificationSchemeKeyFields">
230
+ <xs:annotation>
231
+ <xs:documentation>Key field definition for the Certification Scheme class.</xs:documentation>
232
+ </xs:annotation>
233
+ <xs:sequence>
234
+ <xs:element name="Registered-Name" type="xs:string" minOccurs="1" maxOccurs="1"/>
235
+ </xs:sequence>
236
+ </xs:complexType>
237
+ <xs:simpleType name="PhoneNumberType">
238
+ <xs:restriction base="xs:string">
239
+ <xs:pattern value="[0-9\-\.\)\(\+ ]+"/>
240
+ </xs:restriction>
241
+ </xs:simpleType>
242
+ <xs:simpleType name="CertificateNumberType">
243
+ <xs:annotation>
244
+ <xs:documentation>The Certificate Number is a 10-character fixed-length alphanumeric code consisting of 4 characters identifying the Certification Scheme and a 6-digit zero-padded identifier for each Home Inspector certified by that Certification Scheme. For example ABCD987654, XYZ_123456 etc.</xs:documentation>
245
+ </xs:annotation>
246
+ <xs:restriction base="xs:string">
247
+ <xs:pattern value="[A-Z/_]{4}[0-9]{6}"/>
248
+ <xs:minLength value="10"/>
249
+ <xs:maxLength value="10"/>
250
+ </xs:restriction>
251
+ </xs:simpleType>
215
252
  </xs:schema>
@@ -1,7 +1,10 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <xs:schema targetNamespace="http://www.est.org.uk/epc/lodgement/estV20/DCLG-SAP05/BaseDataTypes" xmlns="http://www.est.org.uk/epc/lodgement/estV20/DCLG-SAP05/BaseDataTypes" xmlns:bdt="http://www.est.org.uk/epc/lodgement/estV20/DCLG-SAP05/BaseDataTypes" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" version="LIG-14.0">
2
+ <xs:schema targetNamespace="http://www.est.org.uk/epc/lodgement/estV20/DCLG-HIP/BaseDataTypes" xmlns="http://www.est.org.uk/epc/lodgement/estV20/DCLG-HIP/BaseDataTypes" xmlns:pfdt="http://www.est.org.uk/epc/lodgement/estV20/DCLG-HIP/BaseDataTypes" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" version="LIG-12.0">
3
3
  <xs:annotation>
4
- <xs:documentation>The purpose of Base Data Type declarations is to provide a point of declaration of all the primitive datatypes that are in use within the domain and can be used to describe the contents of the Business Information Model.
4
+ <xs:documentation Department of Communities and Local Government. © Crown copyright, 2007. The Home Condition Report logo and associated wording is a registered trade mark - any unlicensed use is not permitted. Copyright in the typographical arrangement of this document rests with the Crown. This publication, excluding logos, may be reproduced free of charge in any format or medium for research, private study, for internal circulation within an organisation or by registered scheme users. This is subject to it being reproduced accurately and not used in a misleading context.
5
+
6
+
7
+ The purpose of Base Data Type declarations is to provide a point of declaration of all the primitive datatypes that are in use within the domain and can be used to describe the contents of the Business Information Model.
5
8
 
6
9
  A significant problem with the XML Schema Definition standard is that it is designed to solve a large number of software implementation problems and so provides an equally large number of datatypes with each datatype describing a variation on a theme.
7
10
 
@@ -21,7 +24,7 @@ The declarations in this file underpin the User Defined Types, Message Infrastru
21
24
  </xs:documentation>
22
25
  </xs:annotation>
23
26
  <xs:simpleType name="Percentage">
24
- <xs:restriction base="xs:decimal">
27
+ <xs:restriction base="xs:integer">
25
28
  <xs:maxInclusive value="100"/>
26
29
  <xs:minInclusive value="0"/>
27
30
  </xs:restriction>
@@ -47,7 +50,7 @@ The currency attribute should then include a list of valid currencies codes that
47
50
  <xs:annotation>
48
51
  <xs:documentation>A count of the number of occurrences of something - must therefore be &gt;=0. This is the functional equivalent of the XML nonNegativeInteger datatype.</xs:documentation>
49
52
  </xs:annotation>
50
- <xs:restriction base="xs:integer"/>
53
+ <xs:list itemType="xs:integer"/>
51
54
  </xs:simpleType>
52
55
  <xs:element name="Classifier" type="Classifier"/>
53
56
  <xs:complexType name="Classifier">
@@ -56,7 +59,7 @@ The currency attribute should then include a list of valid currencies codes that
56
59
 
57
60
  Classifier should never actually be used as the datatype for any data-item in a finished data model because a specific Enumerated Domain should be declared for defining the specific values in the domain. However it is acceptable in an incomplete model where definition of the domain has yet to be completed.</xs:documentation>
58
61
  </xs:annotation>
59
- <xs:all/>
62
+ <xs:sequence/>
60
63
  <xs:attribute name="pid" use="required" type="xs:string"/>
61
64
  </xs:complexType>
62
65
  <xs:element name="Reference" type="Reference"/>
@@ -68,14 +71,19 @@ components). In order to be consistent across the entire dataset all references
68
71
  This has a shortcoming in that we can't support multi-value keys using this datatype. However
69
72
  I'm reluctant to extend the datatype to include the ID as a nested element because it becomes very cumbersome to use. Instead, in all likelihood, the Primary Key to any entity in a data processing application is likely to be a single-value, system-generated key so we're imposing that restriction here as well.</xs:documentation>
70
73
  </xs:annotation>
71
- <xs:all/>
74
+ <xs:sequence/>
72
75
  </xs:complexType>
73
- <xs:simpleType name="Measurement">
76
+ <xs:element name="Measurement" type="Measurement"/>
77
+ <xs:complexType name="Measurement">
74
78
  <xs:annotation>
75
- <xs:documentation>A measurement of something such as a length or area. All measurements are to 2 decimal places and must be positive.</xs:documentation>
79
+ <xs:documentation>A measurement of something such as a length or area. All measurements are to 1 decimal places and must be positive.</xs:documentation>
76
80
  </xs:annotation>
77
- <xs:restriction base="xs:decimal"/>
78
- </xs:simpleType>
81
+ <xs:simpleContent>
82
+ <xs:extension base="xs:decimal">
83
+ <xs:attribute name="quantity" use="optional" type="xs:string"/>
84
+ </xs:extension>
85
+ </xs:simpleContent>
86
+ </xs:complexType>
79
87
  <xs:element name="IDString" type="IDString"/>
80
88
  <xs:complexType name="IDString">
81
89
  <xs:annotation>
@@ -130,21 +138,8 @@ This is a very similar concept to XML ID datatype but is locally defined because
130
138
  </xs:enumeration>
131
139
  </xs:restriction>
132
140
  </xs:simpleType>
133
- <xs:simpleType name="ExtendedBoolean">
134
- <xs:annotation>
135
- <xs:documentation>An extended boolean type that also allows 'unknown' as a value.</xs:documentation>
136
- </xs:annotation>
137
- <xs:restriction base="xs:token">
138
- <xs:enumeration value="false"/>
139
- <xs:enumeration value="true"/>
140
- <xs:enumeration value="unknown"/>
141
- </xs:restriction>
142
- </xs:simpleType>
143
141
  <xs:element name="Sentence" type="Sentence"/>
144
142
  <xs:complexType name="Sentence">
145
- <xs:annotation>
146
- <xs:documentation>String value with a language code for natural-language text.</xs:documentation>
147
- </xs:annotation>
148
143
  <xs:simpleContent>
149
144
  <xs:extension base="xs:string">
150
145
  <xs:attribute name="language" use="optional" type="LanguageCode">
@@ -157,9 +152,7 @@ This is a very similar concept to XML ID datatype but is locally defined because
157
152
  </xs:complexType>
158
153
  <xs:simpleType name="RRNType">
159
154
  <xs:annotation>
160
- <xs:documentation>The Report Reference Number is a 20-digit unique identifier assigned to each Report.
161
-
162
- It is formatted as five blocks of four digits i.e. 9999-9999-9999-9999-9999 and generated by an algorithm described in Appendix A "Report ID Generation" of Section 18 "Transformation Rules" of the Technical Standards.</xs:documentation>
155
+ <xs:documentation>The Report Reference Number is a 20-digit unique identifier assigned to each Home Condition Report. It is formatted as five blocks of four digits i.e. 9999-9999-9999-9999-9999 and generayted by an algorithm described in Appendix A "Report ID Generation" of Section 18 "Transformation Rules" of the Technical Standards.</xs:documentation>
163
156
  </xs:annotation>
164
157
  <xs:restriction base="xs:string">
165
158
  <xs:pattern value="[0-9]{4}-[0-9]{4}-[0-9]{4}-[0-9]{4}-[0-9]{4}"/>
@@ -172,4 +165,13 @@ It is formatted as five blocks of four digits i.e. 9999-9999-9999-9999-9999 and
172
165
  <xs:attribute name="KeyName" use="optional" type="xs:string"/>
173
166
  <xs:attribute name="DomainName" use="optional" type="xs:string"/>
174
167
  </xs:complexType>
168
+ <xs:element name="ReportKeyFields" type="ReportKeyFields"/>
169
+ <xs:complexType name="ReportKeyFields">
170
+ <xs:annotation>
171
+ <xs:documentation>Primary Key Fields definition for a Report - used when a message requires a reference tio a report to be passed.</xs:documentation>
172
+ </xs:annotation>
173
+ <xs:sequence>
174
+ <xs:element name="RRN" type="RRNType" minOccurs="1" maxOccurs="1"/>
175
+ </xs:sequence>
176
+ </xs:complexType>
175
177
  </xs:schema>
@@ -0,0 +1,68 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <xs:schema targetNamespace="http://www.est.org.uk/epc/lodgement/estV20/DCLG-HIP" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.est.org.uk/epc/lodgement/estV20/DCLG-HIP" version="LIG-12.0">
3
+ <xs:annotation>
4
+ <xs:documentation>© Department of Communities and Local Government. © Crown copyright, 2007. The Home Condition Report logo and associated wording is a registered trade mark - any unlicensed use is not permitted. Copyright in the typographical arrangement of this document rests with the Crown. This publication, excluding logos, may be reproduced free of charge in any format or medium for research, private study, for internal circulation within an organisation or by registered scheme users. This is subject to it being reproduced accurately and not used in a misleading context.
5
+ </xs:documentation>
6
+ </xs:annotation>
7
+ <xs:simpleType name="RecommendationCategoryCode">
8
+ <xs:restriction base="xs:string">
9
+ <xs:enumeration value="1">
10
+ <xs:annotation>
11
+ <xs:documentation>Lower cost</xs:documentation>
12
+ </xs:annotation>
13
+ </xs:enumeration>
14
+ <xs:enumeration value="2">
15
+ <xs:annotation>
16
+ <xs:documentation>Higher cost</xs:documentation>
17
+ </xs:annotation>
18
+ </xs:enumeration>
19
+ <xs:enumeration value="3">
20
+ <xs:annotation>
21
+ <xs:documentation>Further measure</xs:documentation>
22
+ </xs:annotation>
23
+ </xs:enumeration>
24
+ <xs:enumeration value="4">
25
+ <xs:annotation>
26
+ <xs:documentation>deselected</xs:documentation>
27
+ </xs:annotation>
28
+ </xs:enumeration>
29
+ </xs:restriction>
30
+ </xs:simpleType>
31
+ <xs:simpleType name="EnergyEfficiencySummaryCode">
32
+ <xs:restriction base="xs:string">
33
+ <xs:enumeration value="0">
34
+ <xs:annotation>
35
+ <xs:documentation>N/A</xs:documentation>
36
+ </xs:annotation>
37
+ </xs:enumeration>
38
+ <xs:enumeration value="1">
39
+ <xs:annotation>
40
+ <xs:documentation>Very Poor</xs:documentation>
41
+ </xs:annotation>
42
+ </xs:enumeration>
43
+ <xs:enumeration value="2">
44
+ <xs:annotation>
45
+ <xs:documentation>Poor</xs:documentation>
46
+ </xs:annotation>
47
+ </xs:enumeration>
48
+ <xs:enumeration value="3">
49
+ <xs:annotation>
50
+ <xs:documentation>Average</xs:documentation>
51
+ </xs:annotation>
52
+ </xs:enumeration>
53
+ <xs:enumeration value="4">
54
+ <xs:annotation>
55
+ <xs:documentation>Good</xs:documentation>
56
+ </xs:annotation>
57
+ </xs:enumeration>
58
+ <xs:enumeration value="5">
59
+ <xs:annotation>
60
+ <xs:documentation>Very Good</xs:documentation>
61
+ </xs:annotation>
62
+ </xs:enumeration>
63
+ </xs:restriction>
64
+ </xs:simpleType>
65
+ <xs:simpleType name="EnergyImprovementCode">
66
+ <xs:restriction base="xs:string"/>
67
+ </xs:simpleType>
68
+ </xs:schema>