Tuesday, January 06, 2004

The XML Schema Companion - WebReference.com -:
"Although the XML Schema language has a large number of built-in data types that can be used, restricted, and extended, some requirements demand much finer con­trol over the exact structure of a value. For example, a simple code might need to consist of three lowercase letters:"

abc

ABC

abcd

Similarly, when an element or attribute contains an ISBN (International Standard Book Number), it should be possible to apply constraints that reflect the nature of ISBN codes. All ISBN codes are composed of three identifiers (location, pub­lisher, and book) and a check digit, separated by hyphens (or spaces). Valid values would include ‘0-201-41999-8’ and ‘963-9131-21-0’. The schema processor should detect any error in an ISBN attribute:





Some programming languages, such as Perl, include a regular expression lan­guage, which defines a pattern against which a series of characters can be com­pared. Typically, this feature is used to search for fragments of a text document, but the XML Schema language has co-opted it for sophisticated validation of ele­ment content and attribute values.

http://www.webreference.com/programming/awxml1/index.html

No comments: