This section describes a tutorial example of using built-in datatypes incorrectly.
The namespace rule on built-in datatypes is very important. If you don't follow it, you will get
errors we shown in the following schema examples, holiday_error.xsd:
Here is the output of XsdSchemaChecker.java on this schema:
>java XsdSchemaChecker holiday_error.xsd
Error:
Line number: 10
Column number: 43
Message: src-resolve: Cannot resolve the name 'date' to a(n)
'type definition' component.
Error:
Line number: 12
Column number: 47
Message: s4s-att-invalid-value: Invalid attribute value for
'type' in element 'element'. Recorded reason: UndeclaredPrefix:
Cannot resolve 'w3c:date' as a QName: the prefix 'w3c' is not
declared.
Error:
Line number: 14
Column number: 47
Message: src-resolve.4.2: Error resolving component 'xsd:date'.
It was detected that 'xsd:date' is in namespace
'http://www.w3.org/2001/XMLSchema-datatypes', but components
from this namespace are not referenceable from schema document
'file:/C:/herong/holiday_error.xsd'. If this is the incorrect
namespace, perhaps the prefix of 'xsd:date' needs to be changed.
If this is the correct namespace, then an appropriate 'import'
tag should be added to 'file:/C:/herong/holiday_error.xsd'.
Failed with 3 errors.