XSD Data TypesLesson 98Free preview
XSD String
This lesson is part of XML · All levels
Summary
XML Schema provides several types of text: xs:string accepts any character, xs:normalizedString replaces tabs and new lines with spaces, xs:token to cut out excess spaces, and xs:language for language code. The type selection influences how the parser treats specific spaces and characters. To further limit formatting, combine it with a faceted restriction such as pattern or maxLength.
Key points
- xs:string maintains all characters including spaces exactly as written
- xs:normalizedString converts TAB, CR, and LF into spaces
- xs:to cut the edge space and pin the double space
- xs:language receives values such as "en" or "id-ID"
- Facet length, minLength, maxLength, and pattern limit the shape of the value
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.