YouTip LogoYouTip

Schema Dtypes String

# XSD String Data Types * * * The string data type is used for values that can contain strings. * * * ## String Data Type The string data type can contain characters, line feeds, carriage returns, and tabs. Here is an example of a string declaration in a schema: The element in the document should look like this: John Smith Or like this: John Smith **Note:** If you use the string data type, the XML processor will not change the value. * * * ## NormalizedString Data Type The normalizedString data type is derived from the string data type. The normalizedString data type can also contain characters, but the XML processor will remove line feeds, carriage returns, and tabs. Here is an example of a normalizedString data type in a schema: The element in the document should look like this: John Smith Or like this: John Smith **Note:** In the example above, the XML processor will replace all tabs with spaces. * * * ## Token Data Type The token data type is also derived from the string data type. The token data type can also contain characters, but the XML processor will remove line feeds, carriage returns, tabs, leading and trailing spaces, and (multiple) consecutive spaces. Here is an example of a token declaration in a schema: The element in the document should look like this: John Smith Or like this: John Smith **Note:** In the example above, the XML parser will remove the tab. * * * ## String Data Types Please note that all the following data types are derived from the string data type (except the string data type itself)! | Name | Description | | --- | --- | | ENTITIES | | | ENTITY | | | ID | A string that submits an ID attribute in XML (used only with schema attributes) | | IDREF | A string that submits an IDREF attribute in XML (used only with schema attributes) | | IDREFS language | A string containing a valid language ID | | Name | A string containing a valid XML name | | NCName | | | NMTOKEN | A string that submits an NMTOKEN attribute in XML (used only with schema attributes) | | NMTOKENS | | | normalizedString | A string that does not contain line feeds, carriage returns, or tabs | | QName | | | string | A string | | token | A string that does not contain line feeds, carriage returns, or tabs, leading or trailing spaces, or multiple consecutive spaces | * * * ## Restrictions on String Data Types Restrictions that can be used with the string data type: * enumeration * length * maxLength * minLength * pattern (Cannot be used with NMTOKENS, IDREFS, and ENTITIES) * whiteSpace
← Schema Dtypes DateSchema Example β†’