cbc:CitySubdivisionName is no longer part of UBL2.1 schema, use cbc:District instead

Hi there,

If I use cbc:CitySubdivisionName to specify the name of seller city or district, then I get this error:

XML does not comply with UBL 2.1 standards in line with ZATCA specifications. ERROR: org.xml.sax.SAXParseException; lineNumber: 186; columnNumber: 42; cvc-complex-type.2.4.a: Invalid content was found starting with element '{"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2":CitySubdivisionName}'. One of '{"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2":CountrySubentity, "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2":CountrySubentityCode, "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2":Region, "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2":District, "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2":TimezoneOffset, "urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2":AddressLine, "urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2":Country, "urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2":LocationCoordinate}' is expected.

To solve error above I use cbc:District, but only to get this error:

[BR-KSA-09]-Seller address must contain street name (BT-35), building number (KSA-17), postal code (BT-38), city (BT-37), district (KSA-3), country code (BT-40). For more information please access this link: https://splonline.com.sa/en/national-address-1/

So I think maybe your validator needs to be updated to recognize the new element name cbc:District to obtain the value of cbc:CitySubdivisionName so that it can comply with UBL 2.1 standards.

Hi there ,
here is what i am using , hope this helps
cac:PostalAddress
cbc:StreetNameMy street</cbc:StreetName>
cbc:AdditionalStreetName9090</cbc:AdditionalStreetName>
cbc:BuildingNumber2304</cbc:BuildingNumber>
cbc:PlotIdentification2304</cbc:PlotIdentification>
cbc:CitySubdivisionNameSub Division</cbc:CitySubdivisionName>
cbc:CityNameRiyadh</cbc:CityName>
cbc:PostalZone54000</cbc:PostalZone>
cbc:CountrySubentitySub Entity</cbc:CountrySubentity>
cac:Country
cbc:IdentificationCodeSA</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>

So I solved this by moving the CitySubdivisionName to after BuildingNumber and before CityName.

Seems fine now.

Hey Taseeb,

Thanks for your response.

I see that you are also using CitySubdivisionName, do you not get that error as well?