schemav cvc enumeration valid что это значит
Почему файл может не соответствовать XSD-схеме СЗВ-М?
Что такое XSD-схема файла и ошибка в ней?
XSD — это программный язык. С помощью XSD описывается структура XML-документа:
То есть XSD-схема СЗВ-М — это выполненное программным языком описание структуры отчета СЗВ-М. Если во внесенной в СЗВ-М информации содержатся ошибки или неточности, то при контроле файла тоже средствами XSD информация является нечитаемой. Поэтому система формирует пользователю предупреждение: «отчет СЗВ-М не соответствует XSD-схеме». Это означает, что программное обеспечение не может воспринять данные из отчета, т. к. они некорректные с точки зрения языка XSD.
ОБРАТИТЕ ВНИМАНИЕ! Ошибка XSD может быть как в самих введенных данных (например, в ИНН или регистрационном номере организации), так и в том, как именно эти данные введены (например, указаны лишние нули, или пробелы, или дефисы). То есть для установления и устранения ошибки нужно в каждом конкретном случае проверять конкретный файл!
Больше об ошибках в файле СЗВ-М — в статье «Отрицательный протокол по СЗВ-М (нюансы)».
Начиная с отчетности за май 2021 года СЗВ-М сдается по новой форме. Актуальный образец отчета можно скачать в КонсультантПлюс. Пробный доступ к правовой системе предоставляется бесплатно.
Что означает «неправильное имя файла» или «имя не соответствует утвержденному формату 00042»?
Как должно выглядеть правильное имя файла отчета СЗВ-М (формат 00042), установлено постановлением правления ПФР «Об утверждении формата сведений для ведения индивидуального (персонифицированного) учета (форма СЗВ-М)» от 07.12.2016 № 1077п. Корректное имя должно содержать следующие разделы:
Корректное имя должно выглядеть следующим образом:
Портал поддержки федеральных
систем в сфере образования
Непонятные ошибки при валидации
В версии 3 появились новые ошибки которых раньше не было:
1. Ошибка валидации XSD. Строка:33, cvc-enumeration-valid: Value ‘1.1’ is not facet-valid with respect to enumeration ‘[1, 2, 3, 4, 4.1, 4.2, 5, 6, 7, 7.1, 7.2, 7.3, 7.4, 8, 9, 9.1, 10, 11, 12, 12.1, 13, 13.1, 14, 15, 16, 17, 17.1, 18, 18.1, 18.2, 18.3, 19, 19.1, 19.2, 19.3, 20, 20.1, 20.2, 20.3, 20.4, 21, 22, 23, 24, 25, 26, 29, 30, 30.1, 30.2, 31, 31.2, 31.3, 31.4, 32, 33]’. It must be a value from the enumeration.
(такая же история с показателями 27, 28, 31.1) как это так оказалось что в метод. рекомендациях эти показатели есть, а ваша система говорит что они лишние и необходимо предоставлять только показатели из списка (1, 2, 3, 4, 4.1, 4.2, 5, 6, 7, 7.1, 7.2, 7.3, 7.4, 8, 9, 9.1, 10, 11, 12, 12.1, 13, 13.1, 14, 15, 16, 17, 17.1, 18, 18.1, 18.2, 18.3, 19, 19.1, 19.2, 19.3, 20, 20.1, 20.2, 20.3, 20.4, 21, 22, 23, 24, 25, 26, 29, 30, 30.1, 30.2, 31, 31.2, 31.3, 31.4, 32, 33)
2. Ошибка валидации XSD. Строка:14, cvc-complex-type.4: Attribute ‘features’ must appear on element ‘organization’.
согласно методических рекомендаций атрибута features не существует, есть тэг feature.
Атрибут всегда находится внутри тэга, например: вот age_from, age_to, name и т.д. являются атрибутами тэга group, в связи с этим прошу исправить отображение ошибок.
3. В справочнике ФИАС очень много отсутствует значений для houseguid, в связи с этим мы его не передаем, измените либо проверку либо метод рекомендации, разрешите передавать aoguid улицы и просто текстом номер дома
Портал поддержки федеральных
систем в сфере образования
Что означают ошибки валидации xsd
«message» : «cvc-elt.1: Cannot find the declaration of element ‘push_data_request’.» Неуказан XML заголовок Возможно есть проблемы с неправильно указанным пространством имен
7 ответов
Седова Екатерина Павловна оставил комментарий 6 лет назад
Строка:1, cvc-attribute.3: The value ‘Без контингента’ of attribute ‘status’ on element ‘organization’ is not valid with respect to its type, ‘orgStatus’.
Строка:1, cvc-attribute.3: The value ‘Задержка психического развития’ of attribute ‘ovz_type’ on element ‘group’ is not valid with respect to its type, ‘null’.
Строка:1, cvc-attribute.3: The value ‘Частная’ of attribute ‘type’ on element ‘organization’ is not valid with respect to its type, ‘null’.
Все ошибки cvc-attribute.3:говорят о том что атрибут указан не правильно. Согласно Метод рекомендациям таких значений эти атрибуты принимать не могут.
Строка:1, cvc-complex-type.2.1: Element ‘municipality’ must have no character or element information item [children], because the type’s content type is empty.
Кто-то пытался передать контент прямо внутри тэга ‘municipality’
Строка:1, cvc-complex-type.2.4.a: Invalid content was found starting with element ‘organization’. One of ‘<"http://Fed.edu.segment/gisdo":no_doo_act>‘ is expected.
Ожидается тэг no_doo_act в тэге ‘organization’
Ожидаются тэги building и additional_education в тэге ‘organization’
Добрый день!
вот такие ошибки при прогрузке данных
Ошибка валидации XSD. Строка:cvc-parse-error: Document is invalid: no grammar found., cvc-parse-error: Document is invalid: no grammar found.
Ошибка валидации XSD. Строка:cvc-elt.1: Cannot find the declaration of element ‘push_data_request’., cvc-elt.1: Cannot find the declaration of element ‘push_data_request’.
файл валидацию по XSD шаблону проходит.
вот содержание файла
But if my value is empty it returns an error
cvc-length-valid: Value » with length = ‘0’ is not facet-valid with respect to length ‘3’ for type ‘#AnonType_CurrencyCodeServiceServiceList’.
2 Answers 2
Your schema allows to omitt the CurrencyCode element but if it is present its value must be a string with exactly 3 characters length.
You could weaken your restriction to allow 0-length values by specifying min and max length:
This will however allow values like «EU » which is not a valid currency code.
A different approach would be, to specify a list of valid currency code values and include an empty string as a valid code:
The element is optional. Instead of using an empty value, the most obvious thing to do is to just remove the whole element if you don’t want to give any real value for it.
If you for some reason still want to allow an empty string and a 3 characters long string, then you have at least 3 options that don’t require you to weaken the restriction or list every possible value (=no enumerations).
Solution 1, restrict with a regex
Restrict the element value with a regular expression that allows an empty string and all 3 characters long strings.
Solution 2, allow element to be nillable
Usage in the instance XML:
Note that an empty value is not allowed if you don’t also specify the xsi:nil=»true» attribute. You also need to define that xsi namespace.
Solution 3, define a default value
Add a suitable default value for the element in your schema. The default value must also fulfil the restrictions of the element’s value. Default value will be added to parsed XML tree after schema validation and only if the element contents is empty.
XML instance before validation:
How the instance document is interpreted after the schema validation:
Here is an example schema and an example XML document that is valid against this schema
Schemav cvc enumeration valid что это значит
Table of contents
Notice! This page describes the nature of the error using a hypothetical example and not the erroneous data of the input test file. You should however be able to apply this information to your error case. |
General description of the error:
The format of the error message: cvc-datatype-valid.1.2.3: »<0>» is not a valid value of union type »<1>».
Possible causes for this error:
An example
Error message: Error cvc-datatype-valid.1.2.3: ‘large1’ is not a valid value of union type ‘SizeType’.
How to fix: The error can be corrected looking up the schema definition for element having the erroneous value and using only the values that are allowed. In this case the schema restricts the allowed values.
Schema:
This simply means that to correct this you must use values from collection («small», «medium», «large») or from collection («2», «18»).