Errors in Annotated XDR Schemas
The XDR schema errors are classified in the following categories:
- XDR schema errors detected during the schema processing
- XDR schema errors detected by XPath
XDR Schema Errors Detected During the Processing of the Annotated XDR Schema.
"Schema: unable to load schema %1. An error occurred (%2)"
The annotated schema could not be loaded. Check that the schema file indicated is in the expected location and you have permission to access it. Verify that the schema is well-formed and valid XML.
"Schema: duplicate element definition (%1)"
"Schema: duplicate attribute definition (%1) on %2"
"Schema: duplicate attribute reference (%1) on %2"
"Schema: duplicate top-level attribute definition (%1)"
An attribute or element definition or reference appears more than once in the schema. Remove the offending duplicates.
"Schema: missing attribute definition (%1) on %2"
"Schema: missing element definition (%1)"
A required attribute or element is missing from the schema. Add the missing information.
"Schema: missing %1 on %2"
The annotation (%1) is missing from the schema. Add the missing annotation.
(For example, <sql:relationship key-relation="T" foreign-relation="T" /> is missing key and foreign-key. )
"Schema: value expected for %1 on %2"
The value of the annotation (%1) is empty. (E.g., sql:field=""). Add the missing value.
"Schema: invalid value for %1 on %2"
The value of the annotation (%1) is not valid. (For example, sql:key-fields=" "). Correct the value.
"Schema: nested element definition is not allowed"
An ElementType cannot contain an ElementType.
"Schema: content is not allowed in a relationship tag"
The relationship tag can only have attributes (<sql:relationship />).
"Schema: unknown attribute %1 on relationship tag"
The only attributes on relationship are: key, key-relation, foreign-key, and foreign-relation. XML names are case-sensitive.
"Schema: the key/foreign-key pair in a relationship on %1 do not have the same number of columns"
Check the value of the key and foreign-key attributes on the indicated relationship tag.
(For example, <sql:relationship key-relation="T" foreign-relation="T" key="a b" foreign-key="x" /> has two columns in key but only one column in foreign-key.) Column names that have embedded spaces must be wrapped with square brackets ([]). Refer to the topic in SQL Server Books Online that explains the relationship.
"Schema: '0' or '1' expected for %1 on %2"
The attribute indicated is Boolean-valued. Use "0" for false, "1" for true.
"Schema: unknown XDR type %1 on %2"
The indicated type is not a valid XDR type. See the XML Data Reduced specification for the complete list of available types.
"Schema: unknown SQL type %1 on %2"
The indicated data type is not a valid SQL Server data type. SQL Server data type is used to distinguish among the large object binary types, and so must be one of: binary, image, ntext, or text
"Schema: invalid name/type, string value expected"
The value of the name or type attribute is invalid.
"Schema: invalid schema URL (%1)"
The URL is not valid.
"Schema: unknown element %1"
The only recognized Schema elements are: group, attribute, element, AttributeType, or ElementType.
"Schema: content other than relationship is not allowed in an element/attribute/AttributeType"
These tags can have attributes or a relationship annotation, but no other content.
"Schema: cannot infer default mapping for %1. Neither it nor any of its ancestors defines a relation"
Refer to the doc sections on relation and default mappings. The relation mapping for an element or attribute could not be determined.
"Schema: reference to %1 not allowed. Schema element/attribute is only allowed inside an ElementType"
The element and attribute tags can be used only inside of an ElementType.
"Schema: the element/attribute name %1 is invalid"
The name is not a valid XML element or attribute name.
"Schema: 'type' attribute expected on element/attribute"
"Schema: 'name' attribute expected on ElementType/AttributeType"
A schema item is missing a type or name attribute. (For example, <ElementType type="Oops" /> will cause this error; the user should have used name, not type. Similarly for <element name="Oops" /> )
"Schema: invalid 'type' on element/attribute"
"Schema: invalid 'name' on ElementType/AttributeType"
The name is not a valid XML element/attribute name.
"Schema: mixed content is not allowed on element %1. Property elements cannot have subelements"
Mixed content on property elements is not supported. Refer to the topic in SQL Server Books Online that defines property elements. [A property element is one that maps to a column in SQL Server. The explicit mapping is given using the field annotation, or the default (implicit) mapping will occur with the content="textOnly" annotation (in which case the column name is the element name).]
"Schema: unresolved namespace prefix (%1)"
The namespace prefix was used but never defined (using xmlns:prefix="uri") in the current context.
"Schema: relationship expected on '%1' when specifying a limit field"
The limit-field annotation is used to qualify a join. It cannot be used except on an attribute or element with a relationship.
"Schema: %1 cannot be used on is-constant element (%2)"
Refer to the topic in SQL Server Books Online that explains the is-constant annotation. Is-constant elements cannot have fields or a relation.
"Schema: relationship expected on %1"
The element or attribute requires a relationship.
"Schema: unexpected relationship on %1"
The element or attribute cannot have a relationship.
"Schema: invalid relationship on %1"
Refer to the topic in SQL Server Books Online that defines the relationship annotation. Relationships can be invalid for any number of reasons. Common reasons include:
- The first key-relation must be the mapped ancestor's table
- The last foreign-relation must be the current node's table
- The table and column names are always case-sensitive
"Schema: map-field is not allowed on %1. This annotation may be used only on attributes and property elements"
The map-field annotation can be used only on nodes that map to columns in SQL Server. These are elements or attributes annotated with field, or elements with textOnly content.
"Schema: a relationship from the same table to itself (self-join) is not supported on attribute %1"
The relationship is not supported in SQL Server 2000. Consider using is-constant or different relations.
"Schema: a base path is required to resolve external schema reference"
The external schema was referenced without a base path.
"Schema: the attribute %1 on an element is not supported"
"Schema: the attribute %1 on an attribute is not supported"
"Schema: the attribute %1 on an ElementType is not supported"
"Schema: the attribute %1 on an AttributeType is not supported"
An unrecognized attribute was used. Refer to the XML Data Reduced specification for the use of element, attribute, ElementType, and AttributeType.
XDR Schema Errors Detected by XPath
"Schema: the url-encode annotation requires one or more keys (specified in join relationships or the key-field annotation) in an ancestor or self"
The url-encode annotation causes a direct object query to be generated. Direct object queries must select a single column from a single row, so key information is required to select a single row from the table. Keys are described by key-fields and relationships. The url-encoded node or one of its ancestors has no keys.
"Schema: a join relationship is required between %1 and %2"
When an element and its child map to different tables, a relationship is required. Refer to the topic in SQL Server Books Online that explains the use of the relationship annotation.
"Schema: the join relationship between %1 and %2 is invalid"
Refer to the topic in SQL Server Books Online that explains the use of the relationship annotation.
"Schema: the annotations url-encode and use-cdata are mutually exclusive and may not be used with any of the types id/idref/idrefs/nmtoken/nmtokens"
Not all annotations can be used with each other. Remove one of the mutually exclusive annotations.
"Schema: the map-field annotation is not allowed on the root element (%1)"
The top-most element must be mapped, or else is-constant.
"Schema: a relation is expected on the element %1"
Refer to the topic in SQL Server Books Online that explains relation and default mappings. The relation mapping for the element could not be determined.
"Schema: recursive element containment is not supported"
Recursion is not supported in SQL Server 2000.
"Schema: the is-constant element %1 cannot have attributes"
Attributes are not allowed on is-constant elements. Attributes can be used only on elements with relation.