Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does cvc mean in XML Schema (Validation) context?

Tags:

xml

xsd

This huge document about XML Schema does not explain what cvc means:

http://www.w3.org/TR/2007/WD-xmlschema11-1-20070830/#validation_failures

It is obvious that is something like a error code. But would it be acronym for something that is not there (code value constraint???).

like image 676
rdllopes Avatar asked Apr 24 '14 11:04

rdllopes


People also ask

What is CVC complex type 2.4 A?

cvc-complex-type. 2.4. a: Invalid content was found starting with element 'object_id'. One of '{object_id, description, level}' is expected.

How does XML schema validation work?

XML validation is a process done to check for a syntax error in an XML document to ensure that the document is well-written with the standard rules using either DTD or schema. A complete XML file is considered to be valid XML document unless it has correct syntax and constraints defined in it.

What does Xs mean in XSD?

XML Schema Definition or XSD is a recommendation by the World Wide Web Consortium (W3C) to describe and validate the structure and content of an XML document. It is primarily used to define the elements, attributes and data types the document can contain.


1 Answers

Eh, CVC stands for "Validation Rule"!

Okay, that doesn't make a lot of sense, and I imagine it started out as something more reasonable like "Content Validation Constraint" back in the days before the first working draft.

The main thing is that:

  1. By starting all validation rules with cvc-, uniqueness is aided by avoiding a clash between the name and one for another rule.
  2. It acts as a handy clue to the type of rule, as all validation rules start with cvc- and only validation rules start with cvc-. Similarly, all schema representation constraints start with src- except schema-reference.
like image 118
Jon Hanna Avatar answered Sep 18 '22 01:09

Jon Hanna